diff --git a/src/monopoly/statements/transaction.py b/src/monopoly/statements/transaction.py index 54824f31..a65c7b38 100644 --- a/src/monopoly/statements/transaction.py +++ b/src/monopoly/statements/transaction.py @@ -132,6 +132,10 @@ def convert_credit_amount_to_negative(self: "Transaction") -> "Transaction": """ Converts transactions with a suffix of "CR" or "+" to positive """ + # avoid negative zero + if self.amount == 0: + return self + if self.suffix in ("CR", "+"): self.amount = abs(self.amount)