s2
This commit is contained in:
@@ -263,14 +263,14 @@ if ($_SESSION['type'] === 'admin' && isset($_GET["no"]) && isset($_GET["type"])
|
||||
$userType = 'admin';
|
||||
|
||||
// Entry 1: Deduction from recurring
|
||||
$remarksText1 = "Deducted ₹$loanEMIAmount from recurring balance to pay Loan Account No: $paidToLoanAccountNumber EMI";
|
||||
$remarksText1 = "₹$loanEMIAmount deducted from Recurring for Loan A/c $paidToLoanAccountNumber EMI";
|
||||
$stmt = $conn->prepare("INSERT INTO `$table` (AT_ADMIN, AT_ACID, AT_AMOUNT, REMARKS) VALUES (?, ?, ?, ?)");
|
||||
$stmt->bind_param("ssds", $userType, $accountId, $deductAmount, $remarksText1);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
|
||||
// Entry 2: Credit to loan account
|
||||
$remarksText2 = "Credited ₹$loanEMIAmount to Loan Account No: $paidToLoanAccountNumber EMI from recurring balance";
|
||||
$remarksText2 = "₹$loanEMIAmount credited to Loan A/c $paidToLoanAccountNumber EMI (from Recurring $accountId)";
|
||||
$stmt = $conn->prepare("INSERT INTO `$table` (AT_ADMIN, AT_ACID, AT_AMOUNT, REMARKS) VALUES (?, ?, ?, ?)");
|
||||
$stmt->bind_param("ssds", $userType, $paidToLoanAccountNumber, $loanEMIAmount, $remarksText2);
|
||||
$stmt->execute();
|
||||
@@ -285,9 +285,7 @@ if ($_SESSION['type'] === 'admin' && isset($_GET["no"]) && isset($_GET["type"])
|
||||
$stmt->close();
|
||||
|
||||
// Update Recurring Account
|
||||
$sql = "UPDATE `" . $GLOBALS['arif_ac'] . "`
|
||||
SET `AA_BAL` = `AA_BAL` - ?
|
||||
WHERE `AA_ACNO` = ?";
|
||||
$sql = "UPDATE `" . $GLOBALS['arif_ac'] . "` SET `AA_BAL` = `AA_BAL` - ? WHERE `AA_ACNO` = ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("ds", $loanEMIAmount, $accountId);
|
||||
$stmt->execute();
|
||||
|
||||
Reference in New Issue
Block a user