InvoiceLine - Invoice line information

The invoice line section includes all relevant information about the invoice line.

cac:InvoiceLine (M)
cbc:ID (M)
Default mapping: OrderDocumentLine.LineNo
cbc:Note - Free text note (O)
Default mapping: OrderDocumentLineNote.Note

Alternative mapping: OrderDocumentLine.MemoFileName

Alternative mapping: OrderDocumentLine.MemoNo

Order line memo is available for adding notes for the line. This method requires that the print menu advanced option "Order line memos" is on.

cbc:InvoicedQuantity - Line quantity (M)
Default mapping: OrderDocumentLine.Quantity

Invoiced quantity has unit as an attribute, and this also has a mapping.

@unitCode (M)
Default mapping: OrderDocumentLine.Unit->Unit.EdiUnit

The unit code is mandatory, so if not set in the Unit table, the output will be shown as ZZ. Valid unit codes can be found here:

UN/ECE Recommendation 20

UN/ECE Recommendation 21

Note:
The UN/ECE Recommendation 21 list contains codes with two characters, but the UnitCode will sometimes require three characters. If three characters are required and the code only has two, prefix the code with an X. Example: The UNECERec21 code 'PK' must be set in EDI unit as 'XPK'.
Table 1. Examples of relevant unit codes:
Unit Code
One C62
Piece H87
Each EA
Package XPK
cbc:LineExtensionAmount - Line amount (M)
Default mapping: OrderDocumentLine.AmountInCurrency
cbc:AccountingCost - Accounting string for automated booking (O)
Default mapping: OrderDocumentLineAddition.AccountingCost

The information given in this field is used by the customer to handle the invoice line accounting automatically. See ../reference/r_AutoInvoice_ExtendedInfo_Mapping.html#r_AI_ExtInfo_Mapping for more information about the handling of the AccountingCost string for purchase orders and invoices.

cac:InvoicePeriod - Period the line is invoiced for (O)
cbc:StartDate (O)
Default mapping: None
cbc:EndDate (O)
Default mapping: None

One date may be mapped without having to map the other.

cac:OrderLineReference - Buyer order line reference (O)
cbc:LineID (M)
Default mapping: OrderDocumentLine.ExternalId

Alternative mapping: OrderDocumentLineAddition.OrderLineReference

ExternalID is always used if it is not empty. OrderLineReference can be used as an alternative if the order line reference is alphanumeric or too long to fit ExternalID.

cac:AllowanceCharge - Line level discounts and additions (O)
cbc:ChargeIndicator (M)
Default mapping: Hardcoded
Set as “True” or “False” depending on whether the value is an addition or subtraction.
Note:
Negative discounts are possible to set, in which case it will be displayed with a positive amount and charge indicator = True.
cbc:AllowanceChargeReason (O)
Default mapping: Hardcoded

Indicates whether the amount is a discount or special duty.

cbc:Amount - allowance/charge amount (M)
Default mapping: Calculated depending on type
  • Discount: difference of Price and Price after discount
  • Special tax: settings in the VAT- and accounting information table for special tax
Note:
Because of how the discount is calculated, it is important that the line's price is set in the Price field and not Price after discount. If only set in Price after discount, the discount will be shown as a charge, and the line's price will be shown as 0.