commit 642aac50944a137205dd62f7be1faeeff3913a21
parent 39bf6f7446a871261dc7d90ac2279902682c7985
Author: lash <dev@holbrook.no>
Date: Fri, 1 May 2026 20:32:02 -0600
Fix string summary from entry cli session
Diffstat:
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dummy/usawa/cli/entry.py b/dummy/usawa/cli/entry.py
@@ -496,10 +496,7 @@ Extref: {}
self.entry.extref,
)
- tags = []
- if self.entry.tags:
- tags = self.entry.tags
- s += "Tags: " + ', '.join(tags) + "\n"
+ s += "Tags: " + str(self.entry.tags) + "\n"
s += "Description: " + self.get_description() + "\n"
for v in self.lines:
@@ -511,16 +508,14 @@ Extref: {}
rem = self.ctx.uidx.to_floatstring(self.unitbase, rem)
s += "Accounts src: {}/{}\n".format(rem, amount)
for v in self.entry.debit:
- typ = getattr(AccountType, v.typ)
- o = Account.from_path(v.account, sym=v.unit, typ=typ)
- s += "\t" + o.to_path() + " " + self.ctx.uidx.to_floatstring(v.unit, v.amount) + "\n"
+ typ = getattr(AccountType, v.get_type())
+ s += "\t" + v.account_path(with_unit=False) + " " + self.ctx.uidx.to_floatstring(v.get_unit(), v.amount) + "\n"
rem = self._dst_remaining()
rem = self.ctx.uidx.to_floatstring(self.unitbase, rem)
s += "Accounts dst: {}/{}\n".format(rem, amount)
for v in self.entry.credit:
- typ = getattr(AccountType, v.typ)
- o = Account.from_path(v.account, sym=v.unit, typ=typ)
- s += "\t" + o.to_path() + " " + self.ctx.uidx.to_floatstring(v.unit, v.amount) + "\n"
+ typ = getattr(AccountType, v.get_type())
+ s += "\t" + v.account_path(with_unit=False) + " " + self.ctx.uidx.to_floatstring(v.get_unit(), v.amount) + "\n"
return s
diff --git a/dummy/usawa/unit.py b/dummy/usawa/unit.py
@@ -129,7 +129,7 @@ class UnitIndex:
precision = int(o.find('precision', namespaces=nsmap()).text)
logg.debug('add unit {} precision {}'.format(sym, precision))
r.detail[sym] = precision
- r.rate[sym] = 1000000000
+ r.rate[sym] = 1
r.check()
return r