EVOLUTION-NINJA
Edit File: transaction_order_input_outsourcesummary.php
<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 Input Details</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="booking_print" 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('planning/planning_order?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('planning/planning_order?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('planning/planning_order?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('planning/planning_order?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" id="print_report" > <h3 style="text-align:left;margin-top:1%;">ORDER INPUT DETAILS</h3> <!-- <table> <div class="row"> <div class="col-sm-6" style="padding-top: 7px;"> <div class="col-sm-6"> <p> <?php if(empty($address)) { ?> <?php } else {?> <?php echo $address->customerID; ?><br> <?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 } ?> <br/>Order Date:  <?php $newDate = date("d-m-Y", strtotime($fetch_preview1->orderDate)); echo $newDate; ?><br> Order Delivery Date:  <?php $newDate1 = date("d-m-Y", strtotime($fetch_preview1->deliveryDate)); echo $newDate1; ?><br> Customer Order No:  <?php echo $fetch_preview1->orderNo; ?> Contract Type:   <?php if($fetch_main2->contractType != ""){ echo $fetch_main2->contractType; } ?><br> Currency:   <?php echo $fetch_preview1->currency; ?><br> OSL No:   <?php echo $fetch_preview1->oslNo; ?> </p> </div> <div class="col-sm-6"> </div> </div> <div class="col-sm-6"> <div class="col-sm-6" style="padding-top: 30px;"> </div> <div class="col-sm-6"> <img src="<?php echo base_url('assets/img/preview_logo.png');?>" class="img-responsive" style="float:right;width:157px !important;margin-right: 12px;"> </div> </div> </div> </table>--> <table class="table" style="width:100%;"> <tr> <td style="width: 50%;border-top: none;color: black;"> <?php if(empty($address)) { ?> <?php } else {?> <?php echo $address->customerID; ?><br> <span class="c_name"> <?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 } ?></span> <br class="c_name" >Order Date:  <?php $newDate = date("d-m-Y", strtotime($fetch_preview1->orderDate)); echo $newDate; ?><br> Order Delivery Date:  <?php $newDate1 = date("d-m-Y", strtotime($fetch_preview1->deliveryDate)); echo $newDate1; ?><br> <span class="c_name">Customer Order No:  <?php echo $fetch_preview1->orderNo; ?> Contract Type:   <?php if($fetch_main2->contractType != ""){ echo $fetch_main2->contractType; } ?><br> Currency:   <?php echo $fetch_preview1->currency; ?><br><span class="c_ name"> OSL No:   <?php echo $fetch_preview1->oslNo; ?> </td> <td style="width: 50%;border-top: none;"><img src="<?php echo base_url('assets/img/preview_logo.png');?>" class="img-responsive" style="float:right;width:157px !important;margin-right: 12px;"></td> </tr> </table> <table border="1" class="table table-bordered table-striped table-hover table-condensed table-responsive" style="margin-top:10px;border:1;border-spacing:0 !important;"> <tbody> <tr> <th>SUB NO</th> <th>Order Type</th> <th>Article</th> <th>Quality & Description </th> <th> Design</th> <th>Sl.NO</th> <th>Our shade</th> <th>Buyer Shade</th> <th>SSL Shade</th> <th>Quantity</th> <th>Width<br>(CMS)</th> <th>Planned Width</th> <th>Planned Warp Mtr</th> <th>Planned Weft Mtr</th> <th>Rec Mtrs</th> <th>Bal Mtrs</th> <th>Status</th> </tr> <?php $a=1;$total=0;$tab=0; $rec=0; foreach($fetch_preview2 as $key=>$preview){ ?> <tr> <td style="border-top:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php foreach ($fetch_pre as $pre) { if($preview->subCode != $tab) { echo $preview->subCode; } break; } $tab=$preview->subCode; ?> </td> <td style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->subOrderType; ?> </td> <td style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->articleNo; ?> </td> <td style="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-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-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $a++; ?> </td> <td style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->ourShade; ?> </td> <td style="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-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->shadeName; ?> </td> <td style="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-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;"> <?php echo $preview->width; ?> </td> <td style="border-top:1px solid transparent !important;border-right:1px solid transparent !important;border-left:1px solid transparent !important;"> <?php echo $preview->selWidth; ?> </td> <td style="border-right:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;"> <?php echo $preview->warpPlandMtr; ?> </td> <td style="border-right:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;"> <?php echo $preview->weftPlandMtr; ?> </td> <?php foreach($fetch_quantity as $fetch_quantitys){ if( $fetch_quantitys->sos_id == $preview->shadeID) { ?> <td style="border-right:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;"> <?php echo $fetch_quantitys->total_quantity; ?> </td> <td style="border-right:1px solid transparent !important;border-top:1px solid transparent !important;border-left:1px solid transparent !important;"> <?php echo $fetch_quantitys->balanced_quantity; ?> </td> <td style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;"> <?php echo $fetch_quantitys->prod; ?> </td> <?php $rec=$rec + $fetch_quantitys->total_quantity; }else { }}?> </tr> <?php $total=$total + $preview->quantity; } ?> </tbody> </table> <div class="row"> <div class="col-sm-6"> <p>Customer Instruction:   <?php echo $fetch_preview1->customerComments; ?></p> <p>Sub Total:  <br> <?php foreach ($fetch_pre as $key => $value){ echo "For Subcode".$value->subCode .": ".$value->subtotal." ".$fetch_preview_unit[$key]->unit."<br>"; } ?></p> <p>Grand Total: <?php if(isset($total)){ echo $total ." "; if(isset($preview)){ echo $preview->unit; }} ?></p> </div> <div class="col-sm-4"> </div> <div class="col-sm-2"> <p>Total Rec Mtrs:   <?php echo $rec; ?></p> </div> </div> </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() { $("#booking_print").click(function(){ $('.c_name').hide(); alert(); var divToPrint=document.getElementById("print_report"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); }); }); </script> <style> .mid-work, table { font-family:times !important; font-size:13px; } </style> <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>