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(); } }