<link href="css/form.css" type="text/css" rel="stylesheet" media="screen"  />
<html>
<body >
<?
session_start();
include("opendb.php");
include("test.php");
if(strlen($user)<=0)
{
  	print "<script> alert('Invalid User'); document.location='inde.php' </script>";
  	return;
}
?>
<title>Sale Summary Report</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<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" />
<script type="text/javascript">
$(function() {
if ($.browser.msie && $.browser.version.substr(0,1)<7)
{
	$('li').has('ul').mouseover(function(){
	$(this).children('ul').show();
	}).mouseout(function(){
	$(this).children('ul').hide();
	})
        }
});        
</script>
<script>
function valid()
{
}
</script>
<style>
#txt{
font-family: Arial, Helvetica;
background-color: #F2F2F2;
}
</style>
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<script type="text/javascript" src="jsDatePick.min.1.3.js"></script>
<script type="text/javascript">
window.onload = function(){
new JsDatePick({
	useMode:2,
	target:"inputField",
	dateFormat:"%Y-%m-%d"
});
new JsDatePick({
	useMode:2,
	target:"inputField1",
	dateFormat:"%Y-%m-%d"
});
            
};
</script>

<SCRIPT LANGUAGE="JavaScript" SRC="util/PopupWindow.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="util/AnchorPosition.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="util/CalendarPopup.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="util/date.js"></SCRIPT>
<script>

var cal1 = new CalendarPopup();
cal1.showYearNavigation();

var cal2 = new CalendarPopup();
cal2.showYearNavigation();

</script>
<style>
th{
    // background-color: grey;  
    font-weight: bold;  
    color: white; 
    border:1px solid #D7D7D1;
    border-collapse:collapse;
background: rgb(181,189,200); /* Old browsers */
background: -moz-linear-gradient(top, rgba(181,189,200,1) 0%, rgba(130,140,149,1) 36%, rgba(40,52,59,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(181,189,200,1)), color-stop(36%,rgba(130,140,149,1)), color-stop(100%,rgba(40,52,59,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b5bdc8', endColorstr='#28343b',GradientType=0 ); /* IE6-9 */
}
.ro_settled td
{
background: #6bba70; /* Old browsers */
background: -moz-linear-gradient(top, #6bba70 0%, #6bba70 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6bba70), color-stop(100%,#6bba70)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #6bba70 0%,#6bba70 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #6bba70 0%,#6bba70 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #6bba70 0%,#6bba70 100%); /* IE10+ */
background: linear-gradient(to bottom, #6bba70 0%,#6bba70 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6bba70', endColorstr='#6bba70',GradientType=0 ); /* IE6-9 */
color:white;
}
.ro_settl td
{
background: #6bba70; /* Old browsers */
background: -moz-linear-gradient(top, #6bba70 0%, #6bba70 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6bba70), color-stop(100%,#6bba70)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #6bba70 0%,#6bba70 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #6bba70 0%,#6bba70 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #6bba70 0%,#6bba70 100%); /* IE10+ */
background: linear-gradient(to bottom, #6bba70 0%,#6bba70 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6bba70', endColorstr='#6bba70',GradientType=0 ); /* IE6-9 */
color:red;
}
</style>
<body background="back_ground.jpg">
<?php //include('logo2.php'); ?>
<?php include('includes/top.php'); ?>
<form action='<?print $PHP_SELF?>' method='post' >
<br>
<table class="container"><tr><td>
<br>
<center>
<table class="form" style="width:auto;" align='center' >
<tr><th style="background:grey;">SALES SUMMARY REPORT</th></tr>
<tr><td>Show Report From <input type="text" id="inputField" value="<?echo date('Y-m-d');?>" name="fromdt" readonly  >
 To <input type="text" id="inputField1" name="todt" value="<?echo date('Y-m-d');?>" readonly > </td></tr>
<tr><td align='center'>Report by:<select name='type' ><option>All</option>
<input type='submit' name='show' value='Show' ></td></tr></form>
</table>
<br><br>
<?
if($show)
{
	$qry=mysqli_query($db,"select invno,befrtx,strbtnml,strbtspl,redct,befrtx,taxamt,nettot from prod_invoice where invdate between '$fromdt' and '$todt' and brcode='$brcode' order by invno");
       print "<table class='report' border='1'>";
	print "<tr><th>Sl.no</th><th>Bill No</th><th>Amount</th><th>State Rebate Normal</th><th>State Rebate Spl</th><th>Reduction</th><th>Net Cash</th><th>Tax</th><th>Total Amount</th>";
       $colspan=6;
	$i=1;
  	while($row=mysqli_fetch_array($qry))
  	{  
		print "<tr><td>".$i."</td><td>$row[0]</td><td align='right'>$row[1]</td><td align='right'>$row[2]</td><td align='right'>$row[3]</td><td align='right'>$row[4]</td><td align='right'>$row[5]</td><td align='right'>$row[6]</td><td align='right'>$row[7]</td></tr>";
		$i++;
	}		
}
print "</table>";
?>