36 lines
1.5 KiB
PHP
36 lines
1.5 KiB
PHP
<?php
|
|
// Example: Loop through $installments array if available
|
|
if (!empty($installments)) {
|
|
foreach ($installments as $index => $installment) {
|
|
?>
|
|
<div class="form-row align-items-end">
|
|
|
|
<input type="hidden" name="installment_primary_key[]" value="<?= isset($installment['id']) ? $installment['id'] : '' ?>">
|
|
|
|
<div class="form-group col-md-3">
|
|
<label for="installment_amount">Installment Amount</label>
|
|
<input type="text" class="form-control" name="installment_amount[]" placeholder="Enter Amount"
|
|
value="<?= isset($installment['installment_amount']) ? $installment['installment_amount'] : '' ?>">
|
|
</div>
|
|
|
|
<div class="form-group col-md-3">
|
|
<label for="payment_date">Payment Date</label>
|
|
<input type="text" class="form-control payment_date" name="payment_date[]" placeholder="DD/MM/YYYY"
|
|
value="<?= isset($installment['payment_date']) && $installment['payment_date'] != '0000-00-00' ? date('d/m/Y', strtotime($installment['payment_date'])) : '' ?>">
|
|
</div>
|
|
|
|
<div class="form-group col-md-3">
|
|
<label for="utr_no">UTR No.</label>
|
|
<input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No."
|
|
value="<?= isset($installment['utr_no']) ? $installment['utr_no'] : '' ?>">
|
|
</div>
|
|
|
|
<div class="form-group col-md-2">
|
|
<button type="button" class="btn btn-danger remove-installment">X</button>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|