EVOLUTION-NINJA
Edit File: fabric_embroidry_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> <span class="close-right" ><a href="<?php echo base_url('out_source/fabric_embroidry_grid');?>" 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> </div> <div class="content-wrapper print" id="print_report" style="padding:10px;"> <table style="width:100%;border-spacing:0;"> <tr> <td colspan="11"></td> <td style="text-align:right;">e-mail : sales@swansilk.com</td> </tr> <tr> <td colspan="11"></td> <td style="text-align:right;">phone : 080-41888298</td> </tr> <tr> <td colspan="12" style="text-align:center;font-weight:900;font-size:20px;font-style:Akashi;">SWAN SILK (P) LIMITED</td> </tr> <tr> <td colspan="12" style="text-align:center;">"SWAN HOUSE" No:40, 4th cross, Residency Road, Banglore - 560025. INDIA</td> </tr> <tr> <td colspan="12" style="text-align:center;font-weight:600;text-decoration: underline;">WORK ORDER</td> </tr> <tr> <td colspan="10"></td> <td colspan="2" style="text-align:right;"> </td> </tr> <tr> <td colspan="10"><?php if(empty($fetch_address->name)) echo "SWAN SILK PVT 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 $fetch->work_order; ?></td> </tr> <tr> <td colspan="10"></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;">Delivery Date : <?php echo $fetch->sys_date; ?></td>--> </tr> <tr> <td colspan="2" style="padding-top: 1%;">Sir / Madam,</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%;">We requested you to process our Fabric requirement.</p> </td> </tr> </table> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <thead> <tr> <th>SL No.</th> <th>Work Order</th> <th>Finishing Type</th> <th>Delivery Date</th> <th>Comments </th> <th>Created By </th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if($fetch->id !="") { ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $fetch->work_order; ?></td> <td><?php echo $fetch->finishing_type; ?></td> <td><?php echo $fetch->sys_date; ?></td> <td><?php echo $fetch->comment ; ?></td> <td><?php echo $fetch->created_by ; ?></td> </tr> <?php $i++; } ?> </tbody> </table> </br> </br> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <p style="padding-left:5%;padding-top: 1%;">Below is the Fabric Material Issued Process</p> <thead> <tr> <th>SL No.</th> <th>PO# / OSL No.</th> <th>DTL Piece No</th> <th>Supplier Piece No</th> <!--<th>Actual Quantity</th>--> <th>Issued Quantity</th> <th>Article(PRODUCT)</th> <th>Width</th> <th>Shade</th> <!-- //<th>Balanced Quantity</th> <th>Inspected Mtrs</th> <th>Rejected Mtrs</th>--> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(isset($getalldata)) { foreach($getalldata as $fetch_data){ if($fetch_data->id !=""){ ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $fetch_data->po_no; ?></td> <td><?php echo $fetch_data->ssl_pc_no; ?></td> <td><?php echo $fetch_data->piece_no; ?></td> <!--<td><?php echo $fetch_data->balanced_mtrs ; ?></td>--> <td><?php echo $fetch_data->issue_stock; ?></td> <td><?php echo $fetch_data->product_name; ?></td> <td><?php echo $fetch_data->width; ?></td> <td><?php echo $fetch_data->shades; ?></td> <!--<td><?php echo $fetch_data->bal_goods; ?></td> <td><?php echo $fetch_data->inspected_mtrs; ?></td> <td><?php echo $fetch_data->rejected_mtrs; ?></td>--> </tr> <?php $i++;} } } ?> <!-- <tr> <td colspan="2" style="border-bottom:1px solid transparent !important;border-right:1px solid transparent !important;">Yarn Type </td> <td colspan="3" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;">Total Gross Weight</td> <td colspan="3" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;">Total Net Weight</td> <?php foreach($getotalval as $totval){ if($totval->name !=""){?> <tr> <td colspan="2" style="border-bottom:1px solid transparent !important;border-right:1px solid transparent !important;"><?php echo $totval->name;?></td> <td colspan="3" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;"><?php echo $totval->gross;?></td> <td colspan="3" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;"><?php echo $totval->net;?></td> </tr> <?php } } ?> </tr> <!--<tr> <td colspan="5" style="border-top:1px solid transparent !important;"></td> <td colspan="3" style="border-top:1px solid transparent !important;border-right:1px solid transparent !important;">GRAND Total in Rs</td> <td colspan="3" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;text-align:right;"><?php echo $ttl_amt; ?></td> </tr>--> <tr> <td colspan="5" style="border-top:1px solid transparent !important;"></td> <td colspan="5" style="border-top:1px solid transparent !important;"><b></b></td> </tr> </tbody> </table> <table style="margin-top:10px;"> <!--<tr> <td><?php echo $fetch_data->comment; ?></td> </tr>--> <tr> <?php if(empty($fetch_address)) { echo ""; } else { ?> <td > Bank Details : <?php echo 'A/c No. '. $fetch_address->ac_no . ',' . $fetch_address->name . ' ' . $fetch_address->bank_address ; ?></td> <?php } ?> </td> </tr> </table> <table style="width:100%;margin-top:20px;"> <tr> <td>FOR SWAN SILK (P) LIMITED</td> <td style="text-align:right;">FOR SWAN SILK (P) LIMITED</td> </tr> <tr > <td style="padding-top:7%;">EXECUTIVE - PURCHASE</td> <td style="text-align:right;padding-top:7%;">DIRECTOR</td> </tr> <tr> <td colspan="2" style="text-align:center; padding-top:5%;">IT IS A COMPUTER GENERATED FORMAT. SIGNATURE IS NOT REQUIRED</td> </tr> </table> </div> <!--- content-wrapper ----> <!------------- content-wrapper END -----------------------------------------------------------------------------------------------------> <?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 ; } ?> </div> <!----- wrapper -----> </div> <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>