A group of business terms providing information on individual Invoice lines.
請求書明細行に関する情報を提供するビジネス用語のグループ。


About

Syntax binding
ubl:Invoice / cac:InvoiceLine
Restricted Syntax Cardinality
1..n
UBL 2.1
XPath
/ Invoice / cac:InvoiceLine
Occurrence
1..n
Datatype
cac:InvoiceLineType
UBL Definition
A line describing an invoice item.
Namespace
cac urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2

Semantic

Business Term

INVOICE LINE

請求書明細行
ID
ibg-25
Description
A group of business terms providing information on individual Invoice lines.
請求書明細行に関する情報を提供するビジネス用語のグループ。
Cardinality

Child elements

  XPath Syn. Card. Semantic Card. ID Business term
 / Invoice / cac:InvoiceLine / cbc:ID 1..1 1..1 ibt-126
 / Invoice / cac:InvoiceLine / cbc:Note 0..1 0..1 ibt-127
 / Invoice / cac:InvoiceLine / cbc:InvoicedQuantity 1..1 1..1 ibt-129
 / Invoice / cac:InvoiceLine / cbc:InvoicedQuantity / @unitCode 1..1 1..1 ibt-130
 / Invoice / cac:InvoiceLine / cbc:LineExtensionAmount 1..1 1..1 ibt-131
 / Invoice / cac:InvoiceLine / cbc:LineExtensionAmount / @currencyID 1..1 1..1
 / Invoice / cac:InvoiceLine / cbc:AccountingCost 0..1 0..1 ibt-133
/ Invoice / cac:InvoiceLine / cac:InvoicePeriod 0..1 0..1 ibg-26
 / Invoice / cac:InvoiceLine / cac:InvoicePeriod / cbc:StartDate 0..1 0..1 ibt-134
 / Invoice / cac:InvoiceLine / cac:InvoicePeriod / cbc:EndDate 0..1 0..1 ibt-135
/ Invoice / cac:InvoiceLine / cac:OrderLineReference 0..1
 / Invoice / cac:InvoiceLine / cac:OrderLineReference / cbc:LineID 1..1 0..1 ibt-132
/ Invoice / cac:InvoiceLine / cac:OrderLineReference / cac:OrderReference 0..1
 / Invoice / cac:InvoiceLine / cac:OrderLineReference / cac:OrderReference / cbc:ID 1..1 0..1 ibt-183
/ Invoice / cac:InvoiceLine / cac:DespatchLineReference 0..1
 / Invoice / cac:InvoiceLine / cac:DespatchLineReference / cbc:LineID 1..1
/ Invoice / cac:InvoiceLine / cac:DespatchLineReference / cac:DocumentReference 0..1
 / Invoice / cac:InvoiceLine / cac:DespatchLineReference / cac:DocumentReference / cbc:ID 1..1 0..1 ibt-184
/ Invoice / cac:InvoiceLine / cac:DocumentReference [ not(cbc:DocumentTypeCode = '130') ] 0..1 0..1 ibg-36
 / Invoice / cac:InvoiceLine / cac:DocumentReference [ not(cbc:DocumentTypeCode = '130') ] / cbc:ID 1..1 1..1 ibt-188
 / Invoice / cac:InvoiceLine / cac:DocumentReference [ not(cbc:DocumentTypeCode = '130') ] / cbc:DocumentTypeCode 0..1 0..1 ibt-189
/ Invoice / cac:InvoiceLine / cac:DocumentReference [ cbc:DocumentTypeCode = '130' ] 0..1
 / Invoice / cac:InvoiceLine / cac:DocumentReference [ cbc:DocumentTypeCode = '130' ] / cbc:ID 1..1 0..1 ibt-128
 / Invoice / cac:InvoiceLine / cac:DocumentReference [ cbc:DocumentTypeCode = '130' ] / cbc:ID / @schemeID 0..1 0..1 ibt-128-1
 / Invoice / cac:InvoiceLine / cac:DocumentReference [ cbc:DocumentTypeCode = '130' ] / cbc:DocumentTypeCode 1..1
/ Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] 0..n 0..n ibg-27
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:ChargeIndicator 1..1
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:AllowanceChargeReasonCode 0..1 0..1 ibt-140
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:AllowanceChargeReason 0..1 0..1 ibt-139
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:MultiplierFactorNumeric 0..1 0..1 ibt-138
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:Amount 1..1 1..1 ibt-136
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:Amount / @currencyID 1..1 1..1
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:BaseAmount 0..1 0..1 ibt-137
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:BaseAmount / @currencyID 1..1 1..1
/ Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] 0..n 0..n ibg-28
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:ChargeIndicator 1..1
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:AllowanceChargeReasonCode 0..1 0..1 ibt-145
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:AllowanceChargeReason 0..1 0..1 ibt-144
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:MultiplierFactorNumeric 0..1 0..1 ibt-143
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:Amount 1..1 1..1 ibt-141
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:Amount / @currencyID 1..1 1..1
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:BaseAmount 0..1 0..1 ibt-142
 / Invoice / cac:InvoiceLine / cac:AllowanceCharge [ cbc:ChargeIndicator = true() ] / cbc:BaseAmount / @currencyID 1..1 1..1
/ Invoice / cac:InvoiceLine / cac:Item 1..1 1..1 ibg-31
 / Invoice / cac:InvoiceLine / cac:Item / cbc:Description 0..1 0..1 ibt-154
 / Invoice / cac:InvoiceLine / cac:Item / cbc:Name 1..1 1..1 ibt-153
/ Invoice / cac:InvoiceLine / cac:Item / cac:BuyersItemIdentification 0..1
 / Invoice / cac:InvoiceLine / cac:Item / cac:BuyersItemIdentification / cbc:ID 1..1 0..1 ibt-156
/ Invoice / cac:InvoiceLine / cac:Item / cac:SellersItemIdentification 0..1
 / Invoice / cac:InvoiceLine / cac:Item / cac:SellersItemIdentification / cbc:ID 1..1 0..1 ibt-155
/ Invoice / cac:InvoiceLine / cac:Item / cac:StandardItemIdentification 0..1
 / Invoice / cac:InvoiceLine / cac:Item / cac:StandardItemIdentification / cbc:ID 1..1 0..1 ibt-157
 / Invoice / cac:InvoiceLine / cac:Item / cac:StandardItemIdentification / cbc:ID / @schemeID 1..1 1..1 ibt-157-1
/ Invoice / cac:InvoiceLine / cac:Item / cac:OriginCountry 0..1
 / Invoice / cac:InvoiceLine / cac:Item / cac:OriginCountry / cbc:IdentificationCode 1..1 0..1 ibt-159
/ Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification 0..n
 / Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification / cbc:ItemClassificationCode 1..1 0..n ibt-158
 / Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification / cbc:ItemClassificationCode / @listID 1..1 1..1 ibt-158-1
 / Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification / cbc:ItemClassificationCode / @listVersionID 0..1 0..1 ibt-158-2
/ Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory 1..n 1..n ibg-30
 / Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cbc:ID 1..1 1..1 ibt-151
 / Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cbc:Percent 0..1 0..1 ibt-152
 / Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cbc:PerUnitAmount 0..1 0..1 ibt-166
/ Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cac:TaxScheme 0..1
 / Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cac:TaxScheme / cbc:ID 1..1 0..1 ibt-167
/ Invoice / cac:InvoiceLine / cac:Item / cac:AdditionalItemProperty 0..n 0..n ibg-32
 / Invoice / cac:InvoiceLine / cac:Item / cac:AdditionalItemProperty / cbc:Name 1..1 1..1 ibt-160
 / Invoice / cac:InvoiceLine / cac:Item / cac:AdditionalItemProperty / cbc:Value 1..1 1..1 ibt-161
/ Invoice / cac:InvoiceLine / cac:Price 1..1 1..1 ibg-29
 / Invoice / cac:InvoiceLine / cac:Price / cbc:PriceAmount 1..1 1..1 ibt-146
 / Invoice / cac:InvoiceLine / cac:Price / cbc:PriceAmount / @currencyID 1..1 1..1
 / Invoice / cac:InvoiceLine / cac:Price / cbc:BaseQuantity 0..1 0..1 ibt-149
 / Invoice / cac:InvoiceLine / cac:Price / cbc:BaseQuantity / @unitCode 0..1 0..1 ibt-150
