Rules / IBR-093
If there is a paid amount then total paid amount must exist
If there is a paid amount (ibt-180) then total paid amount (ibt-113) must exist.
Fails
<cac:PrepaidPayment>…</cac:PrepaidPayment>
<cac:LegalMonetaryTotal>
<!-- no cbc:PrepaidAmount -->
</cac:LegalMonetaryTotal>
Fix
When the invoice has cac:PrepaidPayment, add the total paid in cac:LegalMonetaryTotal/cbc:PrepaidAmount.
Schematron
- Context
cac:PrepaidPayment[1]- Test
exists(../cac:LegalMonetaryTotal/cbc:PrepaidAmount)
Official text: If there is a paid amount (ibt-180) then total paid amount (ibt-113) MUST exist.