mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
DEBUG/AUDIT wallet balance not updated
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Models\Wallet;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class UpdatesWalletBalance extends AbstractUpdateRecord
|
||||
{
|
||||
@@ -32,6 +33,15 @@ class UpdatesWalletBalance extends AbstractUpdateRecord
|
||||
}
|
||||
$auditBalance = ($topups + $credit) - ($payments + $debit);
|
||||
|
||||
Log::info('Wallet audit completed', [
|
||||
'wallet_id' => $model->id,
|
||||
'topups' => $topups,
|
||||
'credit' => $credit,
|
||||
'payments' => $payments,
|
||||
'debit' => $debit,
|
||||
'audit_balance' => $auditBalance,
|
||||
]);
|
||||
|
||||
$model->amount = $auditBalance;
|
||||
return $this->handler($model);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user