halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php if(isset($_GET['fromto'])&& $_GET['fromto']!='') { include_once "dbc.php"; error_reporting (0); $fromto = $_GET['fromto']; $explod = explode("-",$fromto); $fromdate=$explod[0]; $sqldate = strtotime($fromdate); $fromdatesql = date("Y-m-d",$sqldate); $todate=$explod[1]; $sqldate1 = strtotime($todate); $todatesql = date("Y-m-d",$sqldate1); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>FROM <?php echo $fromdate; ?> TO <?php echo $todate; ?> TOTAL PRODUCT ORDER REPORT</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <style type="text/css" media="print"> .hide { display: none } </style> <script type="text/javascript"> function printpage() { document.getElementById('printButton').style.visibility="hidden"; window.print(); document.getElementById('printButton').style.visibility="visible"; } </script> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/main.min.css"> <body> <h3 align="center"><strong>Total Product Vs Order Report</strong></h3> <h5 align="right"><strong>From</strong> <?php echo $fromdate; ?> <strong>To</strong> <?php echo $todate; ?></h5> <input name="print" type="button" value="Print" id="printButton" onClick="printpage()" class="btn btn-primary"> <div class="box"> <?php $sel_order = mysqli_query($link,"select * from product_tbl"); ?> <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped"> <thead> <tr> <th>S.NO</th> <th>Product Details</th> <th>Quantity</th> <th>Cost Price</th> <th>Line Total</th> </tr> </thead> <tbody> <?php $sno=1; $line_total[]=0; while($rw_order = mysqli_fetch_object($sel_order)){ $pid = $rw_order->product_id; ?> <?php //echo "select count(product_id) as qty from shopping_tbl where product_id='$pid' and `order_date` BETWEEN '$fromdatesql' AND '$todatesql' order by id desc"; $sel_rw = mysqli_query($link,"select count(product_id) as qty from shopping_tbl where product_id='$pid' and `order_date` BETWEEN '$fromdatesql' AND '$todatesql' order by id desc"); $row = mysqli_fetch_object($sel_rw); $quantity = $row->qty; if($quantity > 0){ ?> <tr> <td><?php echo $sno;?></td> <td> <?php echo $rw_order->product_name; ?> - <?php echo $rw_order->product_name_en; ?> (<?php echo $pid; ?>) - <?php echo $rw_order->size; ?> </td> <td> <?php echo $quantity; ?> </td> <td><?php echo $price = $rw_order->cost_price; ?></td> <td><?php echo $line_total[] = $quantity * $price; ?></td> </tr> <?php $sno++; } } ?> </tbody> </table> <div class="col-lg-12 col-md-12" style="padding:10px;"> <center><h4>Grand Total: <?php echo array_sum($line_total); ?></h4></center> </div> </div> </body> </html> <?php } ?>