# BR-FREXT-CL-20-TAX

Source: https://xmlvalid.com/rules/BR-FREXT-CL-20-TAX

> Coded charge reasons MUST belong to the UNCL 5153 except "VAT" code list

- Level: error
- Rule sets: EXTENDED-CTC-FR rules (UBL) 1.4.0.04
- Context: `cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode[@listID='5153']`
- Test: `((not(contains(normalize-space(.), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAO AAP ADD BOL CAP CAR COC CST CUD CVD ENV EXC EXP FET FRE GCN GST ILL IMP IND LAC LCN LDP LOC LST MCA MCD OTH PDB PDC PRF SCN SSS STT SUP SUR SWT TAC TOT TOX TTA VAD ',concat(' ',normalize-space(.),' '))))`

> Coded charge reasons MUST belong to the UNCL 5153 except "VAT" code list

- Level: error
- Rule sets: EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator = true()]/ram:ReasonCode[@listID='5153']`
- Test: `((not(contains(normalize-space(.), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAO AAP ADD BOL CAP CAR COC CST CUD CVD ENV EXC EXP FET FRE GCN GST ILL IMP IND LAC LCN LDP LOC LST MCA MCD OTH PDB PDC PRF SCN SSS STT SUP SUR SWT TAC TOT TOX TTA VAD ',concat(' ',normalize-space(.),' '))))`

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