XRechnung · UBL · rule diff

XRechnung 2.4.0: UBL validation rule changes

69 rules changed between 2.3.0 and 2.4.0 — added, removed, or rewritten. This is computed from the two rule sets directly, not from a changelog.

About this comparison

Revalidate compares the archived 2.3.0 and 2.4.0 rule sets at the assertion and variable level. The diff identifies changed rules; replaying your invoices shows which changes affect your documents.

Browse archived rule sets and checksums. Report published by Revalidate on .

What changed

BR-DEX-04Dependency changed

ISO-6523 ICD code list gains "0239" and "0240"

The test expression is byte-identical in both releases and references the variable $ISO-6523-ICD-EXT-CODES. The changed variable is $ISO-6523-ICD-CODES, whose value is a space-delimited list of ISO 6523 ICD codes; its list now appends "0239" and "0240" after the preceding value "0238", with no entries removed.

fatalcountry

Original rule text: [BR-DEX-04] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list.

Explanation and fix

What this rule requires

The rule requires that a party identification element (cac:PartyIdentification/cbc:ID in UBL or ram:GlobalID in CII) with a schemeID attribute and an XRechnung extension context uses a scheme identifier from the ISO 6523 ICD code list supplied by the rule. In UBL, SEPA is also allowed if the element is inside an AccountingSupplierParty or PayeeParty; in CII only the ISO 6523 ICD codes are accepted. The document fails when the schemeID is not one of those allowed codes or contains internal spaces.

How to fix

Set the schemeID attribute to a code from the rule's ISO-6523-ICD-EXT-CODES list (e.g., 0002, 0060, or 0088) with no internal spaces. In UBL, if the party is the accounting supplier or payee, SEPA is also accepted; in CII only an ISO 6523 ICD code is allowed. If the scheme identifier is not needed for this party identification, remove the schemeID attribute.

Guidance on this rule. The original text above is authoritative.

BR-DEX-04 rule details

Changed variable $ISO-6523-ICD-CODES

Before · 2.3.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238'

After · 2.4.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240'
BR-DEX-06Dependency changed

Allowed ISO 6523 codes now include "0239" and "0240".

The rule's test expression is byte-identical between versions. The dependency variable $ISO-6523-ICD-CODES has changed: its value list previously ended with "0238", and now ends with "0238 0239 0240", adding "0239" and "0240" to the allowed codes.

fatalcountry

Original rule text: [BR-DEX-06] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list.

Explanation and fix

What this rule requires

This rule applies to item standard identification identifiers that carry a schemeID and occur in a document using the XRechnung extension. It requires the schemeID attribute, after trimming surrounding whitespace, to contain no internal spaces and to be exactly one of the codes listed in the rule's $ISO-6523-ICD-EXT-CODES (for example 0002, 0088, XR01). It fails if the attribute is empty or whitespace-only, contains spaces inside the value, or is not one of those codes.

How to fix

On the relevant element (cac:StandardItemIdentification/cbc:ID in UBL, ram:SpecifiedTradeProduct/ram:GlobalID in CII), set the schemeID attribute to a single valid ISO 6523 ICD code from the allowed list, without any spaces inside the code. For example, use 0002 or XR01 as appropriate. Ensure only one code is provided; if you currently have multiple codes separated by spaces, keep only the applicable one. If the code you used is not in the list, look up the correct ISO 6523 ICD code for the item identification scheme.

Guidance on this rule. The original text above is authoritative.

BR-DEX-06 rule details

Changed variable $ISO-6523-ICD-CODES

Before · 2.3.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238'

After · 2.4.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240'
BR-DEX-07Dependency changed

CEF EAS code list gains "0154", "0158", "0240" and loses "9901"

The rule's test expression is byte-identical in both releases and still uses $CEF-EAS-EXT-CODES. The changed variable is $CEF-EAS-CODES, whose whitespace-delimited code list gained "0154", "0158", and "0240", and no longer contains "9901".

fatalcountry

Original rule text: [BR-DEX-07] Any scheme identifier for an Endpoint Identifier in MUST belong to the CEF EAS code list.

Explanation and fix

What this rule requires

For an endpoint identifier (cbc:EndpointID or ram:URIID) that has a schemeID and the invoice declares itself as an XRechnung extension, the schemeID must be exactly one of the codes from the CEF EAS code list accepted by the rule, with no spaces inside the value. The test fails if the schemeID is empty or whitespace-only, contains an internal space, or is not in the allowed code list.

How to fix

Set the schemeID attribute to a valid CEF EAS code from the rule's list, such as "0088" or "0208". Ensure the value is not empty and does not contain spaces. If the current scheme identifier is not in the list, map it to the appropriate CEF EAS code.

Guidance on this rule. The original text above is authoritative.

BR-DEX-07 rule details

Changed variable $CEF-EAS-CODES

Before · 2.3.0

' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM '

After · 2.4.0

' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0240 0235 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM '
BR-DEX-05Dependency changed

ISO 6523 scheme list gains "0239" and "0240"

The rule's test expression is byte-identical between the two releases. The dependency that changed is the variable $ISO-6523-ICD-CODES, whose list of accepted ISO 6523 ICD codes now ends with "0238" "0239" "0240", where before it ended at "0238". This widens the set of scheme identifiers the rule accepts, with no other entries changed.

fatalcountry

Original rule text: [BR-DEX-05] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list.

Explanation and fix

What this rule requires

The rule applies when the document is identified as an XRechnung extension (the $isExtension condition is true). For such documents, the @schemeID attribute on cac:PartyLegalEntity/cbc:CompanyID (UBL) or on ram:ID outside ram:SpecifiedTaxRegistration (CII) must be a code from the ISO 6523 ICD list, and it must not contain any whitespace. If the value is empty, contains a space, or is not exactly one of the listed codes, the document fails validation. This is a fatal rule, so the invoice is rejected.

How to fix

Set @schemeID to one of the allowed ISO 6523 ICD codes from the rule's list, for example XR01 or 0002, and ensure there are no spaces. If the current value is not in the list or contains whitespace, replace it with the correct code for your identification scheme.

Guidance on this rule. The original text above is authoritative.

BR-DEX-05 rule details

Changed variable $ISO-6523-ICD-CODES

Before · 2.3.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238'

After · 2.4.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240'
BR-DEX-08Dependency changed

Allowed ISO 6523 ICD list adds "0239" and "0240"

The rule's test expression is byte-identical between the two versions. The change is in the variable "$ISO-6523-ICD-CODES": its list of ISO 6523 ICD codes previously ended at "0238" and now adds "0239" and "0240" at the end. No other part of the expression changes.

fatalcountry

Original rule text: [BR-DEX-08] Any scheme identifier for a Delivery location identifier in MUST be coded using one of the ISO 6523 ICD list.

Explanation and fix

What this rule requires

The rule checks the schemeID attribute of the delivery location identifier (UBL: cac:DeliveryLocation/cbc:ID; CII: ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:GlobalID) when the document is declared as an XRechnung extension. The value must not contain internal spaces and must be one of the codes in the rule's ISO 6523 ICD extension list (for example, 0002, 0088, or XR01). The document fails when this attribute contains an internal space or is not one of those listed codes.

How to fix

Change the schemeID value to a code from the ISO 6523 ICD list, such as 0002, 0088, or XR01. Ensure the value has no spaces; if spaces come from data entry, correct the field or mapping to output only the code. Check the source system's configuration for delivery location identifier schemes and align it with the allowed ISO 6523 ICD codes.

Guidance on this rule. The original text above is authoritative.

BR-DEX-08 rule details

Changed variable $ISO-6523-ICD-CODES

Before · 2.3.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238'

After · 2.4.0

' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240'
BR-CL-25Test expression rewritten

Allowed scheme identifiers add "0154", "0158", "0240" and drop "9901"

The CEF EAS code list for the endpoint identifier scheme identifier has changed. The list now includes "0154", "0158", and "0240" and no longer includes "9901". The surrounding requirement that the value contain no spaces, and the overall way the list is checked, are unchanged.

fatalbusiness

Original rule text: [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list

Explanation and fix

What this rule requires

The rule requires that the endpoint identifier's schemeID attribute (cbc:EndpointID/@schemeID in UBL, ram:URIID/@schemeID in CII) is a value from the CEF EAS code list, and that the value contains no spaces (after surrounding whitespace is removed). The test checks both conditions: it fails if the normalized schemeID contains any space or if it is not one of the listed codes. Because severity is fatal, an invoice with a schemeID that does not satisfy this is rejected.

How to fix

Set the endpoint identifier scheme identifier to a valid CEF EAS code. In UBL, change cbc:EndpointID/@schemeID to one of the allowed codes, e.g. 0088, 9930, or EM. In CII, set ram:URIID/@schemeID similarly. Ensure the value has no spaces within it and matches exactly one code from the list. If you believe the current value is already a scheme identifier, verify it is listed in the rule; only codes in the list are accepted.

Guidance on this rule. The original text above is authoritative.

BR-CL-25 rule details

Before · 2.3.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 0240 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))
BR-CL-22Test expression rewritten

Rule accepts 25 additional VATEX codes

Why this matters

The previous version accepted a value only when it had no spaces and matched one of a fixed list of uppercase codes ending with "VATEX-FR-CNWVAT". The new version keeps that check and adds 25 codes to the same list: "VATEX-EU-153", "VATEX-FR-CGI261-1", "VATEX-FR-CGI261-2", "VATEX-FR-CGI261-3", "VATEX-FR-CGI261-4", "VATEX-FR-CGI261-5", "VATEX-FR-CGI261-7", "VATEX-FR-CGI261-8", "VATEX-FR-CGI261A", "VATEX-FR-CGI261B", "VATEX-FR-CGI261C-1", "VATEX-FR-CGI261C-2", "VATEX-FR-CGI261C-3", "VATEX-FR-CGI261D-1", "VATEX-FR-CGI261D-1BIS", "VATEX-FR-CGI261D-2", "VATEX-FR-CGI261D-3", "VATEX-FR-CGI261D-4", "VATEX-FR-CGI261E-1", "VATEX-FR-CGI261E-2", "VATEX-FR-CGI277A", "VATEX-FR-CGI275", "VATEX-FR-298SEXDECIESA", "VATEX-FR-CGI295", and "VATEX-FR-AE". The no-spaces and uppercase matching are unchanged.

fatalbusiness

Original rule text: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list

Explanation and fix

What this rule requires

The rule requires the cbc:TaxExemptionReasonCode element (in CII: ram:ExemptionReasonCode) to contain a value that appears in the CEF VATEX code list. The test first checks that the normalized value contains no space, then checks that the uppercase form of the value is present in the list provided by the rule. A document fails if the value contains a space or is not in that list.

How to fix

Set the cbc:TaxExemptionReasonCode (or ram:ExemptionReasonCode) value to one of the codes listed in the rule's CEF VATEX code list, for example VATEX-EU-79-C or VATEX-FR-FRANCHISE. Ensure the value has no spaces; case is ignored by the test, but using the exact uppercase form is safest. If the current value is not in the list, replace it with the correct VAT exemption reason code.

Guidance on this rule. The original text above is authoritative.

BR-CL-22 rule details

Before · 2.3.0

((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT ', concat(' ', normalize-space(upper-case(.)), ' '))))

After · 2.4.0

((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT VATEX-EU-153 VATEX-FR-CGI261-1 VATEX-FR-CGI261-2 VATEX-FR-CGI261-3 VATEX-FR-CGI261-4 VATEX-FR-CGI261-5 VATEX-FR-CGI261-7 VATEX-FR-CGI261-8 VATEX-FR-CGI261A VATEX-FR-CGI261B VATEX-FR-CGI261C-1 VATEX-FR-CGI261C-2 VATEX-FR-CGI261C-3 VATEX-FR-CGI261D-1 VATEX-FR-CGI261D-1BIS VATEX-FR-CGI261D-2 VATEX-FR-CGI261D-3 VATEX-FR-CGI261D-4 VATEX-FR-CGI261E-1 VATEX-FR-CGI261E-2 VATEX-FR-CGI277A VATEX-FR-CGI275 VATEX-FR-298SEXDECIESA VATEX-FR-CGI295 VATEX-FR-AE ', concat(' ', normalize-space(upper-case(.)), ' '))))
BR-CL-05Test expression rewritten

The rule no longer accepts "ZWL" as a currency code

The test expression changed by removing "ZWL" from the space-padded list of ISO 4217 alpha-3 codes that the rule accepts. Both before and after, the condition checks that the value contains no spaces and appears in the padded list. With "ZWL" absent from the after list, a value of exactly "ZWL" no longer matches. All other listed currency codes remain accepted.

fatalbusiness

Original rule text: [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3

Explanation and fix

What this rule requires

The rule requires cbc:TaxCurrencyCode (UBL) or ram:TaxCurrencyCode (CII) to hold an ISO 4217 alpha-3 currency code from the list accepted by BR-CL-05. It passes only when the normalized value is exactly one of the 178 listed codes, for example EUR, USD, or GBP. A document fails if the element is empty, contains only whitespace, has an internal space, or uses a code not on that list.

How to fix

Put a valid ISO 4217 alpha-3 currency code in the tax currency field, such as EUR, USD, or GBP. Ensure the value has no internal spaces (surrounding whitespace is ignored by the rule) and is not empty or only whitespace. Check that the code is present in the BR-CL-05 list; if the current code is something else, replace it with the correct three-letter ISO 4217 code.

Guidance on this rule. The original text above is authoritative.

BR-CL-05 rule details

Before · 2.3.0

((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ZWL ', concat(' ', normalize-space(.), ' '))))

After · 2.4.0

((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))
BR-CL-07Test expression rewritten

The allowed scheme identifier list gains "AXU" between "AXS" and "BA"

The rule requires the object identifier identification scheme identifier to be coded using a restriction of UNTDID 1153. Its test expression checks membership in a fixed list of allowed scheme identifier codes. Between published "2.3.0" and "2.4.0", the list gained "AXU", inserted after "AXS" and before "BA". The condition otherwise remains the same.

fatalbusiness

Original rule text: [BR-CL-07]-Object identifier identification scheme identifier MUST be coded using a restriction of UNTDID 1153.

Explanation and fix

What this rule requires

The rule requires that for an object identifier (in UBL, cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID] or cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID]; in CII, ram:ReferenceTypeCode), the identification scheme identifier must be a code from a restricted list of UNTDID 1153 values and must not contain any spaces. The test normalizes whitespace and checks that the value contains no space and is one of the allowed codes. Because the rule is fatal, a document that does not satisfy these conditions fails validation.

How to fix

Set the scheme identifier to an allowed code from the UNTDID 1153 list. In UBL, change the schemeID attribute on cbc:ID; in CII, change the ram:ReferenceTypeCode element. The value must be one of the codes accepted by the test (e.g., AAA, AAB, AC, ZZZ) and must not contain spaces. Leading/trailing whitespace is ignored, but internal spaces are not allowed. If the current value is not in the list or has spaces, replace it with a correct code for the identifier scheme; check the UNTDID 1153 code list if unsure.

Guidance on this rule. The original text above is authoritative.

BR-CL-07 rule details

Before · 2.3.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS AXU BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' '))))
BR-CL-10Test expression rewritten

ISO 6523 list adds "0239" and "0240"

The rule requires an identification scheme identifier to use one of the ISO 6523 ICD list. The accepted four-digit codes in the rule's main check previously ended at "0238"; in 2.4.0 the list adds "0239" and "0240". The "SEPA" exception is unchanged.

fatalbusiness

Original rule text: [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list.

Explanation and fix

What this rule requires

The rule requires the @schemeID attribute on the identifier in cac:PartyIdentification/cbc:ID (UBL) or ram:GlobalID (CII, excluding elements under ram:SpecifiedTradeProduct or ram:ShipToTradeParty) to be a code from the ISO 6523 ICD list. For UBL only, the value SEPA is also accepted if the element is within an cac:AccountingSupplierParty or cac:PayeeParty. If the attribute is present but empty or whitespace-only, contains a space, or is not one of the allowed values, the document fails validation.

How to fix

Set @schemeID to a valid ISO 6523 ICD code, for example 0002, 0003, 0088, or any other code from the rule's accepted list. In UBL, if the scheme must be SEPA, use exactly SEPA and ensure the identifier is inside an cac:AccountingSupplierParty or cac:PayeeParty. Check the current value for typos, extra spaces, or a code outside the allowed list.

Guidance on this rule. The original text above is authoritative.

BR-CL-10 rule details

Before · 2.3.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 ', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))

After · 2.4.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 ', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))
BR-CL-11Test expression rewritten

Allowed scheme identifiers now include "0239" and "0240"

The rule's allowed list for registration identifier scheme identifiers now includes "0239" and "0240"; previously the list ended at "0238". The condition still requires the identifier to contain no spaces and then to match one of the listed codes. No other list entries or conditions changed.

fatalbusiness

Original rule text: [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list.

Explanation and fix

What this rule requires

The rule requires that the @schemeID of cac:PartyLegalEntity/cbc:CompanyID (UBL) or ram:ID outside ram:SpecifiedTaxRegistration (CII) is coded using one of the ISO 6523 ICD identifiers. The test checks that the normalized value contains no spaces and matches one of the four-digit codes listed in the rule. A document fails when the @schemeID is missing, blank, contains spaces, or has a code not present in that list.

How to fix

Set the @schemeID attribute to a valid four-digit code from the ISO 6523 ICD list accepted by the rule, such as 0002 or 0003, without spaces. Check the exact code used against the codes listed in the rule.

Guidance on this rule. The original text above is authoritative.

BR-CL-11 rule details

Before · 2.3.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 ', concat(' ', normalize-space(@schemeID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 ', concat(' ', normalize-space(@schemeID), ' '))))
BR-CL-04Test expression rewritten

The allowed currency code list no longer contains "ZWL"

The space-delimited list of accepted currency codes changed. The previous list ended with "ZMW ZWG ZWL"; the new list ends with "ZMW ZWG". This removes "ZWL" as an allowed value while the rest of the condition is unchanged. The rule's message remains "Invoice currency code MUST be coded using ISO code list 4217 alpha-3."

fatalbusiness

Original rule text: [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3

Explanation and fix

What this rule requires

The rule requires the invoice currency code to be a valid ISO 4217 alpha-3 currency code. It checks that the code contains no spaces and appears in the rule's list of accepted currency codes. A document fails if cbc:DocumentCurrencyCode (UBL) or ram:InvoiceCurrencyCode (CII) is empty, contains whitespace, or is not one of the listed codes.

How to fix

Set the currency code element to a three-letter ISO 4217 code from the list allowed by the rule, for example EUR, USD, or GBP. In UBL use cbc:DocumentCurrencyCode; in CII use ram:InvoiceCurrencyCode. Ensure the value contains no spaces.

Guidance on this rule. The original text above is authoritative.

BR-CL-04 rule details

Before · 2.3.0

((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ZWL ', concat(' ', normalize-space(.), ' '))))

After · 2.4.0

((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))
BR-CL-26Test expression rewritten

The rule now permits scheme identifiers "0239" and "0240".

The allowed list of delivery location identifier scheme identifiers was extended. The test now includes "0239" and "0240" in its space-separated list of permitted codes; previously the list ended at "0238". No other part of the expression changed. As a result, the condition accepts those two additional values.

fatalbusiness

Original rule text: [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list

Explanation and fix

What this rule requires

The rule requires that the schemeID attribute on the delivery location identifier (cac:DeliveryLocation/cbc:ID[@schemeID]) be one of the ISO 6523 ICD codes listed in the rule, with no spaces inside the value. The test rejects any value whose normalized form contains a space or is not in the embedded list. Since this is a fatal rule, an invoice with any other schemeID fails validation.

How to fix

Set the schemeID attribute to a code from the ISO 6523 ICD list, for example 0088, and ensure it has no internal spaces or whitespace. If you are unsure which code applies, check the identifier scheme used for the delivery location.

Guidance on this rule. The original text above is authoritative.

BR-CL-26 rule details

Before · 2.3.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 ', concat(' ', normalize-space(@schemeID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 ', concat(' ', normalize-space(@schemeID), ' '))))
BR-CL-13Test expression rewritten

Allowed UNTDID 7143 codes now include "PPI".

The rule's test for the identification scheme identifier originally contained a fixed string of acceptable UNTDID 7143 codes. The updated test inserts the exact code "PPI" between "PO" and "PV". That is the only difference between the before and after expressions. The surrounding no-space condition and the contains condition, including the padded spaces around the identifier and the list, are unchanged.

fatalbusiness

Original rule text: [BR-CL-13]-Item classification identifier identification scheme identifier MUST be coded using one of the UNTDID 7143 list.

Explanation and fix

What this rule requires

The rule checks the item classification identifier scheme identifier in cac:CommodityClassification/cbc:ItemClassificationCode[@listID] (UBL) or ram:ClassCode[@listID] (CII). After surrounding whitespace is ignored, the value must not contain any internal space and must exactly match one of the 185 listed UNTDID 7143 codes, for example AA, AB, AC, EN, or ZZZ. A missing value, a value with internal spaces, or any value not in that list violates this fatal rule.

How to fix

Set the listID attribute to a valid UNTDID 7143 code from the rule's list, e.g. AA, AB, AC, EN, or ZZZ. The value may have leading or trailing whitespace, but after trimming it must be exactly one of those 185 codes and contain no internal spaces. If you do not know which code applies to the item classification, check the UNTDID 7143 list for the correct scheme identifier.

Guidance on this rule. The original text above is authoritative.

BR-CL-13 rule details

Before · 2.3.0

((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PPI PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))
UBL-SR-22Test expression rewritten

Test now counts names directly under 'PartyName'

Why this matters

The test changed from '(count(cac:Party/cac:PartyName/cbc:Name) <= 1)' to '(count(cac:PartyName/cbc:Name) <= 1)'. The limit remains one occurrence, and the rule message still says the seller tax representative name shall occur at most once. The new expression omits the 'cac:Party' level from the counted path, so the count is evaluated at a different node context.

fatalschema

Original rule text: [UBL-SR-22]-Seller tax representative name shall occur maximum once, if the Seller has a tax representative

Explanation and fix

What this rule requires

The rule requires that within cac:TaxRepresentativeParty, the seller tax representative name element cac:PartyName/cbc:Name occurs at most once. A document fails when more than one cac:PartyName/cbc:Name element is present inside cac:TaxRepresentativeParty.

How to fix

In the invoice, locate cac:TaxRepresentativeParty and ensure it contains at most one cac:PartyName/cbc:Name. If multiple names are present, remove the extra cac:PartyName/cbc:Name elements, leaving zero or one name. In the producing system, configure the tax representative party to emit only a single name.

Guidance on this rule. The original text above is authoritative.

UBL-SR-22 rule details

Before · 2.3.0

(count(cac:Party/cac:PartyName/cbc:Name) <= 1)

After · 2.4.0

(count(cac:PartyName/cbc:Name) <= 1)
BR-CL-21Test expression rewritten

The list of ISO 6523 ICD values checked by the rule now includes "0239" and "0240".

The list of ISO 6523 ICD values checked by the rule previously ended at "0238"; it now includes "0239" and "0240" as well. Both versions require the scheme identifier to contain no spaces and to appear in that list, so the only change is the addition of those two values.

fatalbusiness

Original rule text: [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list

Explanation and fix

What this rule requires

The rule requires that the scheme identifier in the item standard identifier (cac:StandardItemIdentification/cbc:ID[@schemeID] in UBL, or ram:SpecifiedTradeProduct/ram:GlobalID[@schemeID] in CII) be exactly one code from the ISO 6523 ICD code list. The test checks that the value does not contain a space and matches one of the listed codes such as 0088, 0160, or 0248. Because the severity is fatal, a value that contains a space or is not among the listed codes causes the document to fail validation.

How to fix

Set the @schemeID attribute to a valid ISO 6523 ICD code from the rule's list, with no spaces inside the value. For example, use 0088 if that is the correct scheme for the item identifier. If the current value is not in the list, look up the correct ISO 6523 ICD code for the identifier scheme in use.

Guidance on this rule. The original text above is authoritative.

BR-CL-21 rule details

Before · 2.3.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 ', concat(' ', normalize-space(@schemeID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 ', concat(' ', normalize-space(@schemeID), ' '))))
BR-CL-03Test expression rewritten

The currency code list drops "ZWL"

The rule's currency code list no longer contains "ZWL". Before, the list ended with "ZAR ZMW ZWG ZWL"; after, it ends with "ZAR ZMW ZWG". The rule message still says currencyID must be coded using ISO code list 4217 alpha-3.

fatalbusiness

Original rule text: [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3

Explanation and fix

What this rule requires

The rule requires that the @currencyID attribute on amount elements (UBL) or on ram:TaxTotalAmount (CII) contains an ISO 4217 alpha-3 currency code from the list accepted by the rule, and that the code contains no spaces. Because the severity is fatal, an invoice that does not satisfy this condition is rejected with message [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3.

How to fix

Set the currencyID attribute to a valid three-letter ISO 4217 alpha-3 code that appears in the rule's list, for example EUR or USD. Ensure the value is not empty and contains no spaces. In UBL this applies to amount elements such as cbc:TaxAmount; in CII it applies to ram:TaxTotalAmount[@currencyID]. If the current value is not a valid code, correct it in the source system.

Guidance on this rule. The original text above is authoritative.

BR-CL-03 rule details

Before · 2.3.0

((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ZWL ', concat(' ', normalize-space(@currencyID), ' '))))

After · 2.4.0

((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(@currencyID), ' '))))
BR-CL-01Test expression rewritten

The invoice type code list gains seven allowed UNTDID 1001 codes.

The allowed invoice type code list now includes "471", "472", "473", "500", "501", "502", and "503". The credit note type code list is unchanged. The requirement that the value has no internal spaces and matches one of the allowed codes remains.

fatalbusiness

Original rule text: [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001.

Explanation and fix

What this rule requires

BR-CL-01 requires the document type code to be exactly one of the UNTDID 1001 codes allowed by the rule. For UBL, cbc:InvoiceTypeCode must contain one of the invoice-related codes, and cbc:CreditNoteTypeCode must contain one of the credit-note-related codes. For CII, rsm:ExchangedDocument/ram:TypeCode must contain one of the combined list. The value must not contain any space; after trimming whitespace it must be a single token. A missing, empty, or non-listed value fails this fatal rule.

How to fix

Set the document type code element to an allowed code. For UBL cbc:InvoiceTypeCode, use an invoice-related code such as 380, 384, or 389. For UBL cbc:CreditNoteTypeCode, use a credit-note-related code such as 381, 396, or 420. For CII rsm:ExchangedDocument/ram:TypeCode, use any allowed code, for example 380 or 381. Ensure the value has no internal spaces; leading/trailing whitespace is ignored.

Guidance on this rule. The original text above is authoritative.

BR-CL-01 rule details

Before · 2.3.0

(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 532 ', concat(' ', normalize-space(.), ' ')))))

After · 2.4.0

(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 471 472 473 500 501 502 503 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 532 ', concat(' ', normalize-space(.), ' ')))))
BR-DE-21Test expression rewritten

Specification identifier test accepts one more value

The test for the specification identifier gained an additional alternative. The condition now allows the element to equal the variable $XR-CVD-ID, alongside the existing alternatives $XR-CIUS-ID and $XR-EXTENSION-ID. The first two alternatives are unchanged. This adds one named value to the set of accepted identifiers.

warningcountry

Original rule text: [BR-DE-21] Das Element "Specification identifier" (BT-24) soll syntaktisch der Kennung des Standards XRechnung entsprechen.

Explanation and fix

What this rule requires

This warning checks that the specification identifier (BT-24) is one of the accepted XRechnung identifiers. In UBL this is cbc:CustomizationID; in CII it is ram:GuidelineSpecifiedDocumentContextParameter/ram:ID. The rule accepts one of three values: the XRechnung CIUS identifier, the XRechnung extension identifier, or the XRechnung CVD identifier. Because severity is warning, the document is not rejected, but the validator reports that the identifier does not syntactically match one of these expected XRechnung identifiers.

How to fix

Set the specification identifier field to the exact identifier that applies to the XRechnung version being used. It must be one of the rule's accepted patterns: urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_<version>, the same with #conformant#urn:xeinkauf.de:kosit:extension:xrechnung_<version>, or the CVD variant ...xrechnung_<version>#compliant#urn:xeinkauf.de:kosit:xrechnung:cvd_<cvd-version>. For UBL, change cbc:CustomizationID; for CII, change ram:GuidelineSpecifiedDocumentContextParameter/ram:ID.

Guidance on this rule. The original text above is authoritative.

BR-DE-21 rule details

Before · 2.3.0

cbc:CustomizationID = $XR-CIUS-ID or cbc:CustomizationID = $XR-EXTENSION-ID

After · 2.4.0

cbc:CustomizationID = $XR-CIUS-ID or cbc:CustomizationID = $XR-EXTENSION-ID or cbc:CustomizationID = $XR-CVD-ID
BR-AG-01New rule

New rule message requires "IPSI" but the check compares to "M"

The rule was introduced in published 2.4.0. Its message states that when an invoice line (BG-25), a document level allowance (BG-20), or a document level charge (BG-21) has VAT category code "IPSI" (BT-151, BT-95, or BT-102), the VAT breakdown (BG-23) must contain at least one VAT category code "IPSI" (BT-118). The check, however, compares tax category identifiers to "M" rather than "IPSI", in allowance/charge categories, classified tax categories, and VAT subtotals.

fatalbusiness

Original rule text: [BR-AG-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI".

Explanation and fix

What this rule requires

The message says an invoice with an invoice line, a document-level allowance or a document-level charge whose VAT category code is "IPSI" must contain a VAT breakdown entry (BG-23) with that code. Both syntax tests look for the code M, not the word "IPSI".

In UBL, if a cac:AllowanceCharge/cac:TaxCategory or cac:ClassifiedTaxCategory with cbc:ID M and VAT tax scheme exists, then cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory must contain a cbc:ID M entry whose tax scheme is VAT. The test also works the other way: if no such source category exists, the breakdown must not contain a M entry with the VAT tax scheme.

In CII, the test does not simply require one breakdown entry. If ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax has a ram:CategoryCode M, the number of those entries plus the ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax entries with M must be at least 2. The same holds for ram:CategoryTradeTax entries with M (document-level allowances and charges) plus the header entries. The CII test has no reverse check.

How to fix

In UBL, add a cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory with cbc:ID M and the VAT tax scheme whenever a line, allowance or charge uses M, and remove a M breakdown entry when none does. In CII, make sure a header ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax with ram:CategoryCode M exists whenever a line or document-level allowance or charge uses M. Use the code M in the document; the word "IPSI" is not matched by this rule's test.

Guidance on this rule. The original text above is authoritative.

BR-AG-01 rule details

Added · 2.4.0

((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)
BR-DE-CVD-01New rule

New rule requires "Contract reference" ("BT-12") to be present

A new rule requires a "Contract reference" ("BT-12") to be transmitted. The rule checks that the reference has an identifier that is non-empty after whitespace is trimmed. A document violates the rule when that reference is missing, or when the identifier is blank after trimming.

fatalcountry

Original rule text: [BR-DE-CVD-01] Das Element "Contract reference" (BT-12) muss übermittelt werden.

Explanation and fix

What this rule requires

The rule requires that a "Contract reference" (BT-12) is transmitted, with a non-empty identifier. In UBL this means cac:ContractDocumentReference/cbc:ID, and in CII it means ram:ContractReferencedDocument/ram:IssuerAssignedID, each with a value that is not empty or only whitespace. The document fails because no such element with a non-whitespace value is present.

How to fix

Add at least one cac:ContractDocumentReference containing a cbc:ID with the contract identifier (for UBL), or at least one ram:ContractReferencedDocument containing ram:IssuerAssignedID with the contract identifier (for CII). The value must not be empty or whitespace-only.

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-01 rule details

Added · 2.4.0

cac:ContractDocumentReference/cbc:ID[boolean(normalize-space(.))]
UBL-SR-53New rule

A new rule requires the company identifier when a tax scheme identifier is given.

The rule is new in published 2.4.0; it did not exist in published 2.3.0. Its test requires both a tax scheme identifier and the company identifier to be present. The rule message states that the company identifier (VAT identifier) must be stated when the tax scheme identifier in the party tax scheme is provided.

fatalschema

Original rule text: [UBL-SR-53]- CompanyID (VAT Identifier) must be stated when providing the PartyTaxScheme/TaxScheme/ID.

Explanation and fix

What this rule requires

The rule applies to each cac:PartyTaxScheme. The test requires both cac:TaxScheme/cbc:ID and cbc:CompanyID to exist in that element. The message says CompanyID (VAT Identifier) must be stated when providing PartyTaxScheme/TaxScheme/ID; because the test uses and, a PartyTaxScheme missing either element fails. This is a fatal rule, so the document is rejected.

How to fix

Ensure every cac:PartyTaxScheme contains both cac:TaxScheme/cbc:ID and cbc:CompanyID. If cbc:CompanyID is missing, add the VAT identifier. If cac:TaxScheme/cbc:ID is missing, add the tax scheme identifier. Check the system that generates the invoice to include both elements whenever a PartyTaxScheme is used.

Guidance on this rule. The original text above is authoritative.

UBL-SR-53 rule details

Added · 2.4.0

exists(cac:TaxScheme/cbc:ID) and exists(cbc:CompanyID)
BR-AF-05New rule

New rule requires VAT rate to be zero or positive when VAT category is "IGIC".

A new rule was introduced in version 2.4.0. It applies where the invoiced item VAT category code (BT-151) is "IGIC". In that case, the invoiced item VAT rate (BT-152) must be 0 (zero) or greater than zero.

fatalbusiness

Original rule text: [BR-AF-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.

Explanation and fix

What this rule requires

For each invoice line or credit note line whose VAT category code (BT-151) is "IGIC" (UBL: cbc:ID = L in cac:ClassifiedTaxCategory with VAT tax scheme), the invoiced item VAT rate (BT-152, UBL: cbc:Percent) must be zero or greater. The test requires cbc:Percent to be greater than or equal to 0; a document fails if any such line has a negative cbc:Percent.

How to fix

In the applicable cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory or cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory where cbc:ID is L, set cbc:Percent to a value greater than or equal to 0, such as 0 or a positive rate. Ensure the system generating the invoice does not produce negative percentages for IGIC-coded lines.

Guidance on this rule. The original text above is authoritative.

BR-AF-05 rule details

Added · 2.4.0

(cbc:Percent) >= 0
BR-AF-07New rule

New rule requires "IGIC" document-level charge rates to be zero or positive.

The rule is new in version 2.4.0. Its message states that when a document level charge has VAT category code "IGIC", the document level charge VAT rate must be 0 or greater than zero. The test expression now checks that the rate is greater than or equal to 0. There is no earlier version of the rule in 2.3.0.

fatalbusiness

Original rule text: [BR-AF-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.

Explanation and fix

What this rule requires

The rule requires that a document-level charge (BG-21) whose VAT category code (BT-102) is IGIC has a VAT rate (BT-103) of zero or greater. The message says "0 (zero) or greater than zero", and the UBL test matches it: it selects cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory where cbc:ID is L and the tax scheme is VAT, and requires cbc:Percent >= 0. The CII test does not match the message: it selects ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:CategoryTradeTax where ram:CategoryCode is L and ram:TypeCode is VAT, and requires ram:RateApplicablePercent > 0, so a rate of 0 passes in UBL and fails in CII.

How to fix

In UBL, set cbc:Percent in the matching cac:TaxCategory to 0 or any positive number. In CII, set ram:RateApplicablePercent in the matching ram:CategoryTradeTax to a number greater than 0, because 0 fails the CII test. If the charge really has a zero rate, expect a CII validator to reject it even though UBL accepts it.

Guidance on this rule. The original text above is authoritative.

BR-AF-07 rule details

Added · 2.4.0

(cbc:Percent) >= 0
BR-TMP-CVD-01New rule

A new rule requires the item classification scheme to come from "UNTDID 7143"

The rule is new in version 2.4.0 and was not present in published 2.3.0. Its message states that the scheme for the item classification identifier, business term "BT-158", must be chosen from the "UNTDID 7143" code list. The test expression checks that the normalized scheme identifier value contains no spaces and is one of the codes in "$UNTDID-7143-CVD-CODES".

fatalbusiness

Original rule text: [BR-TMP-CVD-01] Das Bildungsschema für "Item classification identifier" (BT-158) ist aus der Codeliste UNTDID 7143 zu wählen.

Explanation and fix

What this rule requires

The rule requires that the scheme identifier for the item classification identifier (BT-158) is specified using the listID attribute on cbc:ItemClassificationCode in UBL or ram:ClassCode in CII, and that its value is one of the codes from the UNTDID 7143 code list as defined in the rule. The test checks that after trimming whitespace, the listID contains no spaces and exactly matches one of the space-separated codes in $UNTDID-7143-CVD-CODES (for example CVD, AA, AB). A document fails if the attribute is missing, empty, contains spaces, or has a value not in that list.

How to fix

In UBL, set the listID attribute on cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode to one of the allowed UNTDID 7143 codes, e.g. CVD. In CII, set listID on ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode similarly. Ensure the attribute contains exactly one code with no spaces around or inside it.

Guidance on this rule. The original text above is authoritative.

BR-TMP-CVD-01 rule details

Added · 2.4.0

((not(contains(normalize-space(@listID), ' ')) and contains($UNTDID-7143-CVD-CODES, concat(' ', normalize-space(@listID), ' '))))
BR-AG-10New rule

New rule forbids VAT exemption reason code and text in "IPSI" VAT breakdowns

The rule was added in this change; no such rule existed in 2.3.0. It applies to VAT breakdowns (BG-23) with VAT Category code (BT-118) "IPSI" and requires that neither the VAT exemption reason text (BT-120) nor the VAT exemption reason code (BT-121) be present. There is no previous expression to compare because the rule is new.

fatalbusiness

Original rule text: [BR-AG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).

Explanation and fix

What this rule requires

In UBL, the rule applies to each cac:TaxCategory inside cac:TaxTotal/cac:TaxSubtotal where the VAT category code cbc:ID is M (the code for IPSI, BT-118) and the tax scheme is VAT. The test requires that neither cbc:TaxExemptionReason (BT-120, VAT exemption reason text) nor cbc:TaxExemptionReasonCode (BT-121, VAT exemption reason code) is present. If either child element exists under such a cac:TaxCategory, the invoice fails this fatal rule.

How to fix

Remove cbc:TaxExemptionReason and cbc:TaxExemptionReasonCode from the cac:TaxCategory whose cbc:ID is M and whose cac:TaxScheme/cbc:ID is VAT. If the system generates these fields for IPSI, change the mapping so that a VAT category code M is sent without any exemption reason fields.

Guidance on this rule. The original text above is authoritative.

BR-AG-10 rule details

Added · 2.4.0

not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)
BR-DE-CVD-04New rule

New rule requires item classification identifiers with scheme "CVD" to use an allowed vehicle category.

A rule has been added in published 2.4.0. It requires that when the listID attribute equals "CVD", the item classification identifier value equals one of the values in the variable $CVD-VEHICLE-CATEGORY. No previous version of this rule existed in published 2.3.0.

fatalcountry

Original rule text: [BR-DE-CVD-04] Ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' muss einen Wert aus der Liste der zulässigen Fahrzeugkategorien enthalten.

Explanation and fix

What this rule requires

The rule checks each invoice or credit note line item's ItemClassificationCode (BT-158). When the classification scheme identifier (@listID) is 'CVD', the code value must be one of the allowed vehicle categories: M1, M2, M3, N1, N2, N3. If the list identifier is not 'CVD', the rule does not restrict the value. A document is rejected when the list identifier is 'CVD' and the code is not one of those six values.

How to fix

Set the text of the item classification code to one of M1, M2, M3, N1, N2, N3 when the @listID attribute is 'CVD'. If the classification is not a CVD vehicle category, correct the @listID to the appropriate scheme identifier or remove the 'CVD' list identifier so the rule does not apply.

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-04 rule details

Added · 2.4.0

not(normalize-space(@listID) = 'CVD') or normalize-space(.) = $CVD-VEHICLE-CATEGORY
BR-AF-03New rule

New rule for "IGIC" allowances checks for ID "L"

The rule is new in this release. When a document-level allowance has charge indicator "false" and a tax category ID "L" under the "VAT" tax scheme, the rule passes only if a seller party tax scheme company identifier or a tax representative party company identifier under the "VAT" tax scheme is present; if no such allowance exists, the rule also passes. The rule message describes the trigger as the VAT category code "IGIC", but the test expression checks for ID "L", and the evidence does not show these are the same.

fatalbusiness

Original rule text: [BR-AF-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

Explanation and fix

What this rule requires

The rule is fatal. In UBL, if an invoice contains a document-level allowance (cac:AllowanceCharge with cbc:ChargeIndicator=false()) whose cac:TaxCategory/cbc:ID is L and whose tax scheme ID upper-cased is VAT, then the invoice must also contain at least one of: a cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, or a cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/normalize-space(upper-case(cbc:ID)) = 'VAT']/cbc:CompanyID. If no such allowance exists, the rule passes. In CII, a matching allowance is ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax with ram:CategoryCode='L' and upper-case ram:TypeCode='VAT'; if such an allowance exists, the invoice must contain ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID either VA or FC, or ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID='VA'. The message says BT-95 is “IGIC”, but the test checks category/code L under a VAT scheme, not a literal “IGIC” value.

How to fix

If an invoice has the described document-level allowance, add at least one of the seller identifiers. In UBL, put a cbc:CompanyID inside cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme, or inside cac:TaxRepresentativeParty/cac:PartyTaxScheme where the tax scheme is VAT. In CII, add ram:SpecifiedTaxRegistration/ram:ID in ram:SellerTradeParty with schemeID VA or FC, or in ram:SellerTaxRepresentativeTradeParty with schemeID VA. If no such document-level allowance is present, the rule is satisfied and no identifier is required by this rule. Note the message says “IGIC” but the test checks for code L; ensure the allowance's category/code matches what the test expects (L under VAT) before relying on this rule.

Guidance on this rule. The original text above is authoritative.

BR-AF-03 rule details

Added · 2.4.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-AG-09New rule

New rule checks "IPSI" VAT tax amount calculation

Why this matters

A new rule checks the VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "IPSI". The tax amount must be within one unit of the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119) divided by 100, with the result rounded to two decimal places. The test compares the absolute tax amount with that rounded amount and requires the absolute difference to be less than one. Previously no such check existed. The rule message states that the tax amount shall equal the VAT category taxable amount multiplied by the VAT category rate.

fatalbusiness

Original rule text: [BR-AG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

Explanation and fix

What this rule requires

The message states that where VAT category code (BT-118) is "IPSI", the VAT category tax amount (BT-117) must equal the taxable amount (BT-116) multiplied by the rate (BT-119). In UBL the selector instead requires cac:TaxCategory/cbc:ID to be 'M', not "IPSI", and the test checks that cbc:TaxAmount is within ±1 currency unit of cbc:TaxableAmount * cbc:Percent / 100, rounded to two decimal places. In CII the test is true(), so the calculation is not enforced there.

How to fix

In UBL, for the cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory with cbc:ID = 'M' and VAT tax scheme, set cbc:TaxAmount to approximately cbc:TaxableAmount * cbc:Percent / 100, rounded to two decimal places, ensuring the difference is less than 1 currency unit. If the invoice uses cbc:ID = 'IPSI', the rule as given would not select it; check whether your validator uses a different condition. In CII, no change is required by this rule because the test always passes.

Guidance on this rule. The original text above is authoritative.

BR-AG-09 rule details

Added · 2.4.0

(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )
BR-DE-CVD-06-aNew rule

New rule links item classification list "CVD" with attribute "cva".

The rule was added in version 2.4.0. It states that when an item classification identifier has list identifier "CVD", exactly one item attribute named "cva" must be present alongside it. The test expression forms an either/or: either the classification identifier does not use list identifier "CVD", or the count of item attributes named "cva" equals 1.

fatalcountry

Original rule text: [BR-DE-CVD-06-a] Wenn der Scheme identifier von "Item classification identifier" (BT-158) mit dem Wert 'CVD' angegeben ist, muss in derselben Rechnungszeile genau ein "Item attribute name" (BT-160) mit dem Wert 'cva' vorhanden sein.

Explanation and fix

What this rule requires

For each invoice or credit note line in a CVD-type document, if the item classification identifier (BT-158) uses the scheme identifier 'CVD' (UBL: cac:CommodityClassification/cbc:ItemClassificationCode with @listID = 'CVD'), then the same item must contain exactly one item attribute name (BT-160) with the value 'cva' (UBL: cac:AdditionalItemProperty/cbc:Name = 'cva'). In CII syntax, a ram:DesignatedProductClassification/ram:ClassCode with @listID = 'CVD' requires exactly one ram:ApplicableProductCharacteristic with ram:Description = 'cva'. A line fails when it has such a CVD classification but the count of 'cva' item attributes is not exactly 1 (zero or more than one). Lines without a CVD item classification are not affected.

How to fix

Ensure that each line item containing a CVD item classification also contains exactly one item attribute named 'cva'. In UBL, set the count of cac:AdditionalItemProperty elements where cbc:Name = 'cva' to exactly 1; in CII, set the count of ram:ApplicableProductCharacteristic elements where ram:Description = 'cva' to exactly 1. In business terms, set "Item attribute name" (BT-160) to 'cva' exactly once for that line. If multiple such attributes exist, keep only one; if none exist, add one.

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-06-a rule details

Added · 2.4.0

not(cac:CommodityClassification/cbc:ItemClassificationCode[@listID = 'CVD']) or count(cac:AdditionalItemProperty[cbc:Name = 'cva']) = 1
BR-AF-02New rule

New rule requires seller identifiers for "L", though message says "IGIC"

Why this matters

The rule adds a condition: when a classified tax category with value "L" and a VAT tax scheme is present, one of the company identifier in the accounting supplier party's party tax scheme or the tax representative party's party tax scheme with VAT must also be present. The rule's message names "IGIC" for the item VAT category code, but the test expression matches the value "L". The expression also treats the absence of any such category as satisfying the rule, because the identifier requirement is inside an "or not(exists(...))" branch. Thus the requirement applies only when the category is present.

fatalbusiness

Original rule text: [BR-AF-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

Explanation and fix

What this rule requires

The rule applies when an invoice or credit note contains an invoice line with Invoiced item VAT category code (BT-151) “IGIC”, represented as cbc:ID = L under a VAT cac:TaxScheme in UBL, or ram:CategoryCode = L with ram:TypeCode = VAT in CII. If such a line exists, the document must include at least one of the seller VAT identifier (BT-31), seller tax registration identifier (BT-32), or seller tax representative VAT identifier (BT-63). In UBL, this means a cbc:CompanyID in the seller's cac:PartyTaxScheme or a VAT-scheme cbc:CompanyID in a cac:TaxRepresentativeParty; in CII, it means a ram:SpecifiedTaxRegistration/ram:ID with @schemeID = VA or FC on the ram:SellerTradeParty, or @schemeID = VA on the ram:SellerTaxRepresentativeTradeParty. Documents with an IGIC line but none of these identifiers fail validation because severity is fatal.

How to fix

If the line is correctly IGIC, add the missing identifier: in UBL, place cbc:CompanyID in /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme (or in cac:TaxRepresentativeParty/cac:PartyTaxScheme with cac:TaxScheme/cbc:ID = VAT); in CII, add ram:SpecifiedTaxRegistration/ram:ID under ram:SellerTradeParty with @schemeID = VA or FC, or under ram:SellerTaxRepresentativeTradeParty with @schemeID = VA. If the line is not supposed to be IGIC, set its VAT category code to the appropriate non-L value in the relevant syntax.

Guidance on this rule. The original text above is authoritative.

BR-AF-02 rule details

Added · 2.4.0

(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-AF-09New rule

New rule checks "IGIC" VAT category tax amount equals taxable amount times rate

The rule is new in published 2.4.0; it did not appear in 2.3.0. It applies to VAT breakdowns (BG-23) where the VAT category code (BT-118) is "IGIC". The test requires that the absolute VAT category tax amount (BT-117) equal the absolute VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119), rounded to two decimal places, with a permitted difference of less than one unit.

fatalbusiness

Original rule text: [BR-AF-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

Explanation and fix

What this rule requires

In UBL, this fatal rule applies to a VAT breakdown (cac:TaxSubtotal) whose VAT category code (cbc:ID) is 'L' (IGIC) and whose tax scheme is VAT. The VAT category tax amount (cbc:TaxAmount, BT-117) must be close to the VAT category taxable amount (cbc:TaxableAmount, BT-116) multiplied by the VAT category rate (cbc:Percent, BT-119) divided by 100: the test accepts a difference of less than 1 currency unit from the result rounded to two decimal places. The message says the amounts shall be equal, but the UBL test allows this tolerance. In CII the test is always true, so this rule does not reject CII documents.

How to fix

For UBL, in the failing cac:TaxSubtotal with cac:TaxCategory/cbc:ID = 'L' and cac:TaxScheme/cbc:ID = 'VAT', set ../cbc:TaxAmount to ../cbc:TaxableAmount multiplied by cbc:Percent divided by 100, rounded to two decimal places; a difference of less than 1 currency unit is accepted. Check that cbc:TaxableAmount and cbc:Percent are present and numeric. No change is needed for CII because the test evaluates to true.

Guidance on this rule. The original text above is authoritative.

BR-AF-09 rule details

Added · 2.4.0

(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )
BR-DE-CVD-02New rule

New rule requires "Tender or lot reference" ("BT-17") to be transmitted with a non-empty identifier

A new rule was added in the change from "published 2.3.0" to "published 2.4.0". It requires the element "Tender or lot reference" ("BT-17") to be transmitted, and the test expression requires the identifier in the originator document reference to have non-whitespace content. This requirement did not previously exist in "published 2.3.0".

fatalcountry

Original rule text: [BR-DE-CVD-02] Das Element "Tender or lot reference" (BT-17) muss übermittelt werden.

Explanation and fix

What this rule requires

This fatal XRechnung rule requires that a CVD invoice or credit note includes the element "Tender or lot reference" (BT-17). In UBL, at least one cac:OriginatorDocumentReference/cbc:ID must exist with a value that is not empty or only whitespace. In CII, at least one ram:AdditionalReferencedDocument must have ram:TypeCode equal to '50' and a ram:IssuerAssignedID that is not empty or only whitespace. A document fails when no such reference or ID is present.

How to fix

Add the tender or lot reference (BT-17) to the document. In UBL, include cac:OriginatorDocumentReference/cbc:ID with a non-empty value. In CII, include ram:AdditionalReferencedDocument with ram:TypeCode set to '50' and ram:IssuerAssignedID containing the reference. If the field already exists, check that its ID is not empty or only whitespace.

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-02 rule details

Added · 2.4.0

cac:OriginatorDocumentReference/cbc:ID[boolean(normalize-space(.))]
BR-AG-06New rule

New rule requires Document level allowance VAT rate to be "0" or greater for "IPSI" allowances

The rule is new in published 2.4.0. It states that where a Document level allowance has the Document level allowance VAT category code "IPSI", the Document level allowance VAT rate shall be "0" or greater than "0". There was no corresponding rule in published 2.3.0.

fatalbusiness

Original rule text: [BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.

Explanation and fix

What this rule requires

This is a fatal rule for a document-level allowance (BG-20). In UBL it applies to cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory where cbc:ID is 'M' and the VAT scheme is 'VAT'; the VAT rate element cbc:Percent must be present and greater than or equal to 0. In CII it applies to ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false()]/ram:CategoryTradeTax where ram:CategoryCode is 'M' and ram:TypeCode is 'VAT'; ram:RateApplicablePercent must be present and greater than or equal to 0. The rule message says the VAT category code is 'IPSI' (BT-95), but the test actually selects code 'M', so the test does not check 'IPSI'.

How to fix

For the allowance with VAT category code 'M' (the code selected by the test), make sure the rate element is present and non-negative. In UBL set cbc:Percent to 0 or a positive number inside the cac:TaxCategory with cbc:ID='M'. In CII set ram:RateApplicablePercent to 0 or a positive number inside ram:CategoryTradeTax with ram:CategoryCode='M'. If your invoice uses category 'IPSI', verify whether your system maps it to 'M'; the rule as implemented only checks 'M'.

Guidance on this rule. The original text above is authoritative.

BR-AG-06 rule details

Added · 2.4.0

(cbc:Percent) >= 0
BR-AG-07New rule

New rule requires "IPSI" Document level charge VAT rates to be "0" or greater than zero.

A new rule is added for a Document level charge (BG-21) whose Document level charge VAT category code (BT-102) is "IPSI": the Document level charge VAT rate (BT-103) must be "0" or greater than zero. The added check requires the rate value to be at least "0". This check was not present in the previous version.

fatalbusiness

Original rule text: [BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.

Explanation and fix

What this rule requires

In UBL, for a cac:AllowanceCharge with cbc:ChargeIndicator=true(), the rule checks each cac:TaxCategory that has cbc:ID equal to M and a VAT tax scheme; its cbc:Percent must be 0 or greater (>= 0). In CII, for a ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=true(), it checks ram:CategoryTradeTax with ram:CategoryCode = 'M' and ram:TypeCode VAT (case-insensitive); its ram:RateApplicablePercent must be >= 0. The rule's message says the category code is IPSI, but the test in both syntaxes selects code M. The test only enforces a non-negative numeric rate; a missing rate or a negative value causes a fatal validation error.

How to fix

Set the cbc:Percent (UBL) or ram:RateApplicablePercent (CII) on the charge's tax category to a numeric value 0 or greater, e.g. 0, 5, 19. Remove any negative value or ensure the element exists. If your invoice uses a category code IPSI that is not mapped to M, the rule as written will not apply; check the code mapping used by the sender to match the test's expectation (M).

Guidance on this rule. The original text above is authoritative.

BR-AG-07 rule details

Added · 2.4.0

(cbc:Percent) >= 0
BR-AF-06New rule

A new rule requires "IGIC" document-level allowance VAT rates to be "0" or greater than zero.

A new rule has been added. It applies to a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC". In that case the Document level allowance VAT rate (BT-96) must be "0" or greater than zero. The new test checks that the rate value is at least zero.

fatalbusiness

Original rule text: [BR-AF-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.

Explanation and fix

What this rule requires

For a document-level allowance (BG-20) with VAT category code 'IGIC' (code 'L' in the rule), the rule checks the VAT rate. In UBL, the element cac:AllowanceCharge with cbc:ChargeIndicator=false() and cac:TaxCategory with cbc:ID='L' and TaxScheme VAT must have cbc:Percent >= 0. In CII, the equivalent ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax with ram:CategoryCode='L' and ram:TypeCode='VAT' must have ram:RateApplicablePercent > 0. The UBL test matches the message ('0 or greater than zero'), but the CII test is stricter, requiring greater than zero, so a zero rate fails in CII.

How to fix

In UBL, set cbc:Percent to a number equal to or greater than 0. In CII, set ram:RateApplicablePercent to a number greater than 0. If the intended rate is zero, it will pass UBL but not CII; for CII use a positive number or verify whether zero should be accepted.

Guidance on this rule. The original text above is authoritative.

BR-AF-06 rule details

Added · 2.4.0

(cbc:Percent) >= 0
BR-AG-04New rule

New rule message says "IPSI" but test checks "M"

The rule is new. Its message states it applies when the VAT category code "BT-102" is "IPSI", and requires at least one of the Seller VAT Identifier, the Seller Tax registration identifier, or the Seller tax representative VAT identifier. The check instead looks for a tax category ID of "M" under VAT, then looks for an accounting supplier party tax scheme company identifier or a tax representative party tax scheme company identifier with VAT. The stated value "IPSI" and the tested value "M" do not align.

fatalbusiness

Original rule text: [BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

Explanation and fix

What this rule requires

In XRechnung, a document-level charge (UBL: cac:AllowanceCharge with cbc:ChargeIndicator=true(); CII: ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=true()) whose VAT category code is "IPSI" (represented by code M in UBL cbc:ID or CII ram:CategoryCode, with VAT tax scheme/type code VAT) requires the invoice to include at least one of: the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or the seller tax representative VAT identifier (BT-63). The UBL test requires an existing seller cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, or a cac:TaxRepresentativeParty/cac:PartyTaxScheme[cbc:ID='VAT']/cbc:CompanyID. The CII test requires a ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID='VA' or 'FC', or a ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID='VA'. Because severity is fatal, an invoice that does not satisfy the rule fails validation. Note that the message uses "IPSI" but the test uses code M to identify that category.

How to fix

If the document-level charge is correctly IPSI (code M), add at least one required identifier: in UBL, set cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID to the seller's VAT or tax registration number, or set cac:TaxRepresentativeParty/cac:PartyTaxScheme[cbc:ID='VAT']/cbc:CompanyID to the seller tax representative VAT number. In CII, set ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID='VA' or 'FC', or ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID='VA'. If the charge is not IPSI, change the VAT category code (UBL cbc:ID or CII ram:CategoryCode) from M to another value that is valid for the invoice.

Guidance on this rule. The original text above is authoritative.

BR-AG-04 rule details

Added · 2.4.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-AF-04New rule

New rule ties document-level VAT code L charges to seller or tax representative identifiers

Why this matters

The rule was added in published 2.4.0. It is structured as an OR: either there is no document-level charge whose tax category code is L and whose tax scheme, normalized and uppercased, is VAT, or such a charge exists and at least one of three identifiers is present — a seller VAT identifier, a seller tax registration identifier, or a seller tax representative VAT identifier. The seller identifier check looks for a seller party tax scheme company identifier. The tax representative check looks for a tax representative party tax scheme company identifier with a tax scheme whose normalized, uppercased ID is VAT.

fatalbusiness

Original rule text: [BR-AF-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

Explanation and fix

What this rule requires

The rule requires that if the invoice or credit note contains a document level charge (BG-21, „Dokumentenebene Zuschlag“) whose VAT category code (BT-102) is IGIC — represented in UBL by cbc:ID = L and in CII by CategoryCode = L — then the document must also contain at least one of the Seller VAT Identifier (BT-31), Seller Tax registration identifier (BT-32), or Seller tax representative VAT identifier (BT-63). In UBL, the affected charge is cac:AllowanceCharge with cbc:ChargeIndicator=true() and cac:TaxCategory where cbc:ID = L and cac:TaxScheme/cbc:ID = VAT (case and surrounding whitespace are ignored); the identifier requirement is met by cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID or by cac:TaxRepresentativeParty/cac:PartyTaxScheme with cac:TaxScheme/cbc:ID = VAT and cbc:CompanyID. In CII, the affected charge is ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax where ram:CategoryCode = L and upper-case(ram:TypeCode) = VAT; the identifier requirement is met by ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID = VA or FC, or by ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID = VA. A fatal error means the document fails validation when such a charge exists but none of the required identifiers is present.

How to fix

Add at least one of the required seller identifiers to the invoice. In UBL, add either cbc:CompanyID under cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme (seller VAT number or tax registration number), or cbc:CompanyID under cac:TaxRepresentativeParty/cac:PartyTaxScheme with cac:TaxScheme/cbc:ID = VAT. In CII, add either ram:ID under ram:SellerTradeParty/ram:SpecifiedTaxRegistration with @schemeID = VA or FC, or ram:ID under ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration with @schemeID = VA. Ensure the value is the correct identifier for the seller or tax representative.

Guidance on this rule. The original text above is authoritative.

BR-AF-04 rule details

Added · 2.4.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[cbc:ID='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-DE-CVD-05New rule

New rule requires "cva" item attribute values to match "$CVA-CODES"

The rule set adds a new rule. Its message states that when the item attribute name is "cva", the item attribute value must contain one of the permitted values. The test expression compares the normalized item attribute value to the variable "$CVA-CODES". The evidence does not show which values are in "$CVA-CODES", only that the comparison is now required.

fatalcountry

Original rule text: [BR-DE-CVD-05] Wenn innerhalb von ITEM ATTRIBUTES (BG-32) der "Item attribute name" (BT-160) den Wert 'cva' hat, muss der "Item attribute value" (BT-161) einen der zulässigen Werte enthalten.

Explanation and fix

What this rule requires

In a document flagged as CVD, if an item attribute has the name cva (UBL: cac:AdditionalItemProperty/cbc:Name, CII: ram:ApplicableProductCharacteristic/ram:Description), the corresponding item attribute value (BT-161) must be one of clean, zero-emission, or other. The value is checked after ignoring surrounding whitespace. A document fails validation when the value is missing, only whitespace, or any other text.

How to fix

Set the item attribute value for the cva attribute to one of the allowed values: clean, zero-emission, or other (e.g. <cbc:Value>clean</cbc:Value> or <ram:Value>clean</ram:Value>). If the value is currently missing or different, correct it in the invoice data or in the system that produces it.

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-05 rule details

Added · 2.4.0

normalize-space(cbc:Value) = $CVA-CODES
BR-AF-08New rule

New rule checks "IGIC" VAT taxable amount against line totals

Why this matters

The rule is new in version 2.4.0. It checks that, for each VAT percentage in a VAT breakdown where the VAT category code is "IGIC", the taxable amount equals the sum of line net amounts plus document-level charge amounts minus document-level allowance amounts, within a tolerance of 1 unit. The comparison uses the variable $rate over the percentage values, and selects lines and charges or allowances whose classified tax category ID is "L" and whose percentage matches $rate. The same calculation applies to credit note lines when credit note lines are present instead of invoice lines. The rule is added, so the validation set now contains this constraint.

fatalbusiness

Original rule text: [BR-AF-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).

Explanation and fix

What this rule requires

This fatal rule requires that for each VAT breakdown (BG-23) with VAT category code IGIC (UBL: cbc:ID = L, CII: ram:CategoryCode = L), the VAT category taxable amount (BT-116) equals the sum of invoice line net amounts plus document-level charges minus document-level allowances, all having the same VAT rate. In UBL the test allows a tolerance of less than 1 currency unit (strictly between cbc:TaxableAmount - 1 and cbc:TaxableAmount + 1), while in CII the test requires exact equality after rounding each sum to 2 decimal places. A document fails when the taxable amount in an IGIC rate breakdown does not match that computed sum within the syntax-specific tolerance.

How to fix

In UBL, set cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxableAmount for each IGIC rate to the exact sum of cbc:LineExtensionAmount from lines with cac:Item/cac:ClassifiedTaxCategory/cbc:ID = L and matching cbc:Percent, plus cbc:Amount from cac:AllowanceCharge with cbc:ChargeIndicator=true() and the same category/rate, minus cbc:Amount from allowances with cbc:ChargeIndicator=false(). In CII, set ram:BasisAmount in ram:ApplicableTradeTax to the exact (2-decimal rounded) sum of ram:LineTotalAmount from lines with ram:ApplicableTradeTax/ram:CategoryCode = L and matching ram:RateApplicablePercent, plus ram:ActualAmount from header ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=true() and matching category/rate, minus allowances with false. Ensure all relevant line items and document-level charges/allowances use category code L and the correct rate.

Guidance on this rule. The original text above is authoritative.

BR-AF-08 rule details

Added · 2.4.0

every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))
BR-AF-01New rule

New rule requires "IGIC" VAT category in VAT breakdown.

A new rule was added. It requires that when an invoice line, a document level allowance, or a document level charge carries the VAT category code "IGIC", the VAT breakdown contains at least one VAT category code "IGIC". The test expression represents "IGIC" as the TaxCategory ID "L" with the TaxScheme ID "VAT", and checks that if any such category appears in allowances or classified tax categories, at least one appears in the tax subtotal; if none appear, none may appear in the tax subtotal.

fatalbusiness

Original rule text: [BR-AF-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC".

Explanation and fix

What this rule requires

The message says an invoice with an invoice line, a document-level allowance or a document-level charge whose VAT category code is "IGIC" must contain a VAT breakdown entry (BG-23) with that code. Both syntax tests look for the code L, not the word "IGIC".

In UBL, if a cac:AllowanceCharge/cac:TaxCategory or cac:ClassifiedTaxCategory with cbc:ID L and VAT tax scheme exists, then cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory must contain a cbc:ID L entry. The test also works the other way: if no such source category exists, the breakdown must not contain a L entry with the VAT tax scheme.

In CII, the test does not simply require one breakdown entry. If ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax has a ram:CategoryCode L, the number of those entries plus the ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax entries with L must be at least 2. The same holds for ram:CategoryTradeTax entries with L (document-level allowances and charges) plus the header entries. The CII test has no reverse check.

How to fix

In UBL, add a cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory with cbc:ID L whenever a line, allowance or charge uses L, and remove a L breakdown entry when none does. In CII, make sure a header ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax with ram:CategoryCode L exists whenever a line or document-level allowance or charge uses L. Use the code L in the document; the word "IGIC" is not matched by this rule's test.

Guidance on this rule. The original text above is authoritative.

BR-AF-01 rule details

Added · 2.4.0

((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'L']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)
BR-DE-CVD-06-bNew rule

New "2.4.0" rule: "cva" item attribute needs exactly one "CVD" classification identifier

New in "2.4.0", the rule requires that when any "Item attribute name" is "cva", the same invoice line contains exactly one "Item classification identifier" with scheme identifier "CVD". A line with a "cva" item attribute fails when the count of "CVD" classification identifiers is not exactly 1. No equivalent check existed in "2.3.0".

fatalcountry

Original rule text: [BR-DE-CVD-06-b] Wenn "Item attribute name" (BT-160) mit dem Wert 'cva' angegeben ist, muss in derselben Rechnungszeile genau ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' vorhanden sein.

Explanation and fix

What this rule requires

This fatal rule applies when an item has an "Item attribute name" (BT-160) equal to 'cva'. In that case, the same invoice line must contain exactly one "Item classification identifier" (BT-158) whose scheme identifier is 'CVD'. The document fails if the 'cva' property exists and the number of CVD classification identifiers is not exactly 1 (zero or more than one); if no 'cva' property exists, the rule passes.

How to fix

If the 'cva' item attribute is needed, ensure the item has exactly one cac:CommodityClassification/cbc:ItemClassificationCode with @listID = 'CVD' (UBL) or ram:DesignatedProductClassification/ram:ClassCode with @listID = 'CVD' (CII), and remove any duplicates. If the 'cva' property is not required, remove it from the item (the cac:AdditionalItemProperty with cbc:Name = 'cva' or the ram:ApplicableProductCharacteristic with ram:Description = 'cva').

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-06-b rule details

Added · 2.4.0

not(cac:AdditionalItemProperty[cbc:Name = 'cva']) or count(cac:CommodityClassification/cbc:ItemClassificationCode[@listID = 'CVD']) = 1
BR-AG-08New rule

A new rule checks IPSI VAT breakdown taxable amounts against line and charge sums.

Why this matters

The rule was added between published versions 2.3.0 and 2.4.0. It applies to each VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI". For each such rate, it requires the VAT category taxable amount (BT-116) to equal the sum of invoice line net amounts (BT-131) plus document level charge amounts (BT-99) minus document level allowance amounts (BT-92), considering only lines, charges, and allowances whose VAT category code is "IPSI" and whose VAT rate equals BT-119. The test allows a tolerance of one unit: the taxable amount minus 1 must be less than the computed sum, and the taxable amount plus 1 must be greater than it. The expression handles both invoice lines and credit note lines.

fatalbusiness

Original rule text: [BR-AG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).

Explanation and fix

What this rule requires

Rule BR-AG-08 requires that for each VAT rate in a VAT breakdown (BG-23) with VAT category code M (the message text says “IPSI”, but both syntax tests use the literal code M), the taxable amount equals the sum of line net amounts with that code and rate plus document-level charges minus document-level allowances with that code and rate. In UBL, the test permits a tolerance of ±1 currency unit around that sum; in CII, the comparison is exact after rounding each component sum to two decimals. A fatal error means the document does not satisfy validation if the taxable amount is outside tolerance (UBL) or not equal after rounding (CII).

How to fix

Check the taxable amount cac:TaxSubtotal/cbc:TaxableAmount (UBL) or ram:BasisAmount (CII) for the M VAT category at each rate. For UBL, set it to the sum of cbc:LineExtensionAmount from invoice lines (or cbc:LineExtensionAmount from credit note lines if cac:CreditNoteLine is present) where the line's cac:Item/cac:ClassifiedTaxCategory/cbc:ID is M and cbc:Percent equals the rate, plus document-level cac:AllowanceCharge/cbc:Amount with cbc:ChargeIndicator=true() and the same category code/rate, minus document-level allowances (cbc:ChargeIndicator=false()). For CII, set ram:BasisAmount to the sum of ram:LineTotalAmount from lines whose ram:ApplicableTradeTax/ram:CategoryCode is M and ram:RateApplicablePercent equals the rate, plus header ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount with ram:ChargeIndicator/udt:Indicator=true() and same category/rate, minus those with false, rounding each sum to two decimals. In UBL, the amount may be within 1 of this calculation; in CII it must be exactly equal after rounding.

Guidance on this rule. The original text above is authoritative.

BR-AG-08 rule details

Added · 2.4.0

every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))
BR-DE-TMP-32New rule

New rule checks for an actual delivery date, an invoicing period, or invoice line periods

The rule is new in version 2.4.0 and was not present in version 2.3.0. It checks that an invoice contains either "BT-72" (actual delivery date), "BG-14" (invoicing period), or, for every invoice line and credit note line, "BG-26" (invoice line period) via the variable "$line". The German message frames this with "sollte", a should-level requirement.

informationcountry

Original rule text: [BR-DE-TMP-32] Eine Rechnung sollte zur Angabe des Liefer-/Leistungsdatums entweder BT-72 "Actual delivery date", BG-14 "Invoicing period" oder in jeder Rechnungsposition BG-26 "Invoice line period" enthalten.

Explanation and fix

What this rule requires

This information rule recommends that an invoice indicate the delivery/service date. It is satisfied if at least one of the following is present: the header delivery date cbc:ActualDeliveryDate under cac:Delivery, the header invoicing period cac:InvoicePeriod, or an invoicing period in every invoice line or credit note line (cac:InvoicePeriod under each line). Because severity is information, a document that does not meet this is not rejected; the validator only reports it.

How to fix

To satisfy the recommendation, add at least one of these: cac:Delivery/cbc:ActualDeliveryDate, cac:InvoicePeriod, or ensure every cac:InvoiceLine/cac:CreditNoteLine contains cac:InvoicePeriod. If the invoice already has one of these, check that the element is in the expected location.

Guidance on this rule. The original text above is authoritative.

BR-DE-TMP-32 rule details

Added · 2.4.0

cac:Delivery/cbc:ActualDeliveryDate or cac:InvoicePeriod or (every $line in (cac:InvoiceLine | cac:CreditNoteLine) satisfies $line/cac:InvoicePeriod)
BR-AG-03New rule

New rule's message says "IPSI" but its test matches "M".

Why this matters

The rule is newly added in version 2.4.0. Its message states that a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63). The test expression instead matches a document-level allowance whose tax category ID is "M" and whose tax scheme is "VAT". If such an allowance is present, the rule requires at least one of those seller party identifiers; if no such allowance exists, the rule passes. The message and the test therefore refer to different category codes, "IPSI" versus "M".

fatalbusiness

Original rule text: [BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

Explanation and fix

What this rule requires

For UBL: The rule checks whether the invoice contains a document level allowance (cac:AllowanceCharge with cbc:ChargeIndicator=false) whose tax category code (cac:TaxCategory/cbc:ID) is 'M' and tax scheme ID is 'VAT'. If such an allowance exists, the invoice must also contain at least one of a seller tax identifier at cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID or a tax representative VAT identifier at cac:TaxRepresentativeParty/cac:PartyTaxScheme (with TaxScheme ID 'VAT')/cbc:CompanyID. The message says the category code is 'IPSI', but the UBL test uses value 'M'. For CII: The rule applies to document level allowances (ram:SpecifiedTradeAllowanceCharge with ram:ChargeIndicator/udt:Indicator=false) with ram:CategoryCode = 'M' and ram:TypeCode (upper-case) = 'VAT'. For those allowances the invoice must contain a SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with schemeID 'VA' or 'FC', or a SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with schemeID 'VA'. A fatal rule; a document that does not satisfy it fails validation.

How to fix

UBL: Ensure the invoice contains either cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID or cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='VAT']/cbc:CompanyID when a document level allowance with category code 'M' and VAT tax scheme is present. The UBL test does not distinguish between seller VAT identifier and seller tax registration identifier; any PartyTaxScheme CompanyID qualifies. CII: Ensure the invoice contains ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with schemeID 'VA' or 'FC', or ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with schemeID 'VA' when such an allowance is present. If the document does not contain that allowance, no change is required.

Guidance on this rule. The original text above is authoritative.

BR-AG-03 rule details

Added · 2.4.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-DE-CVD-03New rule

New rule requires a line with scheme identifier "CVD" and name "cva"

A new rule is added in published 2.4.0. The test requires at least one invoice line or credit note line whose commodity classification code has scheme identifier "CVD" and whose additional item property name is "cva". Both conditions must hold on the same line. The rule was not present in 2.3.0.

fatalcountry

Original rule text: [BR-DE-CVD-03] In einer Rechnung muss mindestens eine INVOICE LINE (BG-25) enthalten sein, in der der Scheme identifier von "Item classification identifier" (BT-158) den Wert 'CVD' und der "Item attribute name" (BT-160) den Wert 'cva' enthält.

Explanation and fix

What this rule requires

The rule applies only when the document is identified as a CVD invoice or credit note via the guideline ID. In such documents, at least one invoice line or credit note line must contain an item that has both a commodity classification with @listID equal to 'CVD' and an additional item property with the name 'cva'. If no line satisfies both conditions, the document fails validation with a fatal error.

How to fix

Add the missing data to at least one line's item. In UBL, under cac:InvoiceLine/cac:Item or cac:CreditNoteLine/cac:Item, set cac:CommodityClassification/cbc:ItemClassificationCode with @listID='CVD' and add cac:AdditionalItemProperty/cbc:Name = 'cva'. In CII, in ram:SpecifiedTradeProduct of at least one ram:IncludedSupplyChainTradeLineItem, set ram:DesignatedProductClassification/ram:ClassCode with @listID='CVD' and add ram:ApplicableProductCharacteristic/ram:Description = 'cva'.

Guidance on this rule. The original text above is authoritative.

BR-DE-CVD-03 rule details

Added · 2.4.0

(cac:InvoiceLine/cac:Item | cac:CreditNoteLine/cac:Item)[cac:CommodityClassification/cbc:ItemClassificationCode/@listID = 'CVD' and cac:AdditionalItemProperty/cbc:Name = 'cva']
BR-AF-10New rule

New rule forbids VAT exemption reasons when VAT Category code is "IGIC"

A new rule now requires that a VAT breakdown with VAT Category code "IGIC" (BT-118) shall not carry a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). The test enforces this by checking that neither the VAT exemption reason code nor the VAT exemption reason text is present. The rule applies to the VAT breakdown group BG-23.

fatalbusiness

Original rule text: [BR-AF-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).

Explanation and fix

What this rule requires

This fatal rule applies to every cac:TaxCategory inside a cac:TaxSubtotal where cbc:ID is L (the IGIC VAT category code) and the tax scheme cbc:ID is VAT (case-insensitive, ignoring surrounding whitespace). Such a category must have neither a cbc:TaxExemptionReason nor a cbc:TaxExemptionReasonCode; the presence of either element causes the invoice to fail validation. The test is not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode), so both must be absent.

How to fix

Remove the cbc:TaxExemptionReason and/or cbc:TaxExemptionReasonCode element from the affected cac:TaxCategory. In the system that generates the invoice, ensure no exemption reason text or code is emitted when the VAT category code is L (IGIC). If an exemption reason seems necessary, check the categorisation data because this rule does not name an allowed replacement.

Guidance on this rule. The original text above is authoritative.

BR-AF-10 rule details

Added · 2.4.0

not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)
BR-AG-02New rule

New rule message says "IPSI", but its test checks "M"

The rule is new in this version. Its message states that when the Invoiced item VAT category code is "IPSI", at least one of the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32), and the Seller tax representative VAT identifier (BT-63) must be present. The rule's test, however, checks for a VAT category code of "M" under a VAT tax scheme. The message and the test therefore target different VAT category codes: "IPSI" in the message, "M" in the test.

fatalbusiness

Original rule text: [BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

Explanation and fix

What this rule requires

This fatal rule applies to invoices or credit notes with an invoice line whose VAT category code is IPSI (in UBL and CII the tests select the code M). If such a line is present, the document must also include at least one seller identification: in UBL, a cbc:CompanyID inside cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme (seller VAT or tax registration) or a cbc:CompanyID inside cac:TaxRepresentativeParty/cac:PartyTaxScheme with cac:TaxScheme/cbc:ID VAT; in CII, a ram:SpecifiedTaxRegistration/ram:ID with @schemeID VA or FC under the seller trade party, or with @schemeID VA under the seller tax representative trade party. The UBL test does not restrict the seller’s PartyTaxScheme CompanyID to a specific tax scheme, so any such CompanyID satisfies the seller branch. The document fails when such a line exists but none of these identifiers are present.

How to fix

Add the missing identifier in the relevant syntax. For UBL, add cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID with the seller’s VAT or tax registration number, or add cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:CompanyID with a cac:TaxScheme/cbc:ID of VAT. For CII, add ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID VA or FC, or add ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID with @schemeID VA. If the line’s VAT category code is not actually M/IPSI, correct it to the appropriate code so this rule does not apply.

Guidance on this rule. The original text above is authoritative.

BR-AG-02 rule details

Added · 2.4.0

(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-AG-05New rule

New rule requires zero or positive VAT rate where category is IPSI

A new rule was added. It applies to an invoice line where the invoiced item VAT category code is "IPSI". The rule requires the invoiced item VAT rate to be 0 (zero) or greater than zero. The added test compares the value of "cbc:Percent" with " >= 0".

fatalbusiness

Original rule text: [BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.

Explanation and fix

What this rule requires

The rule requires that for each invoice or credit note line where the item VAT category code is 'M' (the message calls this 'IPSI', but the test and applicability conditions use code 'M') and the tax scheme is VAT, the VAT rate must be 0 or greater. In UBL this is the value of cbc:Percent inside the matching cac:ClassifiedTaxCategory; in CII it is ram:RateApplicablePercent inside the matching ram:ApplicableTradeTax. A document fails if that rate is negative.

How to fix

Set the VAT rate to 0 or any non-negative number: in UBL, change cbc:Percent; in CII, change ram:RateApplicablePercent. Ensure the line's VAT category code is indeed 'M' and the tax scheme is 'VAT'; if the line should not have code 'M', correct the category code instead. Note that despite the message mentioning 'IPSI', the rule only applies to lines with category code 'M'.

Guidance on this rule. The original text above is authoritative.

BR-AG-05 rule details

Added · 2.4.0

(cbc:Percent) >= 0
BR-IG-09Rule removed

The tax amount rounding tolerance check is removed

The rule is removed in the transition from the published version "2.3.0" to "2.4.0". Its previous test compared the absolute tax amount to the absolute taxable amount multiplied by the percentage and divided by one hundred, with the expected amount rounded to two decimal places, and allowed a difference of less than one. Because the rule is removed, documents are no longer checked against this condition.

fatalbusiness

Original rule text (before removal): [BR-IG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

BR-IG-09 rule details

Removed · 2.3.0

(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )
BR-IP-07Rule removed

Rule removed: non-negative percentage check no longer applies

The rule has been removed. Documents no longer fail this check. The previous test required the percentage element to be greater than or equal to "0".

fatalbusiness

Original rule text (before removal): [BR-IP-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.

BR-IP-07 rule details

Removed · 2.3.0

(cbc:Percent) >= 0
BR-IG-06Rule removed

Rule requiring non-negative percent removed

The rule has been removed. It previously required the percent element to be greater than or equal to 0. Documents are no longer rejected for that check.

fatalbusiness

Original rule text (before removal): [BR-IG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.

BR-IG-06 rule details

Removed · 2.3.0

(cbc:Percent) >= 0
BR-IP-03Rule removed

A rule on allowance charges with tax category ID "M" and tax scheme ID "VAT" has been removed

The rule checked for an allowance charge with a charge indicator of "false", a tax category ID of "M", and a tax scheme ID of "VAT". When such a charge was present, the rule required a company identifier for the supplier party or for a tax representative party whose tax scheme ID is "VAT". The rule has been removed entirely, so documents are no longer checked against that condition.

fatalbusiness

Original rule text (before removal): [BR-IP-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

BR-IP-03 rule details

Removed · 2.3.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-IP-08Rule removed

The tax total tolerance rule has been removed

The rule has been removed. It previously required that, for each VAT percentage, the taxable amount at that percentage was within "1" of the sum of the related line extension amounts and allowance and charge amounts, depending on whether the document had invoice lines or credit note lines. Documents are no longer evaluated against this check.

fatalbusiness

Original rule text (before removal): [BR-IP-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).

BR-IP-08 rule details

Removed · 2.3.0

every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))
BR-IG-01Rule removed

Documents no longer fail the VAT tax category consistency check

The rule has been removed from the rule set. It formerly checked whether tax categories with code "L" and scheme "VAT" in allowance or charge and classified tax category entries were matched by tax categories with code "L" in the tax total. If the allowance or classified count was greater than zero, the tax total count also had to be greater than zero; if the allowance or classified count was zero, the tax total's count of "L" under "VAT" had to be zero. Documents that previously failed this check are no longer failed on account of it.

fatalbusiness

Original rule text (before removal): [BR-IG-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC".

BR-IG-01 rule details

Removed · 2.3.0

((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'L']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)
BR-IG-05Rule removed

Percent non-negativity check removed

The rule has been removed. It previously required the percent value to be greater than or equal to "0". The change removes that check, so documents are no longer evaluated against it. The evidence does not show why the rule was removed.

fatalbusiness

Original rule text (before removal): [BR-IG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.

BR-IG-05 rule details

Removed · 2.3.0

(cbc:Percent) >= 0
BR-IG-10Rule removed

Requirement for a tax exemption reason or code removed

The rule that fired when neither a tax exemption reason nor a tax exemption reason code was present has been removed. Before removal, the rule required at least one of the two to be present. Documents lacking both are no longer checked for this condition.

fatalbusiness

Original rule text (before removal): [BR-IG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).

BR-IG-10 rule details

Removed · 2.3.0

not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)
BR-IP-02Rule removed

The check on VAT category "M" and company IDs was removed in "2.4.0".

The rule was removed between the published "2.3.0" and "2.4.0" rule sets. Documents are no longer checked for the condition. The removed test looked for a classified tax category with ID "M" under a tax scheme with ID "VAT". When that category was present, a company ID had to be present on the supplier party or on a VAT tax representative under a tax scheme with ID "VAT"; when the category was absent, the test passed.

fatalbusiness

Original rule text (before removal): [BR-IP-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

BR-IP-02 rule details

Removed · 2.3.0

(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-IG-07Rule removed

Rule requiring percentage value to be at least "0" removed

The rule has been removed. It previously tested that the percentage value was at least "0". Documents are no longer checked against that requirement.

fatalbusiness

Original rule text (before removal): [BR-IG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.

BR-IG-07 rule details

Removed · 2.3.0

(cbc:Percent) >= 0
BR-IG-08Rule removed

Category "L" total check removed; documents no longer checked against it

The rule that checked tax totals against category "L" line and allowance amounts is removed. Previously, for each tax percentage, when invoice lines or credit note lines were present, the document taxable amount had to differ by less than "1" from the sum of line extension amounts plus charge amounts minus allowance amounts for the category with ID "L" at that percentage. Now no such check exists, and documents are no longer checked against this comparison.

fatalbusiness

Original rule text (before removal): [BR-IG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).

BR-IG-08 rule details

Removed · 2.3.0

every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))
BR-IP-04Rule removed

A check requiring a supplier or tax representative company ID for VAT-exempt charges was removed

The rule has been removed from the rule set. It previously required that a document containing a VAT-exempt charge — an allowance or charge with a charge indicator equal to "true" and tax category ID "M" under a tax scheme whose identifier is "VAT" — also contain either a supplier party tax scheme company ID or a tax representative party tax scheme company ID under a tax scheme whose identifier is "VAT". With the rule removed, documents are no longer evaluated against this requirement.

fatalbusiness

Original rule text (before removal): [BR-IP-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

BR-IP-04 rule details

Removed · 2.3.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-IP-09Rule removed

Documents are no longer checked against this tax amount tolerance.

The rule has been removed from the rule set. The previous test expression compared the absolute tax amount with the taxable amount multiplied by the percentage and rounded, requiring the two to be within a difference of less than "1". Documents are no longer checked against that condition.

fatalbusiness

Original rule text (before removal): [BR-IP-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

BR-IP-09 rule details

Removed · 2.3.0

(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )
BR-IG-04Rule removed

The rule was removed, so documents are no longer rejected for this check.

The rule has been removed. Before removal, it checked a combined condition: if an allowance charge with a charge indicator of "true" carried tax category ID "L" under the VAT scheme, then either the accounting supplier party or a tax representative party under VAT had to supply a company identifier; otherwise, the rule also passed if no such allowance charge existed. Now that the rule is gone, documents are no longer rejected for that check.

fatalbusiness

Original rule text (before removal): [BR-IG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

BR-IG-04 rule details

Removed · 2.3.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[cbc:ID='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-IP-01Rule removed

Rule requiring consistency for tax categories with ID "M" in tax scheme "VAT" was removed.

The rule that required consistency for tax categories with ID "M" in tax scheme "VAT" has been removed. The check compared the number of those categories appearing in allowance or charge and classified tax categories with the number appearing in tax total subtotals: if either side had at least one, the other also had to have at least one; if either side had none, the other also had to have none. Documents are no longer assessed against this check.

fatalbusiness

Original rule text (before removal): [BR-IP-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI".

BR-IP-01 rule details

Removed · 2.3.0

((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)
BR-IG-02Rule removed

A conditional "VAT" identifier check for category "L" is removed

The rule has been removed. Previously, when a "VAT" classified tax category with ID "L" was present, the check required a company identifier from the supplier or from a "VAT" tax representative; when no such category was present, the check passed without those identifiers. Documents are no longer rejected for that check.

fatalbusiness

Original rule text (before removal): [BR-IG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

BR-IG-02 rule details

Removed · 2.3.0

(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-IP-05Rule removed

Percentage non-negativity rule removed

The rule that required the percentage value to be at least "0" has been removed between version 2.3.0 and version 2.4.0. Its former condition compared the percentage value to "0" and required it to be non-negative. Because the rule is removed, the check no longer applies.

fatalbusiness

Original rule text (before removal): [BR-IP-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.

BR-IP-05 rule details

Removed · 2.3.0

(cbc:Percent) >= 0
BR-IG-03Rule removed

The rule has been removed; documents are no longer rejected for that check.

The rule was present in published 2.3.0 and is absent in published 2.4.0. Its test condition no longer applies. Documents are no longer rejected for that check. No other change to this rule is shown.

fatalbusiness

Original rule text (before removal): [BR-IG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

BR-IG-03 rule details

Removed · 2.3.0

(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
BR-IP-10Rule removed

Documents with a tax exemption reason or code no longer fail this rule

This rule has been removed. Its test required a tax exemption reason and a tax exemption reason code to both be absent, so a document carrying either value failed. Documents are no longer required to omit either value.

fatalbusiness

Original rule text (before removal): [BR-IP-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).

BR-IP-10 rule details

Removed · 2.3.0

not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)
BR-IP-06Rule removed

Rule requiring a percentage value of at least "0" removed

The rule has been removed. It previously required the percentage value to be at least "0". Documents are no longer checked against it.

fatalbusiness

Original rule text (before removal): [BR-IP-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.

BR-IP-06 rule details

Removed · 2.3.0

(cbc:Percent) >= 0

Which of these catch you depends on your invoices.

The rule diff is the same for everyone — what breaks is not. Upload a corpus once and every subsequent release gets replayed against your own invoices, so you see what breaks for you.