mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
solve duplicate statement transaction created upon import bank statement
This commit is contained in:
@@ -98,7 +98,7 @@ class ImportBankStatementLogic extends AbstractControllerLogic
|
||||
$tellerId = $row[19];
|
||||
$branchChannel = $row[20];
|
||||
$transactionCode = $row[21];
|
||||
$endBalance = $row[22];
|
||||
$endBalance = ((float) str_replace(',', '', $row[22]));
|
||||
$description2 = $row[25];
|
||||
$description3 = $row[26];
|
||||
$description4 = $row[27];
|
||||
@@ -123,11 +123,10 @@ class ImportBankStatementLogic extends AbstractControllerLogic
|
||||
$existingTransaction = StatementTransaction::where('transaction_ref', $transactionRef)
|
||||
->where('posting_date', $postingDate)
|
||||
->where('amount', $amount)
|
||||
->where('transaction_description', $transactionDescription)
|
||||
->where('teller_id', $tellerId)
|
||||
->where('branch_channel', $branchChannel)
|
||||
->where('transaction_code', $transactionCode)
|
||||
->where('end_balance', $endBalance)
|
||||
->whereRaw("CAST(REPLACE(end_balance,',','') AS DECIMAL(15,2)) = ?",[$endBalance])
|
||||
->first();
|
||||
|
||||
if (!$existingTransaction) {
|
||||
|
||||
Reference in New Issue
Block a user