Net price per invoice line

Error FX-SCH-A-000272 Factur-X

Element 'ram:NetPriceProductTradePrice' must occur exactly 1 times.

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

ram:NetPriceProductTradePrice does not occur exactly once in ram:SpecifiedLineTradeAgreement. The element is either missing or present more than once.

What the rule means

ram:NetPriceProductTradePrice contains the product’s net price for the invoice line. The agreement section must have exactly one such price entry.

Please provide exactly one net price for the invoice line

The net price entry is missing from the invoice line’s agreement section or appears more than once. Exactly one ram:NetPriceProductTradePrice is expected there.

What to do
  1. Find the affected ram:SpecifiedLineTradeAgreement.
  2. Check that it contains exactly one ram:NetPriceProductTradePrice.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedLineTradeAgreement/>
✓ Correct
<ram:SpecifiedLineTradeAgreement>
  <ram:NetPriceProductTradePrice/>
</ram:SpecifiedLineTradeAgreement>
Technical details

In the context of ram:SpecifiedLineTradeAgreement, the rule checks whether the number of direct ram:NetPriceProductTradePrice elements equals 1.

Where the rule applies

The rule applies in the agreement section (ram:SpecifiedLineTradeAgreement) of the invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement
Test expression (assert/@test)
count(ram:NetPriceProductTradePrice)=1