fix wallet insufficient balance when amount is below 0.01

This commit is contained in:
omair saleh
2022-11-10 17:48:47 +08:00
parent 62657e511c
commit f8ec4815a7
@@ -129,7 +129,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic
/** @var Wallet $wallet */
$wallet = $booking->company->wallets()->first();
if(($wallet->amount - $amount) < 0.01){
if((float) number_format(($wallet->amount - $amount),2) < 0){
throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.');
}