Voucher Breakdown
Withholdings, discounts and adjustments of each voucher, as recorded in the ERP (optional file).
Accounting lines of each voucher that are neither bank nor receivables: withholdings, discounts,
adjustments, advances and others. With them Fibek knows how much should have reached the bank for
each voucher. File voucher_breakdown.csv.
Optional file: if you do not send it, Fibek keeps the lines it already had and new vouchers are left with unknown lines (
UNKNOWN). See States.
Dependency: processed right after Vouchers and only within the same load: each
erp_voucher_idmust be a valid voucher from that load’s vouchers file, and eacherp_invoice_idyou send, a valid invoice from that load’s Invoices file. It is not enough for them to already exist in Fibek.
Endpoint
POST /manual-csv-integration/upload/voucher-breakdown
- Form Field:
file
This file has no endpoint under /full-csv-integration. It is uploaded through the platform’s
Manual Integration (My Company → Integrations → Manual Integration), with a signed-in
session and together with the vouchers file of the same load (and the invoices file, if the lines
name invoices). The endpoint validates and uploads the file; references are checked when the
complete load is processed.
Required Fields
All four columns must always be in the header, even when an UNKNOWN declaration leaves them
empty.
| Field | Type | Description | Validations |
|---|---|---|---|
erp_voucher_id | String | Voucher ID in ERP | Must be a valid voucher from this load’s vouchers file. Kept as text |
kind | String | Line type | WITHHOLDING, DISCOUNT, ADJUSTMENT, ADVANCE, OTHER or UNKNOWN (lines not known). Surrounding spaces are trimmed and it is uppercased |
signed_amount | Float | Signed amount: debit minus credit | Dot as decimal separator, no thousands separators or exponents. Must fit numeric(18,2); rounded to two decimals. Must be nonzero after rounding; negatives are valid. Empty for UNKNOWN |
erp_line_ref | String | Stable reference of the accounting line | Required except for UNKNOWN, where it is empty. Kept as text; identifies the line within the source document |
Optional Fields
| Field | Type | Description | Validations | Default |
|---|---|---|---|---|
erp_source_document_id | String | Accounting document that groups the vouchers | Must match the voucher’s document: the optional erp_source_document_id column of the vouchers file, or its own erp_voucher_id if it does not carry one. Accepted on UNKNOWN | erp_voucher_id |
erp_invoice_id | String | Invoice the line belongs to | If you send it, it must be a valid invoice from this load’s invoices file. Empty for UNKNOWN | null |
code | String | Line code | Free text, uppercased. Empty for UNKNOWN | null |
name | String | Line name in the ERP | Empty for UNKNOWN | null |
account_code | String | Accounting account | Kept as text. Empty for UNKNOWN | null |
base_amount | Float | Base the line was computed on | Dot as decimal separator, no thousands separators or exponents. Must fit numeric(18,2); rounded to two decimals. Empty for UNKNOWN | null |
rate_percent | Float | Line rate, per hundred | Always per hundred (percent), with a dot as decimal separator: 19 is a 19 % VAT and 2.5 a 2.5 % income tax withholding (ReteFuente). ICA withholding (ReteICA) also goes per hundred, not per thousand: 9.66 per mille is written 0.966. No thousands separators or exponents. Must fit numeric(7,4); rounded to four decimals. Empty for UNKNOWN | null |
How the sign reads
What should reach the bank for a voucher is:
bank = voucher total_amount − sum of signed_amount
total_amount is the one in the vouchers file, gross: what the
voucher applied to receivables, before subtracting withholdings, discounts and the other lines of
this file. It is not what reached the bank.
The sign is debit minus credit, as in the ERP: a positive amount reduces what should reach the bank and a negative one increases it.
States
Each voucher in the load ends up in one of three states:
- With lines (
KNOWN): the voucher keeps lines of its own (a shared line counts only for the first voucher; see below). - No lines (
NONE): the file was sent and carries no lines for the voucher. Sending the file means you know the data, even if it only has the header. - Unknown (
UNKNOWN): the voucher carries anUNKNOWNdeclaration, or the file was not sent and the voucher is new.
To declare that you do not know a voucher’s lines, send a single row with kind = UNKNOWN and
the rest of the line data empty (you may keep erp_source_document_id). No line is created: the
voucher’s previous lines are retired. Other vouchers of the same document may carry their own lines
or declarations.
Repeated rows and dropped rows
- Each source document is processed whole and at once: lines that no longer come are retired and lines that reappear recover their identity.
- A line is identified by source document and
erp_line_ref. Identical copies count once; if several vouchers of the document share the line, a single copy stays on the first one, with no invoice. Two different copies of the same line discard the whole document. - An invalid row discards the whole source document, which keeps what it had, and the response carries a warning. Other documents continue.
- Missing required columns, repeated columns or rows with a different number of columns: the whole file is rejected.
Example CSV
VCH001 and VCH002 are vouchers of this load with document DOC001 (erp_source_document_id
column of the vouchers file), and INV001 is an invoice of this load.
erp_voucher_id,kind,signed_amount,erp_line_ref,erp_source_document_id,erp_invoice_id,code,name,account_code,base_amount,rate_percent
VCH001,DISCOUNT,2000,001,DOC001,INV001,EARLY_PAYMENT,Pronto pago,530535,,
VCH001,ADJUSTMENT,-0.98,002,DOC001,,,,429581,,
VCH002,UNKNOWN,,,DOC001,,,,,,