<?
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;
}

?>
<link type="text/css" href="includes/style1.css" rel="stylesheet" />
<link type="text/css" href="css/form.css" rel="stylesheet" />
<style>
  //tr1{background-color:white}
  th{background-color:steelblue;color:white}
</style>
<body bgcolor="#0033FF">


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

<h3><font color='white'>STOCK VERIFICATION REPORT CONSOLIDATED</font></H3>
<form action='calcstockverabs.php' method='post' name='f1'>
<table cellspacing=1 cellpadding=1 bgcolor='steelblue'>
<tr><td bgcolor='white' align=center>
<table class=noprint>
    <?
$yeardat=explode('-',$fin_year);
$startingyr=$yeardat[0];
 $mgrp=mysqli_query($db,"select distinct(stockverifydt) from stockverification order by stockverifydt desc");

?>
<tr><td>Date from </td><td>
  <select name='verdt' >
<option>select date</option>
<?while($grrow=mysqli_fetch_array($mgrp))
{?>
<option><?print $grrow[0]?></option>
<?}?>
</select>


</td></tr>
<tr><td colspan=2 align=center bgcolor='lightsteelblue'><input type=submit value='Show' name='show'><input type=button value='Print To Excel' onClick=excelfn()><input type=button value='Print' onClick=printfn()><input type=button value='Laser' onClick=dirprntfn()><input type=button value='PDF' onClick=prnpdf()></td></tr>
</table>
</td></tr>
</table>
</form>
<script>
 function excelfn()
 {  
   var dfrom=document.f1.verdt.value; 
   //var url="stkexcel.php?dfrom="+dfrom+"&& dto="+dto+"gname="+gnme;
 // alert(url);
   window.open("stkverabs_exl.php?dfrom="+dfrom,true);
 }
 function printfn()
 {
          var verdt=document.f1.verdt.value;
         document.location="stock_ver_abs_prn.php?verdt="+verdt,true;
 }
  function dirprntfn()
 {
   var dfrom=document.f1.verdt.value;
   window.open("stockverabs_print.php?dfrom="+dfrom,true);
 }
 function prnpdf()
 {
   var dfrom=document.f1.verdt.value;
   window.open("paypdf/stockverabs_pdf.php?dfrom="+dfrom,true);
 }
</script>