/ Invoice / cac:InvoiceLine / cac:Price / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] 0..1
 / Invoice / cac:InvoiceLine / cac:Price / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:ChargeIndicator 1..1
 / Invoice / cac:InvoiceLine / cac:Price / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:Amount 1..1 0..1 ibt-147
 / Invoice / cac:InvoiceLine / cac:Price / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:Amount / @currencyID 1..1 1..1
 / Invoice / cac:InvoiceLine / cac:Price / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:BaseAmount 0..1 0..1 ibt-148
 / Invoice / cac:InvoiceLine / cac:Price / cac:AllowanceCharge [ cbc:ChargeIndicator = false() ] / cbc:BaseAmount / @currencyID 1..1 1..1

VERSION 1.0 RULES

Unchanged
Same as 0.9.3

VERSION 0.9.3 RULES
JP PINT 0.9.3 Aligned rules
aligned-ibrp-050-jp(fatal)
Added
[aligned-ibrp-050-jp]-Each Invoice line (ibg-25) MUST be categorized with an Invoiced item tax category code (ibt-151) and Invoiced item tax rate (ibt-152).
context
/ubl:InvoiceLine |
/cn:CreditNoteLine
test
(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID) and
(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:Percent)
aligned-ibrp-e-01(fatal)
Changed Message
[aligned-ibrp-e-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-095 or ibt-102) is "Exempt from tax" MUST contain exactly one tax breakdown (ibg-23) with the tax category code (ibt-118) equal to "Exempt from tax".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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']
  )
)
aligned-ibrp-e-05(fatal)
Unchanged
Same as 0.9.2
aligned-ibrp-g-01(fatal)
Changed Message
[aligned-ibrp-g-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-095 or ibt-102) is "Export" MUST contain in the tax breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Export".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']
  )
)
aligned-ibrp-g-05(fatal)
Unchanged
Same as 0.9.2
aligned-ibrp-o-01(fatal)
Changed Message
[aligned-ibrp-o-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-095 or ibt-102) is "Not subject to tax" MUST contain exactly one tax breakdown group (ibg-23) with the tax category code (ibt-118) equal to "Not subject to tax".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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']
  )
)
aligned-ibrp-o-05(fatal)
Unchanged
Same as 0.9.2
JP PINT 0.9.3 Shared rules
ibr-016(fatal)
Unchanged
Same as 0.9.2
ibr-021(fatal)
Unchanged
Same as 0.9.2
ibr-022(fatal)
Unchanged
Same as 0.9.2
ibr-023(fatal)
Changed Message
[ibr-023]-Each Invoice line (ibg-25) MUST have an Invoiced quantity unit of measure code (ibt-130).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:InvoicedQuantity/@unitCode) or
exists(cbc:CreditedQuantity/@unitCode)
ibr-024(fatal)
Unchanged
Same as 0.9.2
ibr-025(fatal)
Unchanged
Same as 0.9.2
ibr-026(fatal)
Unchanged
Same as 0.9.2
ibr-089(fatal)
Unchanged
Same as 0.9.2

VERSION 0.9.2 RULES
JP PINT 0.9.2 Aligned rules
aligned-ibrp-050(fatal)
Obsoleted
[aligned-ibrp-050]-Each Invoice line (ibg-25) MUST be categorized with an Invoiced item tax category code (ibt-151).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID)
aligned-ibrp-ae-01(fatal)
Obsoleted
[aligned-ibrp-ae-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-095 or ibt-102) is "Reverse charge" MUST contain in the tax Breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Tax reverse charge".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'AE']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'AE'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'AE']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'AE']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'AE']
  )
)
aligned-ibrp-ae-02(fatal)
Obsoleted
[aligned-ibrp-ae-02]-An Invoice that contains an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Reverse charge" MUST contain the Seller tax Identifier (ibt-31), the Seller Tax registration identifier (ibt-32) and/or the Seller tax representative tax identifier (ibt-63) and the Buyer tax identifier (ibt-48) and/or the Buyer legal registration identifier (ibt-47).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'AE'][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)) and
  (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) or
    exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or
