Ghost Exploiter Team Official
/
home
/
ramdevpcb
/
public_html
/
admin.ramdevpcb.com
/
Nama File / Folder
Size
Action
.well-known
--
NONE
Data_
--
NONE
assets
--
NONE
cgi-bin
--
NONE
include
--
NONE
uploads
--
NONE
.htaccess
0.274KB
Hapus
Edit
Rename
8Products.php
15.674KB
Hapus
Edit
Rename
AvailableStock.php
9.525KB
Hapus
Edit
Rename
Enquiry.php
8.806KB
Hapus
Edit
Rename
MonthlyProducts.php
15.686KB
Hapus
Edit
Rename
NewArrival.php
12.277KB
Hapus
Edit
Rename
add-brand.php
27.782KB
Hapus
Edit
Rename
add-vendor.php
42.001KB
Hapus
Edit
Rename
b-bclients.php
12.086KB
Hapus
Edit
Rename
b-bclients1.php
9.329KB
Hapus
Edit
Rename
b-cclients.php
13.998KB
Hapus
Edit
Rename
category.php
13.583KB
Hapus
Edit
Rename
challan.php
15.391KB
Hapus
Edit
Rename
client.php
16.926KB
Hapus
Edit
Rename
color.php
11.327KB
Hapus
Edit
Rename
company.php
14.712KB
Hapus
Edit
Rename
courier.php
16.539KB
Hapus
Edit
Rename
customerreport.php
11.684KB
Hapus
Edit
Rename
dashboard.php
14.463KB
Hapus
Edit
Rename
delete_product_pdf.php
0.618KB
Hapus
Edit
Rename
discount-b2b.php
9.862KB
Hapus
Edit
Rename
discount-b2c.php
8.333KB
Hapus
Edit
Rename
discount-list.php
10.272KB
Hapus
Edit
Rename
discount-server.php
1.206KB
Hapus
Edit
Rename
error_log
276.584KB
Hapus
Edit
Rename
generate-invoice-server.php
3.183KB
Hapus
Edit
Rename
generate-invoice.php
15.014KB
Hapus
Edit
Rename
index.php
0KB
Hapus
Edit
Rename
invoice-list.php
10.6KB
Hapus
Edit
Rename
invoice.php
29.772KB
Hapus
Edit
Rename
invoice2.php
29.551KB
Hapus
Edit
Rename
invoice22222.php
31.864KB
Hapus
Edit
Rename
invoicenew1.php
17.683KB
Hapus
Edit
Rename
invoiceold.php
20.726KB
Hapus
Edit
Rename
invoicereport.php
31.128KB
Hapus
Edit
Rename
login.php
0KB
Hapus
Edit
Rename
logout.php
0.091KB
Hapus
Edit
Rename
newstock.php
15.827KB
Hapus
Edit
Rename
offline-order-add.php
2.254KB
Hapus
Edit
Rename
offline-order-delete.php
0.338KB
Hapus
Edit
Rename
offline-order-server.php
1.695KB
Hapus
Edit
Rename
offline-order.php
30.544KB
Hapus
Edit
Rename
order-details.php
14.237KB
Hapus
Edit
Rename
order-item-details.php
7.875KB
Hapus
Edit
Rename
ordersreport.php
21.602KB
Hapus
Edit
Rename
paidd.png
27.518KB
Hapus
Edit
Rename
php.ini
0.567KB
Hapus
Edit
Rename
product-list.php
8.904KB
Hapus
Edit
Rename
product.php
35.78KB
Hapus
Edit
Rename
productreport.php
28.885KB
Hapus
Edit
Rename
save_image_order.php
1.284KB
Hapus
Edit
Rename
slider.php
18.567KB
Hapus
Edit
Rename
sms.js
2.603KB
Hapus
Edit
Rename
stock.php
14.202KB
Hapus
Edit
Rename
stockreport.php
24.525KB
Hapus
Edit
Rename
subcategory.php
13.671KB
Hapus
Edit
Rename
update-order-status.php
2.562KB
Hapus
Edit
Rename
update-user-role.php
0.306KB
Hapus
Edit
Rename
vijayinvoice.php
17.683KB
Hapus
Edit
Rename
<?php require_once 'include/db.php'; $invoiceId = $_GET['invoiceId']; // Check if the 'print' key exists in the POST request if (isset($_GET['print'])) { // Trigger the browser's print dialog echo "<script type='text/javascript'> window.print(); </script>"; } $result1 = mysqli_query($conn, "SELECT * FROM Invoices i, Orders o WHERE i.OrderID = o.OrderID AND i.InvoiceNumber = '$invoiceId'") or die(mysqli_error($conn)); $row1 = mysqli_fetch_assoc($result1); $result2 = mysqli_query($conn, "SELECT * FROM Company c, States s WHERE c.StateID = s.StateID LIMIT 1") or die(mysqli_error($conn)); $row2 = mysqli_fetch_assoc($result2); ?> <!doctype html> <html lang="en" dir="ltr"> <head> <!-- META DATA --> <meta charset="UTF-8"> <meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=0'> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="Ramdev PCB Admin"> <meta name="author" content="Ramdev PCB Admin"> <meta name="keywords" content="Ramdev PCB"> <!-- FAVICON --> <link rel="shortcut icon" type="image/x-icon" href="assets/images/brand/favicon.ico" /> <!-- TITLE --> <title>Invoice Ramdev PCB</title> <!-- BOOTSTRAP CSS --> <link id="style" href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" /> <!-- STYLE CSS --> <link href="assets/css/style.css" rel="stylesheet" /> <link href="assets/css/dark-style.css" rel="stylesheet" /> <link href="assets/css/transparent-style.css" rel="stylesheet"> <link href="assets/css/skin-modes.css" rel="stylesheet" /> <!--- FONT-ICONS CSS --> <link href="assets/css/icons.css" rel="stylesheet" /> <link href="assets/css/custom.css" rel="stylesheet" /> <!-- COLOR SKIN CSS --> <link id="theme" rel="stylesheet" type="text/css" media="all" href="assets/colors/color1.css" /> <style> @page { /*size: ISO A4; margin: 10mm; adjust as per your invoice design */ } /* Apply only when printing */ @media print { html, body { /*width: 210mm;*/ height: 400mm; margin: 0 auto; padding: 0; overflow: hidden; /*font-size: 12px;*/ } /*@media print {*/ /* @page {*/ /* size: A4;*/ /* margin: 0mm; */ /* }*/ /*}*/ /** only for the head of the table. */ table.table thead th { padding: 0; } /** only for the body of the table. */ table.table tbody td { padding: 0; } .table-bordered td, .table-bordered th { border-color: black !important; } #watermark { position:absolute; bottom:38%; left: 38%; opacity:0.1;/* z-index:99; color:#d8d5d5; font-size: 900%; transform: rotate(-30deg);*/ } @media print { .no-print, .no-print * { display: none !important; } .row { display: flex !important; /* Retain flex layout for print */ } .col-md-6, .col-md-8, .col-md-2, .col-md-4 { width: auto !important; /* Reset width for print */ } /*html, body {*/ /* margin: 0;*/ /* padding: 0;*/ /* overflow: hidden; */ /* }*/ /*@page {*/ /* size: A4; */ /* margin: 0mm;*/ /* }*/ } .list-unstyled li{ border: none; } .invoice-table { border-collapse: collapse; width: 100%; border: none !important; } .invoice-table th, .invoice-table td { border-top: 1px solid #dcdcdc !important; border-bottom: 1px solid #dcdcdc !important; border-left: none !important; border-right: none !important; color: #000; } /* Optional: light header background */ .invoice-table thead th { background-color: #f9f9f9; font-weight: 600; } .colors{ background-color: #f9f9f9; font-weight: 600; } input{ border:none; } </style> </head> <body class="app sidebar-mini ltr"> <!-- PAGE --> <div class="page"> <div class="page-main"> <div class="main-content mt-0"> <div class="side-app "> <!-- CONTAINER --> <div class="main-container container-fluid"> <!-- PAGE-HEADER --> <div class="page-header no-print"> <h1 class="page-title">Tax Invoice</h1> <button onClick="window.print()" style="padding: 7px;border-radius: 24px;color: #ffffff;font-weight: bolder;background-color: #ad9407;">Print this page</button> <!--<button class="btn btn-primary" id="generateButton">Download PDF</button>--> <div> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="javascript:void(0)">Pages</a></li> <li class="breadcrumb-item active" aria-current="page">Invoice</li> </ol> </div> </div> <!-- PAGE-HEADER END --> <!-- ROW-1 OPEN --> <div id="invoice" class="row"> <div class="col-md-12"> <div class="card"> <!--<center><h1>Tax Invoice </h1></center>--> <div class="card-body"> <div id="watermark"><img src="https://www.ramdevpcb.com/assets/imgs/theme/RamdevLogo.jpg" style="width:250px"></div> <div id="invoice-company-details" class="row"> <div class="col-sm-6 col-12 text-center text-sm-left"> <div class="media row"> <div class="col-12 col-sm-6 col-xl-6"> <img src="https://www.ramdevpcb.com/assets/imgs/theme/RamdevLogo.jpg" style=" height: 150px; width: 170px;" alt="company logo" class="mb-1 mb-sm-0"> </div> </div> </div> <div class="col-sm-6 col-12 text-center text-sm-right"> <h2 style="font-weight:bold;">GST INVOICE</h2> <p><input class="invoice-style text-end" type="text" id="invoiceid" name="invoiceid" value="<?= $invoiceId ?>" style="font-weight:bold;font-size:large;" placeholder="InvoiceId"></p> <img src="paidd.png" alt="signature" class="height-100" style="height: 40px!important; transform: rotate(-1deg);"> </div> </div> <hr style="border-top:2px solid #b09707!important;margin-bottom:2rem;opacity:1"> <div id="invoice-customer-details" class="row pt-3" style="padding: 0rem!important;"> <div class="col-4" style="border-right:1px solid rgba(0,0,0,.1)"> <div class="media-body"> <ul class="ml-2 px-0 list-unstyled"> <li class="text-bold-800" style="font-weight:bold;"><?= $row2['CompanyName'] ?></li> <li><?= $row2['CompanyAddress'] ?></li> <li><?= $row2['StateName'] ?></li> <li><?= $row2['CompanyMobileNumber'] ?></li> <li><?= $row2['CompanyEmail'] ?></li> <li>www.ramdevpcb.com</li> <li style="font-weight:bold;">GST No. : <?= $row2['CompanyGSTNumber'] ?></li> </ul> </div> </div> <?php $result4 = mysqli_query($conn, "SELECT * FROM AddressDetails ad, States s, Cities c,Users u WHERE ad.UserID=u.UserID and c.CityID = ad.CityID AND ad.StateID = s.StateID AND ad.AddressID = '{$row1['BillingAddressID']}'") or die(mysqli_error($conn)); $rcount = mysqli_num_rows($result4); //echo $rcount; if($rcount==0){ $result4 = mysqli_query($conn, "SELECT * FROM AddressDetails ad, States s, Cities c,Users u WHERE ad.UserID=u.UserID and c.CityID = ad.CityID AND ad.StateID = s.StateID AND ad.UserID = '{$row1['UserID']}'") or die(mysqli_error($conn)); //echo $row1['UserID']; } $row4 = mysqli_fetch_assoc($result4); ?> <div class="col-4" style="border-right:1px solid rgba(0,0,0,.1)"> <div class="media-body"> <ul class="ml-2 px-0 list-unstyled"> <li class="text-bold-800" style="font-weight:bold;">Buyer (Bill to)</li> <li><?= $row4['Name'] ?></li> <li><?= $row4['AddressLine1'] ?></li> <li><?= $row4['AddressLine2'] ?></li> <li><?= $row4['CityName'] . '-' .$row4['PinCode'] ?></li> <li><?= $row4['StateName'] ?></li> <li style="font-weight:bold;">GST No. : <?= $row4['UserGSTNumber'] ?></li> </ul> </div> </div> <?php $result3 = mysqli_query($conn, "SELECT ad.StateID,ad.Name,ad.AddressLine1,ad.AddressLine2,ad.PinCode,s.StateName,c.CityName,u.UserGSTNumber FROM AddressDetails ad, States s, Cities c,Users u WHERE ad.UserID=u.UserID and c.CityID = ad.CityID AND ad.StateID = s.StateID AND ad.AddressID = '{$row1['ShippingAddressID']}'") or die(mysqli_error($conn)); $rcounts = mysqli_num_rows($result3); //echo $rcount; if($rcounts==0){ $result3 = mysqli_query($conn, "SELECT * FROM AddressDetails ad, States s, Cities c,Users u WHERE ad.UserID=u.UserID and c.CityID = ad.CityID AND ad.StateID = s.StateID AND ad.UserID = '{$row1['UserID']}'") or die(mysqli_error($conn)); //echo $row1['UserID']; } $row3 = mysqli_fetch_assoc($result3); $shipstate = $row3['StateID']; ?> <div class="col-4"> <div class="media-body"> <ul class="ml-2 px-0 list-unstyled"> <li class="text-bold-800" style="font-weight:bold;">Consignee (Ship to)</li> <li><?= $row3['Name'] ?></li> <li><?= $row3['AddressLine1'] ?></li> <li><?= $row3['AddressLine2'] ?></li> <li><?= $row3['CityName'] . '-' .$row3['PinCode'] ?></li> <li><?= $row3['StateName'] ?></li> <li style="font-weight:bold;">GST No. : <?= $row3['UserGSTNumber'] ?></li> </ul> </div> </div> </div> <hr style="border-top:2px solid #b09707!important;opacity:1"> <div id="invoice-customer-details2" class="row pt-3" style="padding: 0rem!important;"> <div class="col-4" style="border-right:1px solid rgba(0,0,0,.1)"> Invoice Date : <span style="font-weight:bold"></span><input size="10" class="invoice-style" type="text" text="dueamt" id="dueamt1" value="<?= $row1['InvoiceDate'] ?>" style="font-weight:bold" placeholder=""> </div> <div class="col-4" style="border-right:1px solid rgba(0,0,0,.1)"> Dispatch : <span style="font-weight:bold"></span><input size="10" class="invoice-style" type="text" text="dueamt" id="dueamt2" value="<?= $row1['DispatchedThrough'] ?>" style="font-weight:bold" placeholder=""> </div> <div class="col-4" style="border-right:1px solid rgba(0,0,0,.1)"> Paid Amount : <span style="font-weight:bold">₹ </span><input size="10" class="invoice-style" type="text" text="dueamt" id="dueamt3" value="<?= $row1['OrderAmount']; ?>" style="font-weight:bold" placeholder=""> </div> </div> <!--<hr style="border-top:2px solid #b09707!important;margin-bottom:2rem;opacity:1">--> <style> .invoice-table { border-collapse: collapse; width: 100%; border: none; } .invoice-table th, .invoice-table td { border-top: 1px solid #dcdcdc !important; border-bottom: 1px solid #dcdcdc !important; border-left: none !important; border-right: none !important; color: #000; padding: 4px 6px; } .invoice-table thead th { background-color: #f9f9f9; font-weight: 600; } /* Bottom section layout */ .invoice-bottom-section { display: flex; justify-content: space-between; margin-top: 10px; gap: 20px; } /* Left 60% - HSN table */ .invoice-left { flex: 0 0 40%; } /* Right 40% - Summary table */ .invoice-middle { flex: 0 0 28%; } /* Right 40% - Summary table */ .invoice-right { flex: 0 0 28%; } /* Align numbers to right */ .invoice-right td { text-align: right; } /* Optional: bold total row */ .invoice-right .fw-bold td { font-weight: 700; border-top: 2px solid #000 !important; } </style> <div class="table-responsive push" style="margin-top:1rem"> <!-- ========================== 1️⃣ GOODS PURCHASED TABLE =========================== --> <div class="table-responsive push"> <table class="table invoice-table mb-0 text-nowrap" style="text-align: center; font-size: 12px;"> <thead> <tr> <th class="text-center">S.No.</th> <th class="text-center" style="width:45%">Description of Goods</th> <th class="text-end">HSN/SAC</th> <th class="text-end">Quantity</th> <th class="text-end">Rate</th> <th class="text-end">Per</th> <th colspan="2" class="text-end">Amount</th> </tr> </thead> <tbody> <!-- 🔁 Your existing PHP product rows loop goes here --> <?php $orderId = $row1['OrderID']; $result3 = mysqli_query($conn, "SELECT * FROM OrderItems oi, productdetails pd, BrandCategory c, BrandSubCategory sc, BrandModel m, ProductColors pc WHERE oi.ProductID = pd.ProductID AND pd.CategoryID = c.CategoryID AND pd.SubCategoryID = sc.SubCategoryID AND pd.ModelID = m.ModelID AND pc.ColorID = pd.ProductColorID AND oi.OrderID = '$orderId'") or die(mysqli_error($conn)); $i = 1; $totalPrice = 0; $totalQuantity = 0; $totalGst = 0; $grandTotal = 0; $roundOff = 0; while ($row3 = mysqli_fetch_assoc($result3)) { $discounts = mysqli_query($conn, "SELECT * FROM Discounts WHERE DiscountID = {$row3['Discount']}") or die(mysqli_error($conn)); $disc = mysqli_fetch_assoc($discounts); $price = $row3['ProductQuantity'] * ($row3['ProductAmount'] - ($row3['ProductAmount'] * ($disc['DiscountPercent'] / 100))); $prices = $row3['ProductQuantity'] * $row3['ProductAmount']; $totalPrice += $prices; $finalprice += $price; $discprice += $prices - $price; $totalQuantity += $row3['ProductQuantity']; //$totalGst += (($row3['ProductQuantity'] * $price) * ($row3['GSTPercent'] / 100)); $totalGst += $price * ($row3['GSTPercent'] / 100); // echo $totalGst; ?> <tr> <td><?= $i++ ?></td> <td> <p class="font-w600 mb-1"><?= $row3['ProductNumber'] . ' ' . $row3['Watts'] . ' ' . $row3['Size'] . "MM (" . $row3['SubCategory'] . ' @' . $row3['Driver'] . '+LED' . ")" ?></p> </td> <td class="text-end"><?= $row3['HSNCode'] ?></td> <td class="text-end"><?= $row3['ProductQuantity'] ?> NOS</td> <td class="text-end"><?= number_format($row3['ProductAmount'], 2) ?></td> <td class="text-end">NOS</td> <td class="text-end" colspan="2">₹ <?= number_format($row3['ProductQuantity'] * $row3['ProductAmount']) ?></td> </tr> <?php } $tp = empty($row1['TransportPrice']) ? '0.00' : $row1['TransportPrice']; $tll = round($finalprice + $totalGst + $tp,0); $bll = $finalprice + $totalGst + $tp; $roundOff = $tll - $bll; // echo $tll; if (str_contains($roundOff, '-')) { $sign = '-'; $r = explode("-", $roundOff); $roundOff = $r[1]; } else{ $sign = '+'; } // echo $roundOff; $ct = '35' - $i; //echo $ct; for($c=0;$c<=$ct;$c++){ if($c==0){ ?> <tr style="border-style: hidden;border-right: 1px;border-left: 1px;border-top:1px"> <?php }else if($c==$ct){ ?> <tr style="border-style: hidden;border-right: 1px;border-left: 1px;border-bottom:1px"> <?php }else{ ?> <tr style="border-style: hidden;border-right: 1px;border-left: 1px;"> <?php } ?> <td class="text-center" style="border-top: 0px;border-bottom: 0px;"></td> <td style="border-top: 0px;border-bottom: 0px;"> <div align="right" style="margin-right:10px;"><br /></div> </td> <td colspan="3" class="text-center" style="border-top: 0px;border-bottom: 0px;"></td> <td style="border-top: 0px;border-bottom: 0px;"> <div style="text-align: center;"></div> </td> <td colspan="2" style="border-top: 0px;border-bottom: 0px;"> </td> </tr> <?php } ?> </tbody> </table> </div> <?php // echo $totalPrice; ?> <!-- ========================== 2️⃣ BELOW SECTION (HSN + TOTAL) =========================== --> <div class="invoice-bottom-section"> <div class="invoice-left"> <table class="table invoice-table text-nowrap" style="font-size: 12px;border : 1px solid #dcdcdc !important;"> <thead> <tr> <th>HSN/SAC</th> <th class="text-center">Taxable Value</th> <?php if($row2['StateID'] == $shipstate){ ?> <th colspan="2">Central Tax</th> <th colspan="2">State Tax</th> <?php } else { ?> <th colspan="2">Integrated Tax</th> <?php } ?> <th>Total</th> </tr> </thead> <tbody> <tr> <td></td> <td class="text-center"></td> <?php if($row2['StateID'] == $shipstate){ ?> <td>Rate</td> <td>Amount</td> <td>Rate</td> <td>Amount</td> <?php } else { ?> <td>Rate</td> <td>Amount</td> <?php } ?> <td colspan="2">Tax Amount</td> </tr> <?php // Initialize variables $gstTotal = 0; $totalProductAmount = 0; // Get product-wise data $result4 = mysqli_query($conn, "SELECT * FROM OrderItems oi, productdetails pd, BrandCategory c, BrandSubCategory sc, BrandModel m, ProductColors pc WHERE oi.ProductID = pd.ProductID AND pd.CategoryID = c.CategoryID AND pd.SubCategoryID = sc.SubCategoryID AND pd.ModelID = m.ModelID AND pc.ColorID = pd.ProductColorID AND oi.OrderID = '$orderId'") or die(mysqli_error($conn)); $data = array(); while ($row4 = mysqli_fetch_assoc($result4)) { $result5 = mysqli_query($conn, "SELECT * FROM Discounts WHERE DiscountID = {$row4['Discount']}"); $row5 = mysqli_fetch_assoc($result5); $totalPrice1 = $row4['ProductAmount'] * $row4['ProductQuantity']; $amount = $totalPrice1 - ($totalPrice1 * ($row5['DiscountPercent'] / 100)); $data[] = array( 'hsn' => $row4['HSNCode'], 'gst' => $row4['GSTPercent'], 'amount' => $amount, ); } // Consolidate by HSN usort($data, function ($a, $b) { return $a['hsn'] <=> $b['hsn']; }); $d = array(); foreach ($data as $item) { if (isset($d[$item['hsn']])) { $d[$item['hsn']]['amount'] += $item['amount']; } else { $d[$item['hsn']] = $item; } } // Display HSN rows foreach ($d as $item) { $totalProductAmount += $item['amount']; $gstTotal += ($item['amount'] * ($item['gst'] / 100)); ?> <tr> <td><?= $item['hsn'] ?></td> <td class="text-center"><?= number_format($item['amount'], 2) ?></td> <?php if ($row2['StateID'] == $shipstate) { ?> <td><?= ($item['gst'] / 2) ?>%</td> <td><?= number_format(($item['amount'] * ($item['gst'] / 100)) / 2, 2) ?></td> <td><?= ($item['gst'] / 2) ?>%</td> <td><?= number_format(($item['amount'] * ($item['gst'] / 100)) / 2, 2) ?></td> <?php } else { ?> <td><?= $item['gst'] ?>%</td> <td><?= number_format($item['amount'] * ($item['gst'] / 100), 2) ?></td> <?php } ?> <td colspan="2"><?= number_format($item['amount'] * ($item['gst'] / 100), 2) ?></td> </tr> <?php } ?> <!-- ✅ Add Shipping HSN here --> <?php $tp_incl_gst = empty($row1['TransportPrice']) ? 0 : $row1['TransportPrice']; if ($tp_incl_gst > 0) { $shipping_base = $tp_incl_gst / 1.18; // Exclude 18% GST $shipping_gst = $shipping_base * 0.18; $totalProductAmount += $shipping_base; $gstTotal += $shipping_gst; ?> <tr> <td>996531</td> <td class="text-center"><?= number_format($shipping_base, 2) ?></td> <?php if ($row2['StateID'] == $shipstate) { ?> <td>9%</td> <td><?= number_format($shipping_gst / 2, 2) ?></td> <td>9%</td> <td><?= number_format($shipping_gst / 2, 2) ?></td> <?php } else { ?> <td>18%</td> <td><?= number_format($shipping_gst, 2) ?></td> <?php } ?> <td colspan="2"><?= number_format($shipping_gst, 2) ?></td> </tr> <?php } // end if shipping present ?> <!-- ✅ Total Row --> <?php $finalvalue1 = number_format($gstTotal, 2); $num1 = str_replace(',', '', $finalvalue1); ?> <tr> <td>Total</td> <td class="text-center"><?= number_format($totalProductAmount, 2) ?></td> <?php if($row2['StateID'] == $shipstate){ ?> <td></td> <td><?= number_format($gstTotal / 2, 2) ?></td> <td></td> <td><?= number_format($gstTotal / 2, 2) ?></td> <?php } else { ?> <td></td> <td><?= number_format($gstTotal, 2) ?></td> <?php } ?> <td colspan="2"><?= number_format($gstTotal, 2) ?></td> </tr> <!--<tr> <td colspan="8">Tax Amount (in words): <strong class="h4">INR <?= numberToWords($num1) ?></strong></td> </tr>--> </tbody> </table> </div> <div class="invoice-middle"> <table class="table invoice-table text-nowrap" style="font-size: 12px;border : 1px solid #dcdcdc !important;"> <thead> <tr> <th colspan="2" class="text-center">COMPANY BANK DETAILS</th> </tr> </thead> <tbody> <tr> <td class="text-center">Bank Name</td> <td class="text-center">Bank of Baroda</td> </tr> <tr> <td class="text-center">A/c No.</td> <td class="text-center">25230200001252</td> </tr> <tr> <td class="text-center">Branch </td> <td class="text-center">VASAI-EAST</td> </tr><tr> <td class="text-center">IFSC Code</td> <td class="text-center">BARB0VASEAS</td> </tr> </tbody> </table> </div> <div class="invoice-right"> <table class="table invoice-table text-nowrap" style="font-size: 12px;border : 1px solid #dcdcdc !important;"> <tbody> <tr> <td class="text-center">Sub Total</td> <td class="text-end">₹ <?= number_format($totalPrice, 2) ?></td> </tr> <?php $tp_incl_gst = empty($row1['TransportPrice']) ? 0 : $row1['TransportPrice']; // Exclude 18% GST → divide by 1.18 $shipping_base = $tp_incl_gst / 1.18; if ($tp_incl_gst != 0) { ?> <tr> <td class="text-center">Shipping Charges</td> <td class="text-end"><?= number_format($shipping_base, 2) ?></td> </tr> <?php } ?> <?php if (!empty($discprice) && $discprice != 0) { ?> <tr> <td class="text-center">Discount</td> <td class="text-end">(-) <?= number_format($discprice, 2) ?></td> </tr> <?php } ?> <tr> <td class="text-center">GST</td> <td class="text-end"><?= number_format($gstTotal, 2) ?></td> </tr> <!--<tr> <td class="text-center">Shipping Charges</td> <?php $tp_incl_gst = empty($row1['TransportPrice']) ? 0 : $row1['TransportPrice']; // Exclude 18% GST → divide by 1.18 $shipping_base = $tp_incl_gst / 1.18; ?> <td class="text-end"><?= number_format($shipping_base, 2) ?></td> </tr>--> <tr> <td class="text-center">Round Off</td> <td class="text-end">(<?= $sign ?>)<?= number_format($roundOff, 2) ?></td> </tr> <tr class="" style="background-color: #f9f9f9; font-weight: 500 !important;font-size:14px;text-transform: uppercase;"> <td class="text-center">Grand Total</td> <?php if($sign == '+'){ //echo number_format($finalprice + $totalGst + $roundOff + number_format($row1['TransportPrice'],2),2);\ $finalvalue = number_format($finalprice + $totalGst +$roundOff+ number_format(empty($row1['TransportPrice']) ? '0' : $row1['TransportPrice'])); $secondfinalvalue = number_format($finalprice + $totalGst - $roundOff + number_format(empty($row1['TransportPrice']) ? '0' : $row1['TransportPrice'])); //echo $finalvalue; ?> <td class="text-end">₹ <?= number_format(($finalprice + $totalGst +$roundOff+ number_format(empty($row1['TransportPrice']) ? '0' : $row1['TransportPrice'],2)), 2) ?></td> <?php }else{ $finalvalue = number_format($finalprice + $totalGst - $roundOff+ number_format(empty($row1['TransportPrice']) ? '0' : $row1['TransportPrice'])); ?> <td class="text-end">₹ <?= number_format(($finalprice + $totalGst - $roundOff + number_format(empty($row1['TransportPrice']) ? '0' : $row1['TransportPrice'],2)), 2) ?></td> <?php } $num = str_replace( ',', '', $finalvalue ); ?> <!--<td class="text-end">₹ //number_format($finalvalue, 2) </td>--> </tr> </tbody> </table> </div> </div> <hr style="border-top:2px solid #b09707!important;margin-bottom:2rem;opacity:1"> <div id="invoice-customer-details" class="row pt-3" style="padding: 0rem!important;"> <div class="col-6" style="border-right:1px solid rgba(0,0,0,.1)"> <div class="media-body"> <ul class="ml-2 px-0 list-unstyled"> <li><?= $row2['CompanyName'].',<br> '.$row2['CompanyAddress'].', '.$row2['StateName'].', <br>This is Computer Generated Invoice' ?></li> </ul> </div> </div> <div class="col-6 text-end" > <img src="<?= $row2['Signature'] ?>"style="width: 103px;"> <div class="text-muted text-end">Authorized Signatory</div> </div> </div> <!--<table class="table table-bordered text-nowrap" style="font-size:12px"> <tr> <td style="width:50%">Customer's Seal and Signature</td> <td class="text-end" style="padding-right:2px;">for RAMDEV LED <br> <img src="<?= $row2['Signature'] ?>"style="width: 103px;"> <div class="text-muted text-end">Authorized Signatory</div> </td> </tr> </table> <div class="text-center">This is Computer Generated Invoice</div>--> </div> </div> </div> </div> <!-- COL-END --> </div> <!-- ROW-1 CLOSED --> </div> <!-- CONTAINER CLOSED --> </div> </div> <!--app-content closed--> </div> <!-- FOOTER --> <?php include('include/footer.php'); ?> <!-- FOOTER CLOSED --> </div> <!--<script> document.getElementById('generateButton').addEventListener('click', function() { // Choose the element that your invoice is rendered in. const element = document.getElementById('invoice'); // Choose the element and save the PDF for your user. html2pdf().set({ html2canvas: { scale: 2 }, filename: 'invoice.pdf', jsPDF: { format: 'a3', orientation: 'portrait' } }).from(element).output("save").then(function(pdf) { // Create a download button const downloadButton = document.createElement('a'); downloadButton.href = pdf.output('bloburl'); downloadButton.download = 'invoice.pdf'; downloadButton.innerText = 'Download Invoice'; document.body.appendChild(downloadButton); // Print the generated PDF pdf.autoPrint(); }); }); </script>--> <!-- BACK-TO-TOP --> <a href="#top" id="back-to-top"><i class="fa fa-angle-up"></i></a> <!-- JQUERY JS --> <script src="assets/js/jquery.min.js"></script> <!-- BOOTSTRAP JS --> <script src="assets/plugins/bootstrap/js/popper.min.js"></script> <script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script> <!-- SPARKLINE JS--> <script src="assets/js/jquery.sparkline.min.js"></script> <!-- CHART-CIRCLE JS--> <script src="assets/js/circle-progress.min.js"></script> <!-- INPUT MASK JS--> <script src="assets/plugins/input-mask/jquery.mask.min.js"></script> <!-- SIDE-MENU JS --> <!--<script src="assets/plugins/sidemenu/sidemenu.js"></script>--> <!-- SIDEBAR JS --> <script src="assets/plugins/sidebar/sidebar.js"></script> <!-- Perfect SCROLLBAR JS--> <!--<script src="assets/plugins/p-scroll/perfect-scrollbar.js"></script>--> <!--<script src="assets/plugins/p-scroll/pscroll.js"></script>--> <!--<script src="assets/plugins/p-scroll/pscroll-1.js"></script>--> <!-- Color Theme js --> <script src="assets/js/themeColors.js"></script> <!-- Sticky js --> <script src="assets/js/sticky.js"></script> <!-- CUSTOM JS --> <script src="assets/js/custom.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.js"></script> </body> </html>