Each Document level charge (BG-21) shall have a Document level charge amount (BT-99).
The charge is missing ram:ActualAmount, which specifies its amount.
The amount states the value of the document level charge and is needed to represent and calculate the invoice.
A document level charge has no amount. Add the amount so the charge is stated on the invoice.
- Add the charge amount in
ram:ActualAmount. - Check the
AddTradeCharge(...)call and the amount passed to it. - Regenerate the invoice and validate it again.
<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:ActualAmount>10.00</ram:ActualAmount> </ram:SpecifiedTradeAllowanceCharge>
AbstractTradeAllowanceCharge.ActualAmount(Document level charge: BT-99)FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)FacturXInvoice.GetTradeCharges()(BG-21)AbstractTradeAllowanceCharge(Document level charge: BG-21)AbstractTradeAllowanceCharge.ChargeIndicator(Document level charge: BG-21)
Technical details
The check applies to ram:ChargeIndicator with the value true and requires ram:ActualAmount in the parent ram:SpecifiedTradeAllowanceCharge.
The rule applies to each charge in ram:SpecifiedTradeAllowanceCharge within ram:ApplicableHeaderTradeSettlement that is identified as a charge by ram:ChargeIndicator.
rule/@context)assert/@test)