diff --git a/customers/.hta_slug/generate-invoice.php b/customers/.hta_slug/generate-invoice.php index f8f4521..ee6cd1c 100644 --- a/customers/.hta_slug/generate-invoice.php +++ b/customers/.hta_slug/generate-invoice.php @@ -18,7 +18,7 @@ $outstandingAmount = $totalAmount; $emiDate = new DateTime($firstEmiDate); // Set initial date - $stmt = $db->prepare("INSERT INTO emi (customerId, emiNumber, emiAmount, emiDate, totalAmount, outstanding, tenure, frequency, bookingDate, paymentMode) VALUES (:customerId, :emiNumber, :emiAmount, :emiDate, :totalAmount, :outstanding, :tenure, :frequency, bookingDate, :paymentMode)"); + $stmt = $db->prepare("INSERT INTO emi (customerId, emiNumber, emiAmount, emiDate, totalAmount, outstanding, tenure, frequency, bookingDate, paymentMode, salesAgent) VALUES (:customerId, :emiNumber, :emiAmount, :emiDate, :totalAmount, :outstanding, :tenure, :frequency, bookingDate, :paymentMode, :salesAgent)"); for ($i = 1; $i <= $tenure; $i++) { $outstandingAmount -= $emiAmount; @@ -33,6 +33,7 @@ $stmt->bindParam(':frequency', $frequency); $stmt->bindParam(':bookingDate', $bookingDate); $stmt->bindParam(':paymentMode', $paymentMode); + $stmt->bindParam(':salesAgent', $salesAgent); $stmt->execute(); // Move to the next month's EMI date @@ -97,10 +98,6 @@ -