ok

Mini Shell

Direktori : /home2/selectio/public_html/lilyexpresslive/software/admin/
Upload File :
Current File : /home2/selectio/public_html/lilyexpresslive/software/admin/cargo-lable-print-with-address.php

<?php require_once('header.php'); ?>
<?php 
$list_id=array();
$list_id=$_GET['list_id'];


$li=explode(",",$list_id);
?>
<style>

    @media print {
    body{
        min-width: 80mm;
        min-height: 48mm;
       
        /*margin: 3mm 3mm 3mm 3mm;*/ 
         /*change the margins as you want them to be. */
   } 
}
div.solid {
    /*border-style: solid;*/
    min-width:80mm;min-height:48mm;
    background-color: white;
}

</style>

<script>
function goBack() {
  window.history.back();
}
</script>
<br>
<body >
    
<center>
        <a class="btn btn-sm btn-danger " href="cargo-pickup-entry-add.php"><i class="fa fa-plus"></i> Add New Cargo Entry</a>&ensp;
     <a href="cargo-pickup-entry-list.php"><button class="btn btn-sm btn-success"><i class="fa fa-list"></i> Back to List</button></a>
     &ensp;
    <button class="btn btn-sm btn-primary" onclick="printDiv('printableArea')"> <i class="fa fa-print" ></i> Print Now</button>&ensp;
    <a href="cargo-lable-print.php?list_id=<?php echo $list_id; ?>" ><button class="btn btn-sm btn-info"> <i class="fa fa-print"></i> Lable Print</button></a>
    <a href="cargo-invoice-preview.php?list_id=<?php echo $list_id; ?>" ><button class="btn btn-sm btn-info"> <i class="fa fa-print"></i> Print Docket</button></a>
</center><br>
<div style="margin-left:35%;margin-right:35%;">
     <?php
     
      function custom_echo($x, $length)
        {
          if(strlen($x)<=$length)
          {
            echo $x;
          }
          else
          {
            $y=substr($x,0,$length);
            echo $y."....";
          }
        }
     $counts=1;
      foreach($li as $lid){
     $list_id1=100001;
            $i=0;
    			$statement = $pdo->prepare("SELECT pk.pickup_customer_name,pk.pickup_customer_dbcode,pk.entry_type,pk.destination,pk.client_id,pk.picklist_no,tu.address as cust_address,tcu.cust_code as cust_code,pk.ref_no as bar,pk.ref_no as awb,tcu.destination_city as dest,mat.short_desc as content,tu.phone as cust_phone,tu.full_name as cust_name,tcu.cust_name as client_name,pk.address as client_address,pk.city as client_city,pk.state as client_state,pk.phone as client_phone, pk.pics as pieces,pk.c_weight as c_weights,pk.a_weight as a_weights,pk.created_at as created,pk.content_desc as descrp,pk.total_charges as tc,pk.other_charges as oc,pk.payment_mode as pay_mode,pk.gst_no as gst FROM pickup_entry as pk INNER JOIN tbl_user as tu INNER JOIN tbl_customer as tcu INNER JOIN material_desc as mat on pk.client_id=tu.id AND pk.customer_id=tcu.cust_id AND mat.id=pk.content_desc WHERE pk.id='$lid'");
    		
    		$statement->execute();
    		$result = $statement->fetchAll(PDO::FETCH_ASSOC);
     
     foreach ($result as $row) {
     $cust_address=$row['cust_address'];
     $cust_code=$row['cust_code'];
     $cust_phone=$row['cust_phone'];
     $cust_name=$row['cust_name'];
     $client_name=$row['client_name'];
     $client_address=$row['client_address'];
     $client_city=$row['client_city'];
     $client_state=$row['client_state'];
     $client_phone=$row['client_phone'];
     $pieces=$row['pieces'];
     $c_weights=$row['c_weights'];
     $gst=$row['gst'];
     $a_weights=$row['a_weights'];
     $total_charges=$row['tc'];
     $other_charges=$row['oc'];
     $desc=$row['content'];
     $pay_mode=$row['pay_mode'];
     $dest=$row['dest'];
     $destination=$row['destination'];
     $entry_type=$row['entry_type'];
     $client_id=$row['client_id'];
     $picklist_no=$row['picklist_no'];
     $n=$row['awb'];
     $bar=$row['bar'];
     $day=date_create($row['created']);
     $date=date_format($day,'d-m-Y');
     
     
    if($row['pickup_customer_dbcode']!=''){
          $cust_code=$row['pickup_customer_dbcode'];
          $client_name=$row['pickup_customer_name'];
     }else{
          $cust_code=$row['cust_code'];
          $client_name=$row['client_name'];
     }
     
     
     }?>
	<div id="printableArea">
	  
	 <?php for($i=1;$i>0;$i--){?>
	 
	 <?php for($d=1;$d<=1;$d++){?>
	 
	 <div class="solid" >
<table style="font-size:11px;" width="100%">
    <tr>
        
        <td style="padding-top:5px;" width="50%">
             <center><b> AWB No  </b><br> 
             <?php  echo "<img alt='Barcode' width='70%' height='60%' src='barcode/barcode.php?codetype=Code128&size=35&text=".$bar.''.str_pad($i, 3, '0', STR_PAD_LEFT)."'/>"; ?>
             <br><b style="font-size:12px;"><?=$bar?></b></span>
             
            <!-- <?php  echo "<img alt='speedlink' width='70%' height='60%' src='barcode/barcode.php?codetype=Code128&size=40&text=".$bar."'/>"; ?>
             <br><b style="font-size:12px;"><?=$bar?></b></span>-->
             </center> 
        </td>
        <td style="padding:0px;padding-top:5px;" width="50%" height="8%">
           <b>Date</b> &ensp;: &ensp;<b><?php echo $date; ?></b><br>
           <b>DP Code</b> &ensp;: 
           <?php if($cust_code!="" && $cust_code!="0"){ echo custom_echo($cust_code, 10); }else if($picklist_no!="") { echo custom_echo($picklist_no, 10);}else { echo "---";} ?>
        </td>
    </tr>
    
    <tr>
        <td width="50%" colspan="2" style="padding:0px;padding-left:20px;">
            <table width="100%">
                 
                
                 <tr>
                    <td width="20%"><b>Name</b></td><td> &ensp;:</td>
                    <td><b><?php echo $client_name; ?></b></td>
                </tr>
                <tr>
                    <td><b>Mobile No</b></td><td> &ensp;:</td>
                    <td><b><?php echo $client_phone; ?></b></td>
                </tr>
                <tr>
                    <td colspan="3"><b>Address : <span style="font-size:10px;"><?=custom_echo($client_address, 100); ?> </span></b></td>
                </tr>
                <tr>
                    <td ><b>No Of Box</td><td> &ensp;:</b></td>
                    <td><b style="font-size:14px;">&ensp;<?php echo str_pad($pieces, 2, '0', STR_PAD_LEFT); ?></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span ><b>Wt :</b> <b style="font-size:14px;"><?=$a_weights?></b></span></td>
                </tr>
                <tr>
                    <td ><b>City</b></td><td width="1%"> &ensp;:</td>
                    <td><b style="font-size:14px;"><?php if($entry_type==2 || $client_id==22 || $client_id==28){ echo $destination; }else  { echo $dest; }?></b></td>
                </tr>
            </table>
            <!--<table>
                 <tr>
                    <td style="padding:0px;vertical-align:top;" width="60%">
                        <b>Address</b>&ensp;&ensp;:
                       <b style="font-size:6px;"><?=custom_echo($client_address, 100); ?></b> 
                    </td>
                    <td style="margin-left:3px;vertical-align:top;">
                         <center> <b>MPS No </b><br><?php  echo "<img alt='testing' width='100%' height='24%' src='barcode/barcode.php?codetype=Code39&size=24&text=".$bar.''.str_pad($i, 3, '0', STR_PAD_LEFT)."'/>"; ?><br>
                         <b style="font-size:10px;"><?=$bar.''.str_pad($i, 3, '0', STR_PAD_LEFT)?></b></center> 
                    </td>
                </tr>
            </table>-->
            
        </td>
    </tr>
    
</table>

</div>
<?php } ?>
	      
<?php 
 }?>
 
   
 <?php 
          
      }
?>
</div>
</div>
</body>
<!-- page script -->
<script>

 
  function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();

     document.body.innerHTML = originalContents;
}

  $(function () {
    $("#example1").DataTable();
    $('#example2').DataTable({
      "paging": true,
      "lengthChange": false,
      "searching": false,
      "ordering": true,
      "info": true,
      "autoWidth": false,
    });
  });
</script>
<?php require_once('footer.php'); ?>

Zerion Mini Shell 1.0