BR-CO-03
Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive.
Why it fails
- The invoice gives both a VAT point date (
cbc:TaxPointDate, BT-7) and a VAT point date code (cac:InvoicePeriod/cbc:DescriptionCode, BT-8); in CII bothram:TaxPointDateandram:DueDateTypeCode.
How to fix it
Keep one: the date when it is known, or the code when the VAT point follows from another date (in UBL 3 issue date, 35 delivery date, 432 paid to date; in CII 5, 29 and 72).
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
/ubl:Invoice | /cn:CreditNote
(exists(cbc:TaxPointDate) and not(cac:InvoicePeriod/cbc:DescriptionCode)) or (not(cbc:TaxPointDate) and exists(cac:InvoicePeriod/cbc:DescriptionCode)) or (not(cbc:TaxPointDate) and not(cac:InvoicePeriod/cbc:DescriptionCode))
Checked with EN 16931 Invoice (UBL), EN 16931 Credit Note (UBL), Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax
((//ram:TaxPointDate) and not(//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and (//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and not (//ram:DueDateTypeCode))
Checked with EN 16931 Invoice (CII)
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax
((ram:TaxPointDate) and not (ram:DueDateTypeCode)) or (not (ram:TaxPointDate) and (ram:DueDateTypeCode)) or (not (ram:TaxPointDate) and not (ram:DueDateTypeCode))
Checked with France Factur-X BASIC WL, Factur-X / ZUGFeRD BASIC WL