Schematron for validating OIOUBL-2.1 documents. Checking OIOUBL-2.1 Invoice Pattern for validating the UBLExtensions class Pattern for validating root element, Profile and UBL version [F-INV001] Root element must be Invoice [F-INV336] The documenttype does not match an OIOUBL Invoice and can not be validated by this schematron. [F-INV002] There must be an OrderReference class for this profileID Pattern for validating the Invoice structure [F-INV007] Invalid DocumentCurrencyCode. Must contain a value [F-INV008] One or more TaxTotal class must be present [F-INV009] Invalid Invoice/ID (Invoice number). Must contain a value. [F-INV004] No more than one InvoicePeriod class may be present [W-INV010] Invalid listID. Must be '' or '' [W-INV005] Invalid listAgencyID. Must be '' [F-INV011] Invalid InvoiceTypeCode: ''. Must be a value from the codelist [F-INV337] Invalid InvoiceTypeCode: ''. Must be a value from the codelist [F-INV012] There is a LineExtensionAmount for one or more invoice lines where the currencyID does not equal the DocumentCurrencyCode [F-INV013] There is a LineExtensionAmount where the currencyID does not equal the DocumentCurrencyCode [F-INV014] There is a PayableAmount where the currencyID does not equal the DocumentCurrencyCode [F-INV016] TaxCurrencyCode must be either DKK or EUR [F-INV018] One TransactionCurrencyTaxAmount element must be present when TaxCurrencyCode element is used [F-INV339] There is a TransactionCurrencyTaxAmount where the currencyID does not equal the TaxCurrencyCode (''). [F-INV019] There is a PriceAmount where the currencyID does not equal the PricingCurrencyCode [F-INV020] One PricingExchangeRate class must be present when PricingCurrencyCode element is used [F-INV021] One PaymentExchangeRate class must be present when PaymentCurrencyCode element is used [F-INV022] One PaymentAlternativeExchangeRate class must be present when PaymentAlternativeCurrencyCode element is used Pattern for validating the InvoicePeriod class Pattern for validating the OrderReference class [F-INV024] Invalid OrderReference/ID. Must contain a value. Pattern for validating the BillingReference class [F-INV025] DebitNoteDocumentReference class must be excluded [F-INV026] AdditionalDocumentReference class must be excluded [F-INV295] BillingReferenceLine class must be excluded Pattern for validating the OriginatorDocumentReference class Pattern for validating the ReceiptDocumentReference class Pattern for validating the OriginatorDocumentReference class Pattern for validating the ContractDocumentReference class Pattern for validating the AdditionalDocumentReference class Pattern for validating the Signature class [F-INV027] Invalid Signature/ID. Must contain a value [F-INV297] No more than one PartyLegalEntity class may be present Pattern for validating the AccountingSupplierParty class [F-INV029] DataSendingCapability element must be excluded [F-INV030] Party class must be present [F-INV031] Invalid EndpointID. Must contain a value [F-INV034] One PartyLegalEntity class must be present Pattern for validating the AccountingCustomerParty class [F-INV043] One Party class must be present [F-INV044] Invalid EndpointID. Must contain a value [F-INV046] One Contact class must be present [F-INV045] No more than one PartyLegalEntity class may be present [F-INV051] Invalid AccountingCustomerParty/Contact/ID. Must contain a value. Pattern for validating the PayeeParty class [F-INV319] No more than one PartyLegalEntity class may be present Pattern for validating the BuyerCustomerParty class [F-INV061] Party class must be present [F-INV320] No more than one PartyLegalEntity class may be present Pattern for validating the SellerSupplierParty class [F-INV070] DataSendingCapability element must be excluded [F-INV071] Party class must be present [F-INV075] One PartyLegalEntity class must be present Pattern for validating the TaxRepresentativeParty class Pattern for validating the Delivery class [F-INV082] ID element must be excluded [F-INV083] Quantity element must be excluded [F-INV084] MinimumQuantity element must be excluded [F-INV085] MaximumQuantity element must be excluded [F-INV086] ActualDeliveryTime element must be excluded [F-INV087] LatestDeliveryDate element must be excluded [F-INV088] LatestDeliveryTime element must be excluded [F-INV238] DeliveryAddress class must be excluded [F-INV089] PromisedDeliveryPeriod class must be excluded [F-INV090] EstimatedDeliveryPeriod class must be excluded [F-INV239] Address is mandatory when ID is not specified [F-INV299] No more than one PartyLegalEntity class may be present Pattern for validating the DeliveryTerms class [F-INV101] AllowanceCharge class must be excluded [F-INV102] Use either ID or SpecialTerms [W-INV301] If used, use INCO terms (ID = 'INCOTERMS') [F-INV103] Use either LossRiskResponsibilityCode or LossRisk [F-INV302] Invalid DeliveryTerms/DeliveryLocation/ID. Must contain a value. Pattern for validating the PaymentMeans class Pattern for validating the PaymentTerms class Pattern for validating the PrepaidPayment class Pattern for validating the AllowanceCharge class Pattern for validating the TaxExchangeRate class Pattern for validating the PricingExchangeRate class Pattern for validating the PaymentExchangeRate class Pattern for validating the PaymentAlternativeExchangeRate class Pattern for validating the TaxTotal class Pattern for validating the LegalMonetaryTotal class [F-INV120] Invalid LineExtensionAmount. Must contain a value [F-INV122] AllowanceTotalAmount is mandatory when AllowanceCharge classes (with ChargeIndicator='false') are present [F-INV123] ChargeTotalAmount is mandatory when AllowanceCharge classes (with ChargeIndicator='true') are present [F-INV124] PrepaidAmount is mandatory when PrepaidPayment/PaidAmount elements are present [F-INV125] PayableRoundingAmount is mandatory when TaxTotal/RoundingAmount elements are present [F-INV126] The sum of InvoiceLine/LineExtensionAmount ('') elements must equal LegalMonetaryTotal/LineExtensionAmount ('') [F-INV127] The sum of TaxTotal/TaxSubtotal/TaxAmount elements must equal TaxExclusiveAmount [F-INV128] TaxInclusiveAmount is calculated incorrectly [F-INV129] The sum of AllowanceCharge/Amount elements (with ChargeIndicator='false') must equal AllowanceTotalAmount [F-INV130] The sum of AllowanceCharge/Amount elements (with ChargeIndicator='true') must equal cbc:ChargeTotalAmount [F-INV131] The sum of PrepaidPayment/PaidAmount elements must equal PrepaidAmount [F-INV132] The sum of TaxTotal/RoundingAmount elements must equal PayableRoundingAmount [F-INV338] The LegalMonetaryTotal/PayableRoundingAmount must NOT be less then -10.00 or greater then 10.00. 0.00 [F-INV133] PayableAmount is calculated incorrectly - PayableAmount ('' ) don't match total calculation ('' ) [F-INV134] The sum of PaymentTerms/Amount elements or the value of the first PaymentTerms/Amount must equal PayableAmount Pattern for validating the InvoiceLine class 1 [F-INV135] PaymentTerms class must be excluded [F-INV136] DeliveryTerms class must be excluded [F-INV137] Invalid InvoicedQuantity. Must contain a value [F-INV138] One or more TaxTotal classes must be present [F-INV139] One Price class must be present [F-INV140] Invalid InvoiceLine/ID. Must contain a value. [W-INV237] ID must be unique within the document instance [F-INV142] Invoice/OrderReference is mandatory when OrderLineReference class is present [F-INV330] Only use Delivery.ActualDeliveryDate if not specified on header level (Invoice.Delivery) [F-INV331] Only use Delivery.RequestedDeliveryPeriod if not specified on header level (Invoice.Delivery) [F-INV332] Only use Delivery.DeliveryLocation if not specified on header level (Invoice.Delivery) [F-INV333] Only use Delivery.DeliveryParty if not specified on header level (Invoice.Delivery) [F-INV335] AllowanceCharge.Amount can not be negative, if InvoicedQuantity or Price.PriceAmount is not negative. [F-INV335] AllowanceCharge.Amount can not be negative, if InvoicedQuantity or Price.PriceAmount is not negative. [W-INV323] Invoice line '' with lineExtensionAmount () cannot be evaluated since either 'cbc:CalculationRate', 'cbc:MathematicOperatorCode' or both are not present in 'Invoice/cac:PricingExchangeRate' [F-INV326] Invoice line '' with lineExtensionAmount () must equal InvoicedQuantity () * Price.PriceAmount () * Invoice.PricingExchangeRate.CalculationRate) (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply' and OrderableUnitFactorRate is not present) +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-INV344] Invoice line '' with lineExtensionAmount () must equal ((Price.PriceAmount () / Price.BaseQuantity () ) * InvoicedQuantity ()) * Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply' and OrderableUnitFactorRate is not present) +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-INV346] Invoice line '' with lineExtensionAmount () must equal Price.PriceAmount () * InvoicedQuantity () * Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply' and OrderableUnitFactorRate is not present) +/- 1.00. [F-INV327] Invoice line '' with lineExtensionAmount () must equal (InvoicedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate ()) div Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide' and OrderableUnitFactorRate is not present) +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-INV345] Invoice line '' with lineExtensionAmount () must equal ((Price.PriceAmount () / Price.BaseQuantity () ) * InvoicedQuantity ()) div Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide' and OrderableUnitFactorRate is not present) +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-INV347] Invoice line '' with lineExtensionAmount () must equal Price.PriceAmount () * InvoicedQuantity () div Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide' and OrderableUnitFactorRate is not present) +/- 1.00. [F-INV343] Invoice line '' with lineExtensionAmount () must equal InvoicedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate () +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-INV340] Invoice line '' with lineExtensionAmount () must equal (Price.PriceAmount () / Price.BaseQuantity () ) * InvoicedQuantity () +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-INV348] Invoice line '' with lineExtensionAmount () must equal Price.PriceAmount () * InvoicedQuantity () +/- 1.00. [F-INV328] Invoice line '' with lineExtensionAmount () must equal InvoicedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate () * Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply') +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-INV341] Invoice line '' with lineExtensionAmount () must equal (Price.PriceAmount () / Price.BaseQuantity () ) * InvoicedQuantity () * Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply') +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-INV349] Invoice line '' with lineExtensionAmount () must equal Price.PriceAmount () * InvoicedQuantity * Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply') +/- 1.00. [F-INV329] Invoice line '' with lineExtensionAmount () must equal (InvoicedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate ()) div Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide') +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-INV342] Invoice line '' with lineExtensionAmount () must equal ((Price.PriceAmount () / Price.BaseQuantity () ) * InvoicedQuantity ()) div Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide') +/- 1.00 (InvoicedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-INV350] Invoice line '' with lineExtensionAmount () must equal Price.PriceAmount () * InvoicedQuantity () div Invoice.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide') +/- 1.00. [F-INV147] Invalid InvoicedQuantity. Must not be zero [F-INV149] Invalid LineExtensionAmount. Must have at least 2 decimals [F-INV153] Invalid LineID. Must contain a value [F-INV314] Invalid LineID. Must contain a value [F-INV315] Invalid LineID. Must contain a value [F-INV303] DebitNoteDocumentReference class must be excluded [F-INV304] AdditionalDocumentReference class must be excluded [F-INV305] No more than one BillingReferenceLine class may be present [F-INV306] No more than one AllowanceCharge class may be present [F-INV155] ID element must be excluded [F-INV156] MinimumQuantity element must be excluded [F-INV157] MaximumQuantity element must be excluded [F-INV158] ActualDeliveryTime element must be excluded [F-INV159] LatestDeliveryDate element must be excluded [F-INV160] LatestDeliveryTime element must be excluded [F-INV240] DeliveryAddress class must be excluded [F-INV161] PromisedDeliveryPeriod class must be excluded [F-INV162] EstimatedDeliveryPeriod class must be excluded [F-INV241] Address is mandatory when ID is not specified [F-INV300] No more than one PartyLegalEntity class may be present [F-INV211] OriginCountry class must be excluded [F-INV163] Invalid Name for InvoiceLine. Must contain a value [F-INV307] No more than one Keyword element may be present [F-INV308] No more than one BrandName element may be present [F-INV309] No more than one ModelName element may be present [F-INV312] No more than one ManufacturersItemIdentification class may be present [F-INV313] No more than one AdditionalItemIdentification class may be present [F-INV321] No more than one ItemSpecificationDocumentReference class may be present [F-INV167] Invalid SellersItemIdentification/ID. Must contain a value [F-INV171] Invalid Description. Must contain a value cbc:Description[normalize-space(.) = ''] [F-INV171] Invalid Description. Must contain a value /[] [F-INV170] Invalid AttributeID. Must contain a value [F-INV227] Invalid AttributeID. Must contain a value [W-INV184] Use a Valid UNSPSC 19.0501 code [F-INV234] Invalid Name. Must contain a value [F-INV235] Invalid Value. Must contain a value [F-INV185] Invalid Item Property Group ID in InvoiceLine. Must contain a value [F-INV228] Invalid Name. Must contain a value [F-INV310] Invalid Value. Must contain a value [F-INV311] Invalid Item Property Group ID in InvoiceLine. Must contain a value [F-INV316] Invalid Name. Must contain a value [F-INV317] Invalid Value. Must contain a value [F-INV318] Invalid Item Property Group ID in InvoiceLine. Must contain a value [F-INV335] cbc:ID must contain a value. [F-INV351] Invalid cac:CertificateTypeCode: '' Must be a value from the codelist: PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary. [F-INV336] cac:CertificateTypeCode must contain a value. [F-INV338] cbc:CertificateType must contain a value. [W-INV322] The ValidityPeriod class may only be used when Preordering is the case [W-INV194] The attribute languageID should be used when more than one PriceChangeReason element is present [W-INV195] Multilanguage error. Replicated PriceChangeReason elements with same languageID attribute value [F-INV196] Invalid listID. Must be 'UN/ECE 5387'