D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
view-packing.php
back
Copy
<?php ob_start(); session_start(); include 'config.php'; $login = $_SESSION['login_email']; if($login == ''){ echo '<script>location.replace("index.php")</script>'; } $id = $_GET['id']; if(isset($_SESSION["source_id"])){ $source_id = $_SESSION['source_id']; } $companyd = mysqli_query($conn,"SELECT * FROM `company_details`"); $companyrow = mysqli_fetch_assoc($companyd); $company_name = $companyrow['company_name']; $company_logo = $companyrow['company_logo']; $GSTIN = $companyrow['GSTIN']; $phone = $companyrow['phone']; $email = $companyrow['email']; $address = $companyrow['address']; $city = $companyrow['city']; $state = $companyrow['state']; $country = $companyrow['country']; $account_name = $companyrow['account_name']; $account_no = $companyrow['account_no']; $bank_name = $companyrow['bank_name']; $ifsc = $companyrow['ifsc']; $shift = $companyrow['shift']; $branch = $companyrow['branch']; $company_color = $companyrow['company_color']; $currency = $companyrow['currency']; $invoice_prifix = $companyrow['invoice_prifix']; $default_invoice = $companyrow['default_invoice']; $signature = $companyrow['signature']; $invoice_note = $companyrow['invoice_note']; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Invoice Management | Invoice</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" /> <meta content="Coderthemes" name="author" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Font Awsome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- App favicon --> <link rel="shortcut icon" href="assets/images/favicon.png"> <!-- Pie Chart Css --> <!--<link href="assets/pie charts/style.css" rel="stylesheet" type="text/css" />--> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/metismenu.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/style.css" rel="stylesheet" type="text/css" /> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/css/select2.min.css'> <script src="assets/js/modernizr.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript" src="script.js"></script> <link href="plugins/sweet-alert2/sweetalert2.min.css" rel="stylesheet" type="text/css"> <link href="plugins/jquery-toastr/jquery.toast.min.css" rel="stylesheet" /> <style> .table td, .table th { padding: .75rem; vertical-align: top; border-top: 0px solid #dee2e6; border-bottom: 1px solid #dee2e6; } </style> </head> <body> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include 'top-header.php'; ?> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include 'left-sidebar.php'; ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="page-title-box"> <h4 class="page-title float-left">View Packing</h4> <ol class="breadcrumb float-right"> <li class="breadcrumb-item"><a href="#">Sales</a></li> <li class="breadcrumb-item ">All Packing</li> <li class="breadcrumb-item active">View Packing</li> </ol> <div class="clearfix"></div> </div> </div> </div> <?php $sql = "SELECT * FROM packing_list a left join generate_invoice b on a.invoice_id = b.invoice_Id where a.id = '$id'"; $result = mysqli_query($conn,$sql); $row = mysqli_fetch_array($result); $bill_display_name = $row['bill_display_name']; $mobile = $row['mobile']; $date = $row['date']; $package_type = $row['package_type']; $invoice_id = $row['invoice_id']; $proforma_id = $row['proforma_id']; $bill_pay_name = $row['bill_pay_name']; $proforma_id = $row['proforma_id']; $Invoice_date = $row['date']; $terms = $row['terms']; $due_date = $row['due_date']; $deliver_address = $row['deliver_address']; $billingAddress = $row['billingAddress']; $client_name = $row['client_name']; $pincode = $row['pincode']; $mobile_no = $row['mobile_no']; $email = $row['email']; $gstin = $row['gstin']; $type = $row['type']; $buyer_reference = $row['buyer_reference']; $delivery_type = $row['delivery_type']; $delivery_terms = $row['delivery_terms']; $mode_of_shipment = $row['mode_of_shipment']; $shipping_date = $row['shipping_date']; $port_of_loading = $row['port_of_loading']; $port_of_delivery = $row['port_of_delivery']; $payment_method = $row['payment_method']; $hs_code = $row['hs_code']; $terms_of_payment = $row['terms_of_payment']; $bank_details = $row['bank_details']; $foreign_charges = $row['foreign_charges']; $foreign_rate = $row['foreign_rate']; $discount_percent = $row['discount_percent']; $discount = $row['discount']; $other_charges = $row['other_charges']; $memo = $row['memo']; $other_price = $row['other_price']; $subtotal_price = $row['subtotal_price']; $foreign_price = $row['foreign_price']; $discount_price = $row['discount_price']; $amount_paid = $row['amount_paid']; ?> <div class="card-box"> <div class="col-md-12"> <div class="row" > <div class="col-md-12 mt-3 mb-3"> <h3 class="text-center" style="color:<?php echo $row['company_color'] ?>;"><b>Packing List</b></h3> </div> </div> <div class="row"> <div class="col-md-8"> <p><b>SHIPPER :</b></p> <h3 class="mb-0"><?php echo $company_name ?></h3> <p class="mb-0"><?php echo $address.','.$city.','.$state.','.$country; ?></p> <p class="mb-0">Contact Person : Betty Qin</p> <p class="mb-0">Contact Number : <?php echo $phone ?></p> <p class="mb-0">Email : <?php echo $email ?></p> </div> <div class="col-md-4 text-right"> <h3 class="mb-0">Invoice No. : <?php echo $invoice_id ?></h3> <p class="mb-0">Invoice Date : <?php echo $Invoice_date ?></p> <p class="mb-0">Proforma No. : <?php echo $proforma_id ?></p> <p class="mb-0">Buyer's Order : <?php echo $buyer_reference ?></p> <p class="mb-0">HS Code : </p> </div> </div> <hr> <?php $contactsql = mysqli_query($conn,"SELECT * FROM `contact` where id='$bill_pay_name' and data_delete ='no'"); $contactrow = mysqli_fetch_assoc($contactsql); $customer_type = $contactrow['customer_type']; $bill_display_name = $contactrow['bill_display_name']; $contact_person_name = $contactrow['contact_person_name']; $contact_person_designation = $contactrow['contact_person_designation']; // billing address $getad_b = mysqli_query($conn,"SELECT * FROM `contact_address` where id='$billingAddress'"); $getadrow_b = mysqli_fetch_assoc($getad_b); $address_get_b = $getadrow_b['address'] .', '. $getadrow_b['city'] .', '. $getadrow_b['state'] .', '. $getadrow_b['country']; // getting address $getad = mysqli_query($conn,"SELECT * FROM `contact_address` where id='$deliver_address'"); $getadrow = mysqli_fetch_assoc($getad); $address_get = $getadrow['address'] .', '. $getadrow['city'] .', '. $getadrow['state'] .', '. $getadrow['country']; $iecno = $getadrow['iecno']; ?> <div class="row"> <div class="col-md-8"> <p><b>CONSIGNEE :</b></p> <h4 class="mb-0"> <?php echo $bill_display_name ?> </h4> <p class="mb-0"> <?php echo $address_get_b ?></p> <p class="mb-0">Zip Code : <?php echo $pincode ?></p> <p class="mb-0">GSTIN : <?php echo $gstin ?></p> <p class="mb-0">IEC No.: <?php echo $iecno ?></p> <p class="mb-0">Contact Person: <?php echo $contact_person_name ?></p> <p class="mb-0">Contact No.: <?php echo $mobile_no ?></p> </div> <div class="col-md-4 text-right"> <h4 class="mb-0">Delivery Terms : <?php echo $delivery_terms ?></h4> <p class="mb-0">Delivery Type : <?php echo $delivery_type ?></p> <p class="mb-0">Payment Terms : <?php echo $terms_of_payment ?></p> <p class="mb-0">Port Of loading : <?php echo $port_of_loading ?></p> <p class="mb-0">Port Of Delivery : <?php echo $port_of_delivery ?></p> <p class="mb-0">Country Of Origin Of goods : China</p> <p class="mb-0">Country Of Final Destination : India</p> </div> </div> <hr> <div class="row"> <div class="col-md-8"> <p><b>SHIP TO :</b></p> <p><?php echo $address_get ?></p> </div> </div> </div> <div class="row mb-4"> </div> <div class="row" > <table class="table table-responsive"> <thead> <tr style="width:100%"> <th>Item Code</th> <th>Item Name</th> <th>Size</th> <th>Color</th> <th>Unit</th> <th>CTN No.</th> <th>Qty</th> <th>G.W (KGS)</th> <th>N.W (KGS)</th> <th>Measurement (c.m.)</th> <th></th> </tr> </thead> <tbody id="itemsadd"> <?php $getitemsql = mysqli_query($conn,"SELECT * FROM packing_item a left join inventory b on a.item = b.id where a.packing_id = '$id'"); $total_carton_no = 0; while($item_row = mysqli_fetch_assoc($getitemsql)){ $net_wt = 0; $item_id_p = $item_row['item_id']; $item_code_p = $item_row['item_code']; $size_p = $item_row['size']; $qty_p = $item_row['qty']; $price_p = $item_row['price']; $row_total = $item_row['row_total']; $item_name = $item_row['name']; $item_color = $item_row['color']; $unit_of_measure = $item_row['unit_of_measure']; $ctn_roll = $item_row['ctn_roll']; $qty_box_pcs = $item_row['qty_box_pcs']; $qty_mult = $item_row['qty_mult']; $gross_wt = $item_row['gross_wt']; $net_wt = $item_row['net_wt']; $measurement = $item_row['measurement']; $measurement_ex = explode('*',$item_row['measurement']); $total_gross_weight += $gross_wt; $total_net_weight += $net_wt; $total_carton_no = $total_carton_no + 1; $total_volume_multi = $qty_mult*array_product($measurement_ex); $total_volume_plus += $total_volume_multi; ?> <tr style="width:100%"> <td style="width:10%"> <?php echo $item_code_p ?></td> <td style="width:10%"> <?php echo $item_name ?></td> <td style="width:10%"> <?php echo $size_p ?></td> <td style="width:10%"> <?php echo $item_color ?></td> <td style="width:10%"> <?php echo $unit_of_measure ?></td> <td style="width:10%"> <?php echo $ctn_roll ?></td> <td style="width:10%"> <?php echo $qty_box_pcs ?></td> <td style="width:10%"> <?php echo $gross_wt ?></td> <td style="width:10%"> <?php echo $net_wt ?></td> <td style="width:10%"> <?php echo $measurement ?></td> </tr> <?php } ?> </tbody> </table> </div> <!-- getting cartoon no. --> <div class="row"> <div class="col-md-4"> <div class="form-group row"> <p class="col-9 mb-0 "><b>Total Gross Weight </b> : </label> <div class="col-3"> <p class="mb-0 "><?php echo $total_gross_weight ?> </p> </div> </div> <div class="form-group row"> <p class="col-9 mb-0 "><b>Total Net Weight </b> : </label> <div class="col-3"> <p class="mb-0 "><?php echo $total_net_weight ?> </p> </div> </div> <div class="form-group row"> <p class="col-9 mb-0 "><b>Total Volume </b> : </label> <div class="col-3"> <p class="mb-0 "><?php echo $total_volume_plus / 1000000 ?></p> </div> </div> <div class="form-group row"> <p class="col-9 mb-0 "><b>Total Cartoon </b> : </label> <div class="col-3"> <p class="mb-0 "> <?php $getting_cart = explode('-',$ctn_roll); if(empty($getting_cart[1])){ echo $ctn_roll ; }else{ echo $getting_cart[1]; } ?> </p> </div> </div> </div> <div class="col-md-8"> </div> <div class="col-md-12"> <a href="edit-packign.php?id=<?php echo $id ?>" class="btn w-md waves-effect waves-light btn-info" data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit"><i class="fa fa-pencil"></i> Edit</a> <button type="button" class="btn w-md waves-effect waves-light btn-danger" value="<?php echo $id ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Delete" id="btnDelete" onclick="deletePacking(this)"><i class="fa fa-trash-o"></i> Delete</button> <a href="print-packing.php?id=<?php echo $id ?>" target="blank" class="btn w-md waves-effect waves-light btn-success" data-toggle="tooltip" data-placement="top" title="" data-original-title="Print"><i class="fa fa-print"></i> Print</a> </div> </div> </div> </div> </div> <!-- container --> </div> <!-- content --> <?php include 'copyrignt.php' ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </div> <!-- END wrapper --> <!-- /.modal --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/popper.min.js"></script><!-- Popper for Bootstrap --> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/metisMenu.min.js"></script> <!--<script src="assets/js/waves.js"></script>--> <script src="assets/js/jquery.slimscroll.js"></script> <!-- Dashboard init --> <!-- <script src="assets/pages/jquery.dashboard.js"></script> --> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> <!-- Chart Js --> <!-- <script src="assets/pie charts/script.js"></script>--> <!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script> --> <!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js'></script> --> <script src="plugins/sweet-alert2/sweetalert2.min.js"></script> <script src="plugins/jquery-toastr/jquery.toast.min.js" type="text/javascript"></script> <script type="text/javascript"> function deletePacking(button){ var itemId = $(button).val(); swal({ title: 'Are you sure?', text: "Do you really want to restore this Item??", type: 'warning', showCancelButton: true, confirmButtonColor: '#4fa7f3', cancelButtonColor: '#d57171', confirmButtonText: "Yes, I'm Sure!" }).then(function () { $.ajax({ url : "PHP/response.php", data : "action=DeletePacking&packingId="+itemId, method : "POST", async : false, success : function(response){ if(response == "DELETED"){ localStorage.setItem("packingDeleted", "true"); location.replace('manage-packing.php'); } else{ errorMessage("Item could not be deleted."); } }, error : function(error){ errorMessage("Item could not be deleted."); } }); }); } </script> </body> </html>