# F-LIB404

Source: https://xmlvalid.com/rules/F-LIB404

> The values in cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID on lines, total, and on cac:AllowanceCharge/cac:TaxCategory/cbc:ID must correspond. Values found - cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID: … - (cac:InvoiceLine | cac:CreditNoteLine)/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID: … - cac:AllowanceCharge/cac:TaxCategory/cbc:ID: …

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2, OIOUBL 2.1 Credit Note rules (Denmark) 1.17.2, OIOUBL 2.1 Reminder rules (Denmark) 1.17.2
- Test: `not( ( (/*/(cac:InvoiceLine | cac:CreditNoteLine)/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID | /*/cac:AllowanceCharge/cac:TaxCategory/cbc:ID) [.=('B','M','L','K','O','G','ZeroRated','StandardRated','ReverseCharge')] [not(. = /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID [.=('B','M','L','K','O','G','ZeroRated','StandardRated','ReverseCharge')])] ) | ( /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID [.=('B','M','L','K','O','G','ZeroRated','StandardRated','ReverseCharge')] [not(. = (/*/(cac:InvoiceLine | cac:CreditNoteLine)/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID | /*/cac:AllowanceCharge/cac:TaxCategory/cbc:ID) [.=('B','M','L','K','O','G','ZeroRated','StandardRated','ReverseCharge')])] ) )`

Validate a document against these rules: https://xmlvalid.com/validate
