main
parent
492e4d2bb6
commit
43f6f2ce21
|
@ -88,7 +88,7 @@ try {
|
|||
<tr class="text-center">
|
||||
<td><?php echo htmlspecialchars($emi['name']); ?></td>
|
||||
<td>$<?php echo number_format($emi['emiAmount'], 2); ?></td>
|
||||
<td><?php echo date('d M Y', strtotime($emi['emiDate'])); ?></td>
|
||||
<td><?php echo date('m/d/Y', strtotime($emi['emiDate'])); ?></td>
|
||||
<td>
|
||||
<?php if ($emi['payStatus'] == 0) : ?>
|
||||
<span class="badge bg-danger">Pending</span>
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
<div>
|
||||
<p>Customer Name: <strong><?php echo $customer['name']; ?></strong></p>
|
||||
<p>Mobile Number: <strong><?php echo $customer['mobile']; ?></strong></p>
|
||||
<p>Installment Start Date: <strong><?php echo $bookingDate ? htmlspecialchars($bookingDate) : 'N/A'; ?></strong></p>
|
||||
<p>Installment Start Date: <strong><?php echo $bookingDate ? date("m/d/Y", strtotime($bookingDate)) : 'N/A'; ?></strong></p>
|
||||
<p>Invoice Id: <strong><?php echo $emiPlans[0]['invoiceId']; ?></strong></p>
|
||||
<p>Email: <strong><?php echo $customer['email']; ?></strong></p>
|
||||
</div>
|
||||
|
@ -200,10 +200,10 @@
|
|||
<tr id="row-<?= $emi['id']; ?>">
|
||||
<td><?= $emi['emiNumber']; ?></td>
|
||||
<td>$<?= number_format($emi['emiAmount'], 2); ?></td>
|
||||
<td><?= date('d-m-Y', strtotime($emi['emiDate'])); ?></td>
|
||||
<td><?= date("m/d/Y", strtotime($emi['emiDate'])); ?></td>
|
||||
<td>
|
||||
<?php if (!empty($emi['paymentDate'])) { ?>
|
||||
<?= date('d-m-Y', strtotime($emi['paymentDate'])); ?>
|
||||
<?= date("m/d/Y", strtotime($emi['paymentDate'])); ?>
|
||||
<?php } else { ?>
|
||||
<input value="<?= date('Y-m-d', strtotime($emi['emiDate'])); ?>" id="paymentDateId" class="form-control" type="date" />
|
||||
<?php } ?>
|
||||
|
@ -237,7 +237,7 @@
|
|||
<?php foreach ($emiPlans as $emi) { if($emi['adPaymentAmount'] !== null) { ?>
|
||||
<tr id="row-<?= $emi['id']; ?>">
|
||||
<td>$<?= $emi['adPaymentAmount']; ?></td>
|
||||
<td><?= $emi['adPaymentDate']; ?></td>
|
||||
<td><?= date("m/d/Y", strtotime($emi['adPaymentDate'])); ?></td>
|
||||
<td><?= $emi['adPaymentTran']; ?></td>
|
||||
<td><?= $emi['adPaymentRemarks']; ?></td>
|
||||
</tr>
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
<th>Start Date</th>
|
||||
<th>End Date</th>
|
||||
<th>Installments</th>
|
||||
<th>Monthly Payment Date</th>
|
||||
<th>Monthly Payment Amount</th>
|
||||
<th>Payment Date</th>
|
||||
<th>Installment Amount</th>
|
||||
<th>Total Amount</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
|
@ -118,22 +118,22 @@
|
|||
<?php echo htmlspecialchars($customer['name']); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo isset($emi['bookingDate']) ? date('d-m-Y', strtotime($emi['bookingDate'])) : 'N/A'; ?></td>
|
||||
<td><?php echo isset($emi['bookingDate']) ? (new DateTime($emi['bookingDate']))->modify('+'.$emi['tenure']-'1'.'months')->format('d-m-Y') : 'N/A'; ?></td>
|
||||
<td><?php echo isset($emi['bookingDate']) ? date("m/d/Y", strtotime($emi['bookingDate'])) : 'N/A'; ?></td>
|
||||
<td><?php echo isset($emi['bookingDate']) ? (new DateTime($emi['bookingDate']))->modify('+'.$emi['tenure']-'1'.'months')->format("m/d/Y") : 'N/A'; ?></td>
|
||||
<td><?php echo isset($emi['tenure']) ? htmlspecialchars($emi['tenure']) : 'N/A'; ?></td>
|
||||
<td><?php echo isset($emi['bookingDate']) ? date('d', strtotime($emi['bookingDate'])) .' Each Month': 'N/A'; ?></td>
|
||||
<td>$<?php echo isset($emi['emiAmount']) ? htmlspecialchars($emi['emiAmount']) : '0.00'; ?></td>
|
||||
<td>$<?php echo isset($emi['totalAmount']) ? htmlspecialchars($emi['totalAmount']) : '0.00'; ?></td>
|
||||
|
||||
<td class="d-flex gap-1">
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">New</a>
|
||||
<a href="/customers/edit-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">Edit</a>
|
||||
<a href="/customers/print-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;" target="_blank">Print</a>
|
||||
<a href="/customers/change-password/?customerId=<?php echo $customer['customerId'].'&userName='.$customer['name']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">Password</a>
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-sm text-white" style="font-size: 11px; background-color: #374151;">New</a>
|
||||
<a href="/customers/edit-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-sm text-white" style="font-size: 11px; background-color: #374151;">Edit</a>
|
||||
<a href="/customers/print-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-sm text-white" style="font-size: 11px; background-color: #374151;" target="_blank">Print</a>
|
||||
<a href="/customers/change-password/?customerId=<?php echo $customer['customerId'].'&userName='.$customer['name']; ?>" class="btn btn-sm text-white" style="font-size: 11px; background-color: #374151;">Password</a>
|
||||
<form method="post">
|
||||
<input type="hidden" name="customerId" value="<?php echo htmlspecialchars($customer['customerId']); ?>" />
|
||||
<input type="hidden" name="invoiceId" value="<?php echo htmlspecialchars($invoice['invoiceId']); ?>" />
|
||||
<button type="submit" name="delete" class="btn btn-danger btn-sm" style="font-size: 13px;">Delete</button>
|
||||
<button type="submit" name="delete" class="btn btn-danger btn-sm" style="font-size: 11px;">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -147,12 +147,12 @@
|
|||
<td class="fw-bold"><?php echo htmlspecialchars($customer['name']); ?></td>
|
||||
<td colspan="6" class="text-center">No EMI or Invoice Data</td>
|
||||
<td class="d-flex gap-1">
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">New</a>
|
||||
<a href="/customers/change-password/?customerId=<?php echo $customer['customerId'].'&userName='.$customer['name']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">Password</a>
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-sm text-white" style="font-size: 11px; background-color: #374151;">New</a>
|
||||
<a href="/customers/change-password/?customerId=<?php echo $customer['customerId'].'&userName='.$customer['name']; ?>" class="btn btn-sm text-white" style="font-size: 11px; background-color: #374151;">Password</a>
|
||||
<form method="post">
|
||||
<input type="hidden" name="customerId" value="<?php echo htmlspecialchars($customer['customerId']); ?>" />
|
||||
<input type="hidden" name="invoiceId" value="<?php echo htmlspecialchars($invoice['invoiceId']); ?>" />
|
||||
<button type="submit" name="delete" class="btn btn-danger btn-sm" style="font-size: 13px;">Delete</button>
|
||||
<button type="submit" name="delete" class="btn btn-danger btn-sm" style="font-size: 11px;">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -36,7 +36,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<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>
|
||||
<p style="margin-top: -15px; font-size: 14px;">Invoice Date: <?= date('m/d/Y', strtotime($invoiceInfo['invoiceDate'])) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 14px;"><strong>CLASSBOXES TECHNOLOGY</strong></p>
|
||||
|
@ -90,8 +90,8 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<?php foreach ($emiPlans as $emi): if($emi['emiAmount'] !== null) {?>
|
||||
<tr>
|
||||
<td><?= $emi['emiNumber'] ?></td>
|
||||
<td><?= $emi['emiDate'] ?></td>
|
||||
<td><?= $emi['payStatus'] == 1 ? $emi['paymentDate'] : 'Unpaid' ?></td>
|
||||
<td><?= date('m/d/Y', strtotime($emi['emiDate'])) ?></td>
|
||||
<td><?= $emi['payStatus'] == 1 ? date('m/d/Y', strtotime($emi['paymentDate'])) : 'Unpaid' ?></td>
|
||||
<td>$<?= number_format($emi['emiAmount'], 2) ?></td>
|
||||
<td>$<?= number_format($emi['outstanding'], 2) ?></td>
|
||||
<td>
|
||||
|
@ -121,7 +121,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
?>
|
||||
<tr>
|
||||
<td><?= number_format($emiAdditional['adPaymentAmount'], 2) ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentDate']) ? $emiAdditional['adPaymentDate'] : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentDate']) ? date('m/d/Y', strtotime($emiAdditional['adPaymentDate'])) : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentSource']) ? $emiAdditional['adPaymentSource'] : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentTran']) ? $emiAdditional['adPaymentTran'] : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentRemarks']) ? $emiAdditional['adPaymentRemarks'] : '-' ?></td>
|
||||
|
@ -143,7 +143,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
</div>
|
||||
<script src="/assets/js/html2pdf.bundle.min.js"></script>
|
||||
<script>
|
||||
document.getElementById('invoiceGenDate').textContent = new Date().toLocaleDateString('en-GB');
|
||||
document.getElementById('invoiceGenDate').textContent = new Date().toLocaleDateString('en-US');
|
||||
|
||||
function downloadPDF() {
|
||||
const invoice = document.getElementById("invoice-box");
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
|
||||
<!-- Invoice Data -->
|
||||
<td><?php echo htmlspecialchars($invoice['invoiceId']); ?></td>
|
||||
<td><?php echo htmlspecialchars($invoice['invoiceDate']); ?></td>
|
||||
<td><?php echo htmlspecialchars($invoice['totalAmount']); ?></td>
|
||||
<td><?php echo date('m/d/Y', strtotime($invoice['invoiceDate'])); ?></td>
|
||||
<td>$<?php echo htmlspecialchars($invoice['totalAmount']); ?></td>
|
||||
|
||||
<td>
|
||||
<a href="/my-account/emi-details/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn text-white btn-sm" style="background-color: #374151;">Details</a>
|
||||
|
|
|
@ -75,7 +75,7 @@ try {
|
|||
<div>
|
||||
<p>Customer Name: <strong><?php echo $customer['name']; ?></strong></p>
|
||||
<p>Mobile Number: <strong><?php echo $customer['mobile']; ?></strong></p>
|
||||
<p>Installment Start Date: <strong><?php echo $bookingDate ? htmlspecialchars($bookingDate) : 'N/A'; ?></strong></p>
|
||||
<p>Installment Start Date: <strong><?php echo $bookingDate ? date('m/d/Y', strtotime($bookingDate)) : 'N/A'; ?></strong></p>
|
||||
<p>Invoice Id: <strong><?php echo $emiPlans[0]['invoiceId']; ?></strong></p>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -93,7 +93,7 @@ try {
|
|||
<th>Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Payment Status</th>
|
||||
<th>Outstanding</th>
|
||||
<th>Outstanding</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -102,7 +102,7 @@ try {
|
|||
<tr id="row-<?= $emi['id']; ?>">
|
||||
<td><?= $emi['emiNumber']; ?></td>
|
||||
<td>$<?= number_format($emi['emiAmount'], 2); ?></td>
|
||||
<td><?= date('d-m-Y', strtotime($emi['emiDate'])); ?></td>
|
||||
<td><?= date('m/d/Y', strtotime($emi['emiDate'])); ?></td>
|
||||
<td>
|
||||
<span id="status-<?= $emi['id']; ?>" class="badge <?= $emi['payStatus'] == 0 ? 'bg-danger' : 'bg-success'; ?>">
|
||||
<?= $emi['payStatus'] == 0 ? 'Unpaid' : 'Paid'; ?>
|
||||
|
@ -113,4 +113,25 @@ try {
|
|||
<?php } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="mb-3">Additional Payment Details</h3>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead class="text-white text-center" style="background-color: #374151;">
|
||||
<tr>
|
||||
<th>Amount</th>
|
||||
<th>Payment Date</th>
|
||||
<th>Transaction Id</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($emiPlans as $emi) { if($emi['adPaymentAmount'] !== null) { ?>
|
||||
<tr id="row-<?= $emi['id']; ?>">
|
||||
<td>$<?= $emi['adPaymentAmount']; ?></td>
|
||||
<td><?= date('m/d/Y', strtotime($emi['adPaymentDate'])); ?></td>
|
||||
<td><?= $emi['adPaymentTran']; ?></td>
|
||||
<td><?= $emi['adPaymentRemarks']; ?></td>
|
||||
</tr>
|
||||
<?php } }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -36,7 +36,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<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>
|
||||
<p style="margin-top: -15px; font-size: 14px;">Invoice Date: <?= date('m/d/Y', strtotime($invoiceInfo['invoiceDate'])) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 14px;"><strong>CLASSBOXES TECHNOLOGY</strong></p>
|
||||
|
@ -90,8 +90,8 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<?php foreach ($emiPlans as $emi): if($emi['emiAmount'] !== null) {?>
|
||||
<tr>
|
||||
<td><?= $emi['emiNumber'] ?></td>
|
||||
<td><?= $emi['emiDate'] ?></td>
|
||||
<td><?= $emi['payStatus'] == 1 ? $emi['paymentDate'] : 'Unpaid' ?></td>
|
||||
<td><?= date('m/d/Y', strtotime($emi['emiDate'])) ?></td>
|
||||
<td><?= $emi['payStatus'] == 1 ? date('m/d/Y', strtotime($emi['paymentDate'])) : 'Unpaid' ?></td>
|
||||
<td>$<?= number_format($emi['emiAmount'], 2) ?></td>
|
||||
<td>$<?= number_format($emi['outstanding'], 2) ?></td>
|
||||
<td>
|
||||
|
@ -121,7 +121,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
?>
|
||||
<tr>
|
||||
<td><?= number_format($emiAdditional['adPaymentAmount'], 2) ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentDate']) ? $emiAdditional['adPaymentDate'] : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentDate']) ? date('m/d/Y', strtotime($emiAdditional['adPaymentDate'])) : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentSource']) ? $emiAdditional['adPaymentSource'] : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentTran']) ? $emiAdditional['adPaymentTran'] : '-' ?></td>
|
||||
<td><?= !empty($emiAdditional['adPaymentRemarks']) ? $emiAdditional['adPaymentRemarks'] : '-' ?></td>
|
||||
|
@ -143,7 +143,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
</div>
|
||||
<script src="/assets/js/html2pdf.bundle.min.js"></script>
|
||||
<script>
|
||||
document.getElementById('invoiceGenDate').textContent = new Date().toLocaleDateString('en-GB');
|
||||
document.getElementById('invoiceGenDate').textContent = new Date().toLocaleDateString('en-US');
|
||||
|
||||
function downloadPDF() {
|
||||
const invoice = document.getElementById("invoice-box");
|
||||
|
|
Loading…
Reference in New Issue