convert_journal
Convert Spanish bookkeeping journals between A3, ContaPlus, and CSV formats, auto-detecting the source and validating output so the target accounting program accepts it.
Instructions
Convert a libro diario (journal) between Spanish accounting programs.
Formats: a3 (a3ASESOR/a3ECO/a3CON SUENLACE.DAT, apuntes tipo 0), contaplus_csv (Sage ContaPlus / Sage 50
Diario CSV, 142 fields), contaplus_ascii (XDiario.txt fixed width), csv (spreadsheet with header:
Holded, Excel, any ERP; columns auto-detected, override with column_map). The source is auto-detected.
Args: target_format: a3 | contaplus_csv | contaplus_ascii | csv. content: The file as text. content_base64: raw bytes as base64 (Latin-1/CP1252 files with Ñ). source_format: auto (default) or one of the formats. account_digits: Resize every subaccount to this length (ContaPlus uses a fixed length, e.g. 8); also expands '430.1' shorthand. 0 keeps them. account_split: Where zeros are inserted/removed when resizing (default 4: 4300001 -> 43000001). account_map: Exact account renames applied first, e.g. {"5720001": "57200005"}. start_entry_number: Renumber entries from this number (ContaPlus requires numbers; A3 does not use them). company_code: A3 company code (1-99999). a3_format: 5 (512-byte records, current) or 4 (256, old). column_map: For csv sources, e.g. {"debit": "Importe D", "account": "Cta"}. Keys: number, date, account, account_name, debit, credit, amount, dh, concept, document. csv_delimiter: For csv source/target; auto-detected on read, ';' on write. decimal_comma: csv output with decimal comma (Spanish Excel). fiscal_year: flag dates outside it. strict: Refuse to write a file with validation errors (default), so the target program never rejects it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strict | No | ||
| content | No | ||
| a3_format | No | ||
| column_map | No | ||
| account_map | No | ||
| fiscal_year | No | ||
| company_code | No | 00001 | |
| account_split | No | ||
| csv_delimiter | No | ||
| decimal_comma | No | ||
| source_format | No | auto | |
| target_format | Yes | ||
| account_digits | No | ||
| content_base64 | No | ||
| start_entry_number | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||