EVOLUTION-NINJA
Edit File: work_order_complete_weaving_preview.php
<?php //include("menu.php"); error_reporting(E_ALL); ?> <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/avinash.min.css" > <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/skin-blue.min.css" > <link rel='shortcut icon' type='image/x-icon' href="<?php echo base_url(); ?>assets/images/samll-big.png"/> <div class="page-content-wrapper"> <div class="page-content"> <div class="row" style=" text-align: right;"> <button class="btn btn-success btn-lg" type="button" id="booking_print" style=" padding-top: 2px; padding-bottom: 3px; padding-left: 15px; padding-right: 15px; background: rgb(72,91,127); color: white; border: initial !important; font-size: 22px;"> Print </button> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('out_source/weaving_fabric?prop_id=1');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'today_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('out_source/weaving_fabric?prop_id=2');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'monthly_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('out_source/weaving_fabric?prop_id=3');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'year_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('out_source/weaving_fabric?prop_id=4');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } ?></div> <div class="content-wrapper" id="print_report"> <section class="content"> <div class="print" style="width:100%;"> <h2 style="text-align:center;padding-left:299px;margin-bottom:0px !important;"><b><span>Deco-Textil</span></b><span style="padding-left:170px;font-size:14px !important;">Ph: +91(80)41888298</span></h2> <p style="text-align:center;margin-bottom:0px !important;">"SWAN HOUSE" NO.40,4th Cross,Residency Road,</p> <p style="text-align:center;margin-bottom:0px !important;">Bangalore - 560025.</p> <h3 style="text-align:center;margin-top:0px !important;"><u>GOODS RECEIVED NOTE</u></h3> <table style="width:100%;border-spacing:0;"> <tr> <td colspan="10"></td> <td colspan="2" style="text-align:right;"> </td> </tr> <tr> <td colspan="10"><td colspan="10"><?php if(empty($fetch_address->name)) echo "Deco-Textil (P) Ltd" . "<br/>" ."NO 40 4TH CROSS RESIDENCY ROAD". "<br/>". "BANGALORE-560025" . "<br/>". "INDIA "; else echo $fetch_address->name . "<br/>" .$fetch_address->address . "<br/>". $fetch_address->city . "<br/>". $fetch_address->country . "-". $fetch_address->pincode; ?></td> <td colspan="2" style="text-align:right;">No. : <?php echo $po_details->osl_no; ?></td> </tr> <tr> <td colspan="20"></td> <td colspan="2" style="text-align:right;">Date : <?php echo date("d-m-Y"); ?></td> </tr> <tr> <td colspan="10"></td> <td colspan="2" style="text-align:right;"> <?php // echo $fetch->delivery_date; ?></td> </tr> <tr> <td colspan="2" style="padding-top: 1%;"></td> <!--<td colspan="2" style="padding-top: 1%;">INDENT NO.114 DT. 23.05.17</td>--> <td colspan="8"></td> </tr> <tr> <td colspan="12"> <p style="padding-left:5%;padding-top: 1%;">Weaving Fabric requirement.</p> </td> </tr> </table> <table style="width:100%;border-spacing:0 !important;margin-top: 1%;" cellpadding="5px"> <tr> <td colspan="2" style="padding-top:15px;"> <table border="1" style="width:100%;border-spacing:0 !important;"> <tr> <th style="text-align:center;">OSL No. </th> <th style="text-align:center;">Article </th> <th style="text-align:center;"> Shades </th> <th style="text-align:center;">Width </th> <th style="text-align:center;">Planned Width </th> <th style="text-align:center;">Reed </th> <th style="text-align:center;">Reed Width </th> <th style="text-align:center;">PPC </th> <th style="text-align:center;"> Quality </th> <th style="text-align:center;">Design </th> <th style="text-align:center;">Finished Weight </th> <th style="text-align:center;">Weaving Factory </th> <th style="text-align:center;">Piece Length </th> <th style="text-align:center;">Ordered Mtrs </th> <th style="text-align:center;">Warp Plad Mtrs </th> <th style="text-align:center;">Weft Plad Mtrs </th> <th style="text-align:center;"> Weaving Date </th> <th style="text-align:center;">Tentative Date </th> </tr> <tr style="height:30px;"> <td style="text-transform: uppercase !important;"><?php echo $po_details->osl_no; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->article; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->shade; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->width; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->selWidth; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->reed; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->reed_width; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->ppc; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->quality; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->design; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->finished_weight; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->weaving_factory; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->piece_length; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->ordered_mtrs; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->warp_pland_mtr; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->weft_pland_mtr; ?></td> <td style="text-transform: uppercase !important;"><?php echo $registration_date; ?></td> <td style="text-transform: uppercase !important;"><?php echo $po_details->tentative_date; ?></td> </tr> </table> </td> </tr> </tbody> </table> <table align="center" style="width:100%;border-spacing:0px !important;margin-top:20px;" border="1"> <thead> <tr > <th style="text-align:center;">Sl.No.</th> <th style="text-align:center;">Purpose/OSL No.</th> <th style="text-align:center;">Received Mtrs</th> <!-- <th style="text-align:center;">Ordered Goods</th>--> <th style="text-align:center;">Received Weight</th> <th style="text-align:center;">Received Date</th> <th style="text-align:center;">Location</th> <th style="text-align:center;">Weaving Factory</th> <th style="text-align:center;">Piece No.</th> <th style="text-align:center;">Invoice/DC No.</th> <th style="text-align:center;">Received By</th> </tr> </thead> <tbody> <?php $i=1;?> <?php if(isset($goods_details)) { foreach($goods_details as $fetch_data) {?> <tr style="height:30px;"> <td><?php echo $i; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->oslno; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->received_mtrs; ?></td> <!-- <td><?php echo $fetch_data->quantity; ?></td>--> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->received_weight; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->rec_date; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->location; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->factory; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->piece_no; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->in_dc_val; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->rec_by; ?></td> </tr> <?php $i++;} } ?> <tr> <td colspan="12" style="border-bottom:1px solid transparent !important;border: transparent !important;text-align: right;"> <span style=" margin-right: 12px;"><?php if(empty($rec_mtr)) { } else { echo 'Total Received Mtrs : ' . ' '. number_format((float)$rec_mtr->received_mtrs, 2, '.', '') . ' '; } ?></span> </td> </tr> <tr> <td colspan="12" style="border-bottom:1px solid transparent !important;border: transparent !important;text-align: right;"> <span style=" margin-right: 12px;"><?php if(empty($rec_wei)) { } else { echo 'Total Received Weight : ' . ' '. number_format((float)$rec_wei->received_weight, 2, '.', '') . ' '; } ?></span> </td> </tr> </tbody> </table> <table class="" align="center" style="width:100%;"> <tbody> <tr> <td width="" style="padding-top:15px;"> Received By(signature of the Recipient with seal) : <span style="border-bottom:1px dotted #000;"><?php echo $approved_by; ?></span> </td> </tr> <!--<tr> <td colspan="2" style="padding-top:15px;"> Entered into Stock Register by........................................................................................................................................................................... </td> </tr> <tr> <td colspan="2" style="padding-top:15px;"> Stock Reg Folio No............................................................................................................................................................................................. </td> </tr>--> </tbody> </table> </div> </section> </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 ; } ?> <script> $(document).ready(function(){ $("#booking_print").click(function(){ var divToPrint=document.getElementById("print_report"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); }); }); </script> <!--<script> var divContents = $(".print").html(); newWin= window.open(""); newWin.document.write(divContents); newWin.print(); newWin.close(); </script>--> <style> .content-wrapper{ overflow:auto !important; } </style>