setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $db->prepare("SELECT * FROM invoice WHERE customerId = :customerId AND invoiceId = :invoiceId"); $stmt->bindParam(':customerId', $_GET['customerId']); $stmt->bindParam(':invoiceId', $_GET['invoiceId']); $stmt->execute(); $invoiceInfo = $stmt->fetch(PDO::FETCH_ASSOC); $emiPlans = []; if ($invoiceInfo['tenure'] > 1) { $stmt = $db->prepare("SELECT * FROM emi WHERE customerId = :customerId AND invoiceId = :invoiceId ORDER BY emiDate ASC"); $stmt->bindParam(':customerId', $_GET['customerId']); $stmt->bindParam(':invoiceId', $_GET['invoiceId']); $stmt->execute(); $emiPlans = $stmt->fetchAll(PDO::FETCH_ASSOC); } ?>
Address: = $invoiceInfo['address'] ?>
Agent: = $invoiceInfo['salesAgent'] ?>
Item | Description | Qty | Rate | Discount(%) | Discount | Total |
---|---|---|---|---|---|---|
= $invoiceInfo['item'] ?> | = $invoiceInfo['description'] ?> | = $invoiceInfo['qty'] ?> | = $invoiceInfo['rate'] ?> | = $invoiceInfo['discount'] ?>% | $= $invoiceInfo['discountAmount'] ?> | $= number_format($invoiceInfo['totalAmount'], 2) ?> |
EMI No. | EMI Date | Payment Date | EMI Amount | Outstanding | Status |
---|---|---|---|---|---|
= $emi['emiNumber'] ?> | = $emi['emiDate'] ?> | = $emi['payStatus'] == 1 ? $emi['paymentDate'] : 'Unpaid' ?> | $= number_format($emi['emiAmount'], 2) ?> | $= number_format($emi['outstanding'], 2) ?> | = ($emi['payStatus'] == 1) ? 'Paid' : 'Pending' ?> |
Payment Amount | Payment Date | Payment Source | Transaction ID | Remarks |
---|---|---|---|---|
= number_format($emiAdditional['adPaymentAmount'], 2) ?> | = !empty($emiAdditional['adPaymentDate']) ? $emiAdditional['adPaymentDate'] : '-' ?> | = !empty($emiAdditional['adPaymentSource']) ? $emiAdditional['adPaymentSource'] : '-' ?> | = !empty($emiAdditional['adPaymentTran']) ? $emiAdditional['adPaymentTran'] : '-' ?> | = !empty($emiAdditional['adPaymentRemarks']) ? $emiAdditional['adPaymentRemarks'] : '-' ?> |
Admin Note: = $invoiceInfo['adminNote'] ?>
Invoice Generate Date: