X-Git-Url: https://plomlompom.com/repos/condition_descriptions?a=blobdiff_plain;f=ledger.py;h=cd38b820da6354866cd23d64fb196a3ec9f40952;hb=3faab835bd9d842cc0a529ba33007b3f85839e12;hp=817def60ea1f2f29feeb4a4436496b1f1d2158ad;hpb=4aa69f1601319ceeef640a4c56f9d2b1eb25cd6b;p=misc
diff --git a/ledger.py b/ledger.py
index 817def6..cd38b82 100755
--- a/ledger.py
+++ b/ledger.py
@@ -65,6 +65,9 @@ add_structured_html = """
+
+
+
@@ -715,10 +718,13 @@ class LedgerDB(PlomDB):
lines += [f'Assets {amount:.2f} {currency}']
except PlomException:
pass
- if 'add_taxes' in postvars.keys():
+ elif 'add_taxes' in postvars.keys():
lines += self.add_taxes(lines, finish=False)
elif 'add_taxes2' in postvars.keys():
lines += self.add_taxes(lines, finish=True)
+ elif 'replace' in postvars.keys():
+ for i, line in enumerate(lines):
+ lines[i] = line.replace(postvars['replace_from'][0], postvars['replace_to'][0])
return lines, add_empty_line