D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
view-search-item-code-party.php
back
Copy
<!DOCTYPE html> <?php session_start(); $id = $_GET['id']; include 'config.php'; $login = $_SESSION['login_email']; if($login == ''){ echo '<script>location.replace("index.php")</script>'; } if(isset($_SESSION["source_id"])){ $source_id = $_SESSION['source_id']; } $data_invoice_ref=base64_decode($_GET['invoice_ref']); $fitem_code=base64_decode($_GET['item_code']); $fitem_item_name=base64_decode($_GET['item_name']); $fitem_party_name=base64_decode($_GET['party_name']); $sqlgen_invoice1 = "SELECT * FROM `generate_invoice` where `invoice_reference` = '$data_invoice_ref' AND data_delete != 'yes'"; $resultgen_invoice1 = mysqli_query($conn,$sqlgen_invoice1); if(mysqli_num_rows($resultgen_invoice1) > 0){ while($row_genin1 = mysqli_fetch_array($resultgen_invoice1)){ $party_id1 = $row_genin1["bill_pay_name"]; } } ?> <html> <head> <meta 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" /> <!-- DataTables --> <link href="plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <!-- Responsive datatable examples --> <link href="plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <script src="assets/js/modernizr.min.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" /> <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css" /> </head> <body> <style> .ui-widget.ui-widget-content{ height: 200px; /* width: 250px;*/ overflow-x: hidden ; overflow-y: auto; white-space: nowrap; } .compant_hint { position: absolute; background: white; box-shadow: 0 0 6px #dcd9d9; width: 95%; border-radius: 4px; z-index: 9999; list-style: none } .compant_hint li { cursor: pointer } .btnDks { text-decoration: none; background-color: #0088ff; border-radius: 4px; box-shadow: 0 6px 12px rgb(134 140 150 / 65%); } #view_allpayment_status .openModel{ } .tabcontent { display: none; padding: 6px 12px; border: 1px solid #ccc; border-top: none; } @media (min-width: 1200px){ .modal-xl { max-width: 1140px; }} </style> <!-- 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">Filter By Item Code</h4> <!--<ol class="breadcrumb float-right">--> <!-- <li class="breadcrumb-item ">Payments</li>--> <!-- <li class="breadcrumb-item active">Payment Status</li>--> <!--</ol>--> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row"> <div class="col-md-8 offset-md-2 text-center"> <br><br> <a class="btn-primary btnDks" style="padding:8px 25px" href="filter-by-item-code.php">Back to Item Search Page</a> </div> </div> <div class="row"> <div class="col-md-8 offset-md-2"><br> <h5><p><b>Item Code : </b><small><?php echo $fitem_code;?></small></p></h5> <h5><p><b>Item Name : </b><small><?php echo $fitem_item_name;?></small></p></h5> <h5><p><b>Party Name : </b><small><?php echo $fitem_party_name;?></small></p></h5> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="card-box table-responsive"> <table id="view_allpayment_status" class="table table-bordered table-striped"> <thead> <tr class="theme-bg"> <th>#</th> <th>Item Code</th> <th>Item Name</th> <th class="text-center">Item Rate</th> <th class="text-center">Party Name</th> <th class="text-center">Invoice No.</th> </tr> </thead> <tbody> <?php $serNo=0; $sqlinvoice_item="SELECT * FROM `invoice_item` a left join `generate_invoice` b on a.`invoice_reference` = b.`invoice_reference` where a.`item_code` = '$fitem_code' AND b.`bill_pay_name`='$party_id1' ORDER BY a.`price` ASC"; // $sqlinvoice_item = "SELECT * FROM `invoice_item` where `item_code` = '$fitem_code' AND `invoice_reference`='$party_invoice_reference'"; // echo $sqlinvoice_item; $result_item = mysqli_query($conn,$sqlinvoice_item); if(mysqli_num_rows($result_item) > 0){ while($item_row = mysqli_fetch_array($result_item)){ $inv_invoice_reference = $item_row["invoice_reference"]; $inv_invoice_price = $item_row["price"]; $inv_invoice_item_code = $item_row["item_code"]; $party_id = $item_row["bill_pay_name"]; // $sqlgen_invoice = "SELECT * FROM `generate_invoice` where `bill_pay_name` = '$party_id1' AND data_delete != 'yes'"; // $resultgen_invoice = mysqli_query($conn,$sqlgen_invoice); // if(mysqli_num_rows($resultgen_invoice) > 0){ // while($row_genin = mysqli_fetch_array($resultgen_invoice)){ // $party_id = $row_genin["bill_pay_name"]; // $party_invoice_reference = $row_genin["invoice_reference"]; // } // } $sql_party = "SELECT * FROM `contact` where `data_delete` = 'NO' AND `id`='$party_id'"; $result_party = mysqli_query($conn,$sql_party); if(mysqli_num_rows($result_party) > 0){ while($row_party = mysqli_fetch_array($result_party)){ $customer_type = $row_party["customer_type"]; $bill_display_name = $row_party["bill_display_name"]; }} ?> <tr class="gradeX"> <td><?php echo $serNo+=1;?></td> <td><?php echo $fitem_code;?></td> <td class="company-name"><?php echo ucwords(strtolower($fitem_item_name));?></td> <td class="text-center"><?php echo $inv_invoice_price ;?></td> <td class="text-center"><?php if($bill_display_name==''){ echo "-";}else{ echo $bill_display_name;}?></td> <td class="text-center"><small><?php echo $inv_invoice_reference;?></small></td> </tr> <?php }} ?> </tbody> </table> </div> </div> <!-- end: page --> </div> </div> <!-- container --> </div> </div> <div id="myModalViewSummary" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalViewSummary" data-backdrop="static" data-keyboard="false" aria-hidden="true"> <div class="modal-dialog modal-xl"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="addressTitle"><?php echo ucwords(strtolower($bill_display_name));?> <span style="font-weight:300; ">Invoice Details</span></h4> </div> <div class="modal-body"> <div class="row"> <div class="col-md-12"> <div class="card-box table-responsive"> <table id="invoiceTablesdks" class="table table-bordered table-striped "> <thead> <tr class="theme-bg"> <th>#</th> <th>Date</th> <th>Proforma Id</th> <th>Invoice Id</th> <th>Invoice Reference Id</th> <th>Total Amount</th> </tr> </thead> <tbody class="dataInvoiceDisplay"> </tbody> </table> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button> </div> </div> </div> </div> <script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.js'></script> <!-- jQuery --> <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>--> <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 --> <!-- Required datatable js --> <script src="plugins/datatables/jquery.dataTables.min.js"></script> <script src="plugins/datatables/dataTables.bootstrap4.min.js"></script> <!-- Buttons examples --> <script src="plugins/datatables/dataTables.buttons.min.js"></script> <script src="plugins/datatables/buttons.bootstrap4.min.js"></script> <script src="plugins/datatables/jszip.min.js"></script> <script src="plugins/datatables/pdfmake.min.js"></script> <script src="plugins/datatables/vfs_fonts.js"></script> <script src="plugins/datatables/buttons.html5.min.js"></script> <script src="plugins/datatables/buttons.print.min.js"></script> <script src="plugins/datatables/buttons.colVis.min.js"></script> <!-- Responsive examples --> <script src="plugins/datatables/dataTables.responsive.min.js"></script> <script src="plugins/datatables/responsive.bootstrap4.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 src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#search-box").keyup(function() { $.ajax({ type: "POST", url: "readData.php", data: 'keyword=' + $(this).val(), beforeSend: function() { $("#search-box").css("background", "#FFF url(LoaderIcon.gif) no-repeat 165px"); }, success: function(data) { $("#suggesstion-box").show(); $("#suggesstion-box").html(data); $("#search-box").css("background", "#FFF"); } }); }); }); function selectCountry(val) { $("#search-box").val(val); $("#suggesstion-box").hide(); } </script> <script type="text/javascript"> $(function() { $("#search").autocomplete({ source: 'ajax-filter-by-item-code.php', }); }); </script> <script type="text/javascript"> var $ = jQuery; // $(document).ready(function() { // $('#datatable').DataTable(); // //Buttons examples // var table = $('#datatable-buttons').DataTable({ // lengthChange: false, // buttons: ['copy', 'excel', 'pdf', 'colvis'] // }); // table.buttons().container() // .appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)'); // }); $(document).ready(function() { // $(document).on('click', '.openInvoiceModel', function() { // var data_contact_id = $(this).attr("data-contact-id"); // alert(data_contact_id); // }); // $('#view_allpayment_status').on('click', '.openInvoiceModel', function(event) { // var data_contact_id = $(this).attr("data-contact-id"); // // alert(data_contact_id); // if(data_contact_id!=""){ // $.ajax({ // url:"ajax-show-invoice-details.php", // type:"post", // data:{id:data_contact_id}, // success:function(response){ // console.log(response); // var data = JSON.parse(response); // if (data.status == "true") { // $('#addressTitle').html(data.dataRowCompanyName); // $('.dataInvoiceDisplay').html(data.datarows); // $('#myModalViewSummary').modal('show'); // } // } // }); // } // }); // $('#view_allemployer').DataTable( { // dom: 'Bfrtip', // buttons: [ 'copy', 'csv', 'excel', 'pdf', 'print' ] // } ); $('#view_allpayment_status').DataTable({ // dom: 'Bfrtip', dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4'f>>tp", "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], buttons: [{ extend: 'copy', title: 'allPaymentData', className: 'btn-sm' }, { extend: 'csv', title: 'allPaymentData', className: 'btn-sm' }, { extend: 'excel', title: 'allPaymentData', className: 'btn-sm' }, { extend: 'pdf', title: 'allPaymentData', className: 'btn-sm' }, { extend: 'print', title: 'allPaymentData', className: 'btn-sm' } ] }); $('#invoiceTablesdks').DataTable({ // dom: 'Bfrtip', dom: "<'row'<'col-sm-4'l><'col-sm-4 text-center'B><'col-sm-4'f>>tp", "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], buttons: [{ extend: 'copy', title: 'allInvoiceData', className: 'btn-sm' }, { extend: 'csv', title: 'allInvoiceData', className: 'btn-sm' }, { extend: 'excel', title: 'allInvoiceData', className: 'btn-sm' }, { extend: 'pdf', title: 'allInvoiceData', className: 'btn-sm' }, { extend: 'print', title: 'allInvoiceData', className: 'btn-sm' } ] }); }); // function getPaidAmount(referenceNo){ // var result = 0.00; // $.ajax({ // url : "PHP/response.php", // data : "action=getPaidAmount&referenceNo="+referenceNo, // method : "POST", // async : false, // success : function(response){ // result = response*1; // }, // error : function(err){} // }); // return result; // } </script> </body> </html>