home · contact · privacy
Don't hide 0.00 amounts. master
authorChristian Heller <c.heller@plomlompom.de>
Thu, 23 Jan 2025 07:22:06 +0000 (08:22 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 23 Jan 2025 07:22:06 +0000 (08:22 +0100)
ledger.py

index 413b8fbe7640d706a0efe39e4cec0eb68303cedc..80b60990ba02cb7242182d0bd39c4eaaee91797e 100755 (executable)
--- 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}'