Invoice line needs an invoiced quantity

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

A normal invoice line is missing ram:BilledQuantity in ram:SpecifiedLineTradeDelivery. This element contains the invoiced quantity of goods or services for that line.

What the rule means

The invoiced quantity is required for a normal invoice line. It states the quantity of goods or services charged on that line.

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

The invoiced quantity is missing from this normal invoice line. Add the quantity so that the billed amount of goods or services is stated.

What to do
  1. Determine the invoiced quantity of goods or services for this invoice line.
  2. Set TradeLineItem.BilledQuantity.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:IncludedSupplyChainTradeLineItem>
  <ram:AssociatedDocumentLineDocument>
    <ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode>
  </ram:AssociatedDocumentLineDocument>
  <ram:SpecifiedLineTradeDelivery/>
</ram:IncludedSupplyChainTradeLineItem>
✓ Correct
<ram:IncludedSupplyChainTradeLineItem>
  <ram:AssociatedDocumentLineDocument>
    <ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode>
  </ram:AssociatedDocumentLineDocument>
  <ram:SpecifiedLineTradeDelivery>
    <ram:BilledQuantity>2</ram:BilledQuantity>
  </ram:SpecifiedLineTradeDelivery>
</ram:IncludedSupplyChainTradeLineItem>
Check in FactoorSharp
  • AssociatedDocument.LineStatusReasonCode (BT-X-8)
  • LineStatusReasonCodes (BT-X-8)
  • TradeLineItem.BilledQuantity (BT-129)
Technical details

The test requires ram:SpecifiedLineTradeDelivery/ram:BilledQuantity to exist. It applies only to ram:AssociatedDocumentLineDocument without ram:LineStatusReasonCode or with the value DETAIL.

Where the rule applies

The rule applies to ram:AssociatedDocumentLineDocument when ram:LineStatusReasonCode is absent 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)