ok

Mini Shell

Direktori : /home2/selectio/public_html/vijay-gases/
Upload File :
Current File : /home2/selectio/public_html/vijay-gases/purchase-print-invoice.php

<?php include "config/config.php";
$ids = $_GET['id'];
$statement = $pdo->prepare("SELECT tbl_purchase.*,tbl_location.name,tbl_location.address,tbl_location.factory_address,tbl_customer.customer_name,tbl_customer.gst_no,tbl_customer.c_name FROM `tbl_purchase` INNER JOIN tbl_location ON tbl_purchase.location_id=tbl_location.id INNER JOIN tbl_customer ON tbl_purchase.supplier=tbl_customer.id where tbl_purchase.id=".$ids);
$statement->execute();
$emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
$totalData = $statement->rowCount();


$statement_1 = $pdo->prepare("SELECT tbl_purchase_item.*,tbl_product.cylinder_no as pro_cylinder_no FROM `tbl_purchase_item` INNER JOIN tbl_product ON tbl_purchase_item.product_id=tbl_product.id WHERE tbl_purchase_item.purchase_id=".$ids);
$statement_1->execute();
$purchase_product_data = $statement_1->fetchAll(PDO::FETCH_ASSOC);
$totalData_purchase = $statement_1->rowCount();
?> 
                    <table style="width:100%;border:1px solid black;border-bottom:none;">
                        <tr>
                            <td style="width:35%;font-size:12px;">GST IN : 33AABCV9544Q1ZN</td>
                            <td style="width:45%;text-align:center;font-size:12px;"></td>
                            <td style="text-align:right;width:23%;font-size:12px;">
                                <table style="text-align:right;width:100%;">
                                    <tr>
                                        <td style="text-align:right;font-size:12px;">PH&nbsp;</td>
                                        <td style="text-align:left;font-size:12px;">9150114330</td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td style="text-align:left;font-size:12px;">9150114331</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" style="text-align:center;font-size:12px;"><?=$emp_data[0]['name']?> (P) LTD</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="text-align:center;font-size:12px;">Factory : SF NO : <?=$emp_data[0]['address']?>.</td>  
                        </tr>
                        <tr>
                           <td colspan="3" style="text-align:center;font-size:12px;">Regd.Office : <?=$emp_data[0]['factory_address']?></td> 
                        </tr>
                        <tr>
                           <td style="font-size:10px;">No : CR / <b><?=$emp_data[0]['id']?></b></td> 
                           <td style="font-size:12px;"> DELIVERY NOTE FOR INVOICE</td>
                           <td style="font-size:10px;">Date : <?=date('d-m-Y', strtotime($emp_data[0]["purchase_date"]))?></td> 
                        </tr>
                       
                    </table>
                    <table style="width:100%;border:1px solid black;border-top!important:none;border-collapse: collapse;border-bottom:none!important;">
                        <tr>
                             <td colspan="2" style="font-size:10px;">
                                 Mr. / M/s. : <b><?=$emp_data[0]['customer_name']?> .</b>
                             </td>
                        </tr>
                         <tr>
                             <td colspan="2" style="font-size:10px;">
                                Company Name : <b><?=$emp_data[0]['c_name']?>.</b>
                             </td>
                        </tr>
                         <tr>
                             <td colspan="2" style="font-size:10px;">
                                 Party's TIN No : <b><?=$emp_data[0]['gst_no']?></b>
                             </td>
                        </tr>
                        <tr style="border:1px solid black;">
                            <td style="border:1px solid black;font-size:12px;">Your Order No : <b><?=$emp_data[0]['id']?></b></td>
                            <td style="border:1px solid black;font-size:12px;">Our Order Date : <b><?=date('d-m-Y', strtotime($emp_data[0]["purchase_date"]))?></b></td>
                        </tr>
                         <tr style="border:1px solid black;border-bottom:none!important;">
                            <td style="border:1px solid black;border-bottom:none!important;font-size:12px;">Our Invoice  : <b><?=$emp_data[0]['id']?></b></td>
                            <td style="border:1px solid black;border-bottom:none!important;font-size:12px;">Despatched Per : Tamil Nadu</td>
                         </tr>
                    </table>
                    <table style="width:100%;border:1px solid black;border-top!important:none;border-collapse: collapse;">
                        <tr>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">S.No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">Cylinder No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">S.No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">Cylinder No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">S.No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">Cylinder No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">S.No</td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;">Cylinder No</td>
                        </tr>
                        <?php for($i=0;$i<15;$i++){ ?>
                       <tr>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"><?=($i+1)?></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"><?php if(isset($purchase_product_data[$i]['pro_cylinder_no'])){?><?=$purchase_product_data[$i]['pro_cylinder_no']?> <?php } ?></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"><?=($i+16)?></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"><?=($i+31)?></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"><?=($i+46)?></td>
                            <td style="border:1px solid black;text-align:center;font-size:12px;"></td>
                        </tr>
                        <?php } ?>
                    </table>
                    <table style="width:100%;border:1px solid black;border-top:none;">
                        <tr>
                            <td style="font-size:12px;text-align:center;"><b>No.</b></td>
                            <td style="font-size:12px;text-align:center;"><b>Cu.M.</b></td>
                            <td style="font-size:12px;text-align:center;"><b>No.</b></td>
                            <td style="font-size:12px;text-align:center;"><b>Cu.M.</b></td>
                        </tr>
                    </table>
                    <table style="width:100%;border:1px solid black;border-top:none;">
                        <tr>
                            <td style="font-size:12px;"><b>A :</b></td>
                            <td style="font-size:12px;"><b>B :</b></td>
                        </tr>
                        <tr>
                            <td style="font-size:12px;"><b>C :</b></td>
                            <td style="font-size:12px;"><b>D :</b></td>
                        </tr>
                    </table>
                    <table style="width:100%;border:1px solid black;border-top:none;">
                        <tr>
                            <td style="font-size:12px;">O2 Cylinders : </td>
                        </tr>
                    </table>
                    <table style="width:100%;border:1px solid black;border-top:none;">
                        <tr>
                            <td style="font-size:12px;vertical-align:top!important;width:33%;">MO2 Cylinders</td>
                            <td style="text-align:center;width:33%;">
                                <table style="width:100%;border-collapse: collapse;border:1px solid black;">
                                    <tr>
                                        <td rowspan="2" style="font-size:12px;border:1px solid black;writing-mode: vertical-rl;">VEHICLE NO</td>
                                        <td style="font-size:12px;border:1px solid black;max-height:3px;"> TN 54 AV</td>
                                    </tr>
                                    <tr>
                                        <td style="font-size:12px;border:1px solid black;max-height:3px;">6638</td>
                                    </tr>
                                   
                                </table>
                            </td>
                            <td style="font-size:12px;text-align:right;width:33%;">Prepared & Delivered by</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="font-size:12px;">Received In Good Condition</td>
                        </tr>
                    </table>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" ></script>
</script><script type="text/javascript">
$(document).ready(function () {
    window.print();
   setTimeout(window.close, 150);
});

</script>
                  

Zerion Mini Shell 1.0