not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
  )
)
aligned-ibrp-ae-05(fatal)
Obsoleted
[aligned-ibrp-ae-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Reverse charge" the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) =
  0
)
aligned-ibrp-e-01(fatal)
Obsoleted
[aligned-ibrp-e-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Exempt from tax" MUST contain exactly one tax breakdown (ibg-23) with the tax category code (ibt-118) equal to "Exempt from tax".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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']
  )
)
aligned-ibrp-e-02(fatal)
Obsoleted
[aligned-ibrp-e-02]-An Invoice that contains an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Exempt from tax" MUST contain the Seller tax Identifier (ibt-31), the Seller tax registration identifier (ibt-32) and/or the Seller tax representative tax identifier (ibt-63).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'E'][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) =
    'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
  )
)
aligned-ibrp-e-05(fatal)
Still valid
[aligned-ibrp-e-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Exempt from tax", the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
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']
test
(
  xs:decimal(cbc:Percent) =
  0
)
aligned-ibrp-g-01(fatal)
Obsoleted
[aligned-ibrp-g-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Export" MUST contain in the tax breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Export".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']
  )
)
aligned-ibrp-g-02(fatal)
Obsoleted
[aligned-ibrp-g-02]-An Invoice that contains an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Export" MUST contain the Seller tax Identifier (ibt-31) or the Seller tax representative tax identifier (ibt-63).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and
  (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/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) =
    'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
  )
)
aligned-ibrp-g-05(fatal)
Still valid
[aligned-ibrp-g-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Export" the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) =
  0
)
aligned-ibrp-ic-01(fatal)
Obsoleted
[aligned-ibrp-ic-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, BT-95 or BT-102) is "Intra-community supply" MUST contain in the tax breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Intra-community supply".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'K']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'K'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'K']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'K']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'K']
  )
)
aligned-ibrp-ic-02(fatal)
Obsoleted
[aligned-ibrp-ic-02]-An Invoice that contains an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Intra-community supply" MUST contain the Seller tax Identifier (ibt-31) or the Seller tax representative tax identifier (ibt-63) and the Buyer tax identifier (ibt-48).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and
  (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) or
    exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID)) and
  (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID))) or
not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
  'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
)
aligned-ibrp-ic-05(fatal)
Obsoleted
[aligned-ibrp-ic-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Intracommunity supply" the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) =
  0
)
aligned-ibrp-o-01(fatal)
Obsoleted
[aligned-ibrp-o-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Not subject to tax" MUST contain exactly one tax breakdown group (ibg-23) with the tax category code (ibt-118) equal to "Not subject to tax".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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']
  )
)
aligned-ibrp-o-02(fatal)
Obsoleted
[aligned-ibrp-o-02]-An Invoice that contains an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Not subject to tax" MUST not contain the Seller tax identifier (ibt-31), the Seller tax representative tax identifier (ibt-63) or the Buyer tax identifier (ibt-48).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and
  (
    not(
      //cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) and
    not(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) and
    not(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID))) or
not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
  'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
)
aligned-ibrp-o-05(fatal)
Still valid
[aligned-ibrp-o-05]-An Invoice line (ibg-25) where the tax category code (ibt-151) is "Not subject to tax" MUST not contain an Invoiced item tax rate (ibt-152).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
not(cbc:Percent)
aligned-ibrp-o-12(fatal)
Obsoleted
[aligned-ibrp-o-12]-An Invoice that contains a tax breakdown group (ibg-23) with a tax category code (ibt-118) "Not subject to tax" MUST not contain an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is not "Not subject to tax".
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'O']) and
  count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) =
  0) or
not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
  'O']
)
aligned-ibrp-s-01(fatal)
Obsoleted
[aligned-ibrp-s-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Standard rated" MUST contain in the tax breakdown (ibg-23) at least one tax category code (ibt-118) equal with "Standard rated".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) =
      'S']) +
    count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
      'S'])) > 0 and
  count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) =
    'S']) > 0) or
(
  (count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) =
      'S']) +
    count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
      'S'])) =
  0 and
  count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) =
    'S']) =
  0
)
aligned-ibrp-s-02(fatal)
Obsoleted
[aligned-ibrp-s-02]-An Invoice that contains an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Standard rated" MUST contain the Seller tax Identifier (ibt-31), the Seller tax registration identifier (ibt-32) and/or the Seller tax representative tax identifier (ibt-63).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'S'][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) =
    'S']
  )
)
aligned-ibrp-s-05(fatal)
Obsoleted
[aligned-ibrp-s-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Standard rated" the Invoiced item tax rate (ibt-152) MUST be greater than zero.
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) > 0
)
aligned-ibrp-z-01(fatal)
Obsoleted
[aligned-ibrp-z-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Zero rated" MUST contain in the tax breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Zero rated".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) =
      'Z']) +
    count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
      'Z'])) > 0 and
  count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) =
    'Z']) > 0) or
