mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
debug wallet audit
This commit is contained in:
+4
-2
@@ -404,11 +404,13 @@ Route::get('/wallet/audit', function (Request $request) {
|
||||
if((int) $transaction->type === TransactionType::PAYMENT) $payments += (float) $transaction->amount;
|
||||
if((int) $transaction->type === TransactionType::DEBIT_NOTE) $debit += (float) $transaction->amount;
|
||||
}
|
||||
if((round((float) $wallet->amount - (($topups + $credit) - ($payments + $debit)), 2) == 0) AND $wallet->amount > -0.01 AND $wallet->amount == -0) continue;
|
||||
$auditBalance = ($topups + $credit) - ($payments + $debit);
|
||||
$diffenrence = round((float) $wallet->amount - (($topups + $credit) - ($payments + $debit)), 2);
|
||||
if(($diffenrence == 0) AND ($diffenrence == -0) AND $wallet->amount > -0.01) continue;
|
||||
|
||||
$i++;
|
||||
|
||||
echo $i.". Marking: ". $wallet->owner->reference ."(".$wallet->id.")<br>Current Balance: ". $wallet->amount ."<br>Audit Balance: ". (($topups + $credit) - ($payments + $debit)) ."<br>Difference: ". round((float) $wallet->amount - (($topups + $credit) - ($payments + $debit)), 2) ."<br><br><br>";
|
||||
echo $i.". Marking: ". $wallet->owner->reference ."(".$wallet->id.")<br>Current Balance: ". $wallet->amount ."<br>Audit Balance: ". ($auditBalance) ."<br>Difference: ". $diffenrence ."<br><br><br>";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user