home
·
contact
·
privacy
projects
/
plomledger
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c1ff955
)
Don't hide 0.00 amounts.
master
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 23 Jan 2025 07:22:06 +0000
(08:22 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 23 Jan 2025 07:22:06 +0000
(08:22 +0100)
ledger.py
patch
|
blob
|
history
diff --git
a/ledger.py
b/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."""
@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}'
exp = self.amount.as_tuple().exponent
assert isinstance(exp, int)
return f'{self.amount:.1f}…' if exp < -2 else f'{self.amount:.2f}'