<?
include_once('includes/top.php');
include_once('opendb.php');
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
//$br=$_SESSION['branch'];
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='inde.php' </script>";
  return;
}

$yeardat=explode('-',$fin_year);
$startingyr=$yeardat[0];
?>
<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" />
<style>

  th{background-color:steelblue;color:white}
</style>
<body bgcolor="#0033FF">
<script type="text/javascript">
$(function() {
$( "#ref_date" ).datepicker("destroy");
     var fyr=document.getElementById('f_yr').value;
     var splv=fyr.explode("-");
     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);
     $("#ref_date").datepicker({ dateFormat: 'dd-mm-yy', minDate: stfnyr, maxDate: efnyr});

$( "#ref_date1" ).datepicker("destroy");
     var fyr=document.getElementById('f_yr').value;
     var splv=fyr.explode("-");
     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);
     $("#ref_date1").datepicker({ dateFormat: 'dd-mm-yy', minDate: stfnyr, maxDate: efnyr});
        });
</script>

<?php //include('includes/top.php'); ?>
<font style="font-family: 'Trebuchet MS',Verdana,Helvetica,sans-serif; font-size:15px; color:black;">  &nbsp;&nbsp;REPORTS >> CASH RECEIPT REPORT</font>
<center>

<h3><font color='white'>CASH RECEIPT REPORT</font></H3>
<form action='' method='post' name="f1">
<table cellspacing=1 cellpadding=1 bgcolor='steelblue'>
<tr><td bgcolor='white' align=center>
<table class=noprint>

<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 '01-04-'.$startingyr;?>" name="fromdt" readonly></td>
<tr><td> To </td>
<td><input type="text" id="ref_date1" value="<?echo date('d-m-Y');?>" name="todt" readonly></td>
</tr>
<? $mgrp=mysqli_query($db,"select gname from groupmaster order by gname");
?>
<tr><td colspan=2 align=center bgcolor='lightsteelblue'>
<input type=button value='Show' onClick=frma()></td></tr>
</table>
</td></tr>
</table>
</form>

<script type="text/javascript">
    function frma()
        {
            var dfrom=document.f1.fromdt.value;
            var dto=document.f1.todt.value;
            window.open("cshrecrept.php?fromdt="+dfrom+"&&todt="+dto,true);

        }
function printa()
		 {
            var dfrom=document.f1.fromdt.value;
            var dto=document.f1.todt.value;
            document.location="dbtrscollectionprn.php?dfrom="+dfrom+"&&dto="+dto,true;

        }
</script>