From 71a01142baeeb7904d81b83145317d7e4bb514db Mon Sep 17 00:00:00 2001 From: Red S Date: Sat, 31 Dec 2022 23:06:12 -0800 Subject: [PATCH] fix: #41 add 'payment' to ofx transaction types for investment accounts with banking features --- beancount_reds_importers/libtransactionbuilder/investments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beancount_reds_importers/libtransactionbuilder/investments.py b/beancount_reds_importers/libtransactionbuilder/investments.py index 6629ad0..8836aec 100644 --- a/beancount_reds_importers/libtransactionbuilder/investments.py +++ b/beancount_reds_importers/libtransactionbuilder/investments.py @@ -254,7 +254,7 @@ def generate_transfer_entry(self, ot, file, counter): try: if ot.type in ['transfer']: units = ot.units - elif ot.type in ['other', 'credit', 'debit', 'dep', 'cash']: + elif ot.type in ['other', 'credit', 'debit', 'dep', 'cash', 'payment']: units = ot.amount else: units = ot.total @@ -315,7 +315,7 @@ def extract_transactions(self, file, counter): if ot.type in ['buymf', 'sellmf', 'buystock', 'sellstock', 'buyother', 'sellother', 'reinvest']: entry = self.generate_trade_entry(ot, file, counter) elif ot.type in ['other', 'credit', 'debit', 'transfer', 'dep', 'income', - 'dividends', 'capgainsd_st', 'capgainsd_lt', 'cash']: + 'dividends', 'capgainsd_st', 'capgainsd_lt', 'cash', 'payment']: entry = self.generate_transfer_entry(ot, file, counter) else: print("ERROR: unknown entry type:", ot.type)