EVOLUTION-NINJA
Edit File: work_order_complete_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($back_val == 'twisting_back') { ?> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('out_source/delivery_confirmation?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/delivery_confirmation?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/delivery_confirmation?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/delivery_confirmation?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 } ?> <?php } else if($back_val == 'grn_back') { ?> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('out_source/twisting_work_order?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/twisting_work_order?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/twisting_work_order?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/twisting_work_order?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 } ?> <?php } ?> </div> <div class="content-wrapper print" id="print_report" style="padding:10px;" style="width:1000px;"> <section class="content"> <div class="print" style="width:100%;"> <h2 style="text-align:center;margin-bottom:0px !important;"><b><span>Deco-Textil</span></b></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=""></td> <td colspan="">Ph: +91(80)41888298</td> </tr> <tr> <td colspan="" style="width:88%;"><?php if(empty($fetch_address->name)) echo $fetch->vendor_name; else echo $fetch_address->name . "<br/>" .$fetch_address->address . "<br/>". $fetch_address->city . "<br/>". $fetch_address->country . "-". $fetch_address->pincode; ?></td> <!--<td colspan="10"><?php //if(empty($fetch_address->name)) echo "Deco-Textil" . "<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="" style="">No. : <?php echo $fetch->work_order_no; ?></td> </tr> <tr> <td colspan=""></td> <td colspan="" style="">Date : <?php echo date("d-m-Y"); ?></td> </tr> <tr> <td colspan=""></td> <td colspan="" style="text-align:right;"> <?php // echo $fetch->delivery_date; ?></td> </tr> <tr> <td colspan="" style="padding-top: 1%;"></td> <!--<td colspan="2" style="padding-top: 1%;">INDENT NO.114 DT. 23.05.17</td>--> <td colspan=""></td> </tr> <tr> <td colspan=""> <p style="padding-top: 1%;">Twisting 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>Yarn Type</th> <th>Yarn Quality</th> <th>Yarn Name</th> <th>Yarn Denier</th> <th>Yarn Specification</th> <th>Yarn Stage</th> <th>Required Quantity</th> <th>Rate INR</th> <th>Value INR</th> <th>CGST</th> <th>SGST</th> <th>Total</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(isset($getyarndata)) { foreach($getyarndata as $fetch_data){ if($fetch_data->yarn_type !=""){ ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $fetch_data->yarn_type; ?></td> <td><?php echo $fetch_data->yarn_quality; ?></td> <td><?php echo $fetch_data->yarn_name; ?></td> <td><?php echo $fetch_data->yarn_denier ; ?></td> <td><?php echo $fetch_data->yarn_specification; ?></td> <td><?php echo $fetch_data->yarn_stage; ?></td> <td><?php echo bcdiv($fetch_data->quty_kgs, 1, 2); ?></td> <td><?php echo bcdiv($fetch_data->rate_inr, 1, 2); ?></td> <td><?php echo bcdiv($fetch_data->value_inr, 1, 2); ?></td> <td><?php echo $fetch_data->cgst; ?></td> <td><?php echo $fetch_data->sgst; ?></td> <td><?php echo bcdiv($fetch_data->twisting_total, 1, 2); ?></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-top: 1%;">Raw Material Issued.</p> <thead> <tr> <th>SL No.</th> <th>Yarn Name</th> <th>Yarn Denier</th> <th>Yarn Specification</th> <th>Issued Gross Weight</th> <th>Issued Net Weight</th> <th>Location</th> <th>Bale#</th> <th>Lot#</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(isset($getalldata)) { foreach($getalldata as $fetch_data){ if($fetch_data->material_yarnname !=""){ ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $fetch_data->material_yarnname; ?></td> <td><?php echo $fetch_data->material_yarndenier; ?></td> <td><?php echo $fetch_data->material_yarnspecification; ?></td> <td><?php echo bcdiv($fetch_data->issued_gross_Weight, 1, 2); ?></td> <td><?php echo bcdiv($fetch_data->issued_net_weight, 1, 2); ?></td> <td><?php echo $fetch_data->location; ?></td> <td><?php echo $fetch_data->material_bale; ?></td> <td><?php echo $fetch_data->material_lot; ?></td> </tr> <?php $i++;} } } ?> <tr> <td colspan="2" style="border-bottom:1px solid transparent !important;border-right:1px solid transparent !important;">GRAND Total in Rs:</td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Yarn Type </td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Total Gross Weight</td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Total Net Weight</td> <td colspan="1" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;"></td> <?php foreach($getotalval as $totval){ if($totval->name !=""){?> <tr> <td colspan="2" style="border-top:1px solid transparent !important;border-right:1px solid transparent !important;"></td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo $totval->name;?> </td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo bcdiv($totval->gross, 1, 2);?></td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo bcdiv($totval->net, 1, 2);?></td> <td colspan="1" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;"></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 border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <p style="padding-top: 1%;">Recieved Quantity after Twisting.</p> <thead> <tr> <th>SL No.</th> <th>Yarn Name</th> <th>INVOICE #</th> <th>LOT #</th> <th>BALE #/BOX #</th> <th>GROSS WEIGHT</th> <th>NET WEIGHT</th> <th>TARE WEIGHT</th> <th>RECEIVED DATE </th> <th>LOCATION</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(isset($twisting_fetch)) { foreach($twisting_fetch as $fetch_data){ ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $fetch_data->yarn_details; ?></td> <td><?php echo $fetch_data->invoice; ?></td> <td><?php echo $fetch_data->lot; ?></td> <td><?php echo $fetch_data->bale; ?></td> <td><?php echo bcdiv($fetch_data->gross_weight, 1, 2) ; ?></td> <td><?php echo bcdiv($fetch_data->twisting_net_weight, 1, 2); ?></td> <td><?php echo bcdiv($fetch_data->tare_weight, 1, 2); ?></td> <td><?php echo $fetch_data->received_date; ?></td> <td><?php echo $fetch_data->location; ?></td> </tr> <?php $i++; } } ?> <tr> <td colspan="1" style="border-bottom:1px solid transparent !important;border-right:1px solid transparent !important;">GRAND Total in Rs:</td> <td colspan="1" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Variance</td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Variance %</td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Total Gross Weight</td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;">Total Net Weight</td> <td colspan="2" style="border-bottom:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;">Total Tare Weight </td> <?php foreach($getotalval_v as $totval){ ?> <tr> <td colspan="1" style="border-top:1px solid transparent !important;border-right:1px solid transparent !important;"></td> <td colspan="1" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo bcdiv($variance_val, 1, 2);?></td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo bcdiv($variance_per, 1, 2);?></td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo bcdiv($totval->gross, 1, 2);?></td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;border-right:1px solid transparent !important;text-align:center;"><?php echo bcdiv($totval->net, 1, 2);?></td> <td colspan="2" style="border-top:1px solid transparent !important;border-left:1px solid transparent !important;text-align:center;"><?php echo bcdiv($totval->tare, 1, 2);?> </td> </tr> <?php } ?> </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 class="" align="center" style="width:900px;"> <tbody> <tr> <td width="700px;" style="padding-top:15px;"> Received By(signature of the Recipient with seal) : <span style="border-bottom:1px dotted #000;"><?php echo $userdetails->username; ?></span> </td> </tr> </tbody> </table> </div> </section> </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>