halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php error_reporting (0); include "dbc.php"; page_protect(); ?> <?php include'header.php';?> <div class="main-bar"> <h3><i class="fa fa-archive"></i> Product Vs Orders Quantity Report</h3> </div> <!-- /.main-bar --> </header> <!-- /.head --> </div> <!-- /#top --> <?php include'admin_admin.php';?> <!-- /#left --> <div id="content"> <div class="outer"> <div class="inner bg-light lter"> <style> .form-control.col-lg-6 { width: 50% !important; } </style> <div class="row"> <div class="col-lg-12"> <div class="box"> <header class="dark"> <div class="icons"> <i class="fa fa-check"></i> </div> <h5>Order Date</h5> </header> <div id="collapse2" class="body"> <script type="text/javascript"> function order_report_fn() { window.open("productorderreport.php?fromto="+$('#reservation').val(),"myNewWinsr","width=1030,height=800,toolbar=0,menubar=no,status=no,resizable=yes,location=no,directories=no,scrollbars=yes"); } </script> <form id="order_date" class="form-horizontal" method="get" action=""> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label col-lg-4" for="reservation">From - To</label> <div class="col-lg-8"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> <input type="text" name="reservation" id="datepicker reservation" class="form-control"> </div> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <div class="col-md-12"> <input name="submit" type="submit" value="View" class="btn btn-success"> <input name="submit" type="button" value="Print" onclick='order_report_fn();' class="btn btn-success"> <a href="order_report.php" class="btn btn-success">Clear</a> </div> </div> </div> <div class="col-md-3"> </div> </div> </form> </div> </div> <div class="box"> <header class="dark"> <div class="icons"> <i class="fa fa-check"></i> </div> <?php $fromto = $_GET['reservation']; if($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); $sel_order = mysqli_query($link,"select * from product_tbl"); } ?> <h5>Total Ordered Product And Quantity For <?php echo $fromdate; ?> to <?php echo $todate; ?></h5> </header> <div id="collapse4" class="body"> <table id="datatable-responsive" 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>CP Total</th> <th>Selling Price</th> <th>SP Total</th> </tr> </thead> <tbody> <?php $sno=1; $line_total[]=0; while($rw_order = mysqli_fetch_object($sel_order)){ $pid = $rw_order->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"; //echo "select sum(quantity) as qty from shopping_tbl where product_id='$pid' and item_status !='Cancelled' and order_status='Complete' and `order_date` BETWEEN '$fromdatesql' AND '$todatesql' order by id desc"; $sel_rw = mysqli_query($link,"select sum(quantity) as qty from shopping_tbl where product_id='$pid' and item_status !='Cancelled' and order_status='Complete' 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> <td><?php echo $sp_price = $rw_order->selling_price; ?></td> <td><?php echo $sp_line_total[] = $quantity * $sp_price; ?></td> </tr> <?php $sno++; } } ?> </tbody> </table> <div class="col-lg-12 col-md-12" style="padding:10px;"> <center><h4>Cost Price Total: <?php $lt = array_sum($line_total); echo $lt; ?></h4><h4>Selling Price Total: <?php $splt = array_sum($sp_line_total); echo $splt; ?></h4><h4>Profit: <?php $profit = $splt-$lt; echo $profit; ?></h4></center> </div> </div> </div><!--/span--> </div><!--/row--> </div><!--/.fluid-container--> <!-- end: Content --> </div><!--/#content.span10--> </div><!--/fluid-row--> <div class="modal hide fade" id="myModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h3>Settings</h3> </div> <div class="modal-body"> <p>Here settings can be configured...</p> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#" class="btn btn-primary">Save changes</a> </div> </div> </div> </div> </div><!-- /.col-lg-12 --> </div><!-- /.row --> <!-- /.row --> <!-- /.row --> </div><!-- /.inner --> </div><!-- /.outer --> </div><!-- /#content --> <div id="right" class="bg-light lter"> <div class="alert alert-danger"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Warning!</strong> Best check yo self, you're not looking too good. </div> <!-- .well well-small --> <div class="well well-small dark"> <ul class="list-unstyled"> <li>Visitor <span class="inlinesparkline pull-right">1,4,4,7,5,9,10</span> </li> <li>Online Visitor <span class="dynamicsparkline pull-right">Loading..</span> </li> <li>Popularity <span class="dynamicbar pull-right">Loading..</span> </li> <li>New Users <span class="inlinebar pull-right">1,3,4,5,3,5</span> </li> </ul> </div><!-- /.well well-small --> <!-- .well well-small --> <div class="well well-small dark"> <button class="btn btn-block">Default</button> <button class="btn btn-primary btn-block">Primary</button> <button class="btn btn-info btn-block">Info</button> <button class="btn btn-success btn-block">Success</button> <button class="btn btn-danger btn-block">Danger</button> <button class="btn btn-warning btn-block">Warning</button> <button class="btn btn-inverse btn-block">Inverse</button> <button class="btn btn-metis-1 btn-block">btn-metis-1</button> <button class="btn btn-metis-2 btn-block">btn-metis-2</button> <button class="btn btn-metis-3 btn-block">btn-metis-3</button> <button class="btn btn-metis-4 btn-block">btn-metis-4</button> <button class="btn btn-metis-5 btn-block">btn-metis-5</button> <button class="btn btn-metis-6 btn-block">btn-metis-6</button> </div><!-- /.well well-small --> <!-- .well well-small --> <div class="well well-small dark"> <span>Default</span> <span class="pull-right"><small>20%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-info" style="width: 20%"></div> </div> <span>Success</span> <span class="pull-right"><small>40%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-success" style="width: 40%"></div> </div> <span>warning</span> <span class="pull-right"><small>60%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-warning" style="width: 60%"></div> </div> <span>Danger</span> <span class="pull-right"><small>80%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-danger" style="width: 80%"></div> </div> </div> </div><!-- /#right --> </div><!-- /#wrap --> <?php include'footer.php';?>