nhance/app/Views/invoice_template_2.php
2025-11-21 16:19:36 +05:30

159 lines
4.6 KiB
PHP

<head>
<style>
/* Page Setup for DOMPDF */
@page {
size: A4;
margin: 10mm;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
font-size: 12px;
color: #333;
background: #fff;
}
.invoice-container {
width: 180mm; /* reduced from 210mm */
max-width: 180mm;
margin: 0 auto;
padding: 8mm; /* reduced padding */
background: #fff;
}
.invoice-container table {
width: 100%;
/* border-collapse: collapse; */
margin-bottom: 15pt;
}
.invoice-container table th,
.invoice-container table td {
border: 1pt solid #000;
padding: 8pt;
text-align: left;
vertical-align: top;
}
.invoice-container th {
background-color: #f0f0f0;
font-weight: bold;
}
.header {
text-align: center;
font-weight: bold;
background-color: #fff;
}
.nhance-address {
text-align: center;
font-weight: bold;
background-color: #fff;
}
.section-header {
font-weight: bold;
background-color: #f8f8f8;
}
.amount {
text-align: right;
}
.bank-details {
margin-top: 15pt;
margin-bottom: 15pt;
line-height: 1.6;
}
.signature {
text-align: right;
margin-top: 40pt;
padding-top: 20pt;
}
.amount-words {
margin-top: 10pt;
margin-bottom: 10pt;
font-weight: bold;
}
strong {
font-weight: bold;
}
</style>
</head>
<body>
<div class="invoice-container">
<table>
<?php if(isset($agent_name)) : ?>
<tr>
<td colspan="3" class="header"><?= $agent_name ?></td>
</tr>
<?php endif; ?>
<?php if(isset($agent_address) && !empty($agent_address)) : ?>
<tr>
<td colspan="3" class="header"><?= $agent_address ?></td>
</tr>
<?php endif; ?>
<tr>
<td class="section-header">Bill To:</td>
<td class="section-header">Invoice No</td>
<td class="section-header">Date</td>
</tr>
<tr>
<td>
<strong>NHANCE INDIA INSURANCE BROKING PVT LTD</strong><br>
'Old No.76, New No.82, 'Sreshtha', First floor , <br>
4th Avenue, Ashok Nagar, Chennai - 600083
</td>
<td><?= isset($invoice_no) && !empty($invoice_no) ? $invoice_no : "-" ?></td>
<td><?= isset($invoice_date) && !empty($invoice_date) ? change_date_format($invoice_date, 'Y-m-d', 'd/m/Y') : "-" ?></td>
</tr>
</table>
<table>
<tr>
<th>Sl No</th>
<th>Description</th>
<th>Amount-INR</th>
</tr>
<tr>
<td>1</td>
<td>INSURANCE BROKING SERVICE (POINT OF SALE)</td>
<td class="amount"><?= isset($invoice_no) && !empty($invoice_amount) ? format_indian_number($invoice_amount) : "-" ?></td>
</tr>
<tr>
<td colspan="2"><strong>Total</strong></td>
<td class="amount"><strong><?= isset($invoice_no) && !empty($invoice_amount) ? format_indian_number($invoice_amount) : "-" ?></strong></td>
</tr>
</table>
<div class="amount-words">
<strong>Amount Payable in words : <?= isset($invoice_no) && !empty($invoice_amount) ? numberToWords((int)$invoice_amount) . ' Only' : "-" ?> </strong>
</div>
<div class="bank-details">
<strong>BANK ACCOUNT DETAILS</strong><br>
ACCOUNT NUMBER : <?= isset($agent_account_no) && !empty($agent_account_no) ? $agent_account_no : "-" ?><br>
IFSC CODE : <?= isset($agent_ifsc_code) && !empty($agent_ifsc_code) ? $agent_ifsc_code : "-" ?><br>
Bank NAME : <?= isset($agent_bank_name) && !empty($agent_bank_name) ? $agent_bank_name : "-" ?>
</div>
<div class="signature">
Authorised Signatory
</div>
</div>
</body>