From: Christian Heller Date: Thu, 23 Jan 2025 07:22:06 +0000 (+0100) Subject: Don't hide 0.00 amounts. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7Broute%7D?a=commitdiff_plain;p=plomledger Don't hide 0.00 amounts. --- diff --git a/ledger.py b/ledger.py index 413b8fb..80b6099 100755 --- a/ledger.py +++ b/ledger.py @@ -166,7 +166,7 @@ class TransferLine(BookingLine): @property def amount_short(self) -> str: """If no .amount, '', else printed – but if too long, ellipsized.""" - if self.amount: + if self.amount is not None: exp = self.amount.as_tuple().exponent assert isinstance(exp, int) return f'{self.amount:.1f}…' if exp < -2 else f'{self.amount:.2f}'