This commit is contained in:
Suvodip
2025-03-26 11:53:18 +05:30
parent 321e617580
commit 55874583eb
7 changed files with 122 additions and 116 deletions

View File

@@ -22,21 +22,32 @@ if ($invoiceInfo['tenure'] > 1) {
<div class="container my-5">
<div class="invoice-box" id="invoice-box">
<h2 class="text-center fw-bold" style="color: #374151;">Invoice</h2><hr>
<div class="d-flex justify-content-between">
<div class="w-100">
<h6>Invoice ID: <?= $invoiceInfo['invoiceId'] ?></h6>
<h6>Customer: <?= $invoiceInfo['customerName'] ?></h6>
<p style="width: 70%;"><strong>Address:</strong> <?= $invoiceInfo['address'] ?></p>
</div>
<div class="w-100 d-flex flex-column align-items-end">
<h6>Invoice Date: <?= $invoiceInfo['invoiceDate'] ?></h6>
<h6>Payment Mode: <?= $invoiceInfo['paymentMode'] ?></h6>
<p><strong>Agent:</strong> <?= $invoiceInfo['salesAgent'] ?></p>
<div class="d-flex justify-content-between" >
<img src="/assets/logo_dark.png" alt="" style="width: 150px; height: fit-content;" />
<div>
<h3 class="text-center fw-bold" style="color: #374151;">Invoice</h3>
<p style="margin-top: -10px;"><strong># <?= $invoiceInfo['invoiceId'] ?></strong></p>
</div>
</div>
<table class="table table-bordered mt-3">
<div class="d-flex justify-content-between gap-2">
<div>
<p style="font-size: 14px;"><strong>Bill To:</strong></p>
<p style="margin-top: -10px; font-size: 13px;">
<span><strong><?= $invoiceInfo['customerName'] ?></strong></span><br>
<span style=""><?= $invoiceInfo['address'] ?></span>
</p>
<p style="margin-top: -15px; font-size: 14px;">Invoice Date: <?= $invoiceInfo['invoiceDate'] ?></p>
</div>
<div>
<p style="font-size: 14px;"><strong>CLASSBOXES TECHNOLOGY</strong></p>
<p style="margin-top: -15px; font-size: 13px; text-align: right;">
<span>371 Hoes Lane, Suite #200</span><br>
<span>Piscataway New Jersey</span><br>
<span>US 08854</span>
</p>
</div>
</div>
<table class="table table-bordered mt-3" style="font-size: 14px;">
<thead class="text-white" style="background-color: #374151;">
<tr>
<th>Item</th>
@@ -63,8 +74,8 @@ if ($invoiceInfo['tenure'] > 1) {
<!-- EMI Table (if tenure > 1) -->
<?php if ($invoiceInfo['tenure'] > 1): ?>
<h5 class="mt-4" style="color: #374151;">EMI Payment Plan</h5>
<table class="table table-striped">
<h6 class="mt-4" style="color: #374151;">EMI Payment Plan</h6>
<table class="table table-striped" style="font-size: 14px;">
<thead>
<tr>
<th>EMI No.</th>
@@ -91,37 +102,37 @@ if ($invoiceInfo['tenure'] > 1) {
</tbody>
</table>
<?php endif; ?>
<h5 class="mt-4" style="color: #374151;">Additional Payment Details:</h5>
<table class="table table-striped " style="font-size: 12px;">
<thead class="">
<tr>
<th>Payment Amount</th>
<th>Payment Date</th>
<th>Payment Source</th>
<th>Transaction ID</th>
<th>Remarks</th>
</tr>
</thead>
<tbody>
<?php
foreach ($emiPlans as $emiAdditional) {
if (!is_null($emiAdditional['adPaymentAmount']) && $emiAdditional['adPaymentAmount'] > 0) {
?>
<?php if(!is_null($emiPlans[0]['adPaymentAmount']) && $emiPlans[0]['adPaymentAmount'] > 0) { ?>
<h6 class="mt-4" style="color: #374151;">Additional Payment Details:</h6>
<table class="table table-striped " style="font-size: 14px;">
<thead class="">
<tr>
<td><?= number_format($emiAdditional['adPaymentAmount'], 2) ?></td>
<td><?= !empty($emiAdditional['adPaymentDate']) ? $emiAdditional['adPaymentDate'] : '-' ?></td>
<td><?= !empty($emiAdditional['adPaymentSource']) ? $emiAdditional['adPaymentSource'] : '-' ?></td>
<td><?= !empty($emiAdditional['adPaymentTran']) ? $emiAdditional['adPaymentTran'] : '-' ?></td>
<td><?= !empty($emiAdditional['adPaymentRemarks']) ? $emiAdditional['adPaymentRemarks'] : '-' ?></td>
<th>Payment Amount</th>
<th>Payment Date</th>
<th>Payment Source</th>
<th>Transaction ID</th>
<th>Remarks</th>
</tr>
<?php
}
}
?>
</tbody>
</table>
</thead>
<tbody>
<?php
foreach ($emiPlans as $emiAdditional) {
if (!is_null($emiAdditional['adPaymentAmount']) && $emiAdditional['adPaymentAmount'] > 0) {
?>
<tr>
<td><?= number_format($emiAdditional['adPaymentAmount'], 2) ?></td>
<td><?= !empty($emiAdditional['adPaymentDate']) ? $emiAdditional['adPaymentDate'] : '-' ?></td>
<td><?= !empty($emiAdditional['adPaymentSource']) ? $emiAdditional['adPaymentSource'] : '-' ?></td>
<td><?= !empty($emiAdditional['adPaymentTran']) ? $emiAdditional['adPaymentTran'] : '-' ?></td>
<td><?= !empty($emiAdditional['adPaymentRemarks']) ? $emiAdditional['adPaymentRemarks'] : '-' ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<?php } ?>
<p class="text-muted mt-3"><strong>Admin Note:</strong> <?= $invoiceInfo['adminNote'] ?></p>
<p style="font-size: 12px;"><strong>Invoice Generate Date: </strong><span id="invoiceGenDate"></span></p>
<div class="d-flex gap-1">