Schematron for validating OIOUBL-2.1 documents. Checking OIOUBL-2.1 CreditNote Pattern for validating the UBLExtensions class Pattern for validating root element, Profile and UBL version [F-CRN001] Root element must be CreditNote [F-CRN204] The documenttype does not match an OIOUBL CreditNote and can not be validated by this schematron. [F-CRN002] There must be an OrderReference class for this profileID Pattern for validating the CreditNote structure [F-CRN004] Invalid DocumentCurrencyCode. Must contain a value [F-CRN005] One or more TaxTotal class must be present [F-CRN006] Invalid CreditNote/ID (Creditnote number). Must contain a value. [F-CRN159] No more than one InvoicePeriod class may be present [F-CRN007] There is a LineExtensionAmount for one or more CreditNoteLines where the currencyID does not equal the DocumentCurrencyCode [F-CRN008] There is a LineExtensionAmount where the currencyID does not equal the DocumentCurrencyCode [F-CRN009] There is a PayableAmount where the currencyID does not equal the DocumentCurrencyCode [F-CRN011] TaxCurrencyCode must be either DKK or EUR [F-CRN013] One TransactionCurrencyTaxAmount element must be present when TaxCurrencyCode element is used [F-CRN209] There is a TransactionCurrencyTaxAmount where the currencyID does not equal the TaxCurrencyCode (''). [F-CRN014] There is a PriceAmount where the currencyID does not equal the PricingCurrencyCode [F-CRN015] One PricingExchangeRate class must be present when PricingCurrencyCode element is used [F-CRN016] One PaymentExchangeRate class must be present when PaymentCurrencyCode element is used [F-CRN017] One PaymentAlternativeExchangeRate class must be present when PaymentAlternativeCurrencyCode element is used Pattern for validating the InvoicePeriod class Pattern for validating the DiscrepancyResponse class [F-CRN161] Invalid ReferenceID. Must contain a value [F-CRN188] Use either ResponseCode or Description [F-CRN018] Invalid listID. Must be '' [F-CRN160] Invalid listAgencyID. Must be '' [F-CRN193] Invalid ResponseCode: ''. Must be a value from the codelist Pattern for validating the OrderReference class [F-CRN022] Invalid OrderReference/ID. Must contain a value. Pattern for validating the BillingReference class [F-CRN023] DebitNoteDocumentReference class must be excluded [F-CRN024] AdditionalDocumentReference class must be excluded [F-CRN162] BillingReferenceLine class must be excluded Pattern for validating the OriginatorDocumentReference class Pattern for validating the ReceiptDocumentReference class Pattern for validating the ContractDocumentReference class Pattern for validating the AdditionalDocumentReference class Pattern for validating the Signature class [F-CRN025] Invalid Signature/ID. Must contain a value. [F-CRN163] No more than one PartyLegalEntity class may be present Pattern for validating the AccountingSupplierParty class [F-CRN026] DataSendingCapability element must be excluded [F-CRN027] Party class must be present [F-CRN028] Invalid EndpointID. Must contain a value [F-CRN031] One PartyLegalEntity class must be present Pattern for validating the AccountingCustomerParty class [F-CRN039] One Party class must be present [F-CRN040] Invalid EndpointID. Must contain a value [F-CRN042] One Contact class must be present [F-CRN164] No more than one PartyLegalEntity class may be present [F-CRN047] Invalid AccountingCustomerParty/Contact/ID. Must contain a value. Pattern for validating the PayeeParty class [F-CRN166] No more than one PartyLegalEntity class may be present Pattern for validating the TaxRepresentativeParty 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 AllowanceCharge class Pattern for validating the TaxTotal class Pattern for validating the LegalMonetaryTotal class [F-CRN066] Invalid LineExtensionAmount. Must contain a value [F-CRN068] AllowanceTotalAmount is mandatory when AllowanceCharge classes (with ChargeIndicator='false') are present [F-CRN069] ChargeTotalAmount is mandatory when AllowanceCharge classes (with ChargeIndicator='true') are present [F-CRN071] PayableRoundingAmount is mandatory when TaxTotal/RoundingAmount elements are present [F-CRN072] The sum of CreditNoteLine/LineExtensionAmount ('') elements must equal LineExtensionAmount ('') [F-CRN073] The sum of TaxTotal/TaxSubtotal/TaxAmount elements must equal TaxExclusiveAmount [F-CRN074] TaxInclusiveAmount is calculated incorrectly [F-CRN075] The sum of AllowanceCharge/Amount elements (with ChargeIndicator='false') must equal AllowanceTotalAmount [F-CRN076] The sum of AllowanceCharge/Amount elements (with ChargeIndicator='true') must equal cbc:ChargeTotalAmount [F-CRN078] The sum of TaxTotal/RoundingAmount elements must equal PayableRoundingAmount [F-CRN208] The LegalMonetaryTotal/PayableRoundingAmount must NOT be less then -10.00 or greater then 10.00. 0.00 [F-CRN079] PayableAmount is calculated incorrectly - PayableAmount ('' ) don't match total calculation ('' ) Pattern for validating the CreditNoteLine class [F-CRN196] Invalid CreditedQuantity. Must contain a value [F-CRN081] One or more TaxTotal class must be present [F-CRN082] One Item class must be present when CreditNoteLine/BillingReference is not specified [F-CRN083] One Price class must be present when CreditNoteLine/BillingReference is not specified [F-CRN084] Invalid CreditNoteLine/ID. Must contain a value. [F-CRN203] AllowanceCharge.Amount can not be negative, if CreditedQuantity or Price.PriceAmount is not negative. [W-CRN154] CreditNote line '' with lineExtensionAmount () cannot be evaluated since either 'cbc:CalculationRate', 'cbc:MathematicOperatorCode' or both are not present in 'CreditNote/cac:PricingExchangeRate' [F-CRN212] CreditNote line '' with lineExtensionAmount () must equal CreditedQuantity () * Price.PriceAmount () * CreditNote.PricingExchangeRate.CalculationRate) (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply' and OrderableUnitFactorRate is not present) +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-CRN213] CreditNote line '' with lineExtensionAmount () must equal ((Price.PriceAmount () / Price.BaseQuantity () ) * CreditedQuantity ()) * CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply' and OrderableUnitFactorRate is not present) +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-CRN198] CreditNote line '' with lineExtensionAmount () must equal Price.PriceAmount () * CreditedQuantity () * CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply' and OrderableUnitFactorRate is not present) +/- 1.00. [F-CRN214] CreditNote line '' with lineExtensionAmount () must equal (CreditedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate ()) div CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide' and OrderableUnitFactorRate is not present) +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-CRN215] CreditNote line '' with lineExtensionAmount () must equal ((Price.PriceAmount () / Price.BaseQuantity () ) * CreditedQuantity ()) div CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide' and OrderableUnitFactorRate is not present) +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-CRN199] CreditNote line '' with lineExtensionAmount () must equal Price.PriceAmount () * CreditedQuantity () div CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide' and OrderableUnitFactorRate is not present) +/- 1.00. [F-CRN194] CreditNote line '' with lineExtensionAmount () must equal CreditedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate () +/- 1.00 (CreditedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-CRN210] CreditNote line '' with lineExtensionAmount () must equal (Price.PriceAmount () / Price.BaseQuantity () ) * CreditedQuantity () +/- 1.00 (CreditedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-CRN216] CreditNote line '' with lineExtensionAmount () must equal Price.PriceAmount () * CreditedQuantity () +/- 1.00. [F-CRN200] CreditNote line '' with lineExtensionAmount () must equal CreditedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate () * CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply') +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-CRN217] CreditNote line '' with lineExtensionAmount () must equal (Price.PriceAmount () / Price.BaseQuantity () ) * CreditedQuantity () * CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply') +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-CRN218] CreditNote line '' with lineExtensionAmount () must equal Price.PriceAmount () * CreditedQuantity * CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'multiply') +/- 1.00. [F-CRN201] CreditNote line '' with lineExtensionAmount () must equal (CreditedQuantity () * Price.PriceAmount () * Price.OrderableUnitFactorRate ()) div CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide') +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are not equal) [F-CRN219] CreditNote line '' with lineExtensionAmount () must equal ((Price.PriceAmount () / Price.BaseQuantity () ) * CreditedQuantity ()) div CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide') +/- 1.00 (CreditNotedQuantity unitCode and Price.BaseQuantity unitCode are equal) [F-CRN220] CreditNote line '' with lineExtensionAmount () must equal Price.PriceAmount () * CreditedQuantity () div CreditNote.PricingExchangeRate.CalculationRate (when '../cac:PricingExchangeRate' is present with MathematicOperatorCode = 'divide') +/- 1.00. [F-CRN207] For each CreditNoteLine, LineExtensionAmount must be present and contain a value. [F-CRN088] Invalid CreditedQuantity. Must not be zero [F-CRN089] Invalid LineExtensionAmount. Must have at least 2 decimals [F-CRN090] Invalid LineExtensionAmount. No more than 4 decimals [F-CRN168] Invalid ReferenceID. Must contain a value [F-CRN169] Use either ResponseCode or Description [F-CRN091] Invalid listID. Must be 'urn:oioubl:codelist:lineresponsecode-1.0' [F-CRN167] Invalid listAgencyID. Must be '320' [F-CRN170] Invalid LineID. Must contain a value [F-CRN171] Invalid LineID. Must contain a value [F-CRN172] DebitNoteDocumentReference class must be excluded [F-CRN173] AdditionalDocumentReference class must be excluded [F-CRN174] No more than one BillingReferenceLine class may be present [F-CRN175] No more than one AllowanceCharge class may be present [F-CRN098] LatestDeliveryDate element must be excluded [F-CRN099] LatestDeliveryTime element must be excluded [F-CRN157] DeliveryAddress class must be excluded [F-CRN100] PromisedDeliveryPeriod class must be excluded [F-CRN101] EstimatedDeliveryPeriod class must be excluded [F-CRN158] Address is mandatory when ID is not specified [F-CRN176] No more than one PartyLegalEntity class may be present [F-CRN109] OriginCountry class must be excluded [F-CRN110] Invalid Name for InvoiceLine. Must contain a value [F-CRN177] No more than one Keyword element may be present [F-CRN178] No more than one BrandName element may be present [F-CRN179] No more than one ModelName element may be present [F-CRN180] No more than one ManufacturersItemIdentification class may be present [F-CRN181] No more than one AdditionalItemIdentification class may be present [F-CRN182] No more than one ItemSpecificationDocumentReference class may be present [F-CRN115] Invalid SellersItemIdentification/ID. Must contain a value. [F-CRN119] Invalid Description. Must contain a value [F-CRN118] Invalid AttributeID. Must contain a value [F-CRN189] Invalid AttributeID. Must contain a value [W-CRN132] Use a Valid UNSPSC 19.0501 code [F-CRN133] Invalid Name. Must contain a value [F-CRN151] Invalid Value. Must contain a value [F-CRN152] Invalid ID. Must contain a value [F-CRN190] Invalid Name. Must contain a value [F-CRN191] Invalid Value. Must contain a value [F-CRN192] Invalid ID. Must contain a value [F-CRN185] Invalid Name. Must contain a value [F-CRN186] Invalid Value. Must contain a value [F-CRN187] Invalid ID. Must contain a value [F-CRN203] cbc:ID must contain a value. [F-CRN211] Invalid cac:CertificateTypeCode: '' Must be a value from the codelist: PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary. [F-CRN204] cac:CertificateTypeCode must contain a value. [F-CRN205] cbc:CertificateType must contain a value. [W-CRN139] The attribute languageID should be used when more than one PriceChangeReason element is present [W-CRN140] Multilanguage error. Replicated PriceChangeReason elements with same languageID attribute value [F-CRN141] Invalid listID. Must be 'UN/ECE 5387'