From fb7e1ab0395c2aac470e5e2029e0f2ba32247009 Mon Sep 17 00:00:00 2001 From: Gustavo Freze Date: Fri, 8 Nov 2024 10:20:49 -0300 Subject: [PATCH] Release/1.0.3 (#9) --- src/Application/Domain/Models/Account/Balance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/Domain/Models/Account/Balance.php b/src/Application/Domain/Models/Account/Balance.php index 62a62e6..c0f2e66 100644 --- a/src/Application/Domain/Models/Account/Balance.php +++ b/src/Application/Domain/Models/Account/Balance.php @@ -24,6 +24,6 @@ public function hasSufficientFunds(Amount $amount): bool $debitAmount = BigDecimal::fromFloat(value: $amount->toFloat(), scale: $amount::SCALE); $updatedAmount = $this->amount->subtract(subtrahend: $debitAmount->absolute()); - return $updatedAmount->isPositive(); + return !$updatedAmount->isNegative(); } }