From cc6feaf7abc1331a337b2729c4b5c024e0c4c242 Mon Sep 17 00:00:00 2001 From: Red S Date: Wed, 10 Apr 2024 16:49:00 -0700 Subject: [PATCH] fix: schwab_csv_creditline balance sign --- .../importers/schwab/schwab_csv_creditline.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/beancount_reds_importers/importers/schwab/schwab_csv_creditline.py b/beancount_reds_importers/importers/schwab/schwab_csv_creditline.py index cac8038..be9e836 100644 --- a/beancount_reds_importers/importers/schwab/schwab_csv_creditline.py +++ b/beancount_reds_importers/importers/schwab/schwab_csv_creditline.py @@ -1,6 +1,7 @@ """Schwab Credit Line (eg: Pledged Asset Line) .csv importer.""" from beancount_reds_importers.importers.schwab import schwab_csv_checking +from beancount_reds_importers.libtransactionbuilder import banking class Importer(schwab_csv_checking.Importer): @@ -12,3 +13,9 @@ def custom_init(self): self.column_labels_line = ( '"Date","Type","CheckNumber","Description","Withdrawal","Deposit","RunningBalance"' ) + + def get_balance_statement(self, file=None): + """Return the balance on the first and last dates""" + + for i in super().get_balance_statement(file): + yield banking.Balance(i.date, -1 * i.amount, i.currency)