Spaces:
Sleeping
Sleeping
File size: 11,179 Bytes
3cfd7a0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Inephos – Tax Invoice</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
/* ===== Page & print ===== */
@page { size: A4; margin: 16mm 10mm; }
html, body { height: 100%; }
body {
font-family: "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif;
margin: 0; color: #111; background:#fff;
}
.invoice-wrap { width: 210mm; max-width: 100%; margin: 0 auto; }
h1.title { text-align:center; font-size: 18px; margin: 6px 0 10px; letter-spacing: .4px; }
/* ===== Frame ===== */
.frame { border: 1px solid #888; border-radius: 2px; padding: 8px 8px 10px; }
.row { display: grid; grid-gap: 0; }
.muted { color:#444; }
.small { font-size: 11px; }
.right { text-align:right; }
.bold { font-weight:600; }
.mb8 { margin-bottom: 8px; }
.mb4 { margin-bottom: 4px; }
.mt4 { margin-top: 4px; }
/* ===== Header block (logo + seller) ===== */
.hdr {
grid-template-columns: 1fr 1.2fr;
align-items: start;
}
.logo-wrap { display:flex; align-items:flex-start; gap:8px; }
.logo { height: 100px; border: none; }
.tagline { font-size: 12px; margin-top: 6px; }
.seller h3 { margin: 0 0 4px; font-size: 14px; }
.seller p { margin: 0; line-height: 1.25; font-size: 11.5px; }
.statbar { background:#e9edf3; border:1px solid #bfc7d1; border-left:0; border-right:0; padding:4px 6px; font-size: 11.5px; }
/* ===== Meta (Invoice No / Date) ===== */
.meta { grid-template-columns: 140px 1fr 140px 1fr; border:1px solid #999; border-top:0; }
.meta > div { padding:4px 6px; border-right:1px solid #999; }
.meta > div:nth-child(4n) { border-right:0; }
.lbl { background:#f5f5f5; font-weight:600; }
/* ===== Customer details ===== */
.cust-hdr { border:1px solid #999; border-top:0; padding:4px 6px; font-weight:600; }
.cust { display:grid; grid-template-columns: 1fr 140px 1fr; border:1px solid #999; border-top:0; }
.cust > div { padding:6px; }
.cust .grid { display:grid; grid-template-columns: 70px 1fr; }
.cust .grid > div { padding:2px 0; border-bottom:1px solid #eee; }
.cust .grid > div:nth-child(2n) { border-left:1px solid #eee; padding-left:8px; }
/* ===== Items table ===== */
table.items { width:100%; border-collapse:collapse; margin-top: 6px; }
table.items th, table.items td { border:1px solid #999; padding:6px 6px; font-size: 12px; vertical-align: top; }
table.items th { background:#f5f5f5; font-weight:600; }
table.items tfoot td { border:1px solid #999; padding:6px 6px; font-size: 12px; }
table.items tfoot td.label { background:#f5f5f5; font-weight:600; text-align:center; }
.num { text-align:right; white-space:nowrap; }
.pct { text-align:center; }
.w-sr { width:40px; }
.w-desc { width:auto; }
.w-hsn { width:90px; }
.w-taxval { width:95px; }
.w-pct { width:45px; }
.w-amt { width:95px; }
.w-total { width:110px; }
/* ===== Totals ===== */
.totals { width:100%; border-collapse:collapse; margin-top: 6px; }
.totals td { border:1px solid #999; padding:6px; font-size:12px; }
.totals td.label { background:#f5f5f5; font-weight:600; text-align:center; }
/* ===== Words & bank ===== */
.words, .bank { border:1px solid #999; border-top:0; padding:6px; font-size:12px; }
.bank { display:grid; grid-template-columns: 1fr 200px; }
.bank .rightbox { border-left:1px solid #999; padding-left:6px; display:flex; flex-direction:column; justify-content:space-between; }
.bank .sign { text-align:right; padding-top:40px; }
/* ===== Print tweaks ===== */
@media print { .invoice-wrap { width:auto; } }
</style>
</head>
<body>
<div class="invoice-wrap">
<h1 class="title">TAX INVOICE</h1>
<div class="frame">
<!-- Header: logo left, seller right -->
<div class="row hdr mb8">
<div>
<div class="logo-wrap">
<img class="logo" src="assets/inephos.png" alt="Inephos logo" />
</div>
</div>
<div class="seller">
<h3>Inephos</h3>
<p>(a unit of A1 Future Technologies Pvt. Ltd.)</p>
<p>64/89, Khudiram Bose Sarani, Dutta Bagan, Milk Colony, Kolkata - 700037, India</p>
<p>Phone : +91-9007797979, +91-9831066996</p>
<p>Website : <span>www.inephos.com</span> E‑Mail : <span>help@inephos.com</span></p>
<p>State : West Bengal, Code: 19</p>
</div>
</div>
<div class="statbar small">
GSTIN: 19AAKCA7063N1Z1 | PAN : AAKCA7063N | CIN : U72200WB2012PTC183279
</div>
<!-- Invoice meta -->
<div class="row meta">
<div class="lbl">Invoice No.</div>
<div data-key="invoice_no"></div>
<div class="lbl">Date</div>
<div data-key="invoice_date"></div>
</div>
<!-- Customer -->
<div class="cust-hdr">Customer Details</div>
<div class="cust">
<div>
<div class="bold" data-key="customer_name"></div>
<div data-key="customer_address_1"></div>
<div data-key="customer_address_2"></div>
<div data-key="customer_address_3"></div>
</div>
<div></div>
<div class="grid small">
<div class="bold right">GSTIN :</div><div data-key="buyer_gstin"></div>
<div class="bold right">PAN :</div><div data-key="buyer_pan"></div>
<div class="bold right">CIN :</div><div data-key="buyer_cin"></div>
<div class="bold right">PO No. :</div><div data-key="po_no"></div>
<div class="bold right">State :</div><div data-key="buyer_state"></div>
</div>
</div>
<!-- Items table -->
<table class="items">
<thead>
<tr>
<th class="w-sr">Sr.<br/>No.</th>
<th class="w-desc">Service Details</th>
<th class="w-hsn">HSN</th>
<th class="w-taxval">Taxable<br/>Value</th>
<th class="w-pct">CGST<br/>%</th>
<th class="w-amt">CGST<br/>Amt</th>
<th class="w-pct">SGST/UGST<br/>%</th>
<th class="w-amt">SGST/UGST<br/>Amt</th>
<th class="w-pct">IGST<br/>%</th>
<th class="w-amt">IGST<br/>Amt</th>
<th class="w-total">Total</th>
</tr>
</thead>
<tbody data-key="items_tbody">
<!-- rows will be injected -->
</tbody>
<tfoot>
<tr>
<td colspan="3" class="label">TOTAL</td>
<td class="num" data-key="total_taxable"></td>
<td></td>
<td class="num" data-key="total_cgst"></td>
<td></td>
<td class="num" data-key="total_sgst"></td>
<td></td>
<td class="num" data-key="total_igst"></td>
<td class="num" data-key="grand_total"></td>
</tr>
</tfoot>
</table>
<!-- Totals strip moved into items table as tfoot for perfect alignment -->
<table class="totals">
<tr>
<td class="label" colspan="9" style="text-align:right">Rounding Off</td>
<td class="num" data-key="rounding"></td>
</tr>
<tr>
<td class="label" colspan="9" style="text-align:right">Net Amount</td>
<td class="num" data-key="net_amount"></td>
</tr>
</table>
<div class="words">
<div><span class="bold">Total Invoice Value (In Words):</span> <span data-key="words_total"></span></div>
<div><span class="bold">Total CGST Value (In Words):</span> <span data-key="words_cgst"></span></div>
<div><span class="bold">Total SGST Value (In Words):</span> <span data-key="words_sgst"></span></div>
<div><span class="bold">Total IGST Value (In Words):</span> <span data-key="words_igst"></span></div>
</div>
<div class="bank">
<div>
<div class="bold">Bank Details</div>
<div>Account Name: A1 Future Technologies Private Limited</div>
<div>Bank Name: HDFC Bank Ltd. - Bank Branch: Shyam Bazar</div>
<div>Account No.: 01742320002223 - Swift Code : HDFCINBBCAL </div>
<div>RTGS / NEFT IFSC : HDFC0000174 - MICR Code: 700240011</div>
</div>
<div class="rightbox">
<div class="right">E. & O. E.</div>
<div class="sign">For Inephos</div>
</div>
</div>
</div>
</div>
<script>
// --- Minimal injection helpers (optional) ---
function fmtMoney(n){
if(n === null || n === undefined || isNaN(n)) return '';
return Number(n).toLocaleString('en-IN', {minimumFractionDigits:2, maximumFractionDigits:2});
}
function inject(data){
// Simple fields
const map = {
invoice_no: 'INV/00001/25-26',
invoice_date: 'April 1, 2025',
customer_name: 'Binay Sharma',
customer_address_1: "H. No. 8-54/22, Happy's Home",
customer_address_2: 'Sai Harsha Nagar Colony, Hydershakote,',
customer_address_3: '500091 Hyderabad TG',
buyer_gstin: '', buyer_pan: '', buyer_cin: '',
po_no: '', buyer_state: 'Telangana, Code: 36',
total_taxable: fmtMoney(9150), total_cgst: fmtMoney(0), total_sgst: fmtMoney(0), total_igst: fmtMoney(1648),
grand_total: fmtMoney(10798), rounding: fmtMoney(0), net_amount: fmtMoney(10798),
words_total: 'Rupees Ten Thousand Seven Hundred Ninety Eight Only',
words_cgst: 'No Rupees Only', words_sgst: 'No Rupees Only',
words_igst: 'Rupees One Thousand Six Hundred Forty Eight Only'
};
Object.assign(map, data||{});
document.querySelectorAll('[data-key]').forEach(el=>{
const k = el.getAttribute('data-key');
if(k === 'items_tbody') return;
if(map[k] !== undefined) el.textContent = map[k];
});
// Items
const rows = (data && data.items) || [
{ sr:1, desc:'Inephos Framed Canvas Painting - Seven Running White Horses 47 X 29', hsn:'491199', tax:4575, cgst_p:0, cgst_a:0, sgst_p:0, sgst_a:0, igst_p:18, igst_a:824, total:5399 },
{ sr:2, desc:'Inephos Framed Canvas Painting - Divine Radha Krishna 47 X 29', hsn:'491199', tax:4575, cgst_p:0, cgst_a:0, sgst_p:0, sgst_a:0, igst_p:18, igst_a:824, total:5399 },
];
const tbody = document.querySelector('[data-key="items_tbody"]');
tbody.innerHTML = rows.map(r => `
<tr>
<td class="w-sr num">${r.sr}</td>
<td class="w-desc">${r.desc || ''}</td>
<td class="w-hsn">${r.hsn || ''}</td>
<td class="w-taxval num">${fmtMoney(r.tax)}</td>
<td class="w-pct pct">${r.cgst_p||0}</td>
<td class="w-amt num">${fmtMoney(r.cgst_a||0)}</td>
<td class="w-pct pct">${r.sgst_p||0}</td>
<td class="w-amt num">${fmtMoney(r.sgst_a||0)}</td>
<td class="w-pct pct">${r.igst_p||0}</td>
<td class="w-amt num">${fmtMoney(r.igst_a||0)}</td>
<td class="w-total num">${fmtMoney(r.total||0)}</td>
</tr>`).join('');
}
// Example: inject with defaults
inject();
</script>
</body>
</html>
|