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. 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.