(
  (count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) =
      'Z']) +
    count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
      'Z'])) =
  0 and
  count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) =
    'Z']) =
  0
)
aligned-ibrp-z-05(fatal)
Obsoleted
[aligned-ibrp-z-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Zero rated" the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
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']
test
(
  xs:decimal(cbc:Percent) =
  0
)
JP PINT 0.9.2 Shared rules
ibr-016(fatal)
Still valid
[ibr-016]-An Invoice MUST have at least one Invoice line (ibg-25)
context
/ubl:Invoice |
/cn:CreditNote
test
exists(cac:InvoiceLine) or
exists(cac:CreditNoteLine)
ibr-021(fatal)
Still valid
[ibr-021]-Each Invoice line (ibg-25) MUST have an Invoice line identifier (ibt-126).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(cbc:ID) != ''
ibr-022(fatal)
Still valid
[ibr-022]-Each Invoice line (ibg-25) MUST have an invoiced quantity (ibt-129)..
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:InvoicedQuantity) or
exists(cbc:CreditedQuantity)
ibr-023(fatal)
Obsoleted
[ibr-023]-An Invoice line (ibg-25) MUST have an Invoiced quantity unit of measure code (ibt-130).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:InvoicedQuantity/@unitCode) or
exists(cbc:CreditedQuantity/@unitCode)
ibr-024(fatal)
Still valid
[ibr-024]-Each Invoice line (ibg-25) MUST have an Invoice line net amount (ibt-131).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:LineExtensionAmount)
ibr-025(fatal)
Still valid
[ibr-025]-Each Invoice line (ibg-25) MUST contain the Item name (ibt-153).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(cac:Item/cbc:Name) != ''
ibr-026(fatal)
Still valid
[ibr-026]-Each Invoice line (ibg-25) MUST contain the Item net price (ibt-146).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cac:Price/cbc:PriceAmount)
ibr-089(fatal)
Still valid
[ibr-089]-Only one invoiced object (ibt-128) is allowed per line (ibg-25).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(count(cac:DocumentReference[cbc:DocumentTypeCode =
    130]) <= 1
)

VERSION 0.9.1 RULES (Obsoleted)
Aligned rules (0.9.1)
aligned-ibrp-050-jp (fatal)
[aligned-ibrp-050-jp]-Each Invoice line (ibg-25) MUST be categorized with an Invoiced item tax category code (ibt-151) and Invoiced item tax rate (ibt-152)..
Context
/ubl:InvoiceLine |
/cn:CreditNoteLine
Test
(//cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID) and
(//cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:Percent)
aligned-ibrp-e-01 (fatal)
[aligned-ibrp-e-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Exempt from tax" MUST contain exactly one tax breakdown (ibg-23) with the tax category code (ibt-118) equal to "Exempt from tax".
Context
/ubl:Invoice |
/cn:CreditNote
Test
(
  (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']
  )
)
aligned-ibrp-g-01 (fatal)
[aligned-ibrp-g-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Export" MUST contain in the tax breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Export".
Context
/ubl:Invoice |
/cn:CreditNote
Test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']
  )
)
aligned-ibrp-o-05 (fatal)
[aligned-ibrp-o-05]-An Invoice line (ibg-25) where the tax category code (ibt-151) is "Not subject to tax" MUST not contain an Invoiced item tax rate (ibt-152).
Context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
Test
not(cbc:Percent)
aligned-ibrp-o-01 (fatal)
[aligned-ibrp-o-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Not subject to tax" MUST contain exactly one tax breakdown group (ibg-23) with the tax category code (ibt-118) equal to "Not subject to tax".
Context
/ubl:Invoice |
/cn:CreditNote
Test
(
  (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']
  )
)
aligned-ibrp-e-05 (fatal)
[aligned-ibrp-e-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Exempt from tax", the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
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']
Test
(
  xs:decimal(cbc:Percent) =
  0
)
aligned-ibrp-g-05 (fatal)
[aligned-ibrp-g-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Export" the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
Context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
Test
(
  xs:decimal(cbc:Percent) =
  0
)
Shared rules (0.9.1)
aligned-ibrp-050-jp (fatal)
[aligned-ibrp-050-jp]-Each Invoice line (ibg-25) MUST be categorized with an Invoiced item tax category code (ibt-151) and Invoiced item tax rate (ibt-152)..
Context
/ubl:InvoiceLine |
/cn:CreditNoteLine
Test
(//cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID) and
(//cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:Percent)
aligned-ibrp-e-01 (fatal)
[aligned-ibrp-e-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Exempt from tax" MUST contain exactly one tax breakdown (ibg-23) with the tax category code (ibt-118) equal to "Exempt from tax".
Context
/ubl:Invoice |
/cn:CreditNote
Test
(
  (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']
  )
)
aligned-ibrp-g-01 (fatal)
[aligned-ibrp-g-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Export" MUST contain in the tax breakdown (ibg-23) exactly one tax category code (ibt-118) equal with "Export".
Context
/ubl:Invoice |
/cn:CreditNote
Test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']
  )
)
aligned-ibrp-o-05 (fatal)
[aligned-ibrp-o-05]-An Invoice line (ibg-25) where the tax category code (ibt-151) is "Not subject to tax" MUST not contain an Invoiced item tax rate (ibt-152).
Context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
Test
not(cbc:Percent)
aligned-ibrp-o-01 (fatal)
[aligned-ibrp-o-01]-An Invoice that contains an Invoice line (ibg-25), a Document level allowance (ibg-20) or a Document level charge (ibg-21) where the tax category code (ibt-151, ibt-95 or ibt-102) is "Not subject to tax" MUST contain exactly one tax breakdown group (ibg-23) with the tax category code (ibt-118) equal to "Not subject to tax".
Context
/ubl:Invoice |
/cn:CreditNote
Test
(
  (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']
  )
)
aligned-ibrp-e-05 (fatal)
[aligned-ibrp-e-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Exempt from tax", the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
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']
Test
(
  xs:decimal(cbc:Percent) =
  0
)
aligned-ibrp-g-05 (fatal)
[aligned-ibrp-g-05]-In an Invoice line (ibg-25) where the Invoiced item tax category code (ibt-151) is "Export" the Invoiced item tax rate (ibt-152) MUST be 0 (zero).
Context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
Test
(
  xs:decimal(cbc:Percent) =
  0
)

JP PINT 0.9 RULES (Obsoleted)
Aligned Rules (0.9)
jp-br-co-04(fatal)
[jp-br-co-04]-Invoice line (ibg-25), Invoice line charge (ibg-28) and Invoice line allowance (ibg-27) shall be categorized by both Invoiced item tax category code (ibt-151) and Invoiced item tax rate (ibt-152).
Context
/ubl:Invoice[cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode = 'JP' ]/cac:InvoiceLine
Test
(//cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID) and
(//cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:Percent)
Shared Rules (0.9)
ibr-16(fatal)
[ibr-16]-An Invoice shall have at least one Invoice line (ibg-25)
Context
/ubl:Invoice | /cn:CreditNote
Test
exists(cac:InvoiceLine) or
exists(cac:CreditNoteLine)
EN16931 model bound to UBL rules
BR-16 (fatal)
An Invoice shall have at least one Invoice line (BG-25)
context
/ubl:Invoice |
/cn:CreditNote
test
exists(cac:InvoiceLine) or
exists(cac:CreditNoteLine)
BR-21 (fatal)
Each Invoice line (BG-25) shall have an Invoice line Identifier (BT-126).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(cbc:ID) != ''
BR-22 (fatal)
Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:InvoicedQuantity) or
exists(cbc:CreditedQuantity)
BR-23 (fatal)
An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:InvoicedQuantity/@unitCode) or
exists(cbc:CreditedQuantity/@unitCode)
BR-24 (fatal)
Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cbc:LineExtensionAmount)
BR-25 (fatal)
Each Invoice line (BG-25) shall contain the Item name (BT-153).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(cac:Item/cbc:Name) != ''
BR-26 (fatal)
Each Invoice line (BG-25) shall contain the Item net price (BT-146).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
exists(cac:Price/cbc:PriceAmount)
BR-AE-01 (fatal)
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 "Reverse charge" shall contain in the VAT Breakdown (BG-23) exactly one VAT category code (BT-118) equal with "VAT reverse charge".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'AE']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'AE'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'AE']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'AE']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'AE']
  )
)
BR-AE-02 (fatal)
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" 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) and the Buyer VAT Identifier (BT-48) and/or the Buyer legal registration Identifier (BT-47).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'AE'][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)) and
  (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) or
    exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or
not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
  )
)
BR-AE-05 (fatal)
In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" the Invoiced item VAT rate (BT-152) shall be 0 (zero).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) =
  0
)
BR-B-02 (fatal)
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 “Split payment" shall not contain 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”.
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (//cac:TaxCategory/cbc:ID ='B' or
    //cac:ClassifiedTaxCategory/cbc:ID =
    'B') and
  (
    not(
      //cac:TaxCategory/cbc:ID ='S' or
      //cac:ClassifiedTaxCategory/cbc:ID =
      'S'))) or
(
  not(
    //cac:TaxCategory/cbc:ID ='B' or
    //cac:ClassifiedTaxCategory/cbc:ID =
    'B'
  )
)
BR-CO-04 (fatal)
Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).
context
cac:InvoiceLine |
cac:CreditNoteLine
test
(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID)
BR-E-01 (fatal)
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 "Exempt from VAT" shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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-02 (fatal)
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT" 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).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'E'][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) =
    'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
  )
)
BR-E-05 (fatal)
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).
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']
test
(
  xs:decimal(cbc:Percent) =
  0
)
BR-G-01 (fatal)
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 "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'G']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'G']
  )
)
BR-G-02 (fatal)
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT Identifier (BT-63).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and
  (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/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) =
    'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
  )
)
BR-G-05 (fatal)
In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" the Invoiced item VAT rate (BT-152) shall be 0 (zero).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) =
  0
)
BR-IC-01 (fatal)
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 "Intra-community supply" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Intra-community supply".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'K']) or
    exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'K'])) and
  (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
      'K']) =
    1)) or
(
  not(
    //cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'K']) and
  not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'K']
  )
)
BR-IC-02 (fatal)
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT Identifier (BT-63) and the Buyer VAT Identifier (BT-48).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and
  (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) or
    exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID)) and
  (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID))) or
not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
  'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
)
BR-IC-05 (fatal)
In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intracommunity supply" the Invoiced item VAT rate (BT-152) shall be 0 (zero).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(
  xs:decimal(cbc:Percent) =
  0
)
BR-IG-01 (fatal)
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".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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-02 (fatal)
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).
context
/ubl:Invoice |
/cn:CreditNote
test
(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-IG-05 (fatal)
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.
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']|
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(cbc:Percent) >= 0
BR-IP-01 (fatal)
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".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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-IP-02 (fatal)
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).
context
/ubl:Invoice |
/cn:CreditNote
test
(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-IP-05 (fatal)
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.
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']|
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(cbc:Percent) >= 0
BR-O-01 (fatal)
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 "Not subject to VAT" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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-02 (fatal)
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Not subject to VAT" shall not contain the Seller VAT Identifier (BT-31), the Seller tax representative VAT Identifier (BT-63) or the Buyer VAT Identifier (BT-48).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and
  (
    not(
      //cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) and
    not(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID) and
    not(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) =
        'VAT')]/cbc:CompanyID))) or
not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
  'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
)
BR-O-05 (fatal)
An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT" shall not contain an Invoiced item VAT rate (BT-152).
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
not(cbc:Percent)
BR-O-12 (fatal)
An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is not "Not subject to VAT".
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
    'O']) and
  count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) =
  0) or
not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) =
  'O']
)
BR-S-01 (fatal)
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".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) =
      'S']) +
    count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
      'S'])) > 0 and
  count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) =
    'S']) > 0) or
(
  (count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) =
      'S']) +
    count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
      'S'])) =
  0 and
  count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) =
    'S']) =
  0
)
BR-S-02 (fatal)
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" 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).
context
/ubl:Invoice |
/cn:CreditNote
test
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) =
    'S'][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) =
    'S']
  )
)
BR-S-05 (fatal)
In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" the Invoiced item VAT rate (BT-152) shall be greater than zero.
context
cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] |
cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
test
(cbc:Percent) > 0
BR-Z-01 (fatal)
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 "Zero rated" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Zero rated".
context
/ubl:Invoice |
/cn:CreditNote
test
(
  (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-05 (fatal)
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).
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']
test
(
  xs:decimal(cbc:Percent) =
  0
)