ok
Direktori : /proc/thread-self/root/home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : //proc/thread-self/root/home2/selectio/www/lilyexpresslive/software/admin/print_invoice.php |
<?php ob_start(); session_start(); include("inc/config.php"); include("inc/functions.php"); include("inc/CSRF_Protect.php"); $csrf = new CSRF_Protect(); $list_id=array(); $list_id=$_GET['list_id']; $li=explode(",",$list_id); ?> <!DOCTYPE html> <html> <head> <title>speed Link</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> <script> function goBack() { window.history.back(); } </script> <style> table, td, th { border: 1px solid #000; text-align: left; } table { border-collapse: collapse; width: 100%; height:60%; } p.test2 { writing-mode: vertical-rl; } </style> </head> <body style="font-weight:700"> <center> <a class="btn btn-md btn-danger" href="modicare-pickup-entry-add.php">Add Pickup</a>  <a href="modicare-pickup-entry.php"><button class="btn btn-md btn-success">Back</button></a>   <!--<a href="pickup-entry.php"><button class="btn btn-md btn-primary">Back</button></a> --> <input type="button" class="btn btn-info" onclick="printDiv('printableArea')" value="Print Or Pdf" />  <a href="lable_print.php?list_id=<?php echo $list_id; ?>"><button class="btn btn-md btn-primary">Print Label</button></a> </center><br> <?php function address_limit($addr){ // strip tags to avoid breaking any html $string = strip_tags($addr); if (strlen($string) > 110) { // truncate string $stringCut = substr($string, 0, 110); $endPoint = strrpos($stringCut, ' '); //if the string doesn't contain any space then it will cut without word basis. $string = $endPoint? substr($stringCut, 0, $endPoint) : substr($stringCut, 0); $string .= '...'; } echo $string; } foreach($li as $lid){ $list_id1=100001; $i=0; $statement = $pdo->prepare("SELECT tu.address as cust_address,tcu.cust_code as code,pk.read_status as read_status,pk.ref_no as bar,tcu.destination_city as dest,mat.short_desc as content,tu.phone as cust_phone,tu.short_location as short_location,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) { $read_status=$row['read_status']; if($read_status==0){ $statement_update = $pdo->prepare("UPDATE pickup_entry set read_status=1 WHERE id='$lid'"); $statement_update->execute(); } $cust_address=$row['cust_address']; $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']; $day=date_create($row['created']); $date=date_format($day,'d-m-Y'); $bar=$row['bar']; $code=$row['code']; $short_location=$row['short_location']; }?> <div id="printableArea"> <?php for($i=0;$i<3;$i++){ ?> <table> <tr> <td rowspan="2" style="padding-left: 10px;width: 42%;font-size: 14px;"> <div class="row"> <div class="col-md-4"> <img src="img/speed_logo.jpg" style="margin-top: 10px" width="150px" height="100px"> </div> <div class="col-md-8" style="font-size:13px"> <p><span style="font-size:15px;font-weight: 800">SPEED LINK SERVICE</span><br> #93/44, 2nd Main, 8th Cross,<br> Wilson Garden,Bangalore-560027<br> Mb No:+91 9880963232 <br> E-speedlinkblr@gmail.com.<br> <span style="font-weight: 800"> GST NO : 29ALUPM9087C1ZB</span></p> </div> </div> </td> <td style="height: 31px;font-weight: 900;text-align:center;"> ORGIN </td> <td style="height: 31px;font-weight: 900;width: 20%;text-align:center;"> DEST </td> <td style="height: 31px;font-weight: 900;width: 10%;text-align:center;"> DATE </td> <td rowspan="2" style="height: 31px;font-weight: 900;width: 22%;text-align:center;"> <?php echo "<img alt='testing' src='barcode/barcode.php?codetype=Code39&size=40&text=".$bar."&print=true' style='width: 150px;'/>"; ?><br> AWB NO : <span style="font-size: 28px;font-weight: 900;"><?php echo $bar; ?></span> </td> </tr> <tr> <td style="padding-left: 10px;font-size: 28px;font-weight: 900;text-align:center;"><?php echo $short_location; ?></td> <td style="font-weight: 900;font-size: 28px;text-align:center;"><?php echo $dest; ?></td> <td style="text-align:center;font-size:17px;font-weight: 800;"><?php echo $date; ?></td> </tr> </table> <table> <tr style="height: 200px;"> <td style="font-size: 15px;font-weight: 800;width: 1px;"><p class="test2">CONSIGNOR</p></td> <td style="padding-left: 10px;width: 50%;font-size: 13px"> <span style="font-weight: 700;font-size: 15px">FROM :</span><br> <?php echo $cust_name; ?><br> <?php address_limit($cust_address); ?><br> <span style="font-weight: 700;font-size: 15px">PHONE : <?php echo $cust_phone; ?></span> <span style="font-weight: 700;font-size: 15px;float:right">GST NO: <?php echo $gst; ?></span> </td> <td style="font-size: 15px;font-weight: 800;width: 1px;"><p class="test2">CONSIGNEE</p></td> <td style="font-size: 13px;padding-left: 10px;"> <span style="font-weight: 700;font-size: 15px;">TO :</span><br> <?php echo $client_name; ?><br> <?php address_limit($client_address); ?><br> <?php echo $client_city; ?><br> <?php echo $client_state; ?><br> <span style="font-weight: 700;font-size: 20px">PHONE : <?php echo $client_phone; ?></span>   <span style="font-weight: 700;font-size: 20px">DP CODE : <?php echo $code; ?></span> </td> </tr> </table> <table > <tr style="font-size: 11px;text-align:center;font-weight: 700"> <td style="width: 18%;text-align:center">BOOKING BRANCH</td> <td style="text-align:center">CONTENT-DESCRIPTION</td> <td style="text-align:center">NO.OF PIECES</td> <td style="text-align:center">ACTUAL WEIGHT</td> <td style="text-align:center">CHARGED WEIGHT</td> <td style="width: 10%;text-align:center">PAYMENT MODE</td> <td style="text-align:center">OTHER CHARGES</td> <td style="text-align:center">TOTAL</td> </tr> <tr style="font-size: 11px;text-align:center"> <td style="text-align:center;font-weight: 700">Head Office</td> <td style="text-align:center;font-weight: 700">Essential</td> <td style="text-align:center;font-weight: 900;font-size:17px"><?php echo $pieces; ?></td> <td style="text-align:center;font-weight: 900;font-size:17px"><?php echo $a_weights; ?></td> <td style="text-align:center;font-weight: 900;font-size:17px"><?php echo $c_weights; ?></td> <td style="text-align:center;font-weight: 700">Credit</td> <td style="text-align:center;font-weight: 700">₹<?php echo $other_charges; ?></td> <td style="text-align:center;font-weight: 700">₹<?php echo $total_charges; ?></td> </tr> </table> <table> <tr style="height: 150px;"> <td rowspan="2" style="font-size: 11px;width: 26%;"> THE LIABILTY OF SPEED LINK SERVICE FOR THE SHIPMENT IS RESTRICTED TO VALUE DECLARED OR MAXIMUM RS. 100/- WHICHEVER IS LESS I HEREBY AGREE TO THE CONDITIONS OF CARRIAGE ON THE BACK OF THIS AIRWAY BILLS CORRECT. </td> <td style="font-size: 13px;padding-left: 15px">SENDERS SIGNATURE</td> <td rowspan="2" style="font-size: 13px"> <center style="font-weight: 600">RECEIVED IN GOOD CONDITION</center><br> <div class="row"> <div class="col-md-6" style="padding-left: 15px"> <span style="font-size: 14px;font-weight: 600">STAMP</span><br> SIGNATURE<br> NAME<br> RELATIONSHIP<br> </div> <div class="col-md-6"> DATE<br> TIME </div> </div> </td> </tr> <tr> <td style="font-size: 13px;padding-left: 15px">For SPEED LINK SERVICE</td> </tr> </table> <br> <?php } } ?> </div> </body> <!-- page script --> <script> var doc = new jsPDF(); var specialElementHandlers = { '#print-btn': function (element, renderer) { return true; } }; $('#submit').click(function () { doc.fromHTML($('#print').html(), 15, 15, { 'width': 1070, 'elementHandlers': specialElementHandlers }); doc.save('pdf-version.pdf'); }); 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> </html>