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 | Tax(%) | Tax | Total |
---|---|---|---|---|---|---|
= $invoiceInfo['item'] ?> | = $invoiceInfo['description'] ?> | = $invoiceInfo['qty'] ?> | = $invoiceInfo['rate'] ?> | = $invoiceInfo['tax'] ?>% | ₹= $invoiceInfo['taxAmount'] ?> | ₹= number_format($invoiceInfo['totalAmount'], 2) ?> |
EMI No. | EMI Date | EMI Amount | Outstanding | Status |
---|---|---|---|---|
= $emi['emiNumber'] ?> | = $emi['emiDate'] ?> | ₹= number_format($emi['emiAmount'], 2) ?> | ₹= number_format($emi['outstanding'], 2) ?> | = ($emi['payStatus'] == 1) ? 'Paid' : 'Pending' ?> |
Admin Note: = $invoiceInfo['adminNote'] ?>