ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/cargo-pickup-entry-list.php |
<?php require_once('header.php'); $old_date = date('Y-m-d', strtotime("-30 days")); /*Change the date for past days selection*/ $today=date('Y-m-d'); ?> <style> /* The container */ .checkbox { display: block; padding-left: 35px; margin-bottom: 12px; cursor: pointer; font-size: 15px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } /* Hide the browser's default checkbox */ .checkbox input { opacity: 0; cursor: pointer; height: 0; width: 0; } /* Create a custom checkbox */ .checkbox { height: 25px; width: 25px; background-color: #eee; } /* On mouse-over, add a grey background color */ .checkbox:hover input ~ .checkmark { background-color: #ccc; } /* When the checkbox is checked, add a blue background */ .checkbox input:checked ~ .checkmark { background-color: #f39c12; } /* Create the checkmark/indicator (hidden when not checked) */ .checkbox:after { content: ""; display: none; } /* Show the checkmark when checked */ .checkbox input:checked ~ .checkmark:after { display: block; } /* Style the checkmark/indicator */ .checkbox .checkbox:after { left: 9px; top: 5px; width: 5px; height: 10px; border: solid white; border-width: 0 3px 3px 0; -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); } </style> <script type="text/javascript" language="javascript" > $(document).ready(function() { $('#select_all').on('click',function(){ if(this.checked){ $('.checkbox').each(function(){ this.checked = true; }); }else{ $('.checkbox').each(function(){ this.checked = false; }); } }); $('.checkbox').on('click',function(){ if($('.checkbox:checked').length == $('.checkbox').length){ $('#select_all').prop('checked',true); }else{ $('#select_all').prop('checked',false); } }); $('#btn_delete_shipments').on('click',function(){ var checkValues = $('input[name=checkboxlist]:checked').map(function(){ return $(this).val(); }).get(); if(checkValues != ''){ var r = confirm("Confirm if You Want to Delete Those Pickup Entry?"); if (r == true) { var ids=[]; ids = checkValues; console.log('Delete ids :'+ids); $.ajax({ url: 'data-tables/custom-function.php', type: 'post', data: {type:'delete_pickup_entry',delete_id:ids}, success: function(response){ console.log(response); //alert("test..."); //$('#status').val(0); getData(); } }); } //window.location.href="shipment-picked.php?shipment_id="+ids+"&status="+status; }else{ alert("Pls Select Min One Pickup Entry to Delete..."); } }); $("#client_id").select2(); $("#set_status").select2(); function getData(){ var from= $('#from').val(); var to= $('#to').val(); var role= $('#role').val(); var role_id= $('#client_id').val(); var set_status= $('#set_status').val(); var awb_type= $('#awb_type').val(); var branch_id = $('#branch_id').val(); var dataTable = $('#employee-grid').DataTable( { "processing": true, "serverSide": true, "destroy":true, "ajax":{ url :"data-tables/cargo-entry.php", // json datasource data: {client_id:role_id,client_type:role,from:from,to:to,status:set_status,awb_type:awb_type,branch_id:branch_id}, type: "post", // method , by default get error: function(){ // error handling $(".employee-grid-error").html(""); $("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>'); $("#employee-grid_processing").css("display","none"); } } } ); } getData(); $('#get_report').on('click', function(){ var from_date= $('#from').val(); if(from_date){ getData(); } else { alert('Select a Date !!'); } } ); } ); function redirectTo(){ var checkValues = $('input[name=checkboxlist]:checked').map(function() { return $(this).val(); }).get(); // alert(checkValues); var ids=[]; ids = checkValues; // some thing like this you can set value for 1st Param. window.location.href="cargo-invoice-preview.php?list_id="+ids; } function redirectTolable(){ var checkValues = $('input[name=checkboxlist]:checked').map(function() { return $(this).val(); }).get(); // alert(checkValues); var ids=[]; ids = checkValues; // some thing like this you can set value for 1st Param. window.location.href="cargo-lable-print.php?list_id="+ids; } </script> <script type="text/javascript" language="javascript" > $(document).ready(function() { function branchDetails(){ // branch and Employee Details Set /*var branch = $("#branch").val();*/ $.ajax({ url: 'data-tables/custom-function.php', type: 'post', data: {type:'get_branch'}, success: function(response) { var datas = JSON.parse(response) $('#branch_id').empty(); var tot = datas.length; if(tot==0) { $('#branch_id') .append($("<option></option>") .attr("value", '') .text("Branch Not Available")); } else { $('#branch_id') .append($("<option></option>") .attr("value", '') .text("Select Branch")); } for (var index = 0; index < tot; index++) { $('#branch_id') .append($("<option></option>") .attr("value", datas[index]['id']) .text(datas[index]['branch_name'])); } } }); } function clientDetails(){ // branch and Employee Details Set var branch = $("#branch_id").val(); $.ajax({ url: 'data-tables/custom-function.php', type: 'post', data: {type:'get_client',branch_id:branch}, success: function(response) { var datas = JSON.parse(response) $('#client_id').empty(); var tot = datas.length; for (var index = 0; index < tot; index++) { $('#client_id') .append($("<option></option>") .attr("value", datas[index]['id']) .text(datas[index]['client_name'])); } } }); } branchDetails(); $('#branch_id').on('change', function(){ clientDetails(); } ); } ); </script> <section class="content-header" style="background-color: white;"> <div class="row"> <div class="col-md-12" style="text-align: center;"> <h4><i class="fa fa-info-circle"></i> All Cargo Entry Details</h4> </div> </div> <div class="row"> <!--<div style="padding-bottom: 25px;padding-top: 10px;"> <div class="col-md-2" style="text-align: center;"> <b>From</b> </div> <div class="col-md-2" style="text-align: center;"> <b>To</b> </div> <div class="col-md-3" style="text-align: center;"> <b>Client</b> </div> <div class="col-md-3" style="text-align: center;"> <b>Status</b> </div> <div class="col-md-2" style="text-align: center;"> <b>Action</b> </div> </div>--> <form action="excel/overall-report.php" method="POST"> <input type="hidden" id="role" name="role" value="<?php echo $clientType; ?>"> <div style="padding-bottom: 25px;padding-top: 10px;"> <div class="row" style="margin:0px;padding: 5px 0px;"> <div class="col-md-2" style="text-align: center;"> <label for="to">Form:</label> <input type="date" class="form-control" id="from" value="<?php echo $old_date ?>" name="from"> </div> <div class="col-md-2" style="text-align: center;"> <label for="to">To:</label> <input type="date" class="form-control" id="to" value="<?php echo date("Y-m-d") ?>" name="to"> </div> <div class="col-md-4"> <label for="">Select Branch <span>*</span></label> <select class="form-control select2" name="branch_id" id="branch_id" required=""> <option value="">Select Branch</option> </select> </div> <div class="col-md-4" style="text-align: center;"> <label for="to">Client:</label> <select class="form-control" name="client_id[]" id="client_id" multiple> </select> </div> </div> <div class="row" style="margin:0px;padding: 5px 0px;"> <div class='col-md-2'> <label for="to">AWB Type:</label> <select class="form-control select2" name="awb_type" id="awb_type"> <option value=''>All</option> <option value='0'>Forward AWB</option> <option value='1'>Reversed AWB </option> </select> </div> <div class="col-md-3" style="text-align: center;"> <label for="to">Status:</label> <select class="form-control" name="set_status[]" id="set_status" multiple> <option value='all'>All</option> <option value='pending'>Pending</option> <option value='picked'>Picked</option> <option value='manifest'>Manifest Created</option> <option value='In Transit'>In Transit</option> <option value='Received at destination'>Received at Destination</option> <option value='Out for delivery'>Out for delivery</option> <option value='Delivered'>Delivered</option> <option value='Undelivery'>Undelivery</option> <option value='Return To Origin'>Return To Origin</option> </select> </div> <div class="col-md-4" style="text-align: center;"> <br> <span class="btn btn-success btn-sm" id="get_report"><i class="fa fa-filter"></i> Filter</span> <button type="submit" class="btn btn-sm btn-primary" >Export As Excel</button> </div> </div> </div> </form> </div> </section> <section class="content" style="background-color: white;"> <div class="row"> <div class="col-md-12"> <div> <div class="box-body table-responsive"> <table id="employee-grid" class="table table-bordered table-striped" width="100%"> <thead> <tr> <th width="30">SL</th> <th data-sortable="false"><i class="fa fa-check"></i><input type="checkbox" class='checkbox' id="select_all" /></th> <th>Action</th> <th>AWB Number</th> <th>AWB Type</th> <th>Ref Number</th> <th>Status</th> <th>Company Name</th> <th>Address</th> <th>Pincode</th> <th>Mobile Number</th> <th>Actual Weight</th> <th>Charged Weight</th> <th>No.Of Pics</th> <th>Date Added</th> <th>Customer Name</th> <th>Destination</th> <th>E-Way Bill No</th> <th>Invoice No</th> <th>Invoice Value</th> <th>Payment Details</th> </tr> </thead> </table> </div> </div> </div> </div> <div class="content-footer-right" style="margin-left:45%"> <button class="btn btn-success btn-sm" onclick="redirectTo();"><i class="fa fa-print"></i> Print AWB Number</button> <button class="btn btn-warning btn-sm" onclick="redirectTolable();"><i class="fa fa-print"></i> Print Label</button> <button class="btn btn-danger btn-sm" id="btn_delete_shipments"><i class="fa fa-trash-o"></i> Delete Pickup Entry</button> </div> </section> <?php require_once('footer.php'); ?>