bank_to_journal
Convert Norma 43 bank statements into import-ready journal entries, using rules to assign counterpart accounts and flagging unmatched movements for review.
Instructions
Turn a Norma 43 (Cuaderno 43) bank statement into journal entries ready to import.
One entry per movement: abono -> Debe bank / Haber counterpart; cargo -> Debe counterpart / Haber bank.
The counterpart comes from the first matching rule; with no match it goes to suspense_account
(default 555 'partidas pendientes de aplicación', padded to the bank account length) and the movement is
listed in unmatched, so nothing is guessed.
Args: bank_account: The 572 subaccount of the bank, e.g. "57200001". target_format: csv (default) | a3 | contaplus_csv | contaplus_ascii. content / content_base64: The .n43 file (base64 for CP850/Latin-1 bytes). rules: Ordered list, first match wins. Each: {"account": "62800000", "contains": ["IBERDROLA"] or "regex": "...", "common_concept": "03" (AEB concept, e.g. 03 recibos, 04 transferencias, 12 comisiones), "direction": "cargo"|"abono", "concept": optional fixed text}. Text matching is case-insensitive over the movement description (own concept + record-23 texts). bank_accounts: For files with several bank accounts: {IBAN or last digits: "57200002"}. use_value_date: Date entries by value date instead of operation date. account_digits / account_split: Resize every subaccount (see convert_journal). start_entry_number: First entry number (default 1).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | No | ||
| content | No | ||
| a3_format | No | ||
| bank_account | Yes | ||
| company_code | No | 00001 | |
| account_split | No | ||
| bank_accounts | No | ||
| decimal_comma | No | ||
| target_format | No | csv | |
| account_digits | No | ||
| content_base64 | No | ||
| use_value_date | No | ||
| suspense_account | No | ||
| start_entry_number | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||