EVOLUTION-NINJA
Edit File: consumable_spares_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_fun == 'grn') { ?> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url(); ?>vendor/purchase_order_List?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(); ?>vendor/purchase_order_List?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(); ?>vendor/purchase_order_List?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(); ?>vendor/purchase_order_List?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 { ?> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('new_stores/consumable_received_details?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('new_stores/consumable_received_details?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('new_stores/consumable_received_details?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('new_stores/consumable_received_details?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" id="print_report"> <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 class="" align="center" style="width:100%;"> <tbody> <tr> <td width="90%;"> Unit / Branch /Department : <span style="border-bottom:1px dotted #000;"><?php echo $po_details->department; ?></span> </td> <td> Ph: +91(80)41888298 </td> </tr> <tr> <td colspan="" style="padding-top:15px;"> Received the following goods from M/s : <span style="border-bottom:1px dotted #000;"><?php echo $po_details->vendor_name; ?></span> </td> <td> Date: <span style="border-bottom:1px dotted #000;"><?php echo date("d-m-Y"); ?></span> </td> </tr> <tr> <td colspan="2" style="padding-top:15px;"> PO No. : <span style="border-bottom:1px dotted #000;"><?php echo $po_details->po_no; ?></span> </td> </tr> <tr> <td colspan="2" style="padding-top:15px;"> Product Type : <span style="border-bottom:1px dotted #000;"><?php echo $po_details->product_type; ?></span> </td> </tr> <tr> <td colspan="2" style="padding-top:15px;tex"> <table border="1" style="width:100%;border-spacing:0px !important;"> <tr> <th style="text-align:center;">Product </th> <th style="text-align:center;">Ordered Qty </th> <th style="text-align:center;">Recieved Qty </th> <th style="text-align:center;">Unit Price</th> <th style="text-align:center;">Value </th> <th style="text-align:center;">SGST </th> <th style="text-align:center;">CGST </th> <th style="text-align:center;">IGST </th> <th style="text-align:center;">Tax Amt </th> <th style="text-align:center;">Total Value </th> <th style="text-align:center;">Currency </th> </tr> <?php $tot_tax=0; $tot_val=0; $tot_qty=0; if(!empty($po_goods_details)) { foreach($po_goods_details as $fetch_data) { if(!empty($po_details1)) { foreach($po_details1 as $po_detail_added) { if($po_detail_added->product_id == $fetch_data->product_id){ $tot_qty=$tot_qty+$fetch_data->received_quality; } }}} } if(!empty($po_goods_details)) { foreach($po_goods_details as $fetch_data) { ?> <tr> <td style="text-align:center;"> <?php echo $fetch_data->product_name; ?></td> <td style="text-align:center;"><?php echo $fetch_data->quantity; ?></td> <?php ?> <td style="text-align:center;"><?php echo $fetch_data->received_quality; ?></td> <td style="text-align:center;"><?php echo $fetch_data->unit; ?></td> <?php if($fetch_data->received_quality != 0){$value= $fetch_data->unit * $fetch_data->received_quality; } else { $value= $fetch_data->unit; }?> <td style="text-align:center;"><?php echo $value; ?></td> <td style="text-align:center;"><?php echo $fetch_data->sgst; ?></td> <td style="text-align:center;"><?php echo $fetch_data->cgst; ?></td> <td style="text-align:center;"><?php echo $fetch_data->igst; ?></td> <?php $tax=$fetch_data->sgst + $fetch_data->cgst + $fetch_data->igst ?> <?php $taxval= ($value * $tax)/100; $tot_tax=$tot_tax+$taxval?> <td style="text-align:center;"><?php echo $taxval; ?></td> <?php $val= $value + $taxval; $tot_val=$tot_val+ $val;?> <td style="text-align:center;"><?php echo $val; ?></td> <td style="text-align:center;"><?php echo $fetch_data->currency; ?></td> </td> </tr> <?php } }?> <tr> <td></td> <td></td> <td></td> <td></td> <td><?php $otcharge=0; if($po_details->ot_charges != "" ){ $otcharge=$po_details->grand_total - $po_details->totalvalue; echo $po_details->ot_charges." : ".$otcharge; } ?></td> <td></td> <td></td> <td></td> <td>Total Tax Amt : <?php echo $tot_tax;?> </td> <td>Grand Total : <?php if($otcharge >0){echo $tot_val+$otcharge; } else {echo $tot_val; } ?></td> <td></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;">Product</th> <?php if(isset($goods_details)) { if(!empty($goods_detailss->product_type)) { ?> <?php if($goods_detailss->product_type == 'Consumables') { ?> <th style="text-align:center;">Description</th> <?php } } } else { } ?> <th style="text-align:center;">Ordered Quantity</th> <!--<th style="text-align:center;">Received Quantity</th>--> <th style="text-align:center;">Location</th> <th style="text-align:center;">Received Date</th> <th style="text-align:center;">Invoice</th> <th style="text-align:center;">Purpose / OSL No.</th> <th style="text-align:center;">Received By</th> </tr> </thead> <tbody> <?php $i=1; $goods_details_rec=0;?> <?php if(isset($goods_details)) { foreach($goods_details as $fetch_data) { $goods_details_rec=$goods_details_rec+$fetch_data->quantity;?> <tr style="height:30px;"> <td><?php echo $i; ?></td> <td><?php echo $fetch_data->product_name; ?></td> <?php if($fetch_data->product_type == 'Consumables') { ?> <td><?php echo $fetch_data->description; ?></td> <?php } ?> <td><?php echo $fetch_data->quantity; ?></td> <!-- <td><?php //echo $fetch_data->received_quality; ?></td>--> <td><?php echo $fetch_data->consumed_at; ?></td> <td><?php echo $fetch_data->rec_date; ?></td> <td><?php echo $fetch_data->invoice; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->purpose; ?></td> <td style="text-transform: uppercase !important;"><?php echo $fetch_data->rec_by; ?></td> </tr> <?php $i++;} } ?> <tr> <td colspan="9" style="text-align:right;"> Total Received Quantity : <?php if(empty($goods_details_rec)){ } else { echo $goods_details_rec; } ?> </td> </tr> </tbody> </table> <table class="" style="width:100%;"> <tbody> <?php if($po_details->note != ""){ ?> <tr> <td style="padding-top:10;"> NOTE : <?php echo $po_details->note; ?></span> </td> </tr> <?php } ?> <tr> <td style="padding-top:25px;"> Received By(signature of the Recipient with seal) : <span style="border-bottom:1px dotted #000;"><?php echo $approved_by; ?></span> </td> </tr> </tbody> </table> </div> </section> </div> </div> </div> <!-- <script> var divContents = $(".print").html(); newWin= window.open(""); newWin.document.write(divContents); newWin.print(); newWin.close(); </script>--> <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> <style> .content-wrapper{ overflow:auto !important; } </style>