EVOLUTION-NINJA
Edit File: gst_invoice_generate.php
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Invoice</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.3/jspdf.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="<?php echo base_url('decotextil/assets/js/bootstrap.min.js');?>"></script> <style> .invoice_table{ font-family:Arial, Helvetica, sans-serif !important; font-size:10px; } table { border-spacing: 0 !important; border-color: #cacaca !important; } td { padding:5px 5px; line-height: 1.6; } </style> </head> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.jquery.min.js"></script> <script> $(document).ready(function(){ $("#mom").hide(); $("#myInput6").chosen({}); }); </script> <?php function formatToTwoDecimals($number) { return number_format(floor($number * 100) / 100, 2, '.', ''); } ?> <!--<?php ///if($access_row->preview_submit == 1) { ?> <button type="button" onclick="goods_details()" id="submit_booking_print1" style=" margin-top: 13px; right: 180px; margin-right: 4px; padding-bottom: 1px; padding-left: 15px; padding-right: 15px; background: rgb(72,91,127); color: white; font-size: 22px; position:absolute; " >Submit</button> <?php //} else { ?> <button type="button" onclick="goods_details()" id="submit_booking_print1" style=" margin-top: 13px; right: 180px; margin-right: 4px; padding-bottom: 1px; padding-left: 15px; padding-right: 15px; background: rgb(72,91,127); color: white; font-size: 22px; position:absolute;cursor: not-allowed;" disabled>Submit</button> <?php //} ?>--> <script> function back_function() { window.location.href = "<?php echo base_url('packing_list/paking_list_details?prop_id=1'); ?>"; } </script> <div class="row"> <input type="button" onclick="back_function()" id="back_button" value="Back" style=" right:100px; padding-top: 2px; padding-bottom: 1px; padding-left: 15px; padding-right: 15px; float: right;margin-right: 5px;"> <!--<?php //if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <input type="button" onclick="goods_details()" id="submit_booking_print1" value="Submit" style="float: right; margin-right: 5px;" disabled> <?php // } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 1){ ?> <input type="button" onclick="goods_details()" id="submit_booking_print1" value="Submit" style="float: right; margin-right: 5px;"> <?php //} else { ?> <input type="button" onclick="goods_details()" id="submit_booking_print1" value="Submit" style="float: right; margin-right: 5px;"> <?php //} ?> --> <?php if($fetchh->confirm == 'Yes') { ?> <input type="button" onclick="tableToExcel('excelexport', 'W3C Example Table')" id="export_table" value="Export to Excel" style="float: right; margin-right: 5px;"> <button type="button" id="generate_pdf_btn" style="float: right; margin-right: 5px;" class="btn btn-primary" >Export to PDF</button> <input type="button" id="booking_print1" value="Print" style="float: right; margin-right: 5px;"> <?php } else { ?> <input type="button" onclick="tableToExcel('excelexport', 'W3C Example Table')" id="export_table" value="Export to Excel" style="float: right; margin-right: 5px;" disabled> <button type="button" id="generate_pdf_btn" style="float: right; margin-right: 5px;" class="btn btn-primary" disabled>Export to PDF</button> <input type="button" id="booking_print1" value="Print" style="float: right; margin-right: 5px;" disabled> <?php } ?> <!--<?php if($indent_p == 'indent_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('packing_list/paking_list_details?prop_id=1');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 5px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } else if($indent_p == 'today_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('packing_list/paking_list_details?prop_id=2');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 5px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } else if($indent_p == 'monthly_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('packing_list/paking_list_details?prop_id=3');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 5px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } else if($indent_p == 'year_preview') { ?> <span id="back_button" class="close-right" ><a href="<?php echo base_url('packing_list/paking_list_details?prop_id=4');?>" style="font-size: 22px;border: 1px solid;padding-bottom: 5px; margin-top: 10%; text-decoration: none; padding-top: 1px; padding-right: 12px; padding-left: 12px;background: rgb(72,91,127);color: white;margin-top:10%;text-decoration:none;position:absolute;right:0;margin-right: 24px;margin-top: 13px;">Back</a></span> <?php } ?> --> </div> <body> <form> <div class="invoice_table" id="print_report"> <div class="row"> <h4 style="text-align:center; padding-top:1%;font-size: 20px;margin-right:235px;padding-left: 20%;">INVOICE<br/><span class="buyer" style="margin-right:55px;font-size: 15px;">CUSTOM</span></h4> </div> <table class="table" border="1" style="width:100%;border-bottom:1px solid transparent;"> <tr> <td colspan="" rowspan="" style="width:25%;border-right:1px solid transparent;border-bottom:1px solid transparent;"><img src="<?php echo base_url('assets/img/logo2.png');?>" class="img-responsive"></td> <td colspan="" style="width:25%;border-bottom:1px solid transparent;border-left:1px solid transparent;">Phone No. :+91 80 41888298 <br> Fax No. : +91 80 25598300 <br> E- Mail. : sales@swansilk.com <br> WEBSITE : www.swansilk.com</td> <td colspan="" style="width:25%;">Invoice No & date <br><b style="font-size:12px;"><?php echo $fetch->invoice_num; ?> <br/> <?php echo $fetch->invoice_date; ?></b></td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="" style="width:25%;">Exporter's Ref. <br><b><input type="text" id="myInput" style="width:;height: 18px;font-weight: bold;" value="<?php echo $fetch->exporter_ref_preview; ?>" readonly="readonly"> </b></td> <?php } else { ?> <td colspan="" style="width:25%;">Exporter's Ref. <br><b><input type="text" id="myInput" style="width:;height: 18px;font-weight: bold;" value="<?php echo $fetch->exporter_ref_preview; ?>"> </b></td> <?php } ?> </tr> <tr> <td colspan="2" style="clear:both; font-weight:600;border-top:1px solid transparent;border-bottom:1px solid transparent;">P.B. 25210, #40, 4TH CROSS, RESIDENCY ROAD, BANGALORE - 560 025, INDIA<br>State:Karnataka District:Bangalore Urban State Code:29</td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="">Order no & Date<br> <b><input type="text" id="order_myInput1" style=" width:99%;height: 18px;font-weight: bold;font-size:12px !important;" value="<?php echo $fetch->order_numbner_date; ?>" readonly="readonly"> </b></td> <td colspan="" style="">Other Reference's<br> <input type="hidden" id="inovice_numbers" value="<?php echo $fetch->invoice_num; ?>"> <input type="text" id="myInput1" style=" width:80%;height: 18px;font-weight: bold;font-size:12px !important;" value="<?php echo $fetch->other_reference_preview; ?>" readonly="readonly"></td> <?php } else { ?> <td colspan="">Order no & Date<br> <b><input type="text" id="order_myInput1" style=" width:99%;height: 18px;font-weight: bold;font-size:12px !important;" value="<?php echo $fetch->order_numbner_date; ?>" readonly="readonly"> </b></td> <td colspan="" style="">Other Reference's<br> <input type="hidden" id="inovice_numbers" value="<?php echo $fetch->invoice_num; ?>"> <input type="text" id="myInput1" style=" width:80%;height: 18px;font-weight: bold;font-size:12px !important;" value="<?php echo $fetch->other_reference_preview; ?>" readonly="readonly"></td> <?php } ?> </tr> <tr> <td colspan="2" rowspan="2"><span id="customer_name">Customer Name : <input type="text" class="" style=" width: %;border:transparent;font-size:12px;" value="<?php echo $fetch->customer_name; ?>"><br>Contract Type : <input type="text" class="" style=" width: %;border:transparent;font-size:12px;" value="<?php if(empty($osl)) { } else { echo $osl->contractType; } ?>" readonly="readonly"><br></span> <?php if($fetchh->confirm == 'Yes') { ?> Consignee: <br> <b> <textarea type="text" id="myInput2" rows="5" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6; font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->consignee; ?></textarea></b></td> <td colspan="2">Buyer if other than consignee<br> <b> <textarea type="text" id="myInput3" rows="4" style=" width: 90%;" readonly="readonly"><?php echo $fetch->buyer_consignee_preview; ?></textarea></b> </td> <?php } else { ?> Consignee: <br> <b> <textarea type="text" id="myInput2" rows="5" readonly="readonly" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6; font-family: 'Times New Roman', Times, serif;" ><?php echo $fetch->consignee; ?></textarea></b></td> <td colspan="2">Buyer if other than consignee<br> <b> <textarea type="text" id="myInput3" readonly="readonly" rows="4" style=" width: 90%;" ><?php echo $fetch->buyer_consignee_preview; ?></textarea></b> </td> <?php } ?> </tr> <tr> <td colspan="">Country of origin of goods<br><b style="font-size:12px;">INDIA</b></td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="">Destination country <b> <select id="myInput6" style="width: 99%;height: 18px;font-weight: bold; font-size: 12px; text-transform: uppercase !important;"> <?php foreach($countries as $countries) { ?> <option style="text-transform: uppercase !important" value="<?php echo $countries->country_name; ?>" <?php if($countries->country_name == $fetch->country) {echo "selected";}?> ><?php echo $countries->country_name; ?></option> <?php } ?> </select> <!--<input type="text" id="myInput6" style="width: 99%;height: 18px;font-weight: bold; font-size: 12px;" value="<?php echo $fetch->country; ?>" readonly="readonly">--> </b></td> <?php } else { ?> <td colspan="">Destination country <b> <select id="myInput6" style="width: 99%;height: 18px;font-weight: bold; font-size: 12px;text-transform: uppercase !important"> <?php foreach($countries as $countries) { ?> <option style="text-transform: uppercase !important" value="<?php echo $countries->country_name; ?>" <?php if($countries->country_name == $fetch->country) {echo "selected";}?>><?php echo $countries->country_name; ?></option> <?php } ?> </select> <!--<input type="text" id="myInput6" style="width: 99%;height: 18px;font-weight: bold; font-size: 12px;" value="<?php echo $fetch->country; ?>">--> </b></td> <?php } ?> </tr> <tr> <!--- <?php if($access_row->preview_submit == 1) { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <input type="text" id="myInput4" style="width:45%;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->pre_carriage; ?>"></td> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <input type="text" id="myInput4" style="width:45%;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->pre_carriage; ?>"></td> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <input type="text" id="myInput4" style="width:45%;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->pre_carriage; ?>" readonly="readonly"></td> <?php } ?>--> <?php if($access_row->preview_submit == 1) { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <textarea type="text" id="myInput4" rows="2" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->pre_carriage; ?></textarea></td> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <textarea type="text" id="myInput4" rows="2" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->pre_carriage; ?></textarea></td> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <textarea type="text" id="myInput4" rows="2" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->pre_carriage; ?></textarea></td> <?php } ?> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="" style="font-size:12px;">Place of Receipt by pre- carrrier<br> <input type="text" id="myInput5" style="width:;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->receipt_carriage; ?>" readonly="readonly"></td> <td colspan="2" rowspan="3" style="font-size:12px;">Terms of Delivery and payment<br> <b><textarea type="text" id="myInput9" style="width:90%; height: ;font-size:13px;font-weight: bold;font-family: 'Times New Roman', Times, serif;" rows="2" readonly="readonly"><?php echo $fetch->delivery_payment_preview; ?></textarea><br/><?php echo $contract_type->contarct_type; ?></td> <?php } else { ?> <td colspan="" style="font-size:12px;">Place of Receipt by pre- carrrier<br> <input type="text" id="myInput5" style="width:;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->receipt_carriage; ?>"></td> <td colspan="2" rowspan="3" style="font-size:12px;">Terms of Delivery and payment<br> <b><textarea type="text" id="myInput9" style="width:90%; height: ;font-size:13px;font-weight: bold;font-family: 'Times New Roman', Times, serif;" rows="2"><?php echo $fetch->delivery_payment_preview; ?></textarea><br/><?php echo $contract_type->contarct_type; ?></td> <?php } ?> </tr> <tr> <!--- <?php if($access_row->preview_submit == 1) { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <input type="text" id="myInput7" style="width:45%;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->vehicle_flight; ?>"></td> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <input type="text" id="myInput7" style="width:45%;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->vehicle_flight; ?>"></td> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <input type="text" id="myInput7" style="width:45%;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->vehicle_flight; ?>" readonly="readonly"></td> <?php } ?>---> <?php if($access_row->preview_submit == 1) { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <textarea type="text" id="myInput7" rows="2" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" ><?php echo $fetch->vehicle_flight; ?></textarea></td> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <textarea type="text" id="myInput7" rows="2" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" ><?php echo $fetch->vehicle_flight; ?></textarea></td> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <textarea type="text" id="myInput7" rows="2" style=" width:70%;font-size:14px;font-weight:bold;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->vehicle_flight; ?></textarea></td> <?php } ?> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="" style="font-size:12px;">Port of loading<br> <b><input type="text" id="myInput8" style="width:; height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->port_loading; ?>" readonly="readonly"></b></td> <?php } else { ?> <td colspan="" style="font-size:12px;">Port of loading<br> <b><input type="text" id="myInput8" style="width:; height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->port_loading; ?>"></b></td> <?php } ?> </tr> <tr> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="" style="font-size:12px;">Port of discharge<br> <b><input type="text" id="myInput10" style="width:;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->port_discharge; ?>" readonly="readonly"></b></td> <td colspan="" style="font-size:12px;">Final Destination<br> <b><input type="text" id="myInput11" style="width:;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->final_destination; ?>" readonly="readonly"></b></td> <?php } else { ?> <td colspan="" style="font-size:12px;">Port of discharge<br> <b><input type="text" id="myInput10" style="width:;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->port_discharge; ?>"></b></td> <td colspan="" style="font-size:12px;">Final Destination<br> <b><input type="text" id="myInput11" style="width:;height: 18px;font-size:12px;font-weight: bold;" value="<?php echo $fetch->final_destination; ?>"></b></td> <?php } ?> </tr> </table> <table class="table" border="1" style="width:100%;border-top:1px solid transparent;"> <tr> <td colspan="2" style="width:10%;border-right: 1px solid transparent;">Marks & Nos Container no</td> <td colspan="" style="width:10%;border-right: 1px solid transparent;border-left: 1px solid transparent;">No & kind of Packages</td> <td colspan="5" style="width:56%;border-left: 1px solid transparent;">Description of goods</td> <td style="width:8%;">Quantity</td> <td style="width:8%;">Rate</td> <td style="width:8%;">Amount</td> </tr> <tr> <td colspan="2" style="border-right: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;font-size: 11px;"><b><?php echo $fetch->invoice_num . '/1-' . $count_package_fetch_invoice ; ?></b></td> <td style="border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><select style="font-weight: bold;border: transparent;font-size:12px;" id="card_board_select"><option value="<?php echo 'CARD BOARD BOX'; ?>" <?php if($fetch->card_board == 'CARD BOARD BOX'){echo "selected";}?> >CARD BOARD BOX</option> <option value="<?php echo 'POLYURETHANE BALE'; ?>" <?php if($fetch->card_board == 'POLYURETHANE BALE'){echo "selected";}?> >POLYURETHANE BALE</option></select></td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="5" style="border-left: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><textarea rows="2" type="text" id="myInput12" style="width:90%;font-weight: bold;font-size: 13px;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->card_board_box; ?></textarea></td> <?php } else { ?> <td colspan="5" style="border-left: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><textarea rows="2" type="text" id="myInput12" style="width:90%;font-weight: bold;font-size: 13px;line-height: 1.6;font-family: 'Times New Roman', Times, serif;"><?php echo $fetch->card_board_box; ?></textarea></td> <?php } ?> <td style="border-bottom: 1px solid transparent;"></td> <td style="border-bottom: 1px solid transparent;"></td> <td style="border-bottom: 1px solid transparent;"></td> </tr> <tr><td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-bottom: 1px solid transparent;"><b>SL No.</b></td> <!-- <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>ORD./BARCODE</b></td> <td colspan="" style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>SKU./Product Code</b></td>--> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>HSN CODE</b></td> <td colspan="" style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>ARTICLE</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>DESCRIPTION</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>DESIGN</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>SHADE</b></td> <td colspan="" style="border-top: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>WIDTH</b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;"><b></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;"><b><?php echo $fetch_invoice_cureency->currency; ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;"><b><?php echo $fetch_invoice_cureency->currency; ?></b></td> </tr> <?php $i=1; foreach($fetch_invoice as $key=>$val) { ?> <tr> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;font-size:14px;"><b><?php echo $i; ?></b></td> <!--<td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php if(empty($oder_numbers[$key])) { if(empty($sku_number[$key])) { } else { echo $sku_number[$key]->customer_name;} } else { echo $oder_numbers[$key]->orderNo; } ?></b></td>--> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-left: 1px solid transparent;border-right: 1px solid transparent;font-size:14px;"><b><?php if(empty($fetch_invoice[$key])) { } else { echo $fetch_invoice[$key]->hsn_code; } ?></b></td> <!--<td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php // if(empty($oder_numbers[$key])) { if(empty($sku_number[$key])) { } else { echo $sku_number[$key]->customer_name;} } else { echo $oder_numbers[$key]->orderNo; } ?></b></td>--> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-left: 1px solid transparent;border-right: 1px solid transparent;font-size:14px;"><b><?php //if(empty($sku_number[$key])) { } else { echo $sku_number[$key]->skuno; } ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php echo $val->article; ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php if($val->description == '') { if(empty($marketing[$key])) { } else { echo $marketing[$key]->description; } } else { echo $val->description; } ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php echo $val->design; ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php echo $val->shades; ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php echo $val->width; ?></b></td> <!-- <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:14px;"><b><?php if(empty($marketing[$key])) { echo number_format($val->stock_wt,2); } else { echo number_format($val->stock_wt,2);} ?></b></td>--> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:14px;"><b><?php if(empty($marketing[$key])) { echo number_format($val->stock_wt,2); } else { echo number_format($val->stock_wt,2); } ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:14px;"><b><?php echo $val->unitprice; ?></b></td> <!--<td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:14px;"><b><?php echo number_format($val->values_es,2); ?></b></td>--> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:14px;"><b><?php echo formatToTwoDecimals($val->values_es); ?></b></td> </tr> <?php $i++; } ?> <tr> <td colspan="8" style="text-align:right;font-size:14px;"><b>Total</b></td> <td colspan="" style="font-size:14px;"><b><?php echo number_format((float) $fetch_sum_pcs_invoice->stock_wt, 2, '.', '') . ' ' . $units_val; ?></b></td> <td colspan="" style="text-align:right;font-size:14px;"><b>Total</b></td> <td colspan="" style="text-align:right;font-size:14px;" id='mom' ><b></b></td> <td style="font-size:14px;" id="dad"><b><?php echo number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); ?></b></td> </tr> <tr> <?php if($fetch->total_value == 0) { ?> <td colspan="8" style="font-size: 12px;font-weight: bold;">Amount Chargeable (in words) <?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', '')) . " / 100 Only"; ?>, <br/> GSTN. 29AACFD0446K1ZG I.E. CODE No. 0794003885 PAN No. AACFD0446K <br> </td> <?php } else if($fetch->discount == 0 && $fetch->other_charges == 0) { ?> <td colspan="8" style="font-size:12px;font-weight:bold;">Amount Chargeable (in words) <?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', '')) . " / 100 Only"; ?>,<br/> GSTN. 29AACFD0446K1ZG I.E. CODE No. 0794003885 PAN No. AACFD0446K <br> </td> <?php } else { $v=$fetch->discount; $s=number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); $d=($s - $v)+$fetch->other_charges; ?> <td colspan="8" style="font-size: 12px;font-weight: bold;">Amount Chargeable (in words) <?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(number_format((float) $d, 2, '.', '')) . " / 100 Only"; ?>, <br/> GSTN. 29AACFD0446K1ZG I.E. CODE No. 0794003885 PAN No. AACFD0446K <br> </td> <?php } ?> <?php if(number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', '') == 0) { ?> <td colspan="3" style="font-size:14px;"><b><?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?><br/> <?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?><br/> <?php echo 'Total Value : ' . number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); ?></b></td> <?php } else if($fetch->discount == 0 && $fetch->other_charges_des == 0 && $fetch->other_charges==0) { ?> <td colspan="3" style="font-size:14px;"><b> <!-- <?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?><br/>--> <!--<?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?><br/>--> <?php echo 'Total Value : ' . number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); ?></b></td> <?php } else if($fetch->discount == 0) { $v=$fetch->discount; $s=number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); $d=($s - $v)+$fetch->other_charges; ?> ?> <td colspan="3" style="font-size:14px;"><b> <!-- <?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?><br/>--> <?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?><br/> <?php echo 'Total Value : ' . number_format((float) $d, 2, '.', ''); ?></b></td> <?php } else if($fetch->other_charges == 0) { $v=$fetch->discount; $s=number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); $d=($s - $v)+$fetch->other_charges; ?> <td colspan="3" style="font-size:14px;"><b> <?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?><br/> <!--<?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?><br/>--> <?php echo 'Total Value : ' . number_format((float)$d, 2, '.', ''); ?></b></td> <?php } else if($fetch->other_charges!=0) {?> <?php $v=$fetch->discount; $s=number_format((float) $fetch->total_value, 2, '.', ''); $d=$s - $v; ?> <td colspan="3" style="font-size:14px;"><b><?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?><br/> <?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?><br/> <?php echo 'Total Value : ' . number_format((float) $fetch->total_value, 2, '.', ''); ?></b></td> <?php } else { ?> <?php $v=$fetch->discount; $s=number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); $d=$s - $v; ?> <td colspan="3" style="font-size:14px;"><b><?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?><br/> <?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?><br/> <?php echo 'Total Value : ' . number_format((float) $d, 2, '.', ''); ?></b></td> <?php } ?> </tr> <tr> <td colspan="2" style="vertical-align: top;"> <?php if($fetchh->confirm == 'Yes') { ?> <input type="text" id="sq_mtrs" class="" style="width:45px ;font-weight:bold;" value="<?php echo $fetch->sq_mtrs; ?>" readonly="readonly"> <?php } else { ?> <input type="text" id="sq_mtrs" class="" style="width:45px ;font-weight:bold;" value="<?php echo $fetch->sq_mtrs; ?>"> <?php } ?> SQ.MTRS. <br> <?php echo number_format((float) $fetch_sum_gross_net_invoice2->net_wt, 2, '.', '') ; ?> KGS NET. WT. <br> <?php echo number_format((float) $fetch_sum_gross_net_invoice1->gross_wt, 2, '.', ''); ?> KGS.GR.WT. </td> <td colspan="9"> <?php if($access_row->preview_submit == 1) { ?> <textarea id="myInput13" rows="8" cols="110" style="font-weight:bold;font-size: 14px;line-height: 1.6;font-family: 'Times New Roman', Times, serif;"><?php echo $fetch->net_wt_val; ?></textarea> <br><input type="text" class="" id="" style="width:;border: transparent;" ></b> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <textarea id="myInput13" rows="8" cols="110" style="font-weight:bold;font-size: 14px;line-height: 1.6;font-family: 'Times New Roman', Times, serif;"><?php echo $fetch->net_wt_val; ?></textarea> <br><input type="text" class="" id="" style="width:;border: transparent;" ></b> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <textarea id="myInput13" rows="8" cols="110" style="font-weight:bold;font-size: 14px;line-height: 1.6;font-family: 'Times New Roman', Times, serif;" readonly="readonly"><?php echo $fetch->net_wt_val; ?></textarea> <br><input type="text" class="" id="" style="width:;border: transparent;" ></b> <?php } ?> </td> </tr> <!--- <tr> <td colspan="9">Amount Chargeable (in words) TIN. 29AACFD0446K1ZG I.E. CODE No. 0793012201 PAN No. AACCS4515R <br><b><?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(round($fetch_sum_amt_invoice->values_es)) . " / 100 ONLY"; ?> <br> <input type="text" id="sq_mtrs" class="" style="width:65px ;" value="<?php echo $fetch->sq_mtrs; ?>">SQ.MTRS. <br> KGS.GR.WT.<textarea id="myInput13" style="margin-top: -20px; margin-left: 18px; width: ; height: 62px;"><?php echo $fetch->net_wt_val; ?></textarea> <br><input type="text" class="" id="" style="width:;border: transparent;" ></b> </td> <td> <?php echo number_format((float) $fetch_sum_gross_net_invoice2->net_wt, 2, '.', '') ; ?> KGS NET. WT.<br> <?php echo number_format((float) $fetch_sum_gross_net_invoice1->gross_wt, 2, '.', ''); ?> </td> </tr>---> <tr> <td colspan="5" style="padding-bottom: 10px !important;font-size:12px;">Declaration:<br> We declare that this invoice shows the actual price of the goods described and that all particulars are true and correct <br> <b>OUR BANKER : KOTAK MAHINDRA BANK</b> <br>10/7, UMILA LANDMARK, LAVELLE ROAD NEXT TO CHANCERY HOTEL, BANGALORE - 560001, INDIA.<br><br></td> <td colspan="2" style="border-bottom: 1px solid transparent !important;border-left:1px solid transparent !important;font-size:13px; ">BSR CODE: 0180038 <br> A/C # 4011255190<br> SWIFT # KKBKINBBCPC<br> ADC # 01800388400009</td> <td colspan="4" style="border-bottom: 1px solid transparent !important;border-left:1px solid transparent !important;"><b>For Deco Textil <br><br><br> Authorised Signatory</b> </td> </tr> </table> </div> </form> </body> </html> <style> .chosen-container { width: 280px !important; } </style> <?php function convert_number_to_words($number) { $hyphen = '-'; $conjunction = ' '; $separator = ', '; $negative = 'negative '; $decimal = ' And '; $dictionary = array( 0 => 'Zero', 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 => 'Fourty', 50 => 'Fifty', 60 => 'Sixty', 70 => 'Seventy', 80 => 'Eighty', 90 => 'Ninety', 100 => 'Hundred', 1000 => 'Thousand', 1000000 => 'Million', 1000000000 => 'Billion', 1000000000000 => 'Trillion', 1000000000000000 => 'Quadrillion', 1000000000000000000 => 'Quintillion' ); if (!is_numeric($number)) { return false; } if (($number >= 0 && (int) $number < 0) || (int) $number < 0 - PHP_INT_MAX) { // overflow trigger_error( 'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX, E_USER_WARNING ); return false; } if ($number < 0) { return $negative . convert_number_to_words(abs($number)); } $string = $fraction = null; if (strpos($number, '.') !== false) { list($number, $fraction) = explode('.', $number); } switch (true) { case $number < 21: $string = $dictionary[$number]; break; case $number < 100: $tens = ((int) ($number / 10)) * 10; $units = $number % 10; $string = $dictionary[$tens]; if ($units) { $string .= $hyphen . $dictionary[$units]; } break; case $number < 1000: $hundreds = $number / 100; $remainder = $number % 100; $string = $dictionary[$hundreds] . ' ' . $dictionary[100]; if ($remainder) { $string .= $conjunction . convert_number_to_words($remainder); } break; default: $baseUnit = pow(1000, floor(log($number, 1000))); $numBaseUnits = (int) ($number / $baseUnit); $remainder = $number % $baseUnit; $string = convert_number_to_words($numBaseUnits) . ' ' . $dictionary[$baseUnit]; if ($remainder) { $string .= $remainder < 100 ? $conjunction : $separator; $string .= convert_number_to_words($remainder); } break; } if (null !== $fraction && is_numeric($fraction)) { $string .= $decimal; $words = array(); foreach (str_split((string) $fraction) as $number) { $words[] = $dictionary[$number]; } $string .= $fraction; } return $string; } ?> <script> $ = jQuery; $( "#generate_pdf_btn" ).click(function() { // alert(); make_product_sheet(); }); function make_product_sheet() { var today = new Date(); var dd = today.getDate(); var mm = today.getMonth() + 1; //January is 0! var yyyy = today.getFullYear(); var d = dd + '/' + mm + '/' + yyyy; console.log("#generate_pdf_btn clicked"); var pdf = new jsPDF('p', 'pt', 'a4'); pdf.addHTML(document.getElementById("print_report"), function() { ps_filename = "Fabric-Invoice-Generate-"+d; pdf.save(ps_filename+'.pdf'); }); } </script> <script src="<?php echo base_url(); ?>assets/js/sweetalert.min.js" type="text/javascript"></script> <link href="<?php echo base_url(); ?>assets/css/sweetalert.min.css" rel="stylesheet" type="text/css" > <script> $(document).ready(function(){ $('#sq_mtrs').on('change keyup', function() { var sanitized = $(this).val().replace(/[^0-9.]/g, ''); $(this).val(sanitized); }); }); $(document).ready(function(){ $("#booking_print1").click(function(){ $('#booking_print1').toggle(); $('#back_button').toggle(); $('#generate_pdf_btn').toggle(); $('#export_table').toggle(); $('#submit_booking_print1').toggle(); var myInput = document.getElementById("myInput").style; myInput.borderStyle="none"; var myInput1 = document.getElementById("myInput1").style; myInput1.borderStyle="none"; var myInput2 = document.getElementById("myInput2").style; myInput2.borderStyle="none"; var myInput3 = document.getElementById("myInput3").style; myInput3.borderStyle="none"; var myInput4 = document.getElementById("myInput4").style; myInput4.borderStyle="none"; var myInput5 = document.getElementById("myInput5").style; myInput5.borderStyle="none"; var myInput6 = document.getElementById("myInput6").style; myInput6.borderStyle="none"; var myInput7 = document.getElementById("myInput7").style; myInput7.borderStyle="none"; var myInput8 = document.getElementById("myInput8").style; myInput8.borderStyle="none"; var myInput9 = document.getElementById("myInput9").style; myInput9.borderStyle="none"; var myInput10 = document.getElementById("myInput10").style; myInput10.borderStyle="none"; var myInput11 = document.getElementById("myInput11").style; myInput11.borderStyle="none"; var myInput12 = document.getElementById("myInput12").style; myInput12.borderStyle="none"; var myInput13 = document.getElementById("myInput13").style; myInput13.borderStyle="none"; var sq_mtrs = document.getElementById("sq_mtrs").style; sq_mtrs.borderStyle="none"; $("textarea").css({"resize": "none"}); var order_myInput1 = document.getElementById("order_myInput1").style; order_myInput1.borderStyle="none"; $('#myInput12').css({"width": "100%", "font-size": "9.8px"}); $('.chosen-container').css({"border": "transparent"}); $('.chosen-container-single').css({"border": "transparent"}); $('.chosen-single').css({"border": "transparent"}); $('#customer_name').hide(); //$('#dad').hide(); //$('#mom').show(); $('#back_button').hide(); $('.buyer').css({"display": "none"}); //select::-ms-expand { display: none; } $("select").css({"-webkit-appearance": "none"}); var divToPrint=document.getElementById("print_report"); window.print(); }); }); function goods_details() { //alert(); var invoice_numbers=$('#inovice_numbers').val(); var exp_ref=$('#myInput').val(); var other_ref=$('#myInput1').val(); var consignee=$('#myInput2').val(); var buyer_consignee=$('#myInput3').val(); var pre_carriage =$('#myInput4').val(); var receipt =$('#myInput5').val(); var country =$('#myInput6').val(); var Vehicle =$('#myInput7').val(); var Port =$('#myInput8').val(); var payment =$('#myInput9').val(); var discharge =$('#myInput10').val(); var destination =$('#myInput11').val(); var card_board_box=$('#myInput12').val(); var sq_mtrs=$('#sq_mtrs').val(); var net_wt=$('#myInput13').val(); var order_myInput1=$('#order_myInput1').val(); var card_board_select=$('#card_board_select').val(); $.ajax({ url:"<?php echo base_url('packing_list/add_invoice_preview_data');?>", type:"POST", data:{'order_myInput1':order_myInput1,'invoice_numbers':invoice_numbers,'exp_ref':exp_ref,'other_ref':other_ref,'consignee':consignee,'buyer_consignee':buyer_consignee,'pre_carriage':pre_carriage,'receipt':receipt,'country':country,'Vehicle':Vehicle,'Port':Port,'payment':payment,'discharge':discharge,'destination':destination,'card_board_box':card_board_box,'sq_mtrs':sq_mtrs,'net_wt':net_wt,'card_board_select':card_board_select}, async:false, success:function(data) { swal({ title: "Added Sucessfully", text: "", }); } }); } </script> <!-------------------------------------------------------- export excel -----------------------------------------------------> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script type="text/javascript"> var tableToExcel = (function() { var uri = 'data:application/vnd.ms-excel;base64,' , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="https://www.w3.org/TR/REC-html40"><head><!--[if gte mso9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/'); ?>" /></head><body><table>{table}</table></body></html>' , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name) { if (!table.nodeType) table = document.getElementById(table) var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML} window.location.href = uri + base64(format(template, ctx)) } })() </script> <div class="row invoice_table" id="excelexport" style="display:none;"> <table class="table" border="" style="width:100%;border: none;"> <tr> <td colspan="10" style="text-align: center;line-height: initial !important;"> <h4 style="font-size: 20px;">INVOICE<br/><span class="buyer" style="font-size: 15px;">CUSTOM</span></h4></td> </tr> </table> <table class="table" border="1" style="width:100%;border-bottom:1px solid transparent;border-top:1px solid transparent;"> <tr> <td colspan="2" rowspan="" style="text-align:center;width:25%;border-right:1px solid transparent;border-bottom:1px solid transparent;"><img src="https://drive.google.com/uc?export=view&id=0B6tsz21Ma0kFbUMybjRSSzhDc19wZ0FXdHRXTDRJZVJENmZv" class="img-responsive" ></td> <td colspan="2" style="width:25%;border-bottom:1px solid transparent;border-left:1px solid transparent;">Phone No. :+91 80 41888298 <br> Fax No. : +91 80 25598300 <br> E- Mail. : sales@swansilk.com <br> WEBSITE : www.swansilk.com</td> <td colspan="3" style="width:25%;font-size:12px;">Invoice No & date <br><b><?php echo $fetch->invoice_num; ?> & <?php echo $fetch->invoice_date; ?></b></td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="4" style="width:25%;vertical-align:top;">Exporter's Ref. <br><b><?php echo $fetch->exporter_ref_preview; ?></b></td> <?php } else { ?> <td colspan="4" style="width:25%;vertical-align:top;">Exporter's Ref. <br><b><?php echo $fetch->exporter_ref_preview; ?> </b></td> <?php } ?> </tr> <tr> <td colspan="4" style="clear:both; font-weight:600;border-top:1px solid transparent;border-bottom:1px solid transparent;">P.B. 25210, #40, 4TH CROSS, RESIDENCY ROAD, BANGALORE - 560 025, INDIA</td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="3">Order no & Date<br> <b><?php echo $fetch->order_numbner_date; ?></b></td> <td colspan="4" style="">Other Reference's<br> <?php echo $fetch->other_reference_preview; ?></td> <?php } else { ?> <td colspan="3">Order no & Date<br> <b><?php echo $fetch->order_numbner_date; ?> </b></td> <td colspan="4" style="">Other Reference's<br><?php echo $fetch->other_reference_preview; ?></td> <?php } ?> </tr> <tr> <td colspan="4" rowspan="2"><span id="customer_name"><br></span> <?php if($fetchh->confirm == 'Yes') { ?> Consignee: <br> <b> <?php echo $fetch->consignee; ?></b></td> <td colspan="7">Buyer if other than consignee<br> <b> <?php echo $fetch->buyer_consignee_preview; ?></b> </td> <?php } else { ?> Consignee: <br> <b> <?php echo $fetch->consignee; ?></b></td> <td colspan="7">Buyer if other than consignee<br> <b> <?php echo $fetch->buyer_consignee_preview; ?></b> </td> <?php } ?> </tr> <tr> <td colspan="3">Country of origin of goods<br><b>INDIA</b></td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="4">Destination country <br><b><?php echo $fetch->country; ?></b></td> <?php } else { ?> <td colspan="4">Destination country <br><b><?php echo $fetch->country; ?></b></td> <?php } ?> </tr> <tr> <?php if($access_row->preview_submit == 1) { ?> <td colspan="2" style="font-size:12px;">Pre - carriage by<br> <?php echo $fetch->pre_carriage; ?></td> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <td colspan="2" style="font-size:12px;">Pre - carriage by<br> <?php echo $fetch->pre_carriage; ?></td> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <td colspan="" style="font-size:12px;">Pre - carriage by<br> <?php echo $fetch->pre_carriage; ?></td> <?php } ?> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="2" style="font-size:12px;">Place of Receipt by pre- carrrier<br> <?php echo $fetch->receipt_carriage; ?></td> <td colspan="7" rowspan="3" style="font-size:12px;">Terms of Delivery and payment<br> <b><?php echo $fetch->delivery_payment_preview; ?><br/><?php echo $contract_type->contarct_type; ?></td> <?php } else { ?> <td colspan="2" style="font-size:12px;">Place of Receipt by pre- carrrier<br> <?php echo $fetch->receipt_carriage; ?></td> <td colspan="7" rowspan="3" style="font-size:12px;">Terms of Delivery and payment<br> <b><?php echo $fetch->delivery_payment_preview; ?><br/><?php echo $contract_type->contarct_type; ?></td> <?php } ?> </tr> <tr> <?php if($access_row->preview_submit == 1) { ?> <td colspan="2" style="font-size:12px;">Vehicle flight no<br> <?php echo $fetch->vehicle_flight; ?></td> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <td colspan="2" style="font-size:12px;">Vehicle flight no<br> <?php echo $fetch->vehicle_flight; ?></td> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <td colspan="" style="font-size:12px;">Vehicle flight no<br> <?php echo $fetch->vehicle_flight; ?></td> <?php } ?> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="2" style="font-size:12px;">Port of loading<br> <b><?php echo $fetch->port_loading; ?></b></td> <?php } else { ?> <td colspan="2" style="font-size:12px;">Port of loading<br> <b><?php echo $fetch->port_loading; ?></b></td> <?php } ?> </tr> <tr> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="2" style="font-size:12px;">Port of discharge<br> <b><?php echo $fetch->port_discharge; ?></b></td> <td colspan="2" style="font-size:12px;">Final Destination<br> <b><?php echo $fetch->final_destination; ?></b></td> <?php } else { ?> <td colspan="2" style="font-size:12px;">Port of discharge<br> <b><?php echo $fetch->port_discharge; ?></b></td> <td colspan="2" style="font-size:12px;">Final Destination<br> <b><?php echo $fetch->final_destination; ?></b></td> <?php } ?> </tr> </table> <table class="table" border="1" style="width:100%;border-top:1px solid transparent;"> <tr> <td colspan="2" style="width:10%;border-right: 1px solid transparent;">Marks & Nos Container no</td> <td colspan="" style="width:10%;border-right: 1px solid transparent;border-left: 1px solid transparent;">No & kind of Packages</td> <td colspan="5" style="width:56%;border-left: 1px solid transparent;">Description of goods</td> <td style="width:8%;">Quantity</td> <td style="width:8%;">Rate</td> <td style="width:8%;">Amount</td> </tr> <tr> <td colspan="2" style="border-right: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><b><?php echo $fetch->invoice_num . '/1-' . $count_package_fetch_invoice ; ?></b></td> <td style="border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><?php echo $fetch->card_board ?></td> <?php if($fetchh->confirm == 'Yes') { ?> <td colspan="4" style="border-left: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><?php echo $fetch->card_board_box; ?></td> <?php } else { ?> <td colspan="4" style="border-left: 1px solid transparent;border-bottom: 1px solid transparent;font-weight: bold;"><?php echo $fetch->card_board_box; ?></td> <?php } ?> <td style="border-bottom: 1px solid transparent;"></td> <td style="border-bottom: 1px solid transparent;"></td> <td style="border-bottom: 1px solid transparent;"></td> </tr> <tr><td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-bottom: 1px solid transparent;"><b>SL No.</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>ORD./BARCODE</b></td> <td colspan="" style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>SKU./Product Code</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>ARTICLE</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>DESCRIPTION</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>DESIGN</b></td> <td style="border-top: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>SHADE</b></td> <td colspan="" style="border-top: 1px solid transparent;border-left: 1px solid transparent;border-bottom: 1px solid transparent;"><b>WIDTH</b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;"><b></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;"><b><?php echo $fetch_invoice_cureency->currency; ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;"><b><?php echo $fetch_invoice_cureency->currency; ?></b></td> </tr> <?php $i=1; foreach($fetch_invoice as $key=>$val) { ?> <tr> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;font-size:12px;"><b><?php echo $i; ?></b></td> <!--<td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:12px;"><b><?php if(empty($oder_numbers[$key])) { } else { echo $oder_numbers[$key]->orderNo; } ?></b></td>--> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:14px;"><b><?php if(empty($oder_numbers[$key])) { if(empty($sku_number[$key])) { } else { echo $sku_number[$key]->customer_name;} } else { echo $oder_numbers[$key]->orderNo; } ?></b></td> <!--<td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-left: 1px solid transparent;border-right: 1px solid transparent;font-size:12px;"><b><?php if(empty($sku_number[$key])) { } else { echo $sku_number[$key]->skuno; } ?></b></td>--> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-left: 1px solid transparent;border-right: 1px solid transparent;font-size:14px;"><b><?php foreach($sku_number as $sku_val) { if($val->article == $sku_val->article && $val->width == $sku_val->width && $val->shades == $sku_val->shades && $val->design == $sku_val->design) { echo $sku_val->skuno; } else { } } ?> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:12px;"><b><?php echo $val->article; ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:12px;"><b><?php if($val->description == '') { if(empty($marketing[$key])) { } else { echo $marketing[$key]->description; } } else { echo $val->description; } ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:12px;"><b><?php echo $val->design; ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:12px;"><b><?php echo $val->shades; ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;border-right: 1px solid transparent;border-left: 1px solid transparent;font-size:12px;"><b><?php echo $val->width; ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:12px;"><b><?php if(empty($marketing[$key])) { echo number_format($val->stock_wt,2); } else { echo number_format($val->stock_wt,2) . ' ' . $marketing[$key]->unit; } ?></b></td> <td style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:12px;"><b><?php echo $val->unitprice; ?></b></td> <td colspan="" style="border-top: 1px solid transparent;border-bottom: 1px solid transparent;font-size:12px;"><b><?php echo number_format($val->values_es,2); ?></b></td> </tr> <?php $i++; } ?> <tr> <td colspan="8" style="text-align:right;"><b>Total</b></td> <td colspan=""><b><?php echo number_format((float) $fetch_sum_pcs_invoice->stock_wt, 2, '.', '') . ' ' . $units_val; ?></b></td> <td colspan="" style="text-align:right;"><b>Total</b></td> <td ><b><?php echo number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); ?></b></td> </tr> <tr> <td colspan="4" ><b> <?php echo $fetch->discount_name . ' : ' . $fetch->discount; ?></b></td> <td colspan="4"><b> <?php echo $fetch->other_charges_des . ':' . $fetch->other_charges; ?></b></td> <?php if($fetch->total_value == 0) { ?> <td colspan="3" style="font-size:14px;"><b><?php echo 'Total Value : ' . number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); ?></b></td> <?php } else if($fetch->discount == 0 && $fetch->other_charges_des == 0) { ?> <td colspan="3" style="font-size:14px;"><b><?php echo 'Total Value : ' . number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); ?></b></td> <?php } else if($fetch->other_charges!=0) {?> <?php $v=$fetch->discount; $s=number_format((float) $fetch->total_value, 2, '.', ''); $d=$s - $v; ?> <td colspan="3" style="font-size:14px;"><b><?php echo 'Total Value : ' . number_format((float) $fetch->total_value, 2, '.', ''); ?></b></td> <?php } else { ?> <?php $v=$fetch->discount; $s=number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', ''); $d=$s - $v; ?> <td colspan="3" style="font-size:14px;"><b><?php echo 'Total Value : ' . number_format((float) $d, 2, '.', ''); ?></b></td> <?php } ?> </tr> <tr> <?php if($fetch->total_value == 0) { ?> <td colspan="11">Amount Chargeable (in words) GSTN. 29AACFD0446K1ZG I.E. CODE No. 0794003885 PAN No. AACFD0446K <br><?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', '')) . " / 100 Only"; ?> </td> <?php } else if($fetch->discount == 0 && $fetch->other_charges_des == 0) { ?> <td colspan="11" style="font-size:12px;font-weight:bold;">Amount Chargeable (in words) GSTN. 29AACFD0446K1ZG I.E. CODE No. 0794003885 PAN No. AACFD0446K <br><?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(number_format((float) $fetch_sum_amt_invoice->values_es, 2, '.', '')) . " / 100 Only"; ?> </td> <?php } else { ?> <td colspan="11">Amount Chargeable (in words) GSTN. 29AACFD0446K1ZG I.E. CODE No. 0794003885 PAN No. AACFD0446K <br><?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(number_format((float) $d, 2, '.', '')) . " / 100 Only"; ?> </td> <?php } ?> </tr> <tr> <td colspan="2" style="vertical-align: top;"> <?php if($fetchh->confirm == 'Yes') { ?> <?php echo $fetch->sq_mtrs; ?> <?php } else { ?> <?php echo $fetch->sq_mtrs; ?> <?php } ?> SQ.MTRS. <br> <?php echo number_format((float) $fetch_sum_gross_net_invoice2->net_wt, 2, '.', '') ; ?> KGS NET. WT. <br> <?php echo number_format((float) $fetch_sum_gross_net_invoice1->gross_wt, 2, '.', ''); ?> KGS.GR.WT. </td> <td colspan="9"> <?php if($access_row->preview_submit == 1) { ?> <?php echo $fetch->net_wt_val; ?><br></b> <?php } else if($fetchh->confirm == 'No' || $fetchh->confirm == '') { ?> <?php echo $fetch->net_wt_val; ?><br></b> <?php } else if($fetchh->confirm == 'Yes' && $access_row->preview_submit == 0) { ?> <?php echo $fetch->net_wt_val; ?><br></b> <?php } ?> </td> </tr> <!--- <tr> <td colspan="9">Amount Chargeable (in words) TIN. 29AACFD0446K1ZG I.E. CODE No. 0793012201 PAN No. AACCS4515R <br><b><?php echo $fetch_invoice_cureency->currency . '.' . ' ' . convert_number_to_words(round($fetch_sum_amt_invoice->values_es)) . " / 100 ONLY"; ?> <br> <input type="text" id="sq_mtrs" class="" style="width:65px ;" value="<?php echo $fetch->sq_mtrs; ?>">SQ.MTRS. <br> KGS.GR.WT.<textarea id="myInput13" style="margin-top: -20px; margin-left: 18px; width: ; height: 62px;"><?php echo $fetch->net_wt_val; ?></textarea> <br><input type="text" class="" id="" style="width:;border: transparent;" ></b> </td> <td> <?php echo number_format((float) $fetch_sum_gross_net_invoice2->net_wt, 2, '.', '') ; ?> KGS NET. WT.<br> <?php echo number_format((float) $fetch_sum_gross_net_invoice1->gross_wt, 2, '.', ''); ?> </td> </tr>---> <tr> <td colspan="5" style="padding-bottom: 10px !important;font-size:12px;">Declaration:<br> We declare that this invoice shows the actual price of the goods described and that all particulars are true and correct <br> <b>OUR BANKER : KOTAK MAHINDRA BANK</b> <br>10/7, UMILA LANDMARK, LAVELLE ROAD NEXT TO CHANCERY HOTEL, BANGALORE - 560001, INDIA.<br><br></td> <td colspan="2" style="border-bottom: 1px solid transparent !important;border-left:1px solid transparent !important;font-size:13px; ">BSR CODE: 0180038 <br> A/C # 4011255190<br> SWIFT # KKBKINBBCPC<br> ADC # 01800388400009</td> <td colspan="4" style="border-bottom: 1px solid transparent !important;border-left:1px solid transparent !important;"><b>For Deco Textil <br><br><br> Authorised Signatory</b> </td> </tr> </table> </div>