ok
Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/vijay-gases/modal/ |
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/vijay-gases/modal/sales-view.php |
<?php include "../config/config.php"; $ids = $_GET['id']; $statement = $pdo->prepare("SELECT e.*,(select customer_name from tbl_customer WHERE tbl_customer.id=e.customer_id) as customer_name,(select name from tbl_location WHERE tbl_location.id=e.location_id) as location_name FROM tbl_sell e where e.id=".$ids); $statement->execute(); $datas = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); if($totalData==1){ ?> <style> /*.modal-open .modal { overflow-x: hidden; overflow-y: hidden; }*/ </style> <div class="modal-dialog modal-lg" role="document" id="add_modal" style="overflow-x: hidden; overflow-y: hidden;"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title mt-0" id="myLargeModalLabel"><b>Sale Details</b></h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top: -25px;"><i class="fa fa-times"></i></button> </div> <div id="content-div"> <div class="modal-body" style="padding: 20px 40px 20px 40px;"> <div class="row"> <div class="col-md-6"> <div class="row"> <div class="col-md-4"> <b>Sell Date</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=date('d-m-Y', strtotime($datas[0]['sell_date']))?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Total Empty Cylinder</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['total_refill_item']?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Total Sales Amount</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['total_amount']?></div> </div> </div> <div class="col-md-6"> <div class="row"> <div class="col-md-4"> <b>Customer Name</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['customer_name']?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Total Sales Cylinder</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['total_new_item']?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Company Name</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['location_name']?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Paid Amount</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['paid_amount']?></div> </div> </div> </div><br> <?php } ?> <div class="row"> <div class="col-md-12"> <center><b style="font-size: 19px;font-weight: bolder;font-family: emoji;">Sales Cylinder Details</b></center> <table calss="sale_view_table" style="width:100%;"> <tr> <th class="sale_view_head_data">HSN / SAN no</th> <th class="sale_view_head_data">Cylinder No</th> <th class="sale_view_head_data">Product Name</th> </tr> <?php $statement1 = $pdo->prepare("SELECT h.*,(select gas_name from tbl_gas WHERE tbl_gas.id=tbl_product.product_name) as sell_product_name,tbl_product.product_name,tbl_product.sku,tbl_product.cylinder_no FROM `tbl_sell_items` h LEFT JOIN tbl_product ON h.product_id=tbl_product.id LEFT JOIN tbl_sell ON tbl_sell.id=h.sell_id WHERE h.type=2 and h.sell_id=".$ids); $statement1->execute(); $sell_items_data = $statement1->fetchAll(PDO::FETCH_ASSOC); $totalData_sell1 = $statement1->rowCount(); if($totalData_sell1!=0){ foreach($sell_items_data as $sell_data){ ?> <tr> <td><?=$sell_data['sku']?></td> <td><?=$sell_data['cylinder_no']?></td> <td><?=$sell_data['sell_product_name']?></td> </tr> <?php }}else{ ?> <tr> <td colspan="3" style="text-align:center;">No Data Available</td> </tr> <?php } ?> </table> </div> </div><br><br> <div class="row"> <div class="col-md-12"> <center><b style="font-size: 19px;font-weight: bolder;font-family: emoji;">Collected Empty Cylinder Details</b></center> <table calss="sale_view_table" style="width:100%;"> <tr> <th class="sale_view_head_data">HSN / SAN no</th> <th class="sale_view_head_data">Cylinder No</th> <th class="sale_view_head_data">Product Name</th> <th class="sale_view_head_data">Sell Price</th> </tr> <?php $statement2 = $pdo->prepare("SELECT h.*,(select gas_name from tbl_gas WHERE tbl_product.product_name) as sell_product_name,tbl_product.product_name,tbl_product.sku,tbl_product.cylinder_no FROM `tbl_sell_items` h LEFT JOIN tbl_product ON h.product_id=tbl_product.id LEFT JOIN tbl_sell ON tbl_sell.id=h.sell_id WHERE h.type=1 and h.sell_id=".$ids); $statement2->execute(); $sell_items_data1 = $statement2->fetchAll(PDO::FETCH_ASSOC); $totalData_sell2 = $statement2->rowCount(); if($totalData_sell2!=0){ foreach($sell_items_data1 as $sell_data1){ ?> <tr> <td><?=$sell_data1['sku']?></td> <td><?=$sell_data1['cylinder_no']?></td> <td><?=$sell_data1['sell_product_name']?></td> <td><?=$sell_data1['sell_price']?></td> </tr> <?php } } else {?> <tr> <td colspan="4"><center>No Data Available</center></td> </tr> <?php } ?> </table> </div> </div> </div> </div> </div> </div> <style> @media screen and (max-width: 600px) { .sale_view_table { margin-left: -14% !important; } } .sale_view_table { border-collapse: collapse; width: 100%; padding-right:4%; } tr:nth-child(even){background-color: #f2f2f2} .sale_view_head_data{ background-color: #b34923; color: white; text-align: center; padding-top: 5px; padding-bottom: 5px; } td{ padding:10px; } tr:hover{ background-color:#cccc69; } </style> <?php $pdo = null; ?>