Element Additional referenced document can only be used for Invoice line object.
If ram:AdditionalReferencedDocument is present in an invoice line’s settlement, its ram:TypeCode must have the value 130. A different value is not allowed for this element in this location.
The rule restricts the additional referenced document at this invoice line location to the document type with code 130. This ensures the element is used only in the specified form.
The additional referenced document on an invoice line has a type code other than 130. If you use this element, its type code must match that value.
- Locate
ram:AdditionalReferencedDocumentin the settlement of the affected invoice line. - Check the value of
ram:TypeCode. - Use the value
130for this element, or omit the element if it is not needed. - Generate the invoice again and validate it.
<ram:SpecifiedLineTradeSettlement> <ram:AdditionalReferencedDocument> <ram:TypeCode>999</ram:TypeCode> </ram:AdditionalReferencedDocument> </ram:SpecifiedLineTradeSettlement>
<ram:SpecifiedLineTradeSettlement> <ram:AdditionalReferencedDocument> <ram:TypeCode>130</ram:TypeCode> </ram:AdditionalReferencedDocument> </ram:SpecifiedLineTradeSettlement>
Technical details
The test passes when ram:AdditionalReferencedDocument is absent or its ram:TypeCode equals 130.
The rule applies to ram:AdditionalReferencedDocument within ram:SpecifiedLineTradeSettlement on an invoice line.
rule/@context)assert/@test)