EVOLUTION-NINJA
Edit File: madeups_workorder_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_jw" 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;">JW Print </button> <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> </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;">Deco-Textil</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;">WorkOrder</td> </tr> <tr> <td colspan="10"></td> <td colspan="2" style="text-align:right;"> </td> </tr> <tr> <td style="text-align:left;"> To, </td> </tr> <tr> <td style="text-align:left;"> Vendor Name : <?php if(!empty($madeups_work_order)) echo $madeups_work_order->vendor_name; ?> </td> </tr> <tr> <td ><?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->address . "<br/>". $fetch_address->city . "<br/>". $fetch_address->country . "-". $fetch_address->pincode; ?></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="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%;">Below is the work order details.</p> </td> </tr> </table> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="4px"> <thead> <tr> <th>WO #</th> <th>WO Date</th> <th>Wo Type</th> <th>Wo Del Date</th> <th>Issues As</th> <th>Rate INR</th> <th>Req Qty</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(!empty($madeups_work_order)) { ?> <tr > <td><?php echo $madeups_work_order->wo_number; ?></td> <td><?php echo $madeups_work_order->wo_date; ?></td> <td><?php echo $madeups_work_order->wo_type; ?></td> <td><?php echo $madeups_work_order->d_date ; ?></td> <td><?php echo $madeups_work_order->as_per; ?></td> <td><?php echo $madeups_work_order->rate; ?></td> <td><?php echo $madeups_work_order->req_qty; ?></td> </tr> <?php $i++; } ?> </tbody> </table> <tr> <td colspan="12"> <p style="padding-left:5%;padding-top: 1%;">Issued for below order:</p> </td> </tr> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="4px"> <thead> <tr> <th>DTL #</th> <th>Size/Width</th> <th>Article</th> <th>Design</th> <th>Shade</th> <th>DTL Shade</th> <th>Units</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(!empty($madeups_work_order)) { ?> <tr > <td><?php echo $madeups_work_order->DTL; ?></td> <td><?php echo $madeups_work_order->size; ?></td> <td><?php echo $madeups_work_order->article; ?></td> <td><?php echo $madeups_work_order->design; ?></td> <td><?php echo $madeups_work_order->shade;?> <td><?php echo $madeups_work_order->buyerShade; ?></td> <td><?php echo $madeups_work_order->units; ?></td> </tr> <?php $i++; } ?> </tbody> </table> <div class=""> <!-----Warp Details ----------------------> <br/>Below is Fabric Materials Issued for Process <table border="1" class="" style="width:100%;border-spacing:0;margin-top: 1%;margin-bottom: 15px;" cellpadding="2px"> <thead> <tr> <th>SL No.</th> <th>PO/OSL #</th> <th>DTL Piece#</th> <th>Supplier Piece No</th> <th>Width</th> <th>Article</th> <th>Design</th> <th>Shade</th> <th>Issue Quantity</th> <th>Estimated Pcs</th> <th>Issue Date</th> <th>Issued for</th> </tr> </thead> <?php if(isset($fabric_madeups_workorder)) { $i=1; $sum_issue_mtrs = 0; $sum_issue_est_pcs = 0; $sum_issue_mtrs_l = 0; $sum_issue_est_pcs_l = 0; $sum_issue_mtrs_m = 0; $sum_issue_est_pcs_m = 0; foreach($fabric_madeups_workorder as $f) { $sum_issue_mtrs += floatval($f->f_issue_mtrs); $sum_issue_est_pcs += floatval($f->est_pcs); if($f->issued_for == 'Lining/Inter Lining Fabric'){ $sum_issue_mtrs_l += floatval($f->f_issue_mtrs); $sum_issue_est_pcs_l += floatval($f->est_pcs); } else if($f->issued_for == 'Main Fabric'){ $sum_issue_mtrs_m += floatval($f->f_issue_mtrs); $sum_issue_est_pcs_m += floatval($f->est_pcs); } ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $f->f_osl; ?></td> <td><?php echo $f->f_ssl_piece; ?></td> <td><?php echo $f->f_ssl_piece; ?></td> <td><?php echo $f->f_width; ?></td> <td><?php echo $f->f_article; ?></td> <td><?php echo $f->f_design ; ?></td> <td><?php echo $f->f_shade; ?></td> <td><?php echo $f->f_issue_mtrs; ?></td> <td><?php echo $f->est_pcs; ?></td> <td><?php echo $f->issue_date; ?></td> <td><?php echo $f->issued_for; ?></td> </tr> <?php $i++; } } ?> <tr> <td colspan = "7"></td> <td>Total</td> <td><?php echo $sum_issue_mtrs.' Mtrs'; ?></td> <td><?php echo $sum_issue_est_pcs.' Pcs'; ?></td> </tr> <tr> <td colspan = "7"></td> <td>Main Fabric</td> <td><?php echo $sum_issue_mtrs_m.' Mtrs'; ?></td> <td><?php echo $sum_issue_est_pcs_m.' Pcs'; ?></td> </tr> <tr> <td colspan = "7"></td> <td>Lining/Inter Lining Fabric</td> <td><?php echo $sum_issue_mtrs_l.' Mtrs'; ?></td> <td><?php echo $sum_issue_est_pcs_l.' Pcs'; ?></td> </tr> </table> <!-------------Weft Details----------------------> </div> <table style="width:100%;margin-top:20px;"> <tr> <td>Remarks</td> </tr> <tr> <td><?php echo $madeups_work_order->remarks; ?> </td> </tr> </table> <table style="width:100%;margin-top:20px;"> <tr> <td>FOR Deco-Textil</td> </tr> </table> </div> <!--- content-wrapper ----> <div class="content-wrapper print" id="print_report_jw" style="padding:10px;display: none;"> <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;">Deco-Textil</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;">WorkOrder</td> </tr> <tr> <td colspan="10"></td> <td colspan="2" style="text-align:right;"> </td> </tr> <tr> <td style="text-align:left;"> To, </td> </tr> <tr> <td style="text-align:left;"> Vendor Name : <?php if(!empty($madeups_work_order)) echo $madeups_work_order->vendor_name; ?> </td> </tr> <tr> <td ><?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->address . "<br/>". $fetch_address->city . "<br/>". $fetch_address->country . "-". $fetch_address->pincode; ?></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="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%;">Below is the work order details.</p> </td> </tr> </table> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="4px"> <thead> <tr> <th>WO #</th> <th>WO Date</th> <th>Wo Type</th> <th>Wo Del Date</th> <th>Issues As</th> <th>Rate INR</th> <th>Req Qty</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(!empty($madeups_work_order)) { ?> <tr > <td><?php echo $madeups_work_order->wo_number; ?></td> <td><?php echo $madeups_work_order->wo_date; ?></td> <td><?php echo $madeups_work_order->wo_type; ?></td> <td><?php echo $madeups_work_order->d_date ; ?></td> <td><?php echo $madeups_work_order->as_per; ?></td> <td><?php echo $madeups_work_order->rate; ?></td> <td><?php echo $madeups_work_order->req_qty; ?></td> </tr> <?php $i++; } ?> </tbody> </table> <tr> <td colspan="12"> <p style="padding-left:5%;padding-top: 1%;">Issued for below order:</p> </td> </tr> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="4px"> <thead> <tr> <th>DTL #</th> <!--<th>Size/Width</th>--> <!--<th>Article</th>--> <!--<th>Design</th>--> <!--<th>Shade</th>--> <!--<th>DTL Shade</th>--> <!--<th>Units</th>--> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(!empty($madeups_work_order)) { ?> <tr > <td><?php echo $madeups_work_order->DTL; ?></td> <!--<td><?php echo $madeups_work_order->size; ?></td>--> <!--<td><?php echo $madeups_work_order->article; ?></td>--> <!--<td><?php echo $madeups_work_order->design; ?></td>--> <!--<td><?php echo $madeups_work_order->shade;?>--> <!--<td><?php echo $madeups_work_order->buyerShade; ?></td>--> <!--<td><?php echo $madeups_work_order->units; ?></td>--> </tr> <?php $i++; } ?> </tbody> </table> <div class=""> <!-----Warp Details ----------------------> <br/>Below is Fabric Materials Issued for Process <table border="1" class="" style="width:100%;border-spacing:0;margin-top: 1%;margin-bottom: 15px;" cellpadding="2px"> <thead> <tr> <th>SL No.</th> <th>PO/OSL #</th> <th>DTL Piece#</th> <th>Supplier Piece No</th> <th>Width</th> <th>Article</th> <th>Design</th> <th>Shade</th> <th>Issue Quantity</th> <th>Estimated Pcs</th> <th>Issue Date</th> <th>Issued for</th> </tr> </thead> <?php if(isset($fabric_madeups_workorder)) { $i=1; $sum_issue_mtrs = 0; $sum_issue_est_pcs = 0; $sum_issue_mtrs_l = 0; $sum_issue_est_pcs_l = 0; $sum_issue_mtrs_m = 0; $sum_issue_est_pcs_m = 0; foreach($fabric_madeups_workorder as $f) { $sum_issue_mtrs += floatval($f->f_issue_mtrs); $sum_issue_est_pcs += floatval($f->est_pcs); if($f->issued_for == 'Lining/Inter Lining Fabric'){ $sum_issue_mtrs_l += floatval($f->f_issue_mtrs); $sum_issue_est_pcs_l += floatval($f->est_pcs); } else if($f->issued_for == 'Main Fabric'){ $sum_issue_mtrs_m += floatval($f->f_issue_mtrs); $sum_issue_est_pcs_m += floatval($f->est_pcs); } ?> <tr > <td><?php echo $i; ?></td> <td><?php echo $f->f_osl; ?></td> <td><?php echo $f->f_ssl_piece; ?></td> <td><?php echo $f->f_ssl_piece; ?></td> <td><?php echo $f->f_width; ?></td> <td><?php echo $f->f_article; ?></td> <td><?php echo $f->f_design ; ?></td> <td><?php echo $f->f_shade; ?></td> <td><?php echo $f->f_issue_mtrs; ?></td> <td><?php echo $f->est_pcs; ?></td> <td><?php echo $f->issue_date; ?></td> <td><?php echo $f->issued_for; ?></td> </tr> <?php $i++; } } ?> <tr> <td colspan = "7"></td> <td>Total</td> <td><?php echo $sum_issue_mtrs.' Mtrs'; ?></td> <td><?php echo $sum_issue_est_pcs.' Pcs'; ?></td> </tr> <tr> <td colspan = "7"></td> <td>Main Fabric</td> <td><?php echo $sum_issue_mtrs_m.' Mtrs'; ?></td> <td><?php echo $sum_issue_est_pcs_m.' Pcs'; ?></td> </tr> <tr> <td colspan = "7"></td> <td>Lining/Inter Lining Fabric</td> <td><?php echo $sum_issue_mtrs_l.' Mtrs'; ?></td> <td><?php echo $sum_issue_est_pcs_l.' Pcs'; ?></td> </tr> </table> <!-------------Weft Details----------------------> </div> <table style="width:100%;margin-top:20px;"> <tr> <td>Remarks</td> </tr> <tr> <td><?php echo $madeups_work_order->remarks; ?> </td> </tr> </table> <table style="width:100%;margin-top:20px;"> <tr> <td>FOR Deco-Textil</td> </tr> </table> </div> <!--- content-wrapper ----> <!------------- content-wrapper END -----------------------------------------------------------------------------------------------------> <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(); }); $("#booking_print_jw").click(function(){ $('#print_report_jw').css('display','block'); var divToPrint=document.getElementById("print_report_jw"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); $('#print_report_jw').css('display','none'); }); }); </script>