fix bug: customer pay full amount but payment cant go through due to rounding up issue

This commit is contained in:
edmondlang
2024-06-26 23:43:40 +08:00
parent 669cac9bd4
commit dfedb99c13
2 changed files with 2 additions and 1 deletions
@@ -114,7 +114,7 @@ class CreatePaymentTransactionProcessor
/** @var Wallet $wallet */
$wallet = $company_module->wallets()->first();
if((float) number_format(($wallet->amount - $amount),2) < 0){
if((float) number_format(($wallet->amount - $amount),2) < -0.01){
throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.');
}