Hi there, That’s by design. From this article <https://reds-rants.netlify.app/personal-finance/transaction-builders/>:
Banks and credit cards benefit from a postings predictor like smart_importer. Hence, the transaction builders for these are the simplest, producing only a single posting per account, with the assumption that the other posting(s) will be automatically filled in by smart_importer. Here’s example code <https://github.com/redstreet/beancount_reds_importers/blob/9a1129ab7a8da9c00571a4007306420875b72a82/beancount_reds_importers/example/my-smart.import#L1-L22> that uses smart_importer. On Saturday, January 13, 2024 at 5:49:27 PM UTC-8 [email protected] wrote: > I'm trying to import a CSV file from USAA Bank. The CSV file looks like > this: > Date,Description,Original Description,Category,Amount,Status > 2023-01-03,"Credit Card Payment","CARDMEMBER SERV WEB PYMT > ***********1234",Credit Card Payment,-663.94,Posted > 2023-01-03,"Overdraft Advance Transfer In","OD ADVANCE TRANSFER > IN",Transfer,622.42,Posted > > When I run my importer, I only get one entry (as opposed to both legs of a > double entry accounting transaction). Is this a problem with my > transaction_type_map? The output I get looks like this: > 2023-01-03 * "CARDMEMBER SERV WEB PYMT ***********1234" "Credit Card > Payment" > Assets:US:USAA:Savings -663.94 USD > > 2023-01-03 * "OD ADVANCE TRANSFER IN" "Overdraft Advance Transfer In" > Assets:US:USAA:Savings 622.42 USD > > I've created a __init__.py file under > beancount_reds_importers/importers/usaa with the following content: > """ USAA csv importer.""" > > from beancount_reds_importers.libreader import csvreader > from beancount_reds_importers.libtransactionbuilder import banking > > > class Importer(csvreader.Importer,banking.Importer): > IMPORTER_NAME = 'USAA CSV' > def custom_init(self): > self.max_rounding_error = 0.14 > self.filename_pattern_def = 'bk_download*' > self.date_format = '%Y-%m-%d' > self.skip_head_rows = 0 > self.skip_transaction_types = [] > self.header_identifier = 'Date,Description,Original > Description,Category,Amount,Status' > > > # CSV column spec > self.header_map = { > "Date": "date", > "Description": "payee", > "Category": "type", > "Original Description":"memo", > "Amount": "amount", > } > > self.transaction_type_map = { > "Interest Income": "income", > "Credit Card Payment": "expense", > "Shopping": "expense", > "Transfer": "transfer", > "ATM": "cash", > "FEE": "fees", > } > Here is what my.import looks like: > """Import configuration.""" > > import sys > from os import path > > sys.path.insert(0, path.join(path.dirname(__file__))) > > from beancount_reds_importers.importers import vanguard,chase,usaa > from beancount_reds_importers.importers.schwab import schwab_csv_brokerage > from fund_info import * > CONFIG = [ > usaa.Importer({ > 'main_account' : 'Assets:US:USAA:SavingsChristian', > 'interest' : 'Income:US:Interest:USAA:SavingsChristian', > 'income' : 'Income:US:USAA:SavingsChristian', > 'expense' : 'Expenses:Shopping', > 'currency' : 'USD', > }), > ] > > Can you tell me what I'm missing here? > Thanks > > Christian > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/2be35070-40bc-45b1-8a12-cfb5256976f3n%40googlegroups.com.
