Document data mapping
The formatter builds the document from the Magento sales document and the store-view configuration. Review the source field as well as the output value when a receiver rejects a file.
References
Buyer reference (BT-10), purchase order and related references can come from persisted order or customer values. If no configured value is present, the invoice or credit-memo increment ID can be used as a fallback. That keeps the XML populated but may not satisfy procurement routing.
Prepayments and totals
Prepayment fields can map to BT-113. The payable amount follows the document total rules, including BT-112 and BT-115. A prepayment must be deducted from the grand total before it is emitted as payable. Check the generated CII totals with einvoice:verify-amounts and compare them with Magento totals.
VAT and vouchers
Line categories include standard, zero-rated, exempt, reverse-charge, intra-community, export and out-of-scope cases. Magento gift-card products and the configured voucher attribute can affect classification. Test mixed VAT rates, shipping, discounts, gift cards and cross-border orders together with the recipient.
Accounting references
BT-133 can come from an order-item field, product attribute or customer attribute. The value is resolved from the sales data available during generation. Treat it as a snapshot: later changes to product or customer attributes do not rewrite an already generated document.
Payment means
Default payment terms and payment means codes can be overridden per payment method. The Payment Method Mapping grid edits one row per payment method with these columns:
| Column | Effect |
|---|---|
| Payment Method | The Magento payment method the row applies to |
| Payment Terms Template | Term text for this method; empty inherits the default template |
| Terms Days | Due-date offset for this method; empty inherits Default Payment Terms (Days) |
| Payment Means Code | UN/EDIFACT 4461 code for this method; empty uses the default (or the no-IBAN default when no IBAN resolves) |
| Settlement Treatment | Standard / unpaid, Document-specific prepayment or Paid with settlement evidence — controls how an already-paid amount enters the document totals (BT-113/prepaid vs. fully settled) |
| IBAN Override | Bank IBAN used for this method instead of the company Bank IBAN |
| BIC Override | Bank BIC used for this method instead of the company Bank BIC/SWIFT |
A missing IBAN can select the configured no-IBAN code. Verify the result against the payment method and the instructions printed on the normal Magento invoice.