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/purchase-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.supplier) as supplier_name,(select name from tbl_location WHERE tbl_location.id=e.location_id) as location_name FROM tbl_purchase 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>Purchase 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-10"></div> <div class="col-md-2"> <?php if($datas[0]['paid_amount']==0){ ?> <span class="btn btn-success">All Payment Pending</span> <?php }elseif($datas[0]['paid_amount']==$datas[0]['total_amount']){ ?> <span class="btn btn-success">Fully Paid</span> <?php }elseif($datas[0]['paid_amount']>$datas[0]['total_amount']){ ?> <span class="btn btn-success">Partialy Paid</span> <?php }elseif($datas[0]['paid_amount']<$datas[0]['total_amount']){ ?> <span class="btn btn-success">Advanced Amount</span> <?php } ?> </div> </div> <div class="row"> <div class="col-md-6"> <div class="row"> <div class="col-md-4"> <b>Purchase Date</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=date('d-m-Y', strtotime($datas[0]['purchase_date']))?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Total Purchase Items</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 Purchase Amount</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['total_amount']?></div> </div><br> <div class="row"> <div class="col-md-4"> <b>Balance Amount</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['total_amount']-$datas[0]['paid_amount']?></div> </div> </div> <div class="col-md-6"> <div class="row"> <div class="col-md-4"> <b>Supplier Name</b> </div> <div class="col-md-1"><b>:</b></div> <div class="col-md-7"><?=$datas[0]['supplier_name']?></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"> <table id="table_purchase_view"> <tr> <th class="tbl_head_sty">Product Name</th> <th class="tbl_head_sty">Cylinder Number</th> <th class="tbl_head_sty">Purchase Price</th> <th class="tbl_head_sty">Sell Price</th> </tr> <?php $statement1 = $pdo->prepare("SELECT h.*,tbl_product.product_name,tbl_product.cylinder_no FROM `tbl_purchase_item`h LEFT JOIN tbl_product ON tbl_product.id=h.product_id WHERE h.purchase_id=".$ids); $statement1->execute(); $purchase_item_data = $statement1->fetchAll(PDO::FETCH_ASSOC); foreach($purchase_item_data as $purchase_data){ ?> <tr> <td><?=$purchase_data['product_name']?></td> <td><?=$purchase_data['cylinder_no']?></td> <td><?=$purchase_data['purchase_price']?></td> <td><?=$purchase_data['sell_price']?></td> </tr> <?php } ?> </table> </div> </div> </div> </div> </div> </div> <style> @media screen and (max-width: 600px) { #table_purchase_view { margin-left: -14% !important; } } #table_purchase_view { border-collapse: collapse; width: 100%; padding-right:4%; } tr:nth-child(even){background-color: #f2f2f2} .tbl_head_sty{ 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; ?>