Référence des règles de validation des e-factures

Recherchez n'importe quelle règle de validation d'e-facture par son ID : ce qu'elle vérifie, le test technique, quels formats l'imposent et comment corriger une infraction. Couvre le socle européen EN 16931, PEPPOL BIS 3.0, XRechnung et les profils CIUS nationaux, généré à partir du même schematron que celui exécuté par nos validateurs.

209règles documentées
196fatales (bloquantes)
12familles de règles

Affichage de209209règles

EN 16931 — core rules (59)

BR-01

fatal

An Invoice shall have a Specification identifier (BT-24).

EN 16931CIIUBLBT-24
Test technique (XPath)
normalize-space(rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID) != ''
Valider selon cette règle

BR-03

fatal

An Invoice shall have an Invoice issue date (BT-2).

EN 16931CIIUBLBT-2
Test technique (XPath)
normalize-space(rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@format='102']) != ''
Valider selon cette règle

BR-04

fatal

An Invoice shall have an Invoice type code (BT-3).

EN 16931CIIUBLBT-3
Test technique (XPath)
normalize-space(rsm:ExchangedDocument/ram:TypeCode) != ''
Valider selon cette règle

BR-05

fatal

An Invoice shall have an Invoice currency code (BT-5).

EN 16931CIIUBLBT-5
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode) != ''
Valider selon cette règle

BR-06

fatal

An Invoice shall contain the Seller name (BT-27).

EN 16931CIIUBLBT-27
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name) != ''
Valider selon cette règle

BR-07

fatal

An Invoice shall contain the Buyer name (BT-44).

EN 16931CIIUBLBT-44
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name) != ''
Valider selon cette règle

BR-08

fatal

An Invoice shall contain the Seller postal address.

EN 16931CIIUBL
Test technique (XPath)
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress
Valider selon cette règle

BR-09

fatal

The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

EN 16931CIIUBLBG-5BT-40
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''
Valider selon cette règle

BR-10

fatal

An Invoice shall contain the Buyer postal address (BG-8).

EN 16931CIIUBLBG-8
Test technique (XPath)
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress
Valider selon cette règle

BR-11

fatal

The Buyer postal address shall contain a Buyer country code (BT-55).

EN 16931CIIUBLBT-55
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''
Valider selon cette règle

BR-17

fatal

The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4).

EN 16931CIIUBLBT-59BG-10BG-4
Test technique (XPath)
(ram:Name) and (not(ram:Name = ../../ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name) and not(ram:ID = ../../ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID) and not(ram:SpecifiedLegalOrganization/ram:ID = ../../ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID))
Valider selon cette règle

BR-18

fatal

The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11).

EN 16931CIIUBLBT-62BG-4BG-11
Test technique (XPath)
(ram:Name)
Valider selon cette règle

BR-19

fatal

The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11).

EN 16931CIIUBLBG-12BG-4BG-11
Test technique (XPath)
(ram:PostalTradeAddress)
Valider selon cette règle

BR-20

fatal

The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11).

EN 16931CIIUBLBG-12BT-69BG-4BG-11
Test technique (XPath)
(ram:PostalTradeAddress/ram:CountryID)
Valider selon cette règle

BR-21

fatal

Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126).

EN 16931CIIUBLBG-25BT-126
Test technique (XPath)
normalize-space(ram:AssociatedDocumentLineDocument/ram:LineID) != ''
Valider selon cette règle

BR-22

fatal

Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).

EN 16931CIIUBLBG-25BT-129
Test technique (XPath)
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity)
Valider selon cette règle

BR-23

fatal

An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).

EN 16931CIIUBLBG-25BT-130
Test technique (XPath)
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)
Valider selon cette règle

BR-24

fatal

Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131).

EN 16931CIIUBLBG-25BT-131
Test technique (XPath)
(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)
Valider selon cette règle

BR-25

fatal

Each Invoice line (BG-25) shall contain the Item name (BT-153).

EN 16931CIIUBLBG-25BT-153
Test technique (XPath)
normalize-space(ram:SpecifiedTradeProduct/ram:Name) != ''
Valider selon cette règle

BR-26

fatal

Each Invoice line (BG-25) shall contain the Item net price (BT-146).

EN 16931CIIUBLBG-25BT-146
Test technique (XPath)
(ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount)
Valider selon cette règle

BR-29

fatal

If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73).

EN 16931CIIUBLBT-73BT-74
Valider selon cette règle

BR-30

fatal

If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134).

EN 16931CIIUBLBT-134BT-135
Valider selon cette règle

BR-31

fatal

Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92).

EN 16931CIIUBLBG-20BT-92
Test technique (XPath)
(../ram:ActualAmount)
Valider selon cette règle

BR-32

fatal

Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95).

EN 16931CIIUBLBG-20BT-95
Test technique (XPath)
(../ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Valider selon cette règle

BR-33

fatal

Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98).

EN 16931CIIUBLBG-20BT-97BT-98
Test technique (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Valider selon cette règle

BR-36

fatal

Each Document level charge (BG-21) shall have a Document level charge amount (BT-99).

EN 16931CIIUBLBG-21BT-99
Test technique (XPath)
(../ram:ActualAmount)
Valider selon cette règle

BR-37

fatal

Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102).

EN 16931CIIUBLBG-21BT-102
Test technique (XPath)
(../ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Valider selon cette règle

BR-38

fatal

Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105).

EN 16931CIIUBLBG-21BT-104BT-105
Test technique (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Valider selon cette règle

BR-41

fatal

Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136).

EN 16931CIIUBLBG-27BT-136
Test technique (XPath)
(../ram:ActualAmount)
Valider selon cette règle

BR-42

fatal

Each Invoice line allowance (BG-27) shall have an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140).

EN 16931CIIUBLBG-27BT-139BT-140
Test technique (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Valider selon cette règle

BR-43

fatal

Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141).

EN 16931CIIUBLBG-28BT-141
Test technique (XPath)
(../ram:ActualAmount)
Valider selon cette règle

BR-44

fatal

Each Invoice line charge shall have an Invoice line charge reason or an invoice line allowance reason code.

EN 16931CIIUBL
Test technique (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Valider selon cette règle

BR-47

fatal

Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118).

EN 16931CIIUBLBG-23BT-118
Test technique (XPath)
(.[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Valider selon cette règle

BR-48

fatal

Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT.

EN 16931CIIUBLBG-23BT-119
Test technique (XPath)
(.[upper-case(ram:TypeCode) = 'VAT']/ram:RateApplicablePercent) or (.[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode = 'O')
Valider selon cette règle

BR-50

fatal

A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice.

EN 16931CIIUBLBT-84BG-17
Test technique (XPath)
(ram:IBANID) or (ram:ProprietaryID)
Valider selon cette règle

BR-51

fatal

In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87).

EN 16931CIIUBLBT-87
Test technique (XPath)
string-length(ram:ID)<=10
Valider selon cette règle

BR-52

fatal

Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122).

EN 16931CIIUBLBG-24BT-122
Test technique (XPath)
normalize-space(ram:IssuerAssignedID) != ''
Valider selon cette règle

BR-53

fatal

If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided.

EN 16931CIIUBLBT-6BT-111
Test technique (XPath)
not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) or (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and (ram:TaxTotalAmount/@currencyID = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode))
Valider selon cette règle

BR-54

fatal

Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161).

EN 16931CIIUBLBG-32BT-160BT-161
Test technique (XPath)
(ram:Description) and (ram:Value)
Valider selon cette règle

BR-55

fatal

Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

EN 16931CIIUBLBG-3BT-25
Test technique (XPath)
normalize-space(ram:IssuerAssignedID) != ''
Valider selon cette règle

BR-56

fatal

Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63).

EN 16931CIIUBLBG-11BT-63
Test technique (XPath)
normalize-space(ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA']) != ''
Valider selon cette règle

BR-57

fatal

Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80).

EN 16931CIIUBLBG-15BT-80
Test technique (XPath)
(ram:ShipToTradeParty/ram:PostalTradeAddress and normalize-space(ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID) != '') or not (ram:ShipToTradeParty/ram:PostalTradeAddress)
Valider selon cette règle

BR-61

fatal

If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.

EN 16931CIIUBLBT-81BT-84
Test technique (XPath)
(ram:IBANID) or (ram:ProprietaryID)
Valider selon cette règle

BR-62

fatal

The Seller electronic address (BT-34) shall have a Scheme identifier.

EN 16931CIIUBLBT-34
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication[1]/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication)
Valider selon cette règle

BR-63

fatal

The Buyer electronic address (BT-49) shall have a Scheme identifier.

EN 16931CIIUBLBT-49
Test technique (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication[1]/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication)
Valider selon cette règle

BR-64

fatal

The Item standard identifier (BT-157) shall have a Scheme identifier.

EN 16931CIIUBLBT-157
Test technique (XPath)
normalize-space(ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID) != '' or not (ram:SpecifiedTradeProduct/ram:GlobalID)
Valider selon cette règle

BR-65

fatal

The Item classification identifier (BT-158) shall have a Scheme identifier.

EN 16931CIIUBLBT-158
Test technique (XPath)
normalize-space(ram:ClassCode/@listID) != '' or not (ram:ClassCode)
Valider selon cette règle

EN 16931 — calculation rules (18)

BR-CO-03

fatal

Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive.

EN 16931CIIUBLBT-7BT-8
Test technique (XPath)
((//ram:TaxPointDate) and not(//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and (//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and not (//ram:DueDateTypeCode))
Valider selon cette règle

BR-CO-04

fatal

Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).

EN 16931CIIUBLBG-25BT-151
Test technique (XPath)
(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Valider selon cette règle

BR-CO-05

fatal

Document level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance.

EN 16931CIIUBLBT-98BT-97
Test technique (XPath)
true()
Valider selon cette règle

BR-CO-06

fatal

Document level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge.

EN 16931CIIUBLBT-105BT-104
Test technique (XPath)
true()
Valider selon cette règle

BR-CO-07

fatal

Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason.

EN 16931CIIUBLBT-140BT-139
Test technique (XPath)
true()
Valider selon cette règle

BR-CO-08

fatal

Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason.

EN 16931CIIUBLBT-145BT-144
Test technique (XPath)
true()
Valider selon cette règle

BR-CO-09

fatal

The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix 'EL'.

EN 16931CIIUBLBT-31BT-63BT-48
Test technique (XPath)
contains(' 1A AD AE AF AG AI AL AM AN AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BL BJ 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 EL 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 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(' ', substring(.,1,2), ' '))
Valider selon cette règle

BR-CO-10

fatal

Sum of Invoice line net amount (BT-106) = Sum of Invoice line net amounts (BT-131).

EN 16931CIIUBLBT-106BT-131
Test technique (XPath)
xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)
Valider selon cette règle

BR-CO-11

fatal

Sum of allowances on document level (BT-107) = Sum of Document level allowance amounts (BT-92).

EN 16931CIIUBLBT-107BT-92
Test technique (XPath)
(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false()])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false()]/ram:ActualAmount)* 10 * 10 ) div 100)
Valider selon cette règle

BR-CO-12

fatal

Sum of charges on document level (BT-108) = Sum of Document level charge amounts (BT-99).

EN 16931CIIUBLBT-108BT-99
Test technique (XPath)
(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100)
Valider selon cette règle

BR-CO-13

fatal

Invoice total amount without VAT (BT-109) = Sum of Invoice line net amounts (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

EN 16931CIIUBLBT-109BT-131BT-107BT-108
Test technique (XPath)
(xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) - xs:decimal(ram:AllowanceTotalAmount) + xs:decimal(ram:ChargeTotalAmount)) *10 * 10) div 100) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) - xs:decimal(ram:AllowanceTotalAmount)) *10 * 10) div 100) and not (ram:ChargeTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) + xs:decimal(ram:ChargeTotalAmount)) *10 * 10) div 100) and not (ram:AllowanceTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount)) *10 * 10) div 100) and not (ram:ChargeTotalAmount) and not (ram:AllowanceTotalAmount))
Valider selon cette règle

BR-CO-15

fatal

Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).

EN 16931CIIUBLBT-112BT-109BT-110
Test technique (XPath)
every $Currency in rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode satisfies ( count ( rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=$Currency] ) eq 1 and (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:GrandTotalAmount) = round( (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxBasisTotalAmount) + (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxTotalAmount[@currencyID=$Currency]))) * 10 * 10) div 100)) or (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:GrandTotalAmount) = (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxBasisTotalAmount)))
Valider selon cette règle

BR-CO-16

fatal

Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) - Paid amount (BT-113) + Rounding amount (BT-114).

EN 16931CIIUBLBT-115BT-112BT-113BT-114
Test technique (XPath)
(xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount) - xs:decimal(ram:TotalPrepaidAmount) + xs:decimal(ram:RoundingAmount)) or ((xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount) + xs:decimal(ram:RoundingAmount)) and not (xs:decimal(ram:TotalPrepaidAmount))) or ((xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount) - xs:decimal(ram:TotalPrepaidAmount)) and not (xs:decimal(ram:RoundingAmount))) or ((xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount)) and not (xs:decimal(ram:TotalPrepaidAmount)) and not (xs:decimal(ram:RoundingAmount)))
Valider selon cette règle

BR-CO-17

fatal

VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.

EN 16931CIIUBLBT-117BT-116BT-119
Valider selon cette règle

BR-CO-18

fatal

An Invoice shall at least have one VAT breakdown group (BG-23).

EN 16931CIIUBLBG-23
Test technique (XPath)
//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax
Valider selon cette règle

BR-CO-21

fatal

Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both.

EN 16931CIIUBLBG-20BT-97BT-98
Test technique (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Valider selon cette règle

BR-CO-22

fatal

Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both.

EN 16931CIIUBLBG-21BT-104BT-105
Test technique (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Valider selon cette règle

BR-CO-25

fatal

In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present.

EN 16931CIIUBLBT-115BT-9BT-20
Valider selon cette règle

EN 16931 — VAT category rules (16)

BR-AE-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Reverse charge" shall contain in the VAT Breakdown exactly one VAT category code equal with "VAT reverse charge".

EN 16931CIIUBL
Test technique (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='AE'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='AE'])))
Valider selon cette règle

BR-AE-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Reverse charge" shall contain the Seller VAT Identifier, the Seller Tax registration identifier and/or the Seller tax representative VAT identifier and the Buyer VAT identifier and/or the Buyer legal registration identifier.

EN 16931CIIUBL
Test technique (XPath)
(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)
Valider selon cette règle

BR-AE-05

fatal

In an Invoice line where the Invoiced item VAT category code is "Reverse charge" the Invoiced item VAT rate shall be 0 (zero).

EN 16931CIIUBL
Test technique (XPath)
ram:RateApplicablePercent = 0
Valider selon cette règle

BR-AE-09

fatal

The VAT category tax amount in a VAT breakdown where the VAT category code is "Reverse charge" shall be 0 (zero).

EN 16931CIIUBL
Test technique (XPath)
../ram:CalculatedAmount = 0
Valider selon cette règle

BR-AE-10

fatal

A VAT breakdown with VAT Category code "Reverse charge" shall have a VAT exemption reason code or the VAT exemption reason text "Reverse charge".

EN 16931CIIUBL
Test technique (XPath)
(../ram:ExemptionReason) or (../ram:ExemptionReasonCode)
Valider selon cette règle

BR-E-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Exempt from VAT" shall contain exactly one VAT breakdown with the VAT category code equal to "Exempt from VAT".

EN 16931CIIUBL
Test technique (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='E'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='E'])))
Valider selon cette règle

BR-E-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Exempt from VAT" shall contain the Seller VAT Identifier, the Seller tax registration identifier and/or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Test technique (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Valider selon cette règle

BR-G-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Export outside the EU" shall contain in the VAT breakdown exactly one VAT category code equal with "Export outside the EU".

EN 16931CIIUBL
Test technique (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='G'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='G'])))
Valider selon cette règle

BR-G-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Export outside the EU" shall contain the Seller VAT Identifier or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Test technique (XPath)
(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])
Valider selon cette règle

BR-IC-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Intra-community supply" shall contain in the VAT breakdown exactly one VAT category code equal with "Intra-community supply".

EN 16931CIIUBL
Test technique (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='K'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='K'])))
Valider selon cette règle

BR-IC-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Intra-community supply" shall contain the Seller VAT Identifier or the Seller tax representative VAT identifier and the Buyer VAT identifier.

EN 16931CIIUBL
Test technique (XPath)
(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and //ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Valider selon cette règle

BR-O-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Not subject to VAT" shall contain exactly one VAT breakdown group with the VAT category code equal to "Not subject to VAT".

EN 16931CIIUBL
Test technique (XPath)
not(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='O']) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='O'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='O']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='O'])))
Valider selon cette règle

BR-S-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Standard rate" shall contain in the VAT breakdown at least one VAT category code equal with "Standard rate".

EN 16931CIIUBL
Valider selon cette règle

BR-S-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Standard rate" shall contain the Seller VAT Identifier, the Seller tax registration identifier and/or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Test technique (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Valider selon cette règle

BR-Z-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Zero rated" shall contain in the VAT breakdown exactly one VAT category code equal with "Zero rated".

EN 16931CIIUBL
Test technique (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='Z'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='Z'])))
Valider selon cette règle

BR-Z-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Zero rated" shall contain the Seller VAT Identifier, the Seller tax registration identifier and/or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Test technique (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Valider selon cette règle

EN 16931 — decimal rules (14)

BR-DEC-01

fatal

The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2.

EN 16931CIIUBLBT-92
Test technique (XPath)
string-length(substring-after(../ram:ActualAmount,'.'))<=2
Valider selon cette règle

BR-DEC-02

fatal

The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2.

EN 16931CIIUBLBT-93
Test technique (XPath)
string-length(substring-after(../ram:BasisAmount,'.'))<=2
Valider selon cette règle

BR-DEC-05

fatal

The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2.

EN 16931CIIUBLBT-99
Test technique (XPath)
string-length(substring-after(../ram:ActualAmount,'.'))<=2
Valider selon cette règle

BR-DEC-06

fatal

The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2.

EN 16931CIIUBLBT-100
Test technique (XPath)
string-length(substring-after(../ram:BasisAmount,'.'))<=2
Valider selon cette règle

BR-DEC-09

fatal

The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2.

EN 16931CIIUBLBT-106
Test technique (XPath)
string-length(substring-after(ram:LineTotalAmount,'.'))<=2
Valider selon cette règle

BR-DEC-10

fatal

The allowed maximum number of decimals for the Sum of allowances on document level (BT-107) is 2.

EN 16931CIIUBLBT-107
Test technique (XPath)
string-length(substring-after(ram:AllowanceTotalAmount,'.'))<=2
Valider selon cette règle

BR-DEC-11

fatal

The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2.

EN 16931CIIUBLBT-108
Test technique (XPath)
string-length(substring-after(ram:ChargeTotalAmount,'.'))<=2
Valider selon cette règle

BR-DEC-12

fatal

The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2.

EN 16931CIIUBLBT-109
Test technique (XPath)
string-length(substring-after(ram:TaxBasisTotalAmount,'.'))<=2
Valider selon cette règle

BR-DEC-13

fatal

The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2.

EN 16931CIIUBLBT-110
Test technique (XPath)
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[(@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode and . = round(. * 100) div 100) or not (@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode)]
Valider selon cette règle

BR-DEC-14

fatal

The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2.

EN 16931CIIUBLBT-112
Test technique (XPath)
string-length(substring-after(ram:GrandTotalAmount,'.'))<=2
Valider selon cette règle

BR-DEC-15

fatal

The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2.

EN 16931CIIUBLBT-111
Test technique (XPath)
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[(@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and . = round(. * 100) div 100) or not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode)]
Valider selon cette règle

BR-DEC-16

fatal

The allowed maximum number of decimals for the Paid amount (BT-113) is 2.

EN 16931CIIUBLBT-113
Test technique (XPath)
string-length(substring-after(ram:TotalPrepaidAmount,'.'))<=2
Valider selon cette règle

BR-DEC-17

fatal

The allowed maximum number of decimals for the Rounding amount (BT-114) is 2.

EN 16931CIIUBLBT-114
Test technique (XPath)
string-length(substring-after(ram:RoundingAmount,'.'))<=2
Valider selon cette règle

BR-DEC-18

fatal

The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.

EN 16931CIIUBLBT-115
Test technique (XPath)
string-length(substring-after(ram:DuePayableAmount,'.'))<=2
Valider selon cette règle

PEPPOL BIS 3.0 (38)

PEPPOL-COMMON-R042

fatal

Danish organization number (CVR) MUST be stated in the correct format.

PEPPOL BIS 3.0UBL
Test technique (XPath)
(string-length(string()) = 10 and substring(string(), 1, 2) = 'DK' and string-length(translate(substring(string(), 3, 8), '1234567890', '')) = 0) or (string-length(string()) = 8) and (string-length(translate(substring(string(), 1, 8),'1234567890', '')) = 0)
Valider selon cette règle

PEPPOL-COMMON-R049

fatal

Swedish organization number MUST be stated in the correct format.

PEPPOL BIS 3.0UBL
Test technique (XPath)
string-length(normalize-space()) = 10 and string(number(normalize-space())) != 'NaN' and u:checkSEOrgnr(normalize-space())
Valider selon cette règle

PEPPOL-EN16931-R004

fatal

Specification identifier MUST have the value 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'.

PEPPOL BIS 3.0UBL
Test technique (XPath)
starts-with(normalize-space(cbc:CustomizationID/text()), 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0')
Valider selon cette règle

PEPPOL-EN16931-R005

fatal

VAT accounting currency code MUST be different from invoice currency code when provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Test technique (XPath)
not(normalize-space(text()) = normalize-space(../cbc:DocumentCurrencyCode/text()))
Valider selon cette règle

PEPPOL-EN16931-R043

fatal

Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'.

PEPPOL BIS 3.0XRechnung 3.xUBL
Test technique (XPath)
normalize-space(cbc:ChargeIndicator/text()) = 'true' or normalize-space(cbc:ChargeIndicator/text()) = 'false'
Valider selon cette règle

PEPPOL-EN16931-R046

fatal

Item net price MUST equal (Gross price - Allowance amount) when gross price is provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Test technique (XPath)
not(cbc:BaseAmount) or xs:decimal(../cbc:PriceAmount) = xs:decimal(cbc:BaseAmount) - xs:decimal(cbc:Amount)
Valider selon cette règle

PEPPOL-EN16931-R051

fatal

All currencyID attributes must have the same value as the invoice currency code (BT-5), except for the invoice total VAT amount in accounting currency (BT-111).

PEPPOL BIS 3.0UBLBT-5BT-111
Test technique (XPath)
@currencyID = $documentCurrencyCode
Valider selon cette règle

PEPPOL-EN16931-R054

fatal

Only one tax total without tax subtotals MUST be provided when tax currency code is provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Test technique (XPath)
count(cac:TaxTotal[not(cac:TaxSubtotal)]) = (if (cbc:TaxCurrencyCode) then 1 else 0)
Valider selon cette règle

PEPPOL-EN16931-R055

fatal

Invoice total VAT amount and Invoice total VAT amount in accounting currency MUST have the same operational sign.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Test technique (XPath)
not(cbc:TaxCurrencyCode) or (cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:TaxCurrencyCode)] <= 0 and cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:DocumentCurrencyCode)] <= 0) or (cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:TaxCurrencyCode)] >= 0 and cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:DocumentCurrencyCode)] >= 0)
Valider selon cette règle

PEPPOL-EN16931-R101

fatal

Element Document reference can only be used for Invoice line object.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Test technique (XPath)
(not(cac:DocumentReference) or (cac:DocumentReference/cbc:DocumentTypeCode='130'))
Valider selon cette règle

PEPPOL-EN16931-R120

fatal

Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount.

PEPPOL BIS 3.0XRechnung 3.xUBL
Test technique (XPath)
u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, 0.02)
Valider selon cette règle

National CIUS (DK) (13)

DK-R-002

fatal

Danish suppliers MUST provide legal entity (CVR-number).

PEPPOL BIS 3.0UBL
Test technique (XPath)
(normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/text()) != '')
Valider selon cette règle

DK-R-003

warning

Danish Suppliers MUST provide legal entity identifier (CVR number) when Item Classification Code is TST.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listID = 'TST') and not((cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '19.05.01') or (cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '19.0501') or (cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '26.08.01') or (cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '26.0801') ) )
Valider selon cette règle

DK-R-004

fatal

Danish Suppliers MUST provide reason text when Allowance/Charge reason code is ZZZ.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cbc:AllowanceChargeReasonCode = 'ZZZ') and not(((string-length(normalize-space(cbc:AllowanceChargeReason/text())) = 4) and (number(cbc:AllowanceChargeReason) >= 0) and (number(cbc:AllowanceChargeReason) <= 9999)) or (((cbc:AllowanceChargeReason and contains(cbc:AllowanceChargeReason, '#') and not(starts-with(cbc:AllowanceChargeReason, '#')) and not(ends-with(cbc:AllowanceChargeReason, '#')))) ) ) )
Valider selon cette règle

DK-R-005

fatal

For Danish suppliers the following Payment means codes are allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97.

PEPPOL BIS 3.0UBL
Test technique (XPath)
contains(' 1 10 31 42 48 49 50 58 59 93 97 ', concat(' ', cbc:PaymentMeansCode, ' '))
Valider selon cette règle

DK-R-006

fatal

For Danish Suppliers bank account and routing numbers are mandatory for payment by bank transfer.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not(((cbc:PaymentMeansCode = '31') or (cbc:PaymentMeansCode = '42')) and not((normalize-space(cac:PayeeFinancialAccount/cbc:ID/text()) != '') and (normalize-space(cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID/text()) != '')) )
Valider selon cette règle

DK-R-007

fatal

For Danish Suppliers PaymentMandate ID and Seller account ID are mandatory for direct debit.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cbc:PaymentMeansCode = '49') and not((normalize-space(cac:PaymentMandate/cbc:ID/text()) != '') and (normalize-space(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID/text()) != '')) )
Valider selon cette règle

DK-R-008

fatal

For Danish Suppliers PaymentCard primary account number is mandatory for payment by card.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cbc:PaymentMeansCode = '50') and not(((substring(cbc:PaymentID, 1, 3) = '01#') or (substring(cbc:PaymentID, 1, 3) = '04#') or (substring(cbc:PaymentID, 1, 3) = '15#')) and matches(cac:PayeeFinancialAccount/cbc:ID, '^[0-9]{7,8}$') ) )
Valider selon cette règle

DK-R-009

fatal

For Danish Suppliers PaymentCard holder name is mandatory for payment by card.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cbc:PaymentMeansCode = '50') and ((substring(cbc:PaymentID, 1, 3) = '04#') or (substring(cbc:PaymentID, 1, 3) = '15#')) and not(string-length(cbc:PaymentID) = 19) )
Valider selon cette règle

DK-R-010

fatal

For Danish Suppliers FinancialInstitutionBranch ID is mandatory for payment type 93.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cbc:PaymentMeansCode = '93') and not(((substring(cbc:PaymentID, 1, 3) = '71#') or (substring(cbc:PaymentID, 1, 3) = '73#') or (substring(cbc:PaymentID, 1, 3) = '75#')) and (string-length(cac:PayeeFinancialAccount/cbc:ID/text()) = 8) ) )
Valider selon cette règle

DK-R-011

fatal

For Danish Suppliers PayeeFinancialAccount ID is mandatory for payment type 93.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((cbc:PaymentMeansCode = '93') and ((substring(cbc:PaymentID, 1, 3) = '71#') or (substring(cbc:PaymentID, 1, 3) = '75#')) and not((string-length(cbc:PaymentID) = 18) or (string-length(cbc:PaymentID) = 19)) )
Valider selon cette règle

DK-R-013

fatal

For Danish Suppliers only positive values are allowed for the InvoicedQuantity.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((boolean(cbc:ID)) and (normalize-space(cbc:ID/@schemeID) = '') )
Valider selon cette règle

DK-R-014

fatal

For Danish Suppliers DocumentCurrencyCode must match TaxCurrencyCode when provided.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not(((boolean(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID)) and (normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID) != '0184')) )
Valider selon cette règle

DK-R-016

fatal

For Danish Credit Notes with Danish Buyer, a preceding invoice reference must be provided.

PEPPOL BIS 3.0UBL
Test technique (XPath)
not((boolean(/ubl-creditnote:CreditNote) and ($DKCustomerCountry = 'DK')) and (number(cac:LegalMonetaryTotal/cbc:PayableAmount/text()) < 0) )
Valider selon cette règle

National CIUS (GR) (17)

GR-R-001-2

fatal

When Supplier is Greek, the Invoice ID first segment must be a valid 9 digit Tax ID.

PEPPOL BIS 3.0UBL
Test technique (XPath)
string-length(normalize-space($IdSegments[1])) = 9 and u:TinVerification($IdSegments[1]) and ($IdSegments[1] = /*/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/substring(cbc:CompanyID, 3, 9) or $IdSegments[1] = /*/cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/substring(cbc:CompanyID, 3, 9) )
Valider selon cette règle

GR-R-003

fatal

For the Greek Suppliers, the VAT must start with 'EL' and must be a valid TIN number.

PEPPOL BIS 3.0UBL
Test technique (XPath)
substring(.,1,2) = 'EL' and u:TinVerification(substring(.,3))
Valider selon cette règle

GR-R-004-1

fatal

When Supplier is Greek, there must be one MARK Number.

PEPPOL BIS 3.0UBL
Test technique (XPath)
count(cac:AdditionalDocumentReference[cbc:DocumentDescription = '##M.AR.K##'])=1
Valider selon cette règle

GR-R-006

fatal

For Greek buyers, the invoice MUST contain their VAT number.

PEPPOL BIS 3.0UBL
Test technique (XPath)
count(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID)=1 and substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,1,2) = 'EL' and u:TinVerification(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,3))
Valider selon cette règle

GR-R-008-2

fatal

When Supplier is Greek, there should be no more than one invoice url.

PEPPOL BIS 3.0UBL
Test technique (XPath)
(count(cac:AdditionalDocumentReference[cbc:DocumentDescription = '##INVOICE|URL##']) = 0 ) or (count(cac:AdditionalDocumentReference[cbc:DocumentDescription = '##INVOICE|URL##']) = 1 )
Valider selon cette règle

GR-R-009

fatal

Greek suppliers that send an invoice through the PEPPOL network must use a correct TIN number as an electronic address.

PEPPOL BIS 3.0UBL
Test technique (XPath)
./@schemeID='9933' and u:TinVerification(.)
Valider selon cette règle

GR-R-010

fatal

Greek Suppliers that send an invoice through the PEPPOL network to a greek buyer must use a correct TIN number as an electronic address.

PEPPOL BIS 3.0UBL
Test technique (XPath)
./@schemeID='9933' and u:TinVerification(.)
Valider selon cette règle

National CIUS (IS) (6)

IS-R-002

fatal

If seller is icelandic then it shall contain sellers legal id.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID) and cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID = '0196'
Valider selon cette règle

IS-R-003

fatal

If seller is icelandic then it shall contain his address with street name and zip code.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:StreetName) and exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:PostalZone)
Valider selon cette règle

IS-R-004

fatal

If seller and buyer are icelandic then the invoice shall contain the buyers icelandic legal identifier.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(cac:Party/cac:PartyLegalEntity/cbc:CompanyID) and cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID = '0196'
Valider selon cette règle

IS-R-005

fatal

If seller and buyer are icelandic then the invoice shall contain the buyers address with street name and zip code.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(cac:Party/cac:PostalAddress/cbc:StreetName) and exists(cac:Party/cac:PostalAddress/cbc:PostalZone)
Valider selon cette règle

IS-R-006

fatal

If seller is icelandic and payment means is debit transfer, a valid PayeeFinancialAccount ID must be provided.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(cac:PaymentMeans[cbc:PaymentMeansCode = '9']/cac:PayeeFinancialAccount/cbc:ID) and string-length(normalize-space(cac:PaymentMeans[cbc:PaymentMeansCode = '9']/cac:PayeeFinancialAccount/cbc:ID)) = 12 or not(exists(cac:PaymentMeans[cbc:PaymentMeansCode = '9']))
Valider selon cette règle

IS-R-007

fatal

If seller is icelandic and payment means is bank transfer, a valid PayeeFinancialAccount ID must be provided.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(cac:PaymentMeans[cbc:PaymentMeansCode = '42']/cac:PayeeFinancialAccount/cbc:ID) and string-length(normalize-space(cac:PaymentMeans[cbc:PaymentMeansCode = '42']/cac:PayeeFinancialAccount/cbc:ID)) = 12 or not(exists(cac:PaymentMeans[cbc:PaymentMeansCode = '42']))
Valider selon cette règle

National CIUS (IT) (4)

IT-R-001

fatal

For Italian suppliers BT-32 minimum length 11 and maximum length shall be 16.

PEPPOL BIS 3.0UBLBT-32
Test technique (XPath)
matches(normalize-space(cbc:CompanyID),'^[A-Z0-9]{11,16}$')
Valider selon cette règle

National CIUS (NL) (9)

NL-R-001

fatal

For suppliers in the Netherlands, if the document is a creditnote, the document MUST contain an invoice reference.

PEPPOL BIS 3.0UBL
Test technique (XPath)
/*/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID
Valider selon cette règle

NL-R-002

fatal

For suppliers in the Netherlands the supplier's address MUST contain street name, city and post code.

PEPPOL BIS 3.0UBL
Test technique (XPath)
cbc:StreetName and cbc:CityName and cbc:PostalZone
Valider selon cette règle

NL-R-003

fatal

For suppliers in the Netherlands, the legal entity identifier MUST be either a KVK or OIN number (schemeID 0106 or 0190).

PEPPOL BIS 3.0UBL
Test technique (XPath)
(contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0106 ') or contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0190 ')) and (normalize-space(.) != '')
Valider selon cette règle

NL-R-004

fatal

For suppliers in the Netherlands, if the customer is in the Netherlands, the customer address MUST contain the street name, the city and post code.

PEPPOL BIS 3.0UBL
Test technique (XPath)
cbc:StreetName and cbc:CityName and cbc:PostalZone
Valider selon cette règle

NL-R-005

fatal

For suppliers in the Netherlands, if the customer is in the Netherlands, the customer's legal entity identifier MUST be either a KVK or OIN number.

PEPPOL BIS 3.0UBL
Test technique (XPath)
(contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0106 ') or contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0190 ')) and (normalize-space(.) != '')
Valider selon cette règle

NL-R-006

fatal

For suppliers in the Netherlands, if the fiscal representative is in the Netherlands, the representative's address MUST contain street name, city and post code.

PEPPOL BIS 3.0UBL
Test technique (XPath)
cbc:StreetName and cbc:CityName and cbc:PostalZone
Valider selon cette règle

NL-R-007

fatal

For suppliers in the Netherlands, the supplier MUST provide a means of payment if the payment is from customer to supplier.

PEPPOL BIS 3.0UBL
Test technique (XPath)
(/ubl-invoice:Invoice and xs:decimal(cbc:PayableAmount) <= 0.0) or (/ubl-creditnote:CreditNote and xs:decimal(cbc:PayableAmount) >= 0.0) or (//cac:PaymentMeans)
Valider selon cette règle

NL-R-008

fatal

For suppliers in the Netherlands, the payment means code should be 30, 48, 49, 57, 58 or 59.

PEPPOL BIS 3.0UBL
Test technique (XPath)
normalize-space(cbc:PaymentMeansCode) = '30' or normalize-space(cbc:PaymentMeansCode) = '48' or normalize-space(cbc:PaymentMeansCode) = '49' or normalize-space(cbc:PaymentMeansCode) = '57' or normalize-space(cbc:PaymentMeansCode) = '58' or normalize-space(cbc:PaymentMeansCode) = '59'
Valider selon cette règle

NL-R-009

fatal

For suppliers in the Netherlands, if an order line reference is used, there must be an order reference on the document level.

PEPPOL BIS 3.0UBL
Test technique (XPath)
exists(/*/cac:OrderReference/cbc:ID)
Valider selon cette règle

National CIUS (NO) (2)

NO-R-001

fatal

Norwegian suppliers MUST provide VAT ID in correct format (12 digits + 'MVA').

PEPPOL BIS 3.0UBL
Test technique (XPath)
cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/substring(cbc:CompanyID, 1, 2)='NO' and matches(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/substring(cbc:CompanyID,3), '^[0-9]{9}MVA$') and u:mod11(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID, 3, 9)) or not(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/substring(cbc:CompanyID, 1, 2)='NO')
Valider selon cette règle

NO-R-002

warning

For Norwegian suppliers, most invoice issuers are required to append "Foretaksregisteret" to their registration.

PEPPOL BIS 3.0UBL
Test technique (XPath)
normalize-space(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'TAX']/cbc:CompanyID) = 'Foretaksregisteret'
Valider selon cette règle

National CIUS (SE) (13)

SE-R-001

fatal

For Swedish suppliers, Swedish VAT-numbers must consist of 14 characters.

PEPPOL BIS 3.0UBL
Test technique (XPath)
string-length(normalize-space(cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID)) = 14
Valider selon cette règle

SE-R-002

fatal

For Swedish suppliers, the Swedish VAT-numbers must have the trailing 12 characters in numeric form.

PEPPOL BIS 3.0UBL
Test technique (XPath)
string(number(substring(cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID, 3, 12))) != 'NaN'
Valider selon cette règle

SE-R-005

fatal

For Swedish suppliers, when using Seller tax registration identifier, 'Godkand for F-skatt' must be stated.

PEPPOL BIS 3.0UBL
Test technique (XPath)
normalize-space(upper-case(.)) = 'GODKÄND FÖR F-SKATT'
Valider selon cette règle

SE-R-006

fatal

For Swedish suppliers, only standard VAT rate of 6, 12 or 25 are used.

PEPPOL BIS 3.0UBL
Test technique (XPath)
number(cbc:Percent) = 25 or number(cbc:Percent) = 12 or number(cbc:Percent) = 6
Valider selon cette règle

SE-R-009

warning

For Swedish suppliers using Bankgiro, the Account ID must have 7-8 characters.

PEPPOL BIS 3.0UBL
Test technique (XPath)
string-length(normalize-space(.)) = 7 or string-length(normalize-space(.)) = 8
Valider selon cette règle

SE-R-010

warning

For Swedish suppliers using Plusgiro, the Account ID must have 2-8 characters.

PEPPOL BIS 3.0UBL
Test technique (XPath)
string-length(normalize-space(.)) >= 2 and string-length(normalize-space(.)) <= 8
Valider selon cette règle

SE-R-011

warning

For Swedish suppliers using Swedish Bankgiro or Plusgiro, the proper way to indicate this is to use Code 30 for PaymentMeans and FinancialInstitutionBranch ID with code SE:BANKGIRO or SE:PLUSGIRO.

PEPPOL BIS 3.0UBL
Test technique (XPath)
false()
Valider selon cette règle

SE-R-012

warning

For domestic transactions between Swedish trading partners, credit transfer should be indicated by PaymentMeansCode="30".

PEPPOL BIS 3.0UBL
Test technique (XPath)
false()
Valider selon cette règle

SE-R-013

fatal

The last digit of a Swedish organization number must be valid according to the Luhn algorithm.

PEPPOL BIS 3.0UBL
Test technique (XPath)
u:checkSEOrgnr(normalize-space(cbc:CompanyID))
Valider selon cette règle

Foire aux questions

Qu'est-ce qu'une règle de validation PEPPOL / EN 16931 ?

C'est une règle métier (identifiée par un code tel que BR-CO-13 ou PEPPOL-EN16931-R008) qu'une e-facture doit respecter pour être valide selon la norme européenne EN 16931 ou un CIUS national comme PEPPOL BIS 3.0 ou XRechnung. Les validateurs exécutent ces règles, exprimées en schematron, sur le XML de la facture.

Que signifie une règle « fatale » par rapport à un « avertissement » ?

Une règle fatale doit être respectée, sinon le destinataire rejette la facture. Un avertissement signale une erreur probable mais ne bloque pas la facture. La plupart des règles BR-* et PEPPOL-* sont fatales ; quelques-unes sont des avertissements.

Comment corriger une infraction de règle comme BR-CO-13 ?

Lisez le message de la règle : il indique exactement quels termes métier (codes BT-/BG-) doivent être présents ou doivent s'additionner. Corrigez ces champs dans votre facture, puis revalidez. aiDoks affiche l'ID et le message de la règle en échec pour chaque facture téléversée.

Quels formats utilisent ces règles ?

EN 16931 est le socle commun. PEPPOL BIS 3.0, XRechnung, Factur-X/ZUGFeRD et les profils CIUS nationaux (Allemagne, Danemark, Suède, Italie, Pays-Bas et autres) ajoutent leurs propres règles. Cette page les couvre tous.

Et si ma règle n'est pas listée ici ?

Pas d'inquiétude : cette page met en avant les règles les plus courantes, mais notre validateur contrôle toujours votre facture par rapport à l'ensemble complet des règles (toutes les règles EN 16931, PEPPOL, XRechnung et Factur-X, y compris les contrôles de syntaxe et de listes de codes non listés ici). Téléversez votre facture et vous obtiendrez chaque règle applicable, listée sur cette page ou non.

Arrêtez de deviner pourquoi votre facture a échoué

Téléversez votre facture UBL, CII ou Factur-X et aiDoks signale chaque règle en échec avec son ID et son message – gratuit, sans inscription.