Invoiced quantity required

Error BR-FXEXT-BR-22 Factur-X

Each invoice line item "INVOICE LINE" (BG-25) must contain the quantity of goods or services invoiced in the relevant line item as a line item "Invoiced quantity" (BT-129) if the "Subtype of invoice line item" (BT-X-8) has the value "Normal line item (standard case)" (DETAIL) or is not specified.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The invoice line is missing BilledQuantity under SpecifiedLineTradeDelivery. This applies when LineStatusReasonCode is not specified or is DETAIL.

What the rule means

The quantity states how many goods or services are invoiced on this invoice line. Without it, the invoiced quantity for the line is not provided.

Affected fields BG-25 BT-129 BT-X-8
Please add the invoiced quantity for the invoice line

The invoiced quantity is missing from this invoice line. You can resolve this by adding the quantity to the line.

What to do
  1. Check the status in AssociatedDocumentLineDocument.
  2. For a line with no status code or with DETAIL, add the quantity using TradeLineItem.BilledQuantity.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:AssociatedDocumentLineDocument>
  <ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode>
</ram:AssociatedDocumentLineDocument>
✓ Correct
<ram:AssociatedDocumentLineDocument>
  <ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedLineTradeDelivery>
  <ram:BilledQuantity unitCode="C62">2</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
Check in FactoorSharp
  • AssociatedDocument.LineStatusReasonCode (BT-X-8)
  • LineStatusReasonCodes (BT-X-8)
  • TradeLineItem.BilledQuantity (BT-129)
Technical details

The test requires SpecifiedLineTradeDelivery/BilledQuantity for lines without LineStatusReasonCode and for lines with the code DETAIL.

Where the rule applies

The rule applies to an IncludedSupplyChainTradeLineItem invoice line whose AssociatedDocumentLineDocument has no LineStatusReasonCode or has the value DETAIL.

Context (rule/@context)
//ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument[ not(ram:LineStatusReasonCode) or ram:LineStatusReasonCode = 'DETAIL' ]
Test expression (assert/@test)
(../ram:SpecifiedLineTradeDelivery/ram:BilledQuantity)