Each Invoice line charge or tax (BG-28) shall have an Invoice line charge or tax reason (BT-144), an Invoice line charge reason code (BT-145) or an Invoice line-level non-VAT tax type code (BT-193).
This charge or tax at invoice line level has neither ram:Reason nor ram:ReasonCode. The test checks whether at least one of these two elements is present.
A reason or reason code describes the charge or tax at invoice line level. This rule ensures that at least one of these explanations is present.
A reason is missing for this charge or tax at invoice line level. You can provide a text reason or a reason code.
- Find the relevant
ram:SpecifiedTradeAllowanceCharge. - Add either
AbstractTradeAllowanceCharge.ReasonorTradeCharge.ReasonCode. - Generate the invoice again and validate it.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> <ram:Reason>Transport</ram:Reason> </ram:SpecifiedTradeAllowanceCharge>
ChargeReasonCodes(Line level charge: BT-145)TradeCharge.ReasonCode(Line level charge: BT-145)AbstractTradeAllowanceCharge.Reason(Line level charge: BT-144)TradeLineItem.SpecifiedTradeAllowanceCharges(BG-28)AbstractTradeAllowanceCharge(Line level charge: BG-28)
Technical details
The test runs for ram:ChargeIndicator with udt:Indicator equal to true and requires ram:Reason or ram:ReasonCode on the enclosing element. Although the rule text also mentions BT-193, the XPath expression does not check that field.
The rule applies to ram:SpecifiedTradeAllowanceCharge in ram:SpecifiedLineTradeSettlement when ram:ChargeIndicator contains the value true.
rule/@context)assert/@test)