Skip to content

Commit

Permalink
Fix bulk payment function
Browse files Browse the repository at this point in the history
  • Loading branch information
o-psi committed Mar 22, 2024
1 parent b46e268 commit d70a5a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions functions/payment_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ function createBulkPayment(

$email_body_invoices = "";

$_SESSION['alert_message'] = "";

// Check if bulk_payment_amount exceeds total_account_balance
if ($bulk_payment_amount > $total_client_balance) {
Expand Down Expand Up @@ -326,6 +327,10 @@ function createBulkPayment(
// Logging
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Payment', log_action = 'Create', log_description = 'Bulk Payment of $bulk_payment_amount_static', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $payment_id");

$return_data = [
'payment_id' => $payment_id,
'credit_id' => $credit_id
];
}

function readPayment(
Expand Down
4 changes: 2 additions & 2 deletions post/invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@
$bulk_payment = [];
$bulk_payment['client_id'] = $client_id;
$bulk_payment['date'] = $date;
$bulk_payment['bulk_payment_amount'] = $bulk_payment_amount;
$bulk_payment['amount'] = $bulk_payment_amount;
$bulk_payment['bulk_payment_amount_static'] = $bulk_payment_amount_static;
$bulk_payment['total_client_balance'] = $total_client_balance;
$bulk_payment['account'] = $account;
$bulk_payment['currency_code'] = $currency_code;
$bulk_payment['payment_method'] = $payment_method;
$bulk_payment['method'] = $payment_method;
$bulk_payment['reference'] = $reference;
$bulk_payment['email_receipt'] = $email_receipt;

Expand Down

0 comments on commit d70a5a4

Please sign in to comment.