ok
Direktori : /home2/selectio/public_html/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/public_html/lilyexpresslive/software/admin/print-cargo-empty-number.php |
<?php require_once('header.php'); ?> <script> $(document).ready(function(){ $('#start').val('');$('#end').val(''); $('#print_cargo').hide(); }); function verify_empty_invoice(){ //$('#print_varify').hide(); //$('#action').hide(); console.log('Verify information Details Showing Below...'); $('#message').empty(); $('#loading').append('<i class="fa fa-spinner" aria-hidden="true"></i> Loading Pls Wait Do not Reload Page...'); var s=$('#start').val();var e=$('#end').val();var awb_type=$('#awb_type').val();var prefix=$('#prefix').val(); if(s!='' && e!=''){ if((e-s)<=100000){ var idss=[];for(var b=s;b<=e;b++){ idss.push(b); } $.ajax({ type: 'POST', url: 'ajax-code-api/custom-api-generate-status-check.php', data: {start_awb: s,end_awb: e,ids:idss,awb_type:awb_type,prefix:prefix}, dataType: 'json', success: function(response) { $('#loading').empty(); console.log(response); if(response['error']){ $('#message').empty(); $('#message').css('color', 'red'); $('#message').append(response['message']); $('#action').show(); //alert(response['message']); }else{ $('#message').append(response['message']); generate_number(); } } }); }else{ alert('100000 Records Only Generate At a Time...'); } }else{ alert('pls enter awb start and end'); } } function generate_number(){ $('#loading').append('<i class="fa fa-spinner" aria-hidden="true"></i> Loading Pls Wait Do not Reload Page...'); var s=$('#start').val();var e=$('#end').val();var awb_type=$('#awb_type').val();var prefix=$('#prefix').val(); var client_id=$('#client_id').val(); var logistic_id=$('#logistic_id').val(); var date=$('#date').val(); if(s!='' && e!=''){ var awb_ids=[];for(var b=s;b<=e;b++){ awb_ids.push(b); } $.ajax({ type: 'POST', url: 'ajax-code-api/custom-api-generate-status.php', data: {start_awb: s,end_awb: e,ids:awb_ids,awb_type:awb_type,client_id:client_id,logistic_id:logistic_id,prefix:prefix,date:date}, dataType: 'json', success: function(response) { $('#loading').empty(); console.log(response); if(response['error']){ $('#message').empty(); $('#message').css('color', 'red'); $('#message').append(response['message']); //alert(response['message']); $('#action').show(); }else{ // if((e-s)<=200){ // // print_empty_invoice(); // $('#action').show(); // }else{ $('#message').empty(); $('#message').css('color', 'green'); $('#message').append(response['message']); $('#action').show(); // } } } }); console.log('client_id:'+client_id); }else{ alert('pls enter awb start and end'); } } function print_empty_invoice(){ var ids=[]; var s=$('#start').val();var e=$('#end').val();var awb_type=$('#awb_type').val();var prefix=$('#prefix').val(); var client_id=$('#client_id').val(); var logistic_id=$('#logistic_id').val(); if(s!='' && e!=''){ $('#print_cargo').hide(); $('#message').val(''); $('#print_varify').show(); for(var b=s;b<=e;b++){ ids.push(b); } $('#start').val('');$('#end').val('');$('#message').append(''); window.open('cargo-invoice-empty-insert.php?is_insert=1&awb_type='+awb_type+'&client_id='+client_id+'&list_id='+ids+'&logistic_id='+logistic_id+'&prefix='+prefix, '_blank'); }else{ alert('pls enter awb start and end'); } } </script> <section class="content" style="background-color: white;"> <div class="row"> <div class="col-md-8" style="text-align: center;"> <h4><i class="fa fa-info-circle"></i> Cargo Invoice Empty Dynamic Print & Generate Number's</h4> </div> <center> <br><br><b id='loading' class="blinking"></b><b id='message' style="color:red;"></b> </center> </div> <div class="row"> <div class="col-md-2"> <label for="to">Awb Number Prefix:</label> <input type="text" class="form-control" name="prefix" id="prefix" /> </div> <div class="col-md-2"> <label for="to">Awb Number Start:</label> <input type="number" class="form-control" name="set_status" id="start" /> </div> <div class="col-md-2"> <label for="to">Awb Number End:</label> <input type="number" class="form-control" name="set_status" id="end" /> </div> <div class='col-md-3'> <label for="to">Client Name</label> <select class="form-control select2" name="client_id" id="client_id"> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_user` where (role='Modicare' or role='Cargo')"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { ?> <option value="<?php echo $row['id']; ?>"><?php echo $row['full_name']; ?></option> <?php } ?> </select> </div> <div class='col-md-3'> <label for="to">Logistic Name</label> <select class="form-control select2" name="logistic_id" id="logistic_id"> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_logistic`"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { ?> <option value="<?php echo $row['id']; ?>"><?php echo $row['name']; ?></option> <?php } ?> </select> </div> <div class='col-md-2'> <label for="to">AWB Type:</label> <select class="form-control select2" name="awb_type" id="awb_type"> <option value='0'>Forward AWB</option> <option value='1'>Reversed AWB </option> </select> </div> <div class='col-md-2'> <label for="to">Date:</label> <input type="date" class="form-control" name="date" id="date" value="<?php echo date('Y-m-d');?>" /> </div> <div class="col-md-3" id="action"> <label for="to">Action</label><br> <button class="btn btn-success btn-sm" id="print_cargo" onclick="print_empty_invoice();"><i class="fa fa-print"></i> Print Cargo Empty AWB Number</button> <button class="btn btn-info btn-sm" id="print_verify" onclick="verify_empty_invoice();"><i class="fa fa-print"></i> Verify Cargo Empty AWB Number</button> </div> </div> </section> <style> .blinking{ animation:blinkingText 1.0s infinite; } @keyframes blinkingText{ 0%{ color: green; } 40%{ color: yellow; } 50%{ color: pink; } 99%{ color:red; } 100%{ color: #000; } } </style> <?php require_once('footer.php'); ?>