diff --git a/src/monopoly/statements/credit_statement.py b/src/monopoly/statements/credit_statement.py index ff2f9bc2..41e5a580 100644 --- a/src/monopoly/statements/credit_statement.py +++ b/src/monopoly/statements/credit_statement.py @@ -62,6 +62,11 @@ def perform_safety_check(self) -> bool: total_amount_found = total_amount in numbers + # if sum of debit and credit is the same as the total amount + # then the statement is safe + if round(sum(amounts), 2) == total_amount: + return True + # attempt a debit-statement style safety for banks that have # debit and credit amounts as separate numbers and not a single total sum if total_amount_found or DebitStatement.perform_safety_check(self):