SchXslt/${project.version} SAXON/HE 10.5 true 2021-08-31T19:20:00.249319615+02:00 Amendment commission Acceptance commission Commission for obtaining acceptance Commission on delivery Advising commission Confirmation commission Deferred payment commission Unknown SchXslt/${project.version} SAXON/HE 10.5 true 2021-08-31T19:20:00.249319615+02:00 WARNING: Rule for context "cac:AdditionalDocumentReference" shadowed by preceding rule cac:AdditionalDocumentReference cac:AdditionalDocumentReference (cbc:ID) != '' [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). BR-52 Business rules - integrity constraints (BR) WARNING: Rule for context "/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()]" shadowed by preceding rule /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()] /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()] exists(cbc:Amount) [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). BR-31 Business rules - integrity constraints (BR) exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) and (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) !='' [BR-32]-Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95). BR-32 Business rules - integrity constraints (BR) string-length(substring-after(cbc:Amount,'.'))<=2 [BR-DEC-01]-The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2. BR-DEC-01 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:BaseAmount,'.'))<=2 [BR-DEC-02]-The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2. BR-DEC-02 Business rules - Decimals (BR-DEC) WARNING: Rule for context "/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()]" shadowed by preceding rule /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()] /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()] error: Rule for context "/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()]" shadowed by preceding rule /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()] /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()] not(exists((/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/exists(cbc:amount) ))) [BR-36]-Each Document level charge (BG-21) shall have a Document level charge amount (BT-99). BR-36 Business rules - integrity constraints (BR) not(exists((/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/exists(cbc:TaxCategory/cvc:ID) ))) [BR-37]-Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102). BR-37 Business rules - integrity constraints (BR) string-length(substring-after(cbc:BaseAmount,'.'))<=2 [BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2. BR-DEC-06 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:Amount,'.'))<=2 [BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2. BR-DEC-05 Business rules - Decimals (BR-DEC) warning: Rule for context "//cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]" shadowed by preceding rule //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()] not(exists((/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/exists(cbc:amount) ))) [BR-43]-Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141). BR-43 Business rules - integrity constraints (BR) string-length(substring-after(cbc:Amount,'.'))<=2 [BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2. BR-DEC-27 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:BaseAmount,'.'))<=2 [BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2. BR-DEC-28 Business rules - Decimals (BR-DEC) error: Rule for context "cac:LegalMonetaryTotal" shadowed by preceding rule cac:LegalMonetaryTotal cac:LegalMonetaryTotal exists(cbc:TaxExclusiveAmount) [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). BR-13 Business rules - integrity constraints (BR) exists(cbc:TaxInclusiveAmount) [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). BR-14 Business rules - integrity constraints (BR) exists(cbc:PayableAmount) [BR-15]-An Invoice shall have the Amount due for payment (BT-115). BR-15 Business rules - integrity constraints (BR) (xs:decimal(cbc:LineExtensionAmount) = xs:decimal(round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100)) [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). BR-CO-10 Business rules - conditions (BR-CO) xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()])) [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). BR-CO-11 Business rules - conditions (BR-CO) xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()])) [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). BR-CO-12 Business rules - conditions (BR-CO) xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()])) [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). BR-CO-12 Business rules - conditions (BR-CO) ((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount))) [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). BR-CO-13 Business rules - conditions (BR-CO) ((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount))) [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). BR-CO-13 Business rules - conditions (BR-CO) (exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount))) [BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114). BR-CO-16 Business rules - conditions (BR-CO) string-length(substring-after(cbc:LineExtensionAmount,'.'))<=2 [BR-DEC-09]-The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2. BR-DEC-09 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:AllowanceTotalAmount,'.'))<=2 [BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2. BR-DEC-10 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:AllowanceTotalAmount,'.'))<=2 [BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2. BR-DEC-11 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:TaxExclusiveAmount,'.'))<=2 [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. BR-DEC-12 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:TaxInclusiveAmount,'.'))<=2 [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. BR-DEC-14 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:PrepaidAmount,'.'))<=2 [BR-DEC-16]-The allowed maximum number of decimals for the Pre-Paid amount (BT-113) is 2. BR-DEC-16 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:PayableRoundingAmount,'.'))<=2 [BR-DEC-17]-The allowed maximum number of decimals for the Rounding amount (BT-114) is 2. BR-DEC-17 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:PayableAmount,'.'))<=2 [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. BR-DEC-18 Business rules - Decimals (BR-DEC) WARNING: Rule for context "/ubl:Invoice | /cn:CreditNote" shadowed by preceding rule /ubl:Invoice | /cn:CreditNote /ubl:Invoice | /cn:CreditNote exists(cbc:ID) and (cbc:ID) !='' [BR-02]-An Invoice shall have an Invoice number (BT-1). BR-02 Business rules - integrity constraints (BR) exists(cbc:ID) and string-length(cbc:ID) > 127 [BR-KSA-F-06-C1] - Field character limits for Invoice number field (BT-1) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters. BR-KSA-F-06-C1 Business rules - integrity constraints (BR) exists((//cbc:Note/text()[string-length() > 1000 or string-length() < 0])[1]) [BR-KSA-F-06-C2] - Field character limits for Invoice note field (BT-22) have not been met. The maximum limit is 1000 characters. BR-KSA-F-06-C2 KSA - business rules (BR-KSA) exists(cbc:IssueDate) and (cbc:IssueDate) !='' [BR-03]-An Invoice shall have an Invoice issue date (BT-2). BR-03 Business rules - integrity constraints (BR) (exists(cbc:InvoiceTypeCode) and (cbc:InvoiceTypeCode) !='') or (exists(cbc:CreditNoteTypeCode) and (cbc:CreditNoteTypeCode) !='') [BR-04]-An Invoice shall have an Invoice type code (BT-3). BR-04 Business rules - integrity constraints (BR) exists(cbc:DocumentCurrencyCode) and (cbc:DocumentCurrencyCode) !='' [BR-05]-An Invoice shall have an Invoice currency code (BT-5). BR-05 Business rules - integrity constraints (BR) exists(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) and (cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) !='' [BR-06]-An Invoice shall contain the Seller name (BT-27). BR-06 Business rules - integrity constraints (BR) exists(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) and (string-length(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) > 127 or string-length(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) < 1) [BR-KSA-F-06-C10] - Field character limits for Seller name field (BT-27) have not been met. The minimum limit is 1 character and the maximum limit is 1000 characters. BR-KSA-F-06-C10 Business rules - length constraints(BR) exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) and (string-length(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) > 127 or string-length(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) < 1) [BR-KSA-F-06-C8] - Field character limits for the Seller Address - Province/State field (BT-39) have not been met. The maximum limit is 127 characters. BR-KSA-F-06-C8 KSA - business rules (BR-KSA) exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) and count(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) >0 [BR-08]-An Invoice shall contain the Seller postal address (BG-5) BR-08 Business rules - integrity constraints (BR) exists(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity)) and string-length(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) > 127 [BR-KSA-F-06-C27] - Field character limits for the Buyer Address - Province/State field (BT-54) have not been met. The maximum limit is 127 characters. BR-KSA-F-06-C27 KSA - business rules (BR-KSA) exists(cac:InvoiceLine) or exists(cac:CreditNoteLine) [BR-16]-An Invoice shall have at least one Invoice line (BG-25) BR-16 Business rules - integrity constraints (BR) (exists(cbc:TaxCurrencyCode) and not(every $taxcurrency in ./cac:TaxTotal/cbc:TaxAmount/@currencyID satisfies $taxcurrency = cbc:TaxCurrencyCode)) or(exists(cbc:TaxCurrencyCode) and not(every $taxamount in ./cac:TaxTotal satisfies exists($taxamount/cbc:TaxAmount))) [BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided. BR-53 Business rules - integrity constraints (BR) exists(cac:InvoiceLine/cbc:ID) and (string-length(cac:InvoiceLine/cbc:ID) > 6 or string-length(cac:InvoiceLine/cbc:ID) < 1) [BR-KSA-F-06-C17] - Field character limits for Invoice line identifier field (BT-126) have not been met. The minimum limit is 1 character and the maximum limit is 6 characters. BR-KSA-F-06-C17 Business rules - integrity constraints (BR) exists(cac:Item/cac:BuyersItemIdentification/cbc:ID) and string-length(cac:Item/cac:BuyersItemIdentification/cbc:ID) > 127 [BR-KSA-F-06-C30] - Field character limits for Item Buyer's identifier field (BT-156) have not been met. The maximum limit is 127 characters. BR-KSA-F-06-C30 Business rules - integrity constraints (BR) exists(cac:Item/cac:SellersItemIdentification/cbc:ID) and string-length(cac:Item/cac:SellersItemIdentification/cbc:ID) > 127 [BR-KSA-F-06-C31] - Field character limits for Item Seller's identifier field (BT-155) have not been met. The maximum limit is 127 characters. BR-KSA-F-06-C31 Business rules - integrity constraints (BR) exists(cac:Item/cac:StandardItemIdentification/cbc:ID) and string-length(cac:Item/cac:StandardItemIdentification/cbc:ID) > 127 [BR-KSA-F-06-C20] - Field character limits for Item standard identifier field (BT-157) have not been met. The maximum limit is 127 characters. BR-KSA-F-06-C20 Business rules - integrity constraints (BR) every $Currency in cbc:DocumentCurrencyCode satisfies (count(cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) >= 1) and (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxInclusiveAmount) = round( (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxExclusiveAmount) + sum(cac:TaxTotal/cac:TaxSubtotal/xs:decimal(cbc:TaxAmount))) * 10 * 10) div 100) [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). BR-CO-15 Business rules - conditions (BR-CO) exists(cac:TaxTotal/cac:TaxSubtotal) [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). BR-CO-18 Business rules - conditions (BR-CO) ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E'])) [BR-E-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 or BT-95 or BT-102) is "Exempt from VAT" shall contain at least one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". BR-E-01 Business rules - Exempted from VAT (BR-E) ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O'])) [BR-O-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 or BT-95 or BT-102) is "Not subject to VAT" shall contain exactly at least one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT". BR-O-01 Business rules - Not subject to VAT (BR-OO) ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S'])) [BR-S-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 "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated". BR-S-01 Business rules - VAT Standard rated (BR-S) cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] and (/ubl:Invoice/cac:AllowanceCharge/cac:TaxCategory /cbc:Percent)=0 [BR-Z-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Zero rated" the Document level charge VAT rate (BT-103) shall be 0 (zero). BR-Z-07 Business rules - Not subject to VAT (BR-OO) (xs:decimal(cbc:Percent) = 0) [BR-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). BR-E-07 Business rules - Exempted from VAT (BR-E) ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) >= 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z'])) [BR-Z-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 or BT-95 or BT-102) is "Zero rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Zero rated". BR-Z-01 Business rules - VAT zero rate (BR-Z) error: Rule for context "cac:InvoiceLine | cac:CreditNoteLine" shadowed by preceding rule cac:InvoiceLine | cac:CreditNoteLine cac:InvoiceLine | cac:CreditNoteLine exists(cac:InvoiceLine/cbc:InvoicedQuantity/@unitCode) and string-length(cac:InvoiceLine/cbc:InvoicedQuantity/@unitCode) > 127 [BR-KSA-F-06-C18] - Field character limits for Invoiced quantity unit of measure field (BT-130) have not been met. The maximum limit is 127 characters. BR-KSA-F-06-C18 Business rules - integrity constraints (BR) exists(cac:Item/cbc:Name) and (string-length(cac:Item/cbc:Name) > 1000 or string-length(cac:Item/cbc:Name) < 3) [BR-KSA-F-06-C19] - Field character limits for Item name field (BT-153) have not been met. The minimum limit is 3 character and the maximum limit is 1000 characters. BR-KSA-F-06-C19 KSA - business rules (BR-KSA) [BR-KSA-F-C-01] - Please recheck Item Description (BT-153). Providing unclear description violates the requirements specified in Article 53 of VAT Regulations. BR-KSA-F-C-01 KSA - business rules (BR-KSA) (cbc:ID) != '' [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). BR-21 Business rules - integrity constraints (BR) exists(cbc:InvoicedQuantity) or exists(cbc:CreditedQuantity) [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). BR-22 Business rules - integrity constraints (BR) exists(cbc:LineExtensionAmount) [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). BR-24 Business rules - integrity constraints (BR) (cac:Item/cbc:Name) != '' [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). BR-25 Business rules - integrity constraints (BR) exists(cac:Price/cbc:PriceAmount) [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). BR-26 Business rules - integrity constraints (BR) (cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID) [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151). BR-CO-04 Business rules - conditions (BR-CO) string-length(substring-after(cbc:LineExtensionAmount,'.'))<=2 [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. BR-DEC-23 Business rules - Decimals (BR-DEC) warning: Rule for context "//cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]" shadowed by preceding rule //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] exists(cbc:Amount) [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). BR-41 Business rules - integrity constraints (BR) string-length(substring-after(cbc:Amount,'.'))<=2 [BR-DEC-24]-The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2. BR-DEC-24 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:BaseAmount,'.'))<=2 [BR-DEC-25]-The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2. BR-DEC-25 Business rules - Decimals (BR-DEC) warning: Rule for context "//cac:AdditionalItemProperty" shadowed by preceding rule //cac:AdditionalItemProperty //cac:AdditionalItemProperty exists(cbc:Name) and exists(cbc:Value) [BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161). BR-54 Business rules - integrity constraints (BR) warning: Rule for context "cac:PaymentMeans" shadowed by preceding rule cac:PaymentMeans cac:PaymentMeans exists(cbc:PaymentMeansCode) [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). BR-49 Business rules - integrity constraints (BR) warning: Rule for context "cac:BillingReference" shadowed by preceding rule cac:BillingReference cac:BillingReference exists(cac:InvoiceDocumentReference/cbc:ID) and (cac:InvoiceDocumentReference/cbc:ID) !='' [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). BR-55 Business rules - integrity constraints (BR) warning: Rule for context "cac:AccountingSupplierParty/cac:Party/cac:PostalAddress" shadowed by preceding rule cac:AccountingSupplierParty/cac:Party/cac:PostalAddress cac:AccountingSupplierParty/cac:Party/cac:PostalAddress (cac:Country/cbc:IdentificationCode) != '' [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). BR-09 Business rules - integrity constraints (BR) warning: Rule for context "/ubl:Invoice/cac:TaxTotal | /cn:CreditNote/cac:TaxTotal" shadowed by preceding rule /ubl:Invoice/cac:TaxTotal | /cn:CreditNote/cac:TaxTotal /ubl:Invoice/cac:TaxTotal | /cn:CreditNote/cac:TaxTotal (xs:decimal(child::cbc:TaxAmount)= round((sum(cac:TaxSubtotal/xs:decimal(cbc:TaxAmount)) * 10 * 10)) div 100) or not(cac:TaxSubtotal) [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). BR-CO-14 Business rules - conditions (BR-CO) warning: Rule for context "cac:TaxTotal/cac:TaxSubtotal" shadowed by preceding rule cac:TaxTotal/cac:TaxSubtotal cac:TaxTotal/cac:TaxSubtotal exists(cbc:TaxableAmount) [BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116). BR-45 Business rules - integrity constraints (BR) exists(cbc:TaxAmount) [BR-46]-Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117). BR-46 Business rules - integrity constraints (BR) exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) [BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118). BR-47 Business rules - integrity constraints (BR) exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:Percent) or (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/normalize-space(cbc:ID)='O') [BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT. BR-48 Business rules - integrity constraints (BR) (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) = 0 and (round(xs:decimal(cbc:TaxAmount)) = 0)) or (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) != 0 and ((abs(xs:decimal(cbc:TaxAmount)) - 1 < round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ) and (abs(xs:decimal(cbc:TaxAmount)) + 1 > round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ))) or (not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent))) and (round(xs:decimal(cbc:TaxAmount)) = 0)) [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. BR-CO-17 Business rules - conditions (BR-CO) string-length(substring-after(cbc:TaxableAmount,'.'))<=2 [BR-DEC-19]-The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2. BR-DEC-19 Business rules - Decimals (BR-DEC) string-length(substring-after(cbc:TaxAmount,'.'))<=2 [BR-DEC-20]-The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2. BR-DEC-20 Business rules - Decimals (BR-DEC) warning: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] count(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])> 0 and (exists(../../../cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) or exists(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']])) or ((xs:decimal(../cbc:TaxableAmount) =(sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) ))) [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Exempt from VAT". BR-E-08 Business rules - Not subject to VAT (BR-OO) xs:decimal(../cbc:TaxAmount) = 0 [BR-E-09]-The VAT category tax amount (BT-117) In a VAT breakdown (BG-23) where the VAT category code (BT-118) equals "Exempt from VAT" shall equal 0 (zero). BR-E-09 Business rules - Exempted from VAT (BR-E) warning: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] (xs:decimal(cbc:Percent) = 0) [BR-E-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT", the Document level allowance VAT rate (BT-96) shall be 0 (zero). BR-E-06 Business rules - Exempted from VAT (BR-E) warning: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] (xs:decimal(cbc:Percent) = 0) [BR-E-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT", the Invoiced item VAT rate (BT-152) shall be 0 (zero). BR-E-05 Business rules - Exempted from VAT (BR-E) warning: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] count(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])> 0 and (exists(../../../cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) or exists(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']])) or (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount))))) [BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Not subject to VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Not subject to VAT". BR-O-08 Business rules - Not subject to VAT (BR-OO) xs:decimal(../cbc:TaxAmount) = 0 [BR-O-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Not subject to VAT" shall be 0 (zero). BR-O-09 Business rules - Not subject to VAT (BR-OO) warning: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] count(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])> 0 and (exists(../../../cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']) or exists(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']])) or ((xs:decimal(../cbc:TaxableAmount) =(sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) ))) [BR-S-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Standard rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Standard Rate". BR-S-08 Business rules - Not subject to VAT (BR-OO) (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) = 0 and (round(xs:decimal(cbc:TaxAmount)) = 0)) or (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) != 0 and ((abs(xs:decimal(cbc:TaxAmount)) - 1 < round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ) and (abs(xs:decimal(cbc:TaxAmount)) + 1 > round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ))) or (not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent))) and (round(xs:decimal(cbc:TaxAmount)) = 0)) [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119) / 100), rounded to two decimals. BR-S-09 Business rules - VAT standard and reduced rate (BR-S) not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode) [BR-S-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). BR-S-10 Business rules - VAT standard and reduced rate (BR-S) warning: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] (cbc:Percent) > 0 [BR-S-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" the Document level allowance VAT rate (BT-96) shall be greater than zero. BR-S-06 Business rules - VAT standard and reduced rate (BR-S) error: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] (cbc:Percent) > 0 [BR-S-07]--In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" the Document level charge VAT rate (BT-103) shall be greater than zero. BR-S-07 Business rules - VAT standard and reduced rate (BR-S) warning: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] count(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])> 0 and (exists(../../../cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) or exists(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']])) or ((xs:decimal(../cbc:TaxableAmount) =(sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) ))) [BR-Z-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Zero rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Zero Rated". BR-Z-08 Business rules - Not subject to VAT (BR-OO) xs:decimal(../cbc:TaxAmount) = 0 [BR-Z-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero). BR-Z-09 Business rules - VAT zero rate (BR-Z) warning: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] (xs:decimal(cbc:Percent) = 0) [BR-Z-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" the Document level allowance VAT rate (BT-96) shall be 0 (zero). BR-Z-06 Business rules - VAT zero rate (BR-Z) warning: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] (xs:decimal(cbc:Percent) = 0) [BR-Z-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Zero rated" the Invoiced item VAT rate (BT-152) shall be 0 (zero). BR-Z-05 Business rules - VAT zero rate (BR-Z) warning: Rule for context "cac:TaxTotal/cbc:TaxAmount[@currencyID = //cbc:DocumentCurrencyCode]" shadowed by preceding rule cac:TaxTotal/cbc:TaxAmount[@currencyID = //cbc:DocumentCurrencyCode] cac:TaxTotal/cbc:TaxAmount[@currencyID = //cbc:DocumentCurrencyCode] (string-length(substring-after(.,'.'))<=2) [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. BR-DEC-13 Business rules - Decimals (BR-DEC) warning: Rule for context "cac:TaxTotal/cbc:TaxAmount[@currencyID = //cbc:TaxCurrencyCode]" shadowed by preceding rule cac:TaxTotal/cbc:TaxAmount[@currencyID = //cbc:TaxCurrencyCode] cac:TaxTotal/cbc:TaxAmount[@currencyID = //cbc:TaxCurrencyCode] (string-length(substring-after(.,'.'))<=2) [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. BR-DEC-15 Business rules - Decimals (BR-DEC) warning: Rule for context "cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode" shadowed by preceding rule cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode (self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 80 82 84 130 202 203 204 211 295 325 326 380 381 383 384 385 386 387 388 389 390 393 394 395 456 457 527 575 623 633 751 780 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 396 420 458 532 ', concat(' ', normalize-space(.), ' '))))) [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. BR-CL-01 Business rules - Code lists (BR-CL) error: Rule for context "cbc:Amount | cbc:BaseAmount | cbc:PriceAmount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:TaxExclusiveAmount | cbc:TaxInclusiveAmount | cbc:AllowanceTotalAmount | cbc:ChargeTotalAmount | cbc:PrepaidAmount | cbc:PayableRoundingAmount | cbc:PayableAmount" shadowed by preceding rule cbc:Amount | cbc:BaseAmount | cbc:PriceAmount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:TaxExclusiveAmount | cbc:TaxInclusiveAmount | cbc:AllowanceTotalAmount | cbc:ChargeTotalAmount | cbc:PrepaidAmount | cbc:PayableRoundingAmount | cbc:PayableAmount cbc:Amount | cbc:BaseAmount | cbc:PriceAmount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:TaxExclusiveAmount | cbc:TaxInclusiveAmount | cbc:AllowanceTotalAmount | cbc:ChargeTotalAmount | cbc:PrepaidAmount | cbc:PayableRoundingAmount | cbc:PayableAmount ((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 HRK 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 SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(@currencyID), ' ')))) [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 BR-CL-03 Business rules - Code lists (BR-CL) warning: Rule for context "cbc:DocumentCurrencyCode" shadowed by preceding rule cbc:DocumentCurrencyCode cbc:DocumentCurrencyCode ((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 HRK 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 SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' ')))) [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 BR-CL-04 Business rules - Code lists (BR-CL) warning: Rule for context "cbc:TaxCurrencyCode" shadowed by preceding rule cbc:TaxCurrencyCode cbc:TaxCurrencyCode ((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 HRK 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 SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' ')))) [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 BR-CL-05 Business rules - Code lists (BR-CL) warning: Rule for context "cac:Country/cbc:IdentificationCode" shadowed by preceding rule cac:Country/cbc:IdentificationCode cac:Country/cbc:IdentificationCode ((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', normalize-space(.), ' ')))) [BR-CL-14]-Country codes in an invoice MUST be coded using ISO code list 3166-1 BR-CL-14 Business rules - Code lists (BR-CL) warning: Rule for context "cac:PaymentMeans/cbc:PaymentMeansCode" shadowed by preceding rule cac:PaymentMeans/cbc:PaymentMeansCode cac:PaymentMeans/cbc:PaymentMeansCode ( ( not(contains(normalize-space(.),' ')) and contains( ' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 74 75 76 77 78 91 92 93 94 95 96 97 ZZZ ',concat(' ',normalize-space(.),' ') ) ) ) [BR-CL-16]-Payment means in an invoice MUST be coded using UNCL4461 code list BR-CL-16 Business rules - Code lists (BR-CL) error: Rule for context "cac:ClassifiedTaxCategory/cbc:ID | cac:TaxSubtotal/cac:TaxCategory/cbc:ID" shadowed by preceding rule cac:ClassifiedTaxCategory/cbc:ID cac:ClassifiedTaxCategory/cbc:ID | cac:TaxSubtotal/cac:TaxCategory/cbc:ID ( ( not(contains(normalize-space(.),' ')) and contains( ' AE L M E S Z G O K B ',concat(' ',normalize-space(.),' ') ) ) ) [BR-CL-18]-Invoice tax categories MUST be coded using UNCL5305 code list. BR-CL-18 Business rules - Code lists (BR-CL) error: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" (cbc:Percent) > 0 [BR-S-05]-For invoice items (BG-25) in which the VAT category code of invoiced items (BT-151) is "Standard rated" the VAT rate of the invoiced item (BT-152) must be greater than zero. BR-S-05 Business rules - VAT standard and reduced rate (BR-S)