s22
This commit is contained in:
@@ -15,7 +15,6 @@ try {
|
||||
$stmt->bindParam(':payStatus', $_POST['payStatus'], PDO::PARAM_INT);
|
||||
$stmt->bindParam(':emiId', $_POST['emiId'], PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
|
||||
echo json_encode(['status' => 'success']);
|
||||
} catch (PDOException $e) {
|
||||
echo json_encode(['status' => 'error', 'message' => $e->getMessage()]);
|
||||
@@ -25,8 +24,9 @@ try {
|
||||
}
|
||||
|
||||
// Fetch EMI data
|
||||
$stmt = $db->prepare("SELECT * FROM emi WHERE customerId = :customerId ORDER BY emiDate ASC");
|
||||
$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);
|
||||
// var_dump($emiPlans);
|
||||
@@ -48,6 +48,7 @@ try {
|
||||
<p>Customer Name: <strong><?php echo $customer['name']; ?></strong></p>
|
||||
<p>Mobile Number: <strong><?php echo $customer['mobile']; ?></strong></p>
|
||||
<p>EMI Booking Date: <strong><?php echo $emiPlans[0]['bookingDate']; ?></strong></p>
|
||||
<p>EMI Booking Date: <strong><?php echo $emiPlans[0]['invoiceId']; ?></strong></p>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user