Specify the unit for the charge period

Error FX-SCH-A-000277 Factur-X

Attribute '@unitCode' is required in this context.

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

The unitCode attribute is missing from ram:BasisPeriodMeasure, which identifies the unit of the period.

What the rule means

The basis-period measure needs a unit so that the stated period can be interpreted.

Please specify the unit for the charge period

The unit is missing from the charge basis period. You can resolve this by adding it.

What to do
  1. Find ram:BasisPeriodMeasure in the charge terms.
  2. Add the unitCode attribute.
  3. Generate the invoice again and validate it.
Technical details

The XPath test checks whether the unitCode attribute is present on ram:BasisPeriodMeasure.

Where the rule applies

The rule applies to ram:BasisPeriodMeasure in the charge terms within the document-level payment terms.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradePaymentTerms/ram:ApplicableTradePaymentPenaltyTerms/ram:BasisPeriodMeasure
Test expression (assert/@test)
@unitCode