EVOLUTION-NINJA
Edit File: transaction_order_confirmation_preview.php
<!DOCTYPE HTML> <html lang="en-Us"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Order Confirmation</title> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/style.min.css');?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/bootstrap.min.css');?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/font-awesome.min.css');?>"> <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-3.2.1.min.js');?>"></script> <script src="<?php echo base_url('assets/js/bootstrap.min.js');?>"></script> </head> <body> <button type="button" id="print_booking" style=" margin-top: 13px; right:100px; padding-top: 2px; padding-bottom: 1px; padding-left: 15px; padding-right: 15px; background: rgb(72,91,127); color: white; font-size: 22px;position:absolute;">Print</button> <?php if($indent_p == 'indent_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('marketing/transactions_order_details?prop_id=1');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 8px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } else if($indent_p == 'today_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('marketing/transactions_order_details?prop_id=2');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 8px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } else if($indent_p == 'monthly_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('marketing/transactions_order_details?prop_id=3');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 8px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } else if($indent_p == 'year_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('marketing/transactions_order_details?prop_id=4');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 8px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } ?> <div class="mid-wrk"> <div class="mid-work"> <h3 style="text-align:center;margin-top:1%">ORDER CONFIRMATION</h3> <div class="col-sm-6" style="padding-top: 20px;"> <p> <?php if(empty($address)) { ?> <?php } else {?> <?php echo $address->customerName; ?><br/><?php echo $address->customerAddress; if($address->pincode !="") { ?><br/> <?php echo $address->city."-".$address->pincode; } ?> <br/> <?php echo strtoupper($address->country); ?> <?php } ?> </p> </div> <div class="col-sm-6 mid"> <img src="<?php echo base_url('assets/img/preview_logo.png');?>" class="img-responsive" style="float:right;width:157px !important;margin-right: 12px;"> </div> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;"> <style> .mid-work, table { font-family:times !important; font-size:13px; } </style> <tbody> <tr> <td> TERMS OF PAYMENT:   <?php echo $fetch_preview1->paymentTerms; ?><br> </td> <td> DESTINATION:<br> <?php echo $fetch_main2->deliveryPoint; ?> </td> <td> BUYER'S REFERENCE:<br> <?php echo $fetch_preview1->orderNo; ?> </td> <td> ORDER DATE:   <?php echo $day."-".$month."-".$year; ?> </td> <td> ORDER NO:   <?php echo $fetch_preview1->oslNo; ?> </td> <td> Contract Type:   <?php echo $fetch_main2->contractType; ?> </td> </tr> </tbody> </table> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;"> <tbody> <tr> <th>WIDTH/SIZE</th> <th>ARTICLE</th> <th>DESIGN</th> <th>QUALITY & DESCRIPTION</th> <th>COLOR</th> <th>SKU NO</th> <th>QUANTITY</th> <th>RATE/UNIT</th> <th>PRICE </th> <th>DELIVERY MODE</th> </tr> <?php $totquantity=0; $totvalue=0; $un=0; foreach($fetch_preview2 as $preview){?> <tr> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->width; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->articleNo; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->design; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php //echo $preview->quality; ?> <?php //echo '&'; ?> <?php echo $preview->description; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->buyerShade; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->skuNo; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->quantity." ".$preview->unit; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->unitPrice." ".$fetch_preview1->currency; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->foreignValue." ".$fetch_preview1->currency; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;"> <?php echo $preview->deliveryMode; ?> </td> </tr> <?php $totquantity=$totquantity+$preview->quantity; $totvalue=$totvalue+$preview->foreignValue; $un=$preview->unit; } ?> <tr> <td colspan="10" style="border-top:1px solid;"></td> </tr> </tbody> </table> <div class="mid-1"> <div class="col-sm-6"> <p> <strong> Total Quantity : <?php echo $totquantity." ".$un; ?> </strong> </p> </div> <div class="col-sm-6"> <p style="float: right;"> <strong> TOTAL VALUE : <?php echo $totvalue." ".$fetch_preview1->currency; ?><br> <b><?php echo "(". convert_number_to_words(round($totvalue))." ".$fetch_preview1->currency .")"; ?></b> </p> </div> </div> <h3 style="font-size: 18px;">QUANTITY PLUS OR MINUS 10% ALLOWED</h3> <h3 style="font-size: 18px;">ALL BANK CHARGES OUTSIDE INDIA ARE TO THE ACCOUNT OF BUYER</h3> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;"> <tbody> <tr> <td> DELIVERY DATE:   <?php $newDate1 = date("d-m-Y", strtotime($fetch_preview1->deliveryDate)); echo $newDate1; ?> </td> <td> BUYER'S SIGNATURE </td> <td> SELLERS'S SIGNATURE </td> </tr> </tbody> </table> <p>Deco-Textil "Swan House" Post Box 25210.,40 4th Cross,Residency Road Banglore-560025,India Phone:(080)41888298,Email : sales@swansilk.com</p> </div> </div> <div class="mid-work hidden"> <div id="print_report"> <style> .main_td td { font-size: 12px; } </style> <h3 style="text-align:center;margin-top:1%">ORDER CONFIRMATION</h3> <table border="0" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;"> <tbody> <tr class="main_td"> <?php if(empty($address->customerID)) { ?> <td style="width:700px;"></td> <td style="width:200px;"> <img src="<?php echo base_url('assets/images/1.jpg');?>" class="img-responsive" style="background-color:#485B7F;float:right;width: 170px;margin-right: 12px;"></td> <?php } else {?> <td style="width:700px;"><?php echo $address->customerName; ?><br/><?php echo $address->customerAddress; ?><?php if($address->pincode !="") { ?><br/> <?php echo $address->city."-".$address->pincode; } ?> <br/> <?php echo strtoupper($address->country); ?> </td> <td style="width:200px;"> <img src="<?php echo base_url('assets/img/preview_logo.png');?>" class="img-responsive" style="background-color:#485B7F;float:right;width: 170px;margin-right: 12px;"></td> <?php } ?> </tr> </tbody> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;width:100%;"> <tbody> <tr class="main_td"> <td> TERMS OF PAYMENT:   <?php echo $fetch_preview1->paymentTerms; ?><br> </td> <td> DESTINATION:<br> <?php echo $fetch_main2->deliveryPoint; ?> </td> <td> BUYER'S REFERENCE:<br> <?php echo $fetch_preview1->orderNo; ?> </td> <td> ORDER DATE:   <?php echo $day."-".$month."-".$year; ?> </td> <td> ORDER NO:   <?php echo $fetch_preview1->oslNo; ?> </td> <td> Contract Type:   <?php echo $fetch_main2->contractType; ?> </td> </tr> </tbody> </table> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;margin-right:10px;width:100%;"> <tbody> <tr class="main_td"> <th>WIDTH/SIZE</th> <th>ARTICLE</th> <th>DESIGN</th> <th>QUALITY & DESCRIPTION</th> <th>COLOR</th> <th>SKU NO</th> <th>QUANTITY</th> <th>RATE/UNIT</th> <th>PRICE </th> <th>DELIVERY MODE</th> </tr> <?php $totquantity=0; $totvalue=0; $un=0; foreach($fetch_preview2 as $preview){?> <tr> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->width; ?> </td> <td style="border-left:1px solid transparent !important;border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->articleNo; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->design; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php //echo $preview->quality; ?> <?php //echo '&'; ?> <?php echo $preview->description; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->buyerShade; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->skuNo; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->quantity." ".$preview->unit; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->unitPrice." ".$fetch_preview1->currency; ?> </td> <td style="border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->foreignValue." ".$fetch_preview1->currency; ?> </td> <td style="border-left:1px solid transparent !important;border-bottom:1px solid transparent !important;border-top:1px solid transparent !important;"> <?php echo $preview->deliveryMode; ?> </td> </tr> <?php $totquantity=$totquantity+$preview->quantity; $totvalue=$totvalue+$preview->foreignValue; $un=$preview->unit; } ?> </tbody> </table > <table border="1" style="margin-top:30px; border-spacing:0 !important;width:100%;" class="table table-bordered table-striped table-hover table-condensed table-responsive"> <tbody> <tr class="main_td"> <td style="width:33% !important;"> TOTAL Qty:<?php echo $totquantity." ".$un; ?> </td> <td style="text-align:right;width:67% !important;"> TOTAL VALUE : <?php echo $totvalue." ".$fetch_preview1->currency; ?> </br><b><?php echo "(". convert_number_to_words(round($totvalue))." ".$fetch_preview1->currency .")"; ?></b> </td> </tr> </tbody> </table> <h4 style="text-align:center;font-size: 15px;">QUANTITY PLUS OR MINUS 10% ALLOWED</h4> <h4 style="text-align:center;font-size: 15px;">ALL BANK CHARGES OUTSIDE INDIA ARE TO THE ACCOUNT OF BUYER</h4> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border-spacing:0 !important;"> <tbody> <tr class="main_td"> <td style="width:300px;height:30px;padding-left:12px;"> DELIVERY DATE:   <?php $newDate1 = date("d-m-Y", strtotime($fetch_preview1->deliveryDate)); echo $newDate1; ?> </td> <td style="width:300px; padding-top:30px;text-align:center"> BUYER'S SIGNATURE </td> <td style="width:300px;padding-top:30px;text-align:center"> SELLERS'S SIGNATURE </td> </tr> </tbody> </table> <p><b>Deco-Textil "Swan House" Post Box 25210.,40 4th Cross,Residency Road Banglore-560025,India.<br> Phone:+91-80-41888298, Email : sales@swansilk.com</b></p> <P>BANKERS : KOTAK MAHINDRA BANK</b> 10/7, UMILA LANDMARK, LAVELLE ROAD NEXT TO CHANCERY HOTEL, BANGALORE - 560001, INDIA.<br> BSR CODE: 0180038 <br> A/C # 4011255190<br> SWIFT # KKBKINBBCPC<br> ADC # 01800388400009</P> </div> </div> <?php function convert_number_to_words($no) { //$no = round($number); //alert(); $hundred = null; $digits_1 = strlen($no); $i = 0; $str = array(); $words = array('0' => '', '1' => 'One', '2' => 'Two', '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '7' => 'Seven', '8' => 'Eight', '9' => 'Nine', '10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve', '13' => 'Thirteen', '14' => 'Fourteen', '15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen', '18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty', '30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty', '60' => 'Sixty', '70' => 'Seventy', '80' => 'Eighty', '90' => 'Ninety'); $digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore'); while ($i < $digits_1) { $divider = ($i == 2) ? 10 : 100; $number = floor($no % $divider); $no = floor($no / $divider); $i += ($divider == 10) ? 1 : 2; if ($number) { $plural = (($counter = count($str)) && $number > 9) ? 's' : null; $hundred = ($counter == 1 && $str[0]) ? ' And ' : null; $str [] = ($number < 21) ? $words[$number] . " " . $digits[$counter] . $plural . " " . $hundred : $words[floor($number / 10) * 10] . " " . $words[$number % 10] . " " . $digits[$counter] . $plural . " " . $hundred; } else $str[] = null; } $str = array_reverse($str); $result = implode('', $str); return $result ; } ?> </body> </html> <style> .close-right { text-align:right; } </style> <script> $(document).ready(function() { $("#print_booking").click(function(){ var divToPrint=document.getElementById("print_report"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); }); }); </script> <style> @media only screen and (min-width:320px) and (max-width:640px) { .mid-work{ width:900px; } .mid-wrk{ overflow-x:auto; padding-top:30px; } } </style>