<?
session_start();
$fin_year = 2023;
?>
<style>
 td{font-family:verdana;font-size:14;color:black;}
 th{font-family:verdana;font-size:14;color:white;background-color:green}
 select
  {border-style:ridge;
   border-color:black;
   height:25px;
   border-size=1;
   font-family:verdana;
   color:black;
  }
 input
  {border-style:ridge;
   border-color:#22437f;
   background-color:white;
   height:25px;
//   font-weight:bold;
   border-size=1;
   font-family:sans-serif;
   color:BLACK;
  }
</style>
<title>AMPL</title>
<!--<script src="../rightclick_deactive.js"></script>-->
<script type="text/javascript" src="../scripts/jquery-latest.js"></script>
<link type="text/css" href="../includes/style1.css" rel="stylesheet" />
<link type="text/css" href="../css/form.css" rel="stylesheet" />
<link rel="stylesheet" href="../cal/jquery-ui.css" />
<script src="../cal/jquery-1.9.1.js"></script>
<script src="../cal/jquery-ui1.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />


<script type="text/javascript">
$(function() {
$( "#ref_date" ).datepicker("destroy");
     var fyr="01-22-2023";
     var splv=fyr.split("-");
     var syr=splv[0];
     var eyr='20'.concat(splv[1]);
     var syr1='01-04-2025';
     var eyr1='31-03-2026';
     var stfnyr=syr1;
     var efnyr=eyr1;
     $("#ref_date").datepicker({ dateFormat: 'dd-mm-yy', minDate: stfnyr, maxDate: efnyr});

$( "#ref_date1" ).datepicker("destroy");
     var fyr="01-23-2023";
     var splv=fyr.split("-");
     var syr=splv[0];
     var eyr='20'.concat(splv[1]);
     /*var syr1='01-04-';
     var eyr1='31-03-';
     var stfnyr=syr1.concat(syr);
     var efnyr=eyr1.concat(eyr);*/
     var syr1='01-04-2025';
     var eyr1='31-03-2026';
     var stfnyr=syr1;
     var efnyr=eyr1;
     $("#ref_date1").datepicker({ dateFormat: 'dd-mm-yy', minDate: stfnyr, maxDate: efnyr});
        });
</script>
<center>
<body onLoad=document.f1.d.focus()>

<table class="container"><tr><td>
<center>
<form name=f1 action="cbook-test.php">
<table border=1 class='form' height="100px" width="200px">
<tr><td colspan=2 bgcolor=green align=center><font color=white size=3><b>Cash Book for the Period</font></td></tr>
<tr><td> From <input type=hidden name='f_yr' id='f_yr' value='<? echo $fin_year ?>'></td>
<td><input type="text" id="ref_date" value="<?echo date('d-m-Y');?>" name="fromdt" readonly></td>
</tr>
<tr><td> To </td>
<td><input type="text" id="ref_date1" value="<?echo date('d-m-Y');?>" name="todt" readonly></td>
</tr>
<!--
<tr><td colspan=2 align=center>
  <input type=submit value="Show"><input type=button value="Excel" onclick=excelfn()><input type=button value="Print" onclick=printfnn()>
<input type=button value="Laser Print" onclick=laserprint()>
  </td>
  </tr>
-->
<tr><td colspan=2 align=center>
  <input type=submit value="Show"><input type=button value="Print" onclick=laserprint()>
  </td>
  </tr>

</table>
</form>
</td></tr></table>
<script>
 function excelfn()
 {
   var dfrom=document.f1.fromdt.value;
   var dto=document.f1.todt.value;
   window.open("cashexcel.php?dfrom="+dfrom+"&&dto="+dto,true);

 }
 function printfnn()
 {
      var dfrom=document.f1.fromdt.value;
      var dto=document.f1.todt.value;
      document.location="cbook-prn.php?dfrom="+dfrom+"&&dto="+dto,true;
 }
 function laserprint()
 {
      var dfrom=document.f1.fromdt.value;
      var dto=document.f1.todt.value;
      window.open("cbook-test_laser.php?dfrom="+dfrom+"&&dto="+dto,true);

 }
</script>