diff --git a/README.md b/README.md index 1de3a67c..1009d1b5 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ I hope that with the introduction of PINT, the versioning problem will be solved * Moved Peppol 2023-05 and 2023-11 rules from `phive-rules-peppol` to `phive-rules-peppol-legacy` * Added support for ZuGFERD 2.0.1 - all profiles (XML only) * Added support for ZuGFERD 2.1 - all profiles (XML only) + * Added support for OIOUBL 3.0.1 rules - this requires the EN16931 validation artefacts to be available as well * v3.2.2 - 2024-12-05 * Updated to XRechnung 3.0.2 Schematron Rules 2.2.0 * Added Peppol November 2024 release (Billing 3.0.18 and Upgrade 3.0.14) diff --git a/phive-rules-oioubl/docs/OIOUBL3_2024-12-06_v3.0.1.1e7815bf.zip b/phive-rules-oioubl/docs/OIOUBL3_2024-12-06_v3.0.1.1e7815bf.zip new file mode 100644 index 00000000..5c190141 Binary files /dev/null and b/phive-rules-oioubl/docs/OIOUBL3_2024-12-06_v3.0.1.1e7815bf.zip differ diff --git a/phive-rules-oioubl/pom.xml b/phive-rules-oioubl/pom.xml index acd988f4..bf66eb97 100644 --- a/phive-rules-oioubl/pom.xml +++ b/phive-rules-oioubl/pom.xml @@ -53,6 +53,10 @@ + + 3.0.1 + + com.helger.commons @@ -72,6 +76,10 @@ com.helger.phive.rules phive-rules-api + + com.helger.phive.rules + phive-rules-en16931 + junit @@ -207,6 +215,73 @@ --> + diff --git a/phive-rules-oioubl/src/main/java/com/helger/phive/oioubl/OIOUBLValidation.java b/phive-rules-oioubl/src/main/java/com/helger/phive/oioubl/OIOUBLValidation.java index 3227247b..5bb494ea 100644 --- a/phive-rules-oioubl/src/main/java/com/helger/phive/oioubl/OIOUBLValidation.java +++ b/phive-rules-oioubl/src/main/java/com/helger/phive/oioubl/OIOUBLValidation.java @@ -26,6 +26,7 @@ import com.helger.diver.api.coord.DVRCoordinate; import com.helger.phive.api.executorset.IValidationExecutorSetRegistry; import com.helger.phive.api.executorset.ValidationExecutorSet; +import com.helger.phive.en16931.EN16931Validation; import com.helger.phive.rules.api.PhiveRulesHelper; import com.helger.phive.rules.api.PhiveRulesUBLHelper; import com.helger.phive.xml.source.IValidationSourceXML; @@ -285,6 +286,21 @@ private static ClassLoader _getCL () "utility-statement", VERSION_1_14_2); + // 3.0.1 + private static final String VERSION_3_0_1 = "3.0.1"; + public static final DVRCoordinate VID_OIOUBL_CREDIT_NOTE_3_0_1 = PhiveRulesHelper.createCoordinate (GROUPID, + "credit-note", + VERSION_3_0_1); + public static final DVRCoordinate VID_OIOUBL_INVOICE_3_0_1 = PhiveRulesHelper.createCoordinate (GROUPID, + "invoice", + VERSION_3_0_1); + public static final DVRCoordinate VID_OIOUBL_INVOICE_RESPONSE_3_0_1 = PhiveRulesHelper.createCoordinate (GROUPID, + "invoice-response", + VERSION_3_0_1); + public static final DVRCoordinate VID_OIOUBL_MLR_3_0_1 = PhiveRulesHelper.createCoordinate (GROUPID, + "mlr", + VERSION_3_0_1); + private OIOUBLValidation () {} @@ -303,18 +319,18 @@ public static void initOIOUBL (@Nonnull final IValidationExecutorSetRegistry XSD_UTITLITY_STATEMENT = new CommonsArrayList <> (CUBL20.XSD_CODELIST_UNIT_CODE, - CUBL20.XSD_CODELIST_MIME_MEDIA_TYPE_CODE, - CUBL20.XSD_CODELIST_CURRENCY_CODE, - CUBL20.XSD_CODELIST_LANGUAGE_CODE, - CUBL20.XSD_UNQUALIFIED_DATA_TYPES, - CUBL20.XSD_QUALIFIED_DATA_TYPES, - new ClassPathResource ("external/schemas/OIOUBL_v2.1-b/common/OIOUBL_UTS-CommonBasicComponents-2.1.xsd", - _getCL ()), - new ClassPathResource ("external/schemas/OIOUBL_v2.1-b/common/OIOUBL_UTS-CommonAggregateComponents-2.1.xsd", - _getCL ()), - new ClassPathResource ("external/schemas/OIOUBL_v2.1-b/maindoc/UBL-UtilityStatement-2.1.xsd", - _getCL ())); + final ICommonsList aXSDUtilityStatement = new CommonsArrayList <> (CUBL20.XSD_CODELIST_UNIT_CODE, + CUBL20.XSD_CODELIST_MIME_MEDIA_TYPE_CODE, + CUBL20.XSD_CODELIST_CURRENCY_CODE, + CUBL20.XSD_CODELIST_LANGUAGE_CODE, + CUBL20.XSD_UNQUALIFIED_DATA_TYPES, + CUBL20.XSD_QUALIFIED_DATA_TYPES, + new ClassPathResource ("external/schemas/OIOUBL_v2.1-b/common/OIOUBL_UTS-CommonBasicComponents-2.1.xsd", + _getCL ()), + new ClassPathResource ("external/schemas/OIOUBL_v2.1-b/common/OIOUBL_UTS-CommonAggregateComponents-2.1.xsd", + _getCL ()), + new ClassPathResource ("external/schemas/OIOUBL_v2.1-b/maindoc/UBL-UtilityStatement-2.1.xsd", + _getCL ())); // 1.12.3 { @@ -444,7 +460,7 @@ public static void initOIOUBL (@Nonnull final IValidationExecutorSetRegistry + + + + + SchXslt/1.9.5 SAXON/HE 10.3 + true + + + 2024-12-06T14:17:57.608475858+01:00 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SchXslt/1.9.5 SAXON/HE 10.3 + true + + + 2024-12-06T14:17:57.608475858+01:00 + + + + + + + + + + + + + + + + + + + + Schematron for validating OIOUBL-3 documents. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0184'] | cbc:EndpointID[@schemeID eq '0184'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0184']" shadowed by preceding rule + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0184'] | cbc:EndpointID[@schemeID eq '0184'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0184'] + + + + + + + + + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0184'] | cbc:EndpointID[@schemeID eq '0184'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0184'] + + + + matches(normalize-space(), '^\d{8}$') + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AdditionalDocumentReference/cbc:ID[@schemeID eq 'ARR']" shadowed by preceding rule + + cac:AdditionalDocumentReference/cbc:ID[@schemeID eq 'ARR'] + + + + + + + + + + cac:AdditionalDocumentReference/cbc:ID[@schemeID eq 'ARR'] + + + + (matches(normalize-space(.), '^\d{10}$')) and (../cbc:DocumentTypeCode eq '130') + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: '' The + value in DocumentTypeCode must equal '130' - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0096'] | cbc:EndpointID[@schemeID eq '0096'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0096']" shadowed by preceding rule + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0096'] | cbc:EndpointID[@schemeID eq '0096'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0096'] + + + + + + + + + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0096'] | cbc:EndpointID[@schemeID eq '0096'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0096'] + + + + matches(normalize-space(), '^\d{10}$') + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0198'] | cbc:EndpointID[@schemeID eq '0198'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0198'] | cac:Party/cac:PartyTaxScheme/cbc:CompanyID[@schemeID eq '0198']" shadowed by preceding rule + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0198'] | cbc:EndpointID[@schemeID eq '0198'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0198'] | cac:Party/cac:PartyTaxScheme/cbc:CompanyID[@schemeID eq '0198'] + + + + + + + + + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0198'] | cbc:EndpointID[@schemeID eq '0198'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0198'] | cac:Party/cac:PartyTaxScheme/cbc:CompanyID[@schemeID eq '0198'] + + + + matches(normalize-space(), '^DK\d{8}$') + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0237'] | cac:Party/cac:PartyTaxScheme/cbc:CompanyID[@schemeID eq '0237'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0237']" shadowed by preceding rule + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0237'] | cac:Party/cac:PartyTaxScheme/cbc:CompanyID[@schemeID eq '0237'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0237'] + + + + + + + + + + cac:Party/cac:PartyIdentification/cbc:ID[@schemeID eq '0237'] | cac:Party/cac:PartyTaxScheme/cbc:CompanyID[@schemeID eq '0237'] | cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID eq '0237'] + + + + matches(normalize-space(), '^\d{10}$') + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:UUID" shadowed by preceding rule + + cbc:UUID + + + + + + + + + + cbc:UUID + + + + matches(., '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$') + The element must contain a valid UUID - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "ext:UBLExtensions" shadowed by preceding rule + + ext:UBLExtensions + + + + + + + + + + ext:UBLExtensions + + + + ext:UBLExtension/ext:ExtensionAgencyID = 'ERST' and (number(ext:UBLExtension/cbc:ID) >= 1001 and number(ext:UBLExtension/cbc:ID) <= 1999) + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:SequenceNumeric" shadowed by preceding rule + + cbc:SequenceNumeric + + + + + + + + + + cbc:SequenceNumeric + + + + not(starts-with(., '-')) + SequenceNumeric must not be negative - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Address | cac:DespatchAddress | cac:JurisdictionRegionAddress | cac:OriginAddress | cac:PostalAddress | cac:RegistrationAddress | cac:ReturnAddress" shadowed by preceding rule + + cac:Address | cac:DespatchAddress | cac:JurisdictionRegionAddress | cac:OriginAddress | cac:PostalAddress | cac:RegistrationAddress | cac:ReturnAddress + + + + + + + + + + cac:Address | cac:DespatchAddress | cac:JurisdictionRegionAddress | cac:OriginAddress | cac:PostalAddress | cac:RegistrationAddress | cac:ReturnAddress + + + + count(./cbc:CityName) = 1 and count(./cbc:PostalZone) = 1 + CityName AND PostalZone MUST be present. + + + + + count(./cbc:Postbox) = 1 or (count(./cbc:StreetName) = 1 and count(./cbc:BuildingNumber) = 1) + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + + + + + count(./cbc:Floor) = 0 or (count(./cbc:Floor) = 1 and count(./cbc:StreetName) = 1 and count(./cbc:BuildingNumber) = 1) + IF Floor is present, StreetName and BuildingNumber MUST be present. + + + + + count(./cbc:Room) = 0 or (count(./cbc:Room) = 1 and count(./cbc:StreetName) = 1 and count(./cbc:BuildingNumber) = 1) + IF Room is present, StreetName and BuildingNumber MUST be present. + + + + + (count(./cbc:BuildingNumber) = 0 and count(./cbc:StreetName) = 0) or (count(./cbc:BuildingNumber) = 1 and count(./cbc:StreetName) = 1) + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge" shadowed by preceding rule + + cac:AllowanceCharge + + + + + + + + + + cac:AllowanceCharge + + + + not(cbc:AllowanceChargeReasonCode = 'ZZZ') or cbc:AllowanceChargeReason + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + + + + + not(cbc:AllowanceChargeReasonCode = 'ZZZ') or ((cbc:AllowanceChargeReason and contains(cbc:AllowanceChargeReason, '#') and not(starts-with(cbc:AllowanceChargeReason, '#')) and not(ends-with(cbc:AllowanceChargeReason, '#')))) + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty" shadowed by preceding rule + + cac:AccountingSupplierParty + + + + + + + + + + cac:AccountingSupplierParty + + + + not(cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID = '0237']) or (ancestor::*/cbc:ProfileID = 'urn:fdc:oioubl.dk:bis:billing_private_without_response:3') + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine | cac:CreditNoteLine" shadowed by preceding rule + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + + + cac:InvoiceLine | cac:CreditNoteLine + + + + count(cac:Item/cac:ManufacturersItemIdentification) <= 1 + No more than one ManufacturersItemIdentification class may be present + + + + + not(cac:Item/cac:Certificate/cac:CertificateTypeCode/cbc:ID) or (some $val in $PackagingMarkedLabelAccreditationCode satisfies (cac:Item/cac:Certificate/cac:CertificateTypeCode/cbc:ID = $val)) + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party" shadowed by preceding rule + + cac:Party + + + + + + + + + + cac:Party + + + + cac:PartyLegalEntity + The element 'PartyLegalEntity' is mandatory in the 'Party' + + + + + cac:PartyLegalEntity/cbc:CompanyID + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + + + + + count(./cac:PartyName/cbc:Name) = 1 + cac:Party/cac:PartyName/cbc:Name must be present. + + + + + count(./cac:PartyLegalEntity) = 1 + cac:Party/cac:PartyLegalEntity must be present. + + + + + count(./cac:PartyLegalEntity/cbc:CompanyID) = 1 + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification" shadowed by preceding rule + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification + + + + + + + + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification + + + + count(./cbc:ID) = 1 + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme | cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme | cac:TaxRepresentativeParty/cac:PartyTaxScheme" shadowed by preceding rule + + cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme | cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme | cac:TaxRepresentativeParty/cac:PartyTaxScheme + + + + + + + + + + cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme | cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme | cac:TaxRepresentativeParty/cac:PartyTaxScheme + + + + cbc:CompanyID or not(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID != 'O') + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + cac:TaxScheme/cbc:ID or not(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID != 'O') + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cbc:EndpointID" shadowed by preceding rule + + cac:Party/cbc:EndpointID + + + + + + + + + + cac:Party/cbc:EndpointID + + + + @schemeID + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cac:PartyIdentification/cbc:ID" shadowed by preceding rule + + cac:Party/cac:PartyIdentification/cbc:ID + + + + + + + + + + cac:Party/cac:PartyIdentification/cbc:ID + + + + @schemeID + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Party/cac:PartyLegalEntity/cbc:CompanyID" shadowed by preceding rule + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID + + + + + + + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID + + + + @schemeID + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PartyTaxScheme/cbc:CompanyID" shadowed by preceding rule + + cac:PartyTaxScheme/cbc:CompanyID + + + + + + + + + + cac:PartyTaxScheme/cbc:CompanyID + + + + @schemeID + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + + + + + some $code in $DK-ISO-6523-ICD satisfies @schemeID = $code + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Signature" shadowed by preceding rule + + cac:Signature + + + + + + + + + + cac:Signature + + + + count(./cac:DigitalSignatureAttachment) = 1 + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + + + + + count(./cac:OriginalDocumentReference) = 1 + The element 'OriginalDocumentReference' is mandatory in 'Signature' + + + + + count(./cac:SignatoryParty) = 1 + The element 'SignatoryParty' is mandatory in 'Signature' + + + + + count(./cbc:CanonicalizationMethod) = 1 + The element 'CanonicalizationMethod' is mandatory in 'Signature' + + + + + count(./cbc:SignatureMethod) = 1 + The element 'SignatureMethod' is mandatory in 'Signature' + + + + + + + + + + + + + + + WARNING: Rule for context "cac:ActivityPeriod | cac:ApplicablePeriod | cac:ConstitutionPeriod | cac:ContractAcceptancePeriod | cac:ContractFormalizationPeriod | cac:DeliveryPeriod | cac:DocumentAvailabilityPeriod | cac:DurationPeriod | cac:EffectivePeriod | cac:EstimatedDeliveryPeriod | cac:EstimatedDespatchPeriod | cac:EstimatedDurationPeriod | cac:EstimatedTransitPeriod | cac:ExceptionObservationPeriod | cac:ForecastPeriod | cac:FrequencyPeriod | cac:InventoryPeriod | cac:InvitationSubmissionPeriod | cac:InvoicePeriod | cac:LineValidityPeriod | cac:MainPeriod | cac:NominationPeriod | cac:NotificationPeriod | cac:OptionValidityPeriod | cac:ParticipationRequestReceptionPeriod | cac:PaymentReversalPeriod | cac:PenaltyPeriod | cac:Period | cac:PlannedPeriod | cac:PresentationPeriod | cac:PromisedDeliveryPeriod | cac:ReminderPeriod | cac:RequestedDeliveryPeriod | cac:RequestedDespatchPeriod | cac:RequestedStatusPeriod | cac:RequestedValidityPeriod | cac:ServiceEndTimePeriod | cac:ServiceStartTimePeriod | cac:SettlementPeriod | cac:StatementPeriod | cac:StatusPeriod | cac:TenderSubmissionDeadlinePeriod | cac:TenderValidityPeriod | cac:TransitPeriod | cac:TransportServiceProviderResponseDeadlinePeriod | cac:TransportServiceProviderResponseRequiredPeriod | cac:TransportUserResponseRequiredPeriod | cac:UsabilityPeriod | cac:ValidityPeriod | cac:WarrantyValidityPeriod" shadowed by preceding rule + + cac:ActivityPeriod | cac:ApplicablePeriod | cac:ConstitutionPeriod | cac:ContractAcceptancePeriod | cac:ContractFormalizationPeriod | cac:DeliveryPeriod | cac:DocumentAvailabilityPeriod | cac:DurationPeriod | cac:EffectivePeriod | cac:EstimatedDeliveryPeriod | cac:EstimatedDespatchPeriod | cac:EstimatedDurationPeriod | cac:EstimatedTransitPeriod | cac:ExceptionObservationPeriod | cac:ForecastPeriod | cac:FrequencyPeriod | cac:InventoryPeriod | cac:InvitationSubmissionPeriod | cac:InvoicePeriod | cac:LineValidityPeriod | cac:MainPeriod | cac:NominationPeriod | cac:NotificationPeriod | cac:OptionValidityPeriod | cac:ParticipationRequestReceptionPeriod | cac:PaymentReversalPeriod | cac:PenaltyPeriod | cac:Period | cac:PlannedPeriod | cac:PresentationPeriod | cac:PromisedDeliveryPeriod | cac:ReminderPeriod | cac:RequestedDeliveryPeriod | cac:RequestedDespatchPeriod | cac:RequestedStatusPeriod | cac:RequestedValidityPeriod | cac:ServiceEndTimePeriod | cac:ServiceStartTimePeriod | cac:SettlementPeriod | cac:StatementPeriod | cac:StatusPeriod | cac:TenderSubmissionDeadlinePeriod | cac:TenderValidityPeriod | cac:TransitPeriod | cac:TransportServiceProviderResponseDeadlinePeriod | cac:TransportServiceProviderResponseRequiredPeriod | cac:TransportUserResponseRequiredPeriod | cac:UsabilityPeriod | cac:ValidityPeriod | cac:WarrantyValidityPeriod + + + + + + + + + + cac:ActivityPeriod | cac:ApplicablePeriod | cac:ConstitutionPeriod | cac:ContractAcceptancePeriod | cac:ContractFormalizationPeriod | cac:DeliveryPeriod | cac:DocumentAvailabilityPeriod | cac:DurationPeriod | cac:EffectivePeriod | cac:EstimatedDeliveryPeriod | cac:EstimatedDespatchPeriod | cac:EstimatedDurationPeriod | cac:EstimatedTransitPeriod | cac:ExceptionObservationPeriod | cac:ForecastPeriod | cac:FrequencyPeriod | cac:InventoryPeriod | cac:InvitationSubmissionPeriod | cac:InvoicePeriod | cac:LineValidityPeriod | cac:MainPeriod | cac:NominationPeriod | cac:NotificationPeriod | cac:OptionValidityPeriod | cac:ParticipationRequestReceptionPeriod | cac:PaymentReversalPeriod | cac:PenaltyPeriod | cac:Period | cac:PlannedPeriod | cac:PresentationPeriod | cac:PromisedDeliveryPeriod | cac:ReminderPeriod | cac:RequestedDeliveryPeriod | cac:RequestedDespatchPeriod | cac:RequestedStatusPeriod | cac:RequestedValidityPeriod | cac:ServiceEndTimePeriod | cac:ServiceStartTimePeriod | cac:SettlementPeriod | cac:StatementPeriod | cac:StatusPeriod | cac:TenderSubmissionDeadlinePeriod | cac:TenderValidityPeriod | cac:TransitPeriod | cac:TransportServiceProviderResponseDeadlinePeriod | cac:TransportServiceProviderResponseRequiredPeriod | cac:TransportUserResponseRequiredPeriod | cac:UsabilityPeriod | cac:ValidityPeriod | cac:WarrantyValidityPeriod + + + + not(matches(./cbc:StartDate, '^\d{4}-\d{2}-\d{2}$')) or not(matches(./cbc:StartTime, '^\d{2}:\d{2}:\d{2}$')) or not(matches(./cbc:EndDate, '^\d{4}-\d{2}-\d{2}$')) or not(matches(./cbc:EndTime, '^\d{2}:\d{2}:\d{2}$')) or not(xs:dateTime(concat(./cbc:StartDate, 'T', ./cbc:StartTime)) gt xs:dateTime(concat(./cbc:EndDate, 'T', ./cbc:EndTime))) + StartDate + StartTime must be before or the same as EndDate + EndTime + + + + + count(./cbc:StartTime) = 0 or (count(./cbc:StartDate) = 1 and count(./cbc:StartTime) = 1) + If StartTime exists, StartDate must be present + + + + + count(./cbc:EndTime) = 0 or (count(./cbc:EndDate) = 1 and count(./cbc:EndTime) = 1) + If EndTime exists, EndDate must be present + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:StartTime | cbc:EndTime" shadowed by preceding rule + + cbc:StartTime | cbc:EndTime + + + + + + + + + + cbc:StartTime | cbc:EndTime + + + + matches(., '^\d{2}:\d{2}:\d{2}$') + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Contact" shadowed by preceding rule + + cac:Contact + + + + + + + + + + cac:Contact + + + + not(matches(./cbc:ID, '^\d{6}-?\d{4}$')) + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + + + + + matches(./cbc:Telephone, '^(?:\+|00).*$') + Telephone must include country code (must start with '+' or '00') + + + + + matches(./cbc:ElectronicMail, '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]+$') + ElectronicMail must have valid format (like 'user123@example.com') + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Attachment" shadowed by preceding rule + + cac:Attachment + + + + + + + + + + cac:Attachment + + + + not(count(./cbc:EmbeddedDocumentBinaryObject) = 1 and count(./cac:ExternalReference) = 1) + Must not have both embedded document and external reference. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Attachment/cbc:EmbeddedDocumentBinaryObject" shadowed by preceding rule + + cac:Attachment/cbc:EmbeddedDocumentBinaryObject + + + + + + + + + + cac:Attachment/cbc:EmbeddedDocumentBinaryObject + + + + @filename + EmbeddedDocumentBinaryObject must have filename attribute + + + + + some $code in $OpenPEPPOL-IANA-MimeCode satisfies @mimeCode = $code + Attribute mimeCode must be a value from the code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Attachment/cac:ExternalReference" shadowed by preceding rule + + cac:Attachment/cac:ExternalReference + + + + + + + + + + cac:Attachment/cac:ExternalReference + + + + matches(./cbc:URI, '^.+$') + When using ExternalReference, URI is mandatory + + + + + (count(./cbc:DocumentHash) = 1 and count(./cbc:HashAlgorithmMethod) = 1) or (count(./cbc:DocumentHash) = 0 and count(./cbc:HashAlgorithmMethod) = 0) + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + + + + + (count(./cbc:ExpiryTime) = 1 and count(./cbc:ExpiryDate) = 1) or count(./cbc:ExpiryTime) = 0 + If ExpiryTime is present, ExpiryDate MUST be present + + + + + + + + + + + + + + + WARNING: Rule for context "cac:DocumentReference" shadowed by preceding rule + + cac:DocumentReference + + + + + + + + + + cac:DocumentReference + + + + (count(./cbc:IssueTime) = 1 and count(./cbc:IssueDate) = 1) or count(./cbc:IssueTime) = 0 + If IssueTime is present, IssueDate must be present + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxExchangeRate | cac:PricingExchangeRate | cac:PaymentExchangeRate | cac:PaymentAlternativeExchangeRate" shadowed by preceding rule + + cac:TaxExchangeRate | cac:PricingExchangeRate | cac:PaymentExchangeRate | cac:PaymentAlternativeExchangeRate + + + + + + + + + + cac:TaxExchangeRate | cac:PricingExchangeRate | cac:PaymentExchangeRate | cac:PaymentAlternativeExchangeRate + + + + cbc:CalculationRate > 0 and matches(cbc:CalculationRate, '^[0-9]+(\.[0-9]{4})?$') + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + + + + + + cbc:MathematicOperatorCode = 'multiply' or cbc:MathematicOperatorCode = 'divide' + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + WARNING: Rule for context "/" shadowed by preceding rule + + / + + + + + + + + + + / + + + + local-name(*) = 'ApplicationResponse' + + Root element must be ApplicationResponse + + + + + + namespace-uri(*) = 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2' + + The documenttype does not match an OIOUBL ApplicationResponse and can not be validated by this schematron. + + + + + + + + + + + + + + + + WARNING: Rule for context "/" shadowed by preceding rule + + / + + + + + + + + + + / + + + + not(.//cac:Signature/cac:SignatoryParty/cac:PostalAddress) + The use of element is not allowed - + + + + + + not(.//cac:OrderReference/cac:DocumentReference) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:InvoiceDocumentReference/cac:Attachment) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:SelfBilledInvoiceDocumentReference) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:SelfBilledCreditNoteDocumentReference) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:DebitNoteDocumentReference) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:ReminderDocumentReference/cac:Attachment) + The use of element is not allowed - + + + + + + not(.//cac:Delivery/cac:DeliveryAddress) + The use of element is not allowed - + + + + + + not(.//cac:Delivery/cac:CarrierParty) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:CreditNoteDocumentReference/cac:Attachment) + The use of element is not allowed - + + + + + + not(.//cac:Delivery/cac:Shipment/cac:FreightAllowanceCharge) + The use of element is not allowed - + + + + + + not(.//cac:BillingReference/cac:AdditionalDocumentReference) + The use of element is not allowed - + + + + + + not(.//cac:Delivery/cac:DeliveryLocation/cbc:CountrySubentity) + The use of element is not allowed - + + + + + + not(.//cac:Delivery/cac:DeliveryLocation/cbc:CountrySubentityCode) + The use of element is not allowed - + + + + + + not(.//cac:PaymentMeans/cbc:PaymentDueDate) + The use of element is not allowed - + + + + + + not(.//cac:AllowanceCharge/cac:PaymentMeans) + The use of element is not allowed - + + + + + + not(.//cac:AllowanceCharge/cac:Taxtotal) + The use of element is not allowed - + + + + + + not(.//cac:TaxTotal/cac:TaxSubtotal/cbc:Percent) + The use of element is not allowed - + + + + + + not(.//cac:TaxTotal/cac:TaxSubtotal/cbc:BaseUnitMeasure) + The use of element is not allowed - + + + + + + not(.//cac:TaxTotal/cac:TaxSubtotal/cbc:PerUnitAmount) + The use of element is not allowed - + + + + + + not(.//cac:Person) + The use of element is not allowed - + + + + + + not(.//cac:Item/cac:Certificate/cac:DocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) + The use of element is not allowed - + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine | cac:CreditNoteLine" shadowed by preceding rule + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + + + cac:InvoiceLine | cac:CreditNoteLine + + + + not(cac:Delivery/cbc:LatestDeliveryDate) + The use of element is not allowed - + + + + + + not(cac:Delivery/cbc:LatestDeliveryTime) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:DeliveryAddress) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:DeliveryTerms) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:PaymentTerms) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:CollectPaymentTerms) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:DisbursementPaymentTerms) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:PrepaidPaymentTerms) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:FreightAllowanceCharge) + The use of element is not allowed - + + + + + + not(cac:Delivery/cac:Shipment/cac:Consignment/cac:ExtraAllowanceCharge) + The use of element is not allowed - + + + + + + not(cac:PaymentTerms) + The use of element is not allowed - + + + + + + not(cac:Item/cac:TransactionConditions) + The use of element is not allowed - + + + + + + not(cac:Price/cac:AllowanceCharge/cac:PaymentMeans) + The use of element is not allowed - + + + + + + + + + + + + + + + + WARNING: Rule for context " cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode + + + + not(@listID = 'TST') or (@listVersionID = '19.05.01' or @listVersionID = '19.0501' or @listVersionID = '26.08.01' or @listVersionID = '26.0801') + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: '' + + + + + not(@listID = 'TST') or (matches(., '^\d{8}$')) + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: '' + + + + + + + + + + + + + + + WARNING: Rule for context " cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty | cac:CreditNoteLine/cac:Item/cac:AdditionalItemProperty" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty | cac:CreditNoteLine/cac:Item/cac:AdditionalItemProperty + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty | cac:CreditNoteLine/cac:Item/cac:AdditionalItemProperty + + + + not(cbc:Name = 'EmissionFactor') or (number(cbc:Value) = number(cbc:Value)) + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + + + + + not(cbc:Name = 'NetEmissionQuantity') or ( round(number(../cac:AdditionalItemProperty[cbc:Name = 'EmissionFactor']/cbc:Value) * number(../../cbc:InvoicedQuantity) * 10000) div 10000 = round(number(cbc:Value)*10000) div 10000 or round(number(../cac:AdditionalItemProperty[cbc:Name = 'EmissionFactor']/cbc:Value) * number(../../cbc:CreditedQuantity) * 10000) div 10000 = round(number(cbc:Value)*10000) div 10000) + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + - NetEmissionFactor value + - Quantity: + + + + + + not(cbc:Name = 'EmissionFactorSource') or (cbc:Value = 'Database' or cbc:Value = 'Internal') + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + + + + + not(cbc:Name = 'EmissionFactor') or (../cac:AdditionalItemProperty[cbc:Name = 'EmissionFactorSource']) + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + + + + + not(cbc:Name = 'EmissionFactorCalculationUnit') or (some $val in $UNECERec20-11e satisfies (cbc:Value = $val)) + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:ApplicationResponse/cbc:ProfileID" shadowed by preceding rule + + /ubl:ApplicationResponse/cbc:ProfileID + + + + + + + + + + /ubl:ApplicationResponse/cbc:ProfileID + + + + normalize-space(text()) = 'urn:fdc:oioubl.dk:bis:billing_with_response:3' + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:billing_with_response:3'. + + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:ApplicationResponse/cbc:CustomizationID" shadowed by preceding rule + + /ubl:ApplicationResponse/cbc:CustomizationID + + + + + + + + + + /ubl:ApplicationResponse/cbc:CustomizationID + + + + normalize-space(text()) = 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3@urn:fdc:oioubl.dk:trns:billing:invoice_response:3.0' + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3@urn:fdc:oioubl.dk:trns:billing:invoice_response:3.0'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/DK-PEPPOLBIS-T111.xslt b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/DK-PEPPOLBIS-T111.xslt new file mode 100644 index 00000000..56cba0ab --- /dev/null +++ b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/DK-PEPPOLBIS-T111.xslt @@ -0,0 +1,1922 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Rules for PEPPOL Invoice Response transaction 3.1 + + + + + + + + + + + + + + PEPPOL-COMMON-R001 + fatal + + + + Document MUST not contain empty elements. + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-COMMON-R003 + warning + + + + Document SHOULD not contain schema location. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R030 + fatal + + + + A date must be formatted YYYY-MM-DD. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R040 + fatal + + + + GLN must have a valid format according to GS1 rules. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R041 + fatal + + + + Norwegian organization number MUST be stated in the correct format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R043 + fatal + + + + Belgian enterprise number MUST be stated in the correct format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R044 + warning + + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R045 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R046 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R047 + warning + + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R048 + warning + + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R049 + fatal + + + + Swedish organization number MUST be stated in the correct format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R050 + fatal + + + + Australian Business Number (ABN) MUST be stated in the correct format. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B00101 + fatal + + + + Element 'cbc:CustomizationID' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00102 + fatal + + + + Element 'cbc:ProfileID' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00103 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00104 + fatal + + + + Element 'cbc:IssueDate' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00105 + fatal + + + + Element 'cac:SenderParty' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00106 + fatal + + + + Element 'cac:ReceiverParty' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00107 + fatal + + + + Element 'cac:DocumentResponse' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00108 + fatal + + + + Document MUST not contain schema location. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B00801 + fatal + + + + Element 'cbc:EndpointID' MUST be provided. + + + + + + + + + + PEPPOL-T111-B00802 + fatal + + + + Element 'cac:PartyLegalEntity' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B00901 + fatal + + + + Attribute 'schemeID' MUST be present. + + + + + + + + + + PEPPOL-T111-B00902 + fatal + + + + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + + + + + + + + + + + + + + PEPPOL-T111-B01101 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B01201 + fatal + + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + + + + + + + + + + + + + + PEPPOL-T111-B01401 + fatal + + + + Element 'cbc:RegistrationName' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B01402 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B01601 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B00803 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B02001 + fatal + + + + Element 'cbc:EndpointID' MUST be provided. + + + + + + + + + + PEPPOL-T111-B02002 + fatal + + + + Element 'cac:PartyLegalEntity' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B02101 + fatal + + + + Attribute 'schemeID' MUST be present. + + + + + + + + + + PEPPOL-T111-B02102 + fatal + + + + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + + + + + + + + + + + + + + PEPPOL-T111-B02301 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B02401 + fatal + + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + + + + + + + + + + + + + + PEPPOL-T111-B02601 + fatal + + + + Element 'cbc:RegistrationName' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B02602 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B02003 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B02801 + fatal + + + + Element 'cac:Response' MUST be provided. + + + + + + + + + + PEPPOL-T111-B02802 + fatal + + + + Element 'cac:DocumentReference' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B02901 + fatal + + + + Element 'cbc:ResponseCode' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B03001 + fatal + + + + Value MUST be part of code list 'Invoice status code (UNCL4343 Subset)'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B03301 + fatal + + + + Value MUST be part of code list 'Status Clarification Reason (OpenPEPPOL)' or 'Status Clarification Action (OpenPEPPOL)'. + + + + + + + + + + PEPPOL-T111-B03302 + fatal + + + + Attribute 'listID' MUST be present. + + + + + + + + + + PEPPOL-T111-B03303 + fatal + + + + Value MUST be part of code list 'Clarification list identifier (openPEPPOL)'. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B03601 + fatal + + + + Element 'cbc:AttributeID' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B03602 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B03201 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B02902 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B03901 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + PEPPOL-T111-B03902 + fatal + + + + Element 'cbc:DocumentTypeCode' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B04201 + fatal + + + + Value MUST be part of code list 'Document name code, full list (UNCL1001)'. + + + + + + + + + + + + + + + + PEPPOL-T111-B03903 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B04301 + fatal + + + + Element 'cac:PartyName' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B04401 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B04501 + fatal + + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + + + + + + + + + + + + + + PEPPOL-T111-B04701 + fatal + + + + Element 'cbc:Name' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B04302 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B04901 + fatal + + + + Element 'cac:PartyName' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B05001 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-B05101 + fatal + + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + + + + + + + + + + + + + + PEPPOL-T111-B05301 + fatal + + + + Element 'cbc:Name' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-B04902 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B02803 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T111-B00109 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-R001 + fatal + + + + If status code is one of: CA, UQ or RE then there SHALL be at a clarification code in Invoice Response. + + + + + + + + + + + + + + + + PEPPOL-T111-R002 + warning + + + + If Clarification code is OTH then Clarification reason SHOULD be provided. + + + + + + + + + + + + + + + + PEPPOL-T111-R003 + fatal + + + + Specification identifier SHALL start with the value 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3'. + + + + + + + + + + + + + + + + PEPPOL-T111-R004 + fatal + + + + If Clarification code is PPD, indicating partial payment, then Clarification reason SHALL be provided. + + + + + + + + + + PEPPOL-T111-R005 + fatal + + + + Clarification Reason "PPD" SHALL only be used in compination with Status "PD". + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T111-R006 + fatal + + + + Clarification Reason code shall exist in the OPStatusAction code lists as identified by listID. + + + + + + + + + + + + + + + + PEPPOL-T111-R007 + fatal + + + + Clarification Reason code shall exist in the OPStatusReason code lists as identified by listID. + + + + + + + + + + diff --git a/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/DK-PEPPOLBIS-T71.xslt b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/DK-PEPPOLBIS-T71.xslt new file mode 100644 index 00000000..e1f2ec3d --- /dev/null +++ b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/DK-PEPPOLBIS-T71.xslt @@ -0,0 +1,1363 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Rules for PEPPOL Message Level Response transaction 3.0 + + + + + + + + + + + + + + PEPPOL-COMMON-R001 + fatal + + + + Document MUST not contain empty elements. + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-COMMON-R003 + warning + + + + Document SHOULD not contain schema location. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R030 + fatal + + + + A date must be formatted YYYY-MM-DD. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R040 + fatal + + + + GLN must have a valid format according to GS1 rules. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R041 + fatal + + + + Norwegian organization number MUST be stated in the correct format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R043 + fatal + + + + Belgian enterprise number MUST be stated in the correct format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R044 + warning + + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R045 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R046 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R047 + warning + + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R048 + warning + + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R049 + fatal + + + + Swedish organization number MUST be stated in the correct format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R050 + fatal + + + + Australian Business Number (ABN) MUST be stated in the correct format. + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B00101 + fatal + + + + Element 'cbc:CustomizationID' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00102 + fatal + + + + Element 'cbc:ProfileID' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00103 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00104 + fatal + + + + Element 'cbc:IssueDate' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00105 + fatal + + + + Element 'cac:SenderParty' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00106 + fatal + + + + Element 'cac:ReceiverParty' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00107 + fatal + + + + Element 'cac:DocumentResponse' MUST be provided. + + + + + + + + + + PEPPOL-T71-B00108 + fatal + + + + Document MUST not contain schema location. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B00701 + fatal + + + + Element 'cbc:EndpointID' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B00801 + fatal + + + + Attribute 'schemeID' MUST be present. + + + + + + + + + + PEPPOL-T71-B00802 + fatal + + + + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + + + + + + + + + + + + + + PEPPOL-T71-B00702 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B01001 + fatal + + + + Element 'cbc:EndpointID' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B01101 + fatal + + + + Attribute 'schemeID' MUST be present. + + + + + + + + + + PEPPOL-T71-B01102 + fatal + + + + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + + + + + + + + + + + + + + PEPPOL-T71-B01002 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B01301 + fatal + + + + Element 'cac:Response' MUST be provided. + + + + + + + + + + PEPPOL-T71-B01302 + fatal + + + + Element 'cac:DocumentReference' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B01401 + fatal + + + + Element 'cbc:ResponseCode' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B01501 + fatal + + + + Value MUST be part of code list 'Application Response type code (UNCL4343 Subset)'. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B01402 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B01701 + fatal + + + + Element 'cbc:ID' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B01901 + fatal + + + + Value MUST be part of code list 'Document name code, full list (UNCL1001)'. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B01702 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B02101 + fatal + + + + Element 'cac:LineReference' MUST be provided. + + + + + + + + + + PEPPOL-T71-B02102 + fatal + + + + Element 'cac:Response' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B02201 + fatal + + + + Element 'cbc:LineID' MUST be provided. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B02202 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B02401 + fatal + + + + Element 'cbc:Description' MUST be provided. + + + + + + + + + + PEPPOL-T71-B02402 + fatal + + + + Element 'cac:Status' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B02501 + fatal + + + + Value MUST be part of code list 'Application Response type code (UNCL4343 Subset)'. + + + + + + + + + + + + + + + + + + + + + + PEPPOL-T71-B02701 + fatal + + + + Element 'cbc:StatusReasonCode' MUST be provided. + + + + + + + + + + + + + + + + PEPPOL-T71-B02801 + fatal + + + + Value MUST be part of code list 'Status reason code (openPEPPOL)'. + + + + + + + + + + + + + + + + PEPPOL-T71-B02702 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B02403 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B01303 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + PEPPOL-T71-B00109 + fatal + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Creditnote.xslt b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Creditnote.xslt new file mode 100644 index 00000000..e6e91a42 --- /dev/null +++ b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Creditnote.xslt @@ -0,0 +1,5112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-INV-001 + fatal + + + + The root element + must be 'CreditNote'. + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-020 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-021 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-022 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-023 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-024 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-025 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-026 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-027 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-028 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-029 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-030 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-031 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-032 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-033 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-034 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-035 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-037 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-038 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-039 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-040 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-041 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-043 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-052 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-053 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-054 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-055 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-056 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-057 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-058 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-059 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-060 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-061 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-062 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-063 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-064 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-R008 + fatal + + + + Document MUST not + contain empty elements. + + + + + + + + + + + + + + + + OIOUBL-BIL-099 + fatal + + + + The value of TaxInclusiveAmount must not be negative unless + DocumentTypeCode is 'PEPPOLBIS32OIOUBL' with listAgencyName 'ERST' - Value + found: ' + + ' + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-R080 + fatal + + + + Only one project reference is allowed on document + level + + + + + + + + + + PEPPOL-EN16931-R001 + fatal + + + + Business process MUST be provided. + + + + + + + + + + PEPPOL-EN16931-R002 + fatal + + + + No more than one note is allowed on document level. + + + + + + + + + + PEPPOL-EN16931-R003 + fatal + + + + A buyer reference or purchase order reference MUST be + provided. + + + + + + + + + + PEPPOL-EN16931-R053 + fatal + + + + Only one tax total with tax subtotals MUST be + provided. + + + + + + + + + + PEPPOL-EN16931-R054 + fatal + + + + Only one tax total without tax subtotals MUST be provided when + tax currency code is provided. + + + + + + + + + + PEPPOL-EN16931-R055 + fatal + + + + Invoice total VAT amount and Invoice total VAT amount in + accounting currency MUST have the same operational sign + + + + + + + + + + + + + + + + PEPPOL-EN16931-R005 + fatal + + + + VAT accounting currency code MUST be different from invoice + currency code when provided + + + + + + + + + + + + + + + + PEPPOL-EN16931-R010 + fatal + + + + Buyer electronic address MUST be provided + + + + + + + + + + + + + + + + PEPPOL-EN16931-R020 + fatal + + + + Seller electronic address MUST be provided + + + + + + + + + + + + + + + + PEPPOL-EN16931-R041 + fatal + + + + Allowance/charge base amount MUST be provided when + allowance/charge percentage is provided. + + + + + + + + + + + + + + + + PEPPOL-EN16931-R042 + fatal + + + + Allowance/charge percentage MUST be provided when + allowance/charge base amount is provided. + + + + + + + + + + + + + + + + PEPPOL-EN16931-R040 + fatal + + + + Allowance/charge amount must equal base amount * percentage/100 + if base amount and percentage exists + + + + + + + + + + PEPPOL-EN16931-R043 + fatal + + + + Allowance/charge ChargeIndicator value MUST equal 'true' or + 'false' + + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL007 + fatal + + + + Currency code must be according to ISO 4217:2005 + + + + + + + + + + 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-EN16931-R110 + fatal + + + + Start date of line period MUST be within invoice + period. + + + + + + + + + + + + + + + + PEPPOL-EN16931-R111 + fatal + + + + End date of line period MUST be within invoice period. + + + + + + + + + + + + + + + + + + + + + + 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-EN16931-R121 + fatal + + + + Base quantity MUST be a positive number above zero. + + + + + + + + + + PEPPOL-EN16931-R100 + fatal + + + + Only one invoiced object is allowed pr line + + + + + + + + + + PEPPOL-EN16931-R101 + fatal + + + + Element Document reference can only be used for Invoice line + object + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-R130 + fatal + + + + Unit code of price base quantity MUST be same as invoiced + quantity. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R040 + fatal + + + + GLN must have a valid format according to GS1 rules. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R041 + fatal + + + + Norwegian organization number MUST be stated in the correct + format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R043 + fatal + + + + Belgian enterprise number MUST be stated in the correct + format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R044 + warning + + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated + in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R045 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R046 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R047 + warning + + + + Italian VAT Code (Partita Iva) must be stated in the correct + format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R049 + fatal + + + + Swedish organization number MUST be stated in the correct + format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R050 + fatal + + + + Australian Business Number (ABN) MUST be stated in the correct + format. + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL001 + fatal + + + + Mime code must be according to subset of IANA code + list. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL002 + fatal + + + + Reason code MUST be according to subset of UNCL 5189 + D.16B. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL003 + fatal + + + + Reason code MUST be according to UNCL 7161 D.16B. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL006 + fatal + + + + Invoice period description code must be according to UNCL 2005 + D.16B. + + + + + + + + + + + + + + + + PEPPOL-EN16931-F001 + fatal + + + + A date MUST be formatted YYYY-MM-DD. + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0104 + fatal + + + + Tax Category G MUST be used when exemption reason code is + VATEX-EU-G + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0105 + fatal + + + + Tax Category O MUST be used when exemption reason code is + VATEX-EU-O + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0106 + fatal + + + + Tax Category K MUST be used when exemption reason code is + VATEX-EU-IC + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0107 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-AE + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0108 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-D + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0109 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-F + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0110 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-I + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0111 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-J + + + + + + + + + + + + + + + + PEPPOL-EN16931-R061 + fatal + + + + Mandate reference MUST be provided for direct debit. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL008 + fatal + + + + Electronic address identifier scheme must be from the codelist + "Electronic Address Identifier Scheme" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-BIL-016 + fatal + + + + PayableAmount must be greater than 0 - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-005 + fatal + + + + For Danish suppliers the following Payment means codes are + allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97 + + + + + + + + + + OIOUBL-BIL-006 + fatal + + + + Bank account and registration account is + mandatory if payment means is 31 or 42 + + + + + + + + + + OIOUBL-BIL-007 + fatal + + + + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'IBAN' + + + + + + + + + + + + + + + + + OIOUBL-BIL-020 + fatal + + + + For Invoice the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:invoice:3.0' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-022 + fatal + + + + For CreditNote the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:creditnote:3.0' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-019 + fatal + + + + The value of UBLVersionID must be equal to 2.1 - Value + found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-023 + fatal + + + + The ProfileID must be qual either + 'urn:fdc:oioubl.dk:bis:billing_with_response:3' or + 'urn:fdc:oioubl.dk:bis:billing_private_without_response:3' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-017 + fatal + + + + Invoice type code MUST be set according to the + profile. + + + + + + + + + + + + + + + + OIOUBL-BIL-018 + fatal + + + + Credit note type code MUST be set according to the + profile. + + + + + + + + + + + + + + + + OIOUBL-BIL-098 + fatal + + + + The value of ' + + 'must not be negative - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-100 + fatal + + + + The element 'CompanyID' must not use schemeID='0237' under + 'AccountingCustomerParty' + + + + + + + + + + + + + + + + OIOUBL-BIL-106 + fatal + + + + + The value in '@unitCode' is not valid. It must be one from the codellist UNECERec20 - Value found: ' + + ' + + + + + + + + + + + + + + + + + OIOUBL-BIL-101 + fatal + + + + Only use Delivery/ActualDeliveryDate if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + + + + + + + + OIOUBL-BIL-102 + fatal + + + + Only use Delivery/DeliveryLocation if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + + + + + + + + OIOUBL-BIL-103 + fatal + + + + Only use Delivery/DeliveryParty if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + + + + + + + + OIOUBL-BIL-107 + fatal + + + + + The ID of each InvoiceLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + + + + + + + + OIOUBL-BIL-108 + fatal + + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + + + + + + + + OIOUBL-BIL-110 + fatal + + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + + + + + + + + OIOUBL-BIL-105 + fatal + + + + InvoicedQuantity/CreditedQuantity must not be 0 - Value found: + + + + + + + + + + + + + OIOUBL-BIL-130 + fatal + + + + Invoice/OrderReference is mandatory when OrderLineReference class is present + + + + + + + + + + + OIOUBL-BIL-131 + fatal + + + + One or more TaxTotal classes must be present on line level + + + + + + + + + + + + + + + + + OIOUBL-BIL-111 + fatal + + + + CalculationRate must be greater than zero and have exactly 4 decimal places + + + + + + + + + + OIOUBL-BIL-112 + fatal + + + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + OIOUBL-BIL-115 + fatal + + + + + Each VAT breakdown shall be defined through a VAT category code + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-BIL-124 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 1 + + + + + + + + + + + + + + + + OIOUBL-BIL-125 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 10 + + + + + + + + + + + + + + + + OIOUBL-BIL-028 + fatal + + + + InstructionNote is not allow when the PaymentMeansCode = '31' + + + + + + + + + + OIOUBL-BIL-029 + fatal + + + + PayeeFinancialAccount/ID is mandatory when the PaymentMeansCode = '31' + + + + + + + + + + OIOUBL-BIL-030 + fatal + + + + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-091 + fatal + + + + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-031 + fatal + + + + If PaymentMeansCode = 31 CreditAccount/AccountID must not be + more than 8 characters - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-024 + fatal + + + + If PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', then PayeeFinancialAccount/ID must not + be more than 34 digits - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-025 + fatal + + + + PaymentMeansCode = 31 then FinancialInstitutionBranch/ID is mandatory when PaymentChannelCode equals 'ZZZ' + + + + + + + + + + + OIOUBL-BIL-026 + fatal + + + + If PaymentMeansCode = 31 then FinancialInstitutionBranch/Name + element is mandatory + + + + + + + + + + OIOUBL-BIL-027 + fatal + + + + If PaymentMeansCode = 31 then + FinancialInstitutionBranch/Address class is mandatory + + + + + + + + + + OIOUBL-BIL-095 + fatal + + + + When PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', the ID element in PayeeFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ must be used + + + + + + + + + + OIOUBL-BIL-120 + fatal + + + + When PaymentMeansCode is = 31, then PaymentChannelCode is mandatory + + + + + + + + + + OIOUBL-BIL-121 + fatal + + + + When PaymentMeansCode = 31, then PaymentChannelCode should be either 'IBAN' or 'ZZZ' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-113 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:BANK' when PaymentMeansCode is '42' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-033 + fatal + + + + CreditAccount is not allow when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-034 + fatal + + + + InstructionNote is not allow when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-035 + fatal + + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-092 + fatal + + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-037 + fatal + + + + PayeeFinancialAccount is mandatory when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-038 + fatal + + + + PayeeFinancialAccount/ID is mandatory when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-039 + fatal + + + + PayeeFinancialAccount/FinancialInstitutionBranch/ID must exist + and be 4 digits long when PaymentMeansCode = '42' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-040 + fatal + + + + PayeeFinancialAccount/ID must not be more than 10 characters when PaymentMeansCode = '42' - + Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-032 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 48 + + + + + + + + + + OIOUBL-BIL-041 + fatal + + + + InstructionID is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-042 + fatal + + + + InstructionNote is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-043 + fatal + + + + PayerFinancialAccount is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-044 + fatal + + + + PayeeFinancialAccount is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-045 + fatal + + + + CreditAccount is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-046 + fatal + + + + CardAccount must be used when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-047 + fatal + + + + CardAccount/CardTypeCode is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-048 + fatal + + + + CardAccount/ValidityStartDate is not allow when the + PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-049 + fatal + + + + CardAccount/ExpiryDate is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-050 + fatal + + + + CardAccount/IssuerID is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-051 + fatal + + + + CardAccount/IssueNumberID is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-052 + fatal + + + + CardAccount/CV2ID is not allow when the PaymentMeans = '48'> + + + + + + + + + + OIOUBL-BIL-053 + fatal + + + + CardAccount/CardChipCode is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-054 + fatal + + + + CardAccount/ChipApplicationID is not allow when the + PaymentMeans = '48' + + + + + + + + + + + + + + + + OIOUBL-BIL-122 + fatal + + + + When PaymentMeansCode = 49 then PaymentChannelCode is mandatory + + + + + + + + + + OIOUBL-BIL-123 + fatal + + + + When PaymentMeansCode = 49 then PaymentChannelCode should be either 'DK:BANK' or 'IBAN' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-055 + fatal + + + + InstructionNote is not allow when the PaymentMeans = '49'/> + + + + + + + + + + OIOUBL-BIL-056 + fatal + + + + CreditAccount is not allowed when the PaymentMeans = '49'/> + + + + + + + + + + OIOUBL-BIL-057 + fatal + + + + InstructionID is mandatory when PaymentMeans = '49'"/> + + + + + + + + + + + OIOUBL-BIL-058 + fatal + + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '49' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-059 + fatal + + + + InstructionID must not be more than 60 characters when + PaymentMeansCode = '49' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-060 + fatal + + + + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'DK:BANK' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-061 + fatal + + + + If cbc:PaymentChannelCode is 'DK:BANK', then PaymentMandate/PayeeFinancialAccount/FinancialInstitutionBranch/ID must be 4 characters when + PaymentMeansCode = '49' - Value found:' + + ' + + + + + + + + + + OIOUBL-BIL-062 + fatal + + + + If PaymentChannelCode = 'IBAN' then PaymentMandate/ayerFinancialAccount/ID must be between 18 and 34 characters + when PaymentMeansCode = '49' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-063 + fatal + + + + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/ID is not + allowed when PaymentMeansCode = '49'"/> + + + + + + + + + + OIOUBL-BIL-064 + fatal + + + + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ID + must be present when PaymentMeansCode = '49'"/> + + + + + + + + + + + + + + + + OIOUBL-BIL-114 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:GIRO' when PaymentMeansCode is '50' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-065 + fatal + + + + CreditAccount is not allowed when the PaymentMeans = '50' + + + + + + + + + + OIOUBL-BIL-066 + fatal + + + + PaymentID must be present when PaymentMeansCode ='50' + + + + + + + + + + OIOUBL-BIL-067 + fatal + + + + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '50' + + + + + + + + + + OIOUBL-BIL-068 + fatal + + + + InstructionID is mandatory when PaymentID equals 04 or 15 and + PaymentMeansCode = '50' + + + + + + + + + + OIOUBL-BIL-069 + fatal + + + + PaymentID must equal 01, 04 or 15 when PaymentMeansCode = '50' + + + + + + + + + + OIOUBL-BIL-070 + fatal + + + + InstructionNote is only allowed if PaymentID equals 01 when + PaymentMeansCode = '50' + + + + + + + + + + OIOUBL-BIL-072 + fatal + + + + InstructionID must be 18 or less characters when + PaymentMeansCode = '50'- Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-073 + fatal + + + + InstructionID must be numeric when PaymentID = '04' or '15' and + PaymentMeansCode = '50' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-074 + fatal + + + + PayeeFinancialAccount/ID must consist of 7 or 8 numerical + characters when PaymentMeansCode = '50' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-094 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 58' + + + + + + + + + + OIOUBL-BIL-075 + fatal + + + + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '58' + + + + + + + + + + + + + + + + OIOUBL-BIL-126 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 59 + + + + + + + + + + + + + + + + OIOUBL-BIL-1150 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:FIK' when PaymentMeansCode is '93' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-076 + fatal + + + + PaymentID must be present when PaymentMeansCode = '93' + + + + + + + + + + OIOUBL-BIL-077 + fatal + + + + InstructionID is mandatory when PaymentID equals 71 or 75 and + PaymentMeansCode = '93' + + + + + + + + + + OIOUBL-BIL-078 + fatal + + + + InstructionNote is only allowed when PaymentID equals 73 or 75 + and PaymentMeansCode = '93' + + + + + + + + + + OIOUBL-BIL-079 + fatal + + + + PaymentID must equal 71, 73 or 75 when PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-080 + fatal + + + + InstructionID must equal 15 characters when PaymentID equals 71 + and PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-081 + fatal + + + + InstructionID must equal 16 characters when PaymentID equals 75 + and PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-082 + fatal + + + + InstructionID must be a numeric value when PaymentID equals 71 + or 75 and PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-083 + fatal + + + + InstructionID only allowed if PaymentID equals 71 or 75 when + PaymentMeansCode = '93'"/> + + + + + + + + + + OIOUBL-BIL-084 + fatal + + + + CreditAccount/AccountID must be 8 characters when + PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-116 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:NEMKONTO' when PaymentMeansCode is '97' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-085 + fatal + + + + InstructionID is not allowed when PaymentMeansCode = '97' + + + + + + + + + + OIOUBL-BIL-086 + fatal + + + + InstructionNote is not allowed when PaymentMeansCode = '97'> + + + + + + + + + + OIOUBL-BIL-087 + fatal + + + + PaymentID is not allowed when PaymentMeansCode = '97' + + + + + + + + + + OIOUBL-BIL-088 + fatal + + + + PayerFinancialAccount is not allowed when PaymentMeansCode = '97'> + + + + + + + + + + OIOUBL-BIL-089 + fatal + + + + PayeeFinancialAccount is not allowed when PaymentMeansCode = '97' + + + + + + + + + + OIOUBL-BIL-090 + fatal + + + + CreditAccount is not allowed when PaymentMeansCode = '97' + + + + + + + + + + + + + + + + OIOUBL-BIL-096 + fatal + + + + When ID equals 'Factoring', Note element is mandatory + (factoring note) + + + + + + + + + + OIOUBL-BIL-097 + fatal + + + + No more than one Note element may be present + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-001 + fatal + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-002 + fatal + + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: ' + + ' The + value in DocumentTypeCode must equal '130' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-003 + fatal + + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-004 + fatal + + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-013 + fatal + + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-005 + fatal + + + + The element must contain a valid UUID - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-006 + fatal + + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-007 + fatal + + + + SequenceNumeric must not be negative - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-008 + fatal + + + + CityName AND PostalZone MUST be present. + + + + + + + + + + OIOUBL-COMMON-009 + fatal + + + + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-010 + fatal + + + + IF Floor is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-011 + fatal + + + + IF Room is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-012 + fatal + + + + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-150 + fatal + + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + + + + + + + + + + OIOUBL-COMMON-014 + fatal + + + + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + + + + + + + + + + + + + + OIOUBL-COMMON-102 + fatal + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + + + + + + + + + + + + + + OIOUBL-COMMON-103 + fatal + + + + No more than one ManufacturersItemIdentification class may be present + + + + + + + + + + OIOUBL-COMMON-104 + fatal + + + + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-100 + fatal + + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + + + + + + + + + + OIOUBL-COMMON-101 + fatal + + + + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + + + + + + + + + + OIOUBL-COMMON-106 + fatal + + + + cac:Party/cac:PartyName/cbc:Name must be present. + + + + + + + + + + OIOUBL-COMMON-107 + fatal + + + + cac:Party/cac:PartyLegalEntity must be present. + + + + + + + + + + OIOUBL-COMMON-108 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-105 + fatal + + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-109 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + OIOUBL-COMMON-110 + fatal + + + + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + + + + + + + OIOUBL-COMMON-111 + fatal + + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-112 + fatal + + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-113 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-114 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + OIOUBL-COMMON-115 + fatal + + + + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-116 + fatal + + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-117 + fatal + + + + The element 'OriginalDocumentReference' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-118 + fatal + + + + The element 'SignatoryParty' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-119 + fatal + + + + The element 'CanonicalizationMethod' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-120 + fatal + + + + The element 'SignatureMethod' is mandatory in 'Signature' + + + + + + + + + + + + + + + + OIOUBL-COMMON-121 + fatal + + + + StartDate + StartTime must be before or the same as EndDate + EndTime + + + + + + + + + + OIOUBL-COMMON-122 + fatal + + + + If StartTime exists, StartDate must be present + + + + + + + + + + OIOUBL-COMMON-123 + fatal + + + + If EndTime exists, EndDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-124 + fatal + + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + + + + + + + + + + + + + + OIOUBL-COMMON-125 + fatal + + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + + + + + + + + + + OIOUBL-COMMON-126 + fatal + + + + Telephone must include country code (must start with '+' or '00') + + + + + + + + + + OIOUBL-COMMON-127 + fatal + + + + ElectronicMail must have valid format (like 'user123@example.com') + + + + + + + + + + + + + + + + OIOUBL-COMMON-128 + fatal + + + + Must not have both embedded document and external reference. + + + + + + + + + + + + + + + + OIOUBL-COMMON-129 + fatal + + + + EmbeddedDocumentBinaryObject must have filename attribute + + + + + + + + + + OIOUBL-COMMON-130 + fatal + + + + Attribute mimeCode must be a value from the code list + + + + + + + + + + + + + + + + OIOUBL-COMMON-131 + fatal + + + + When using ExternalReference, URI is mandatory + + + + + + + + + + OIOUBL-COMMON-132 + fatal + + + + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + + + + + + + + + + OIOUBL-COMMON-133 + fatal + + + + If ExpiryTime is present, ExpiryDate MUST be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-134 + fatal + + + + If IssueTime is present, IssueDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-140 + fatal + + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + + + + + + + + + + + + OIOUBL-COMMON-141 + fatal + + + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-Common-GP001 + fatal + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: ' + + ' + + + + + + + + + + OIOUBL-Common-GP002 + fatal + + + + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-Common-GP004 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + + + + + + + + + + OIOUBL-Common-GP005 + fatal + + + + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + + + - NetEmissionFactor value + + + - Quantity: + + + + + + + + + + + + + OIOUBL-Common-GP006 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + + + + + + + + + + OIOUBL-Common-GP007 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + + + + + + + + + + OIOUBL-Common-GP008 + fatal + + + + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Invoice-Response.xslt b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Invoice-Response.xslt new file mode 100644 index 00000000..e8a48de9 --- /dev/null +++ b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Invoice-Response.xslt @@ -0,0 +1,2115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + profile + profile + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-001 + fatal + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-002 + fatal + + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: ' + + ' The + value in DocumentTypeCode must equal '130' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-003 + fatal + + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-004 + fatal + + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-013 + fatal + + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-005 + fatal + + + + The element must contain a valid UUID - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-006 + fatal + + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-007 + fatal + + + + SequenceNumeric must not be negative - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-008 + fatal + + + + CityName AND PostalZone MUST be present. + + + + + + + + + + OIOUBL-COMMON-009 + fatal + + + + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-010 + fatal + + + + IF Floor is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-011 + fatal + + + + IF Room is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-012 + fatal + + + + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-150 + fatal + + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + + + + + + + + + + OIOUBL-COMMON-014 + fatal + + + + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + + + + + + + + + + + + + + OIOUBL-COMMON-102 + fatal + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + + + + + + + + + + + + + + OIOUBL-COMMON-103 + fatal + + + + No more than one ManufacturersItemIdentification class may be present + + + + + + + + + + OIOUBL-COMMON-104 + fatal + + + + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-100 + fatal + + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + + + + + + + + + + OIOUBL-COMMON-101 + fatal + + + + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + + + + + + + + + + OIOUBL-COMMON-106 + fatal + + + + cac:Party/cac:PartyName/cbc:Name must be present. + + + + + + + + + + OIOUBL-COMMON-107 + fatal + + + + cac:Party/cac:PartyLegalEntity must be present. + + + + + + + + + + OIOUBL-COMMON-108 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-105 + fatal + + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-109 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + OIOUBL-COMMON-110 + fatal + + + + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + + + + + + + OIOUBL-COMMON-111 + fatal + + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-112 + fatal + + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-113 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-114 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + OIOUBL-COMMON-115 + fatal + + + + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-116 + fatal + + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-117 + fatal + + + + The element 'OriginalDocumentReference' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-118 + fatal + + + + The element 'SignatoryParty' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-119 + fatal + + + + The element 'CanonicalizationMethod' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-120 + fatal + + + + The element 'SignatureMethod' is mandatory in 'Signature' + + + + + + + + + + + + + + + + OIOUBL-COMMON-121 + fatal + + + + StartDate + StartTime must be before or the same as EndDate + EndTime + + + + + + + + + + OIOUBL-COMMON-122 + fatal + + + + If StartTime exists, StartDate must be present + + + + + + + + + + OIOUBL-COMMON-123 + fatal + + + + If EndTime exists, EndDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-124 + fatal + + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + + + + + + + + + + + + + + OIOUBL-COMMON-125 + fatal + + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + + + + + + + + + + OIOUBL-COMMON-126 + fatal + + + + Telephone must include country code (must start with '+' or '00') + + + + + + + + + + OIOUBL-COMMON-127 + fatal + + + + ElectronicMail must have valid format (like 'user123@example.com') + + + + + + + + + + + + + + + + OIOUBL-COMMON-128 + fatal + + + + Must not have both embedded document and external reference. + + + + + + + + + + + + + + + + OIOUBL-COMMON-129 + fatal + + + + EmbeddedDocumentBinaryObject must have filename attribute + + + + + + + + + + OIOUBL-COMMON-130 + fatal + + + + Attribute mimeCode must be a value from the code list + + + + + + + + + + + + + + + + OIOUBL-COMMON-131 + fatal + + + + When using ExternalReference, URI is mandatory + + + + + + + + + + OIOUBL-COMMON-132 + fatal + + + + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + + + + + + + + + + OIOUBL-COMMON-133 + fatal + + + + If ExpiryTime is present, ExpiryDate MUST be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-134 + fatal + + + + If IssueTime is present, IssueDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-140 + fatal + + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + + + + + + + + + + + + OIOUBL-COMMON-141 + fatal + + + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-AR-001 + fatal + + + + + Root element must be ApplicationResponse + + + + + + + + + + + OIOUBL-AR-002 + fatal + + + + + The documenttype does not match an OIOUBL ApplicationResponse and can not be validated by this schematron. + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-020 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-021 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-022 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-023 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-024 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-025 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-026 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-027 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-028 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-029 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-030 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-031 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-032 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-033 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-034 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-035 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-037 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-038 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-039 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-040 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-041 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-043 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-052 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-053 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-054 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-055 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-056 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-057 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-058 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-059 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-060 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-061 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-062 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-063 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-064 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-Common-GP001 + fatal + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: ' + + ' + + + + + + + + + + OIOUBL-Common-GP002 + fatal + + + + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-Common-GP004 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + + + + + + + + + + OIOUBL-Common-GP005 + fatal + + + + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + + + - NetEmissionFactor value + + + - Quantity: + + + + + + + + + + + + + OIOUBL-Common-GP006 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + + + + + + + + + + OIOUBL-Common-GP007 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + + + + + + + + + + OIOUBL-Common-GP008 + fatal + + + + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-IR-001 + fatal + + + + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:billing_with_response:3'. + + + + + + + + + + + + + + + + + OIOUBL-IR-002 + fatal + + + + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3@urn:fdc:oioubl.dk:trns:billing:invoice_response:3.0'. + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Invoice.xslt b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Invoice.xslt new file mode 100644 index 00000000..12dd4858 --- /dev/null +++ b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Invoice.xslt @@ -0,0 +1,5112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-INV-001 + fatal + + + + The root element + must be 'Invoice'. + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-020 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-021 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-022 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-023 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-024 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-025 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-026 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-027 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-028 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-029 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-030 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-031 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-032 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-033 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-034 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-035 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-037 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-038 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-039 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-040 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-041 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-043 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-052 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-053 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-054 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-055 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-056 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-057 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-058 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-059 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-060 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-061 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-062 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-063 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-064 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-R008 + fatal + + + + Document MUST not + contain empty elements. + + + + + + + + + + + + + + + + OIOUBL-BIL-099 + fatal + + + + The value of TaxInclusiveAmount must not be negative unless + DocumentTypeCode is 'PEPPOLBIS32OIOUBL' with listAgencyName 'ERST' - Value + found: ' + + ' + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-R080 + fatal + + + + Only one project reference is allowed on document + level + + + + + + + + + + PEPPOL-EN16931-R001 + fatal + + + + Business process MUST be provided. + + + + + + + + + + PEPPOL-EN16931-R002 + fatal + + + + No more than one note is allowed on document level. + + + + + + + + + + PEPPOL-EN16931-R003 + fatal + + + + A buyer reference or purchase order reference MUST be + provided. + + + + + + + + + + PEPPOL-EN16931-R053 + fatal + + + + Only one tax total with tax subtotals MUST be + provided. + + + + + + + + + + PEPPOL-EN16931-R054 + fatal + + + + Only one tax total without tax subtotals MUST be provided when + tax currency code is provided. + + + + + + + + + + PEPPOL-EN16931-R055 + fatal + + + + Invoice total VAT amount and Invoice total VAT amount in + accounting currency MUST have the same operational sign + + + + + + + + + + + + + + + + PEPPOL-EN16931-R005 + fatal + + + + VAT accounting currency code MUST be different from invoice + currency code when provided + + + + + + + + + + + + + + + + PEPPOL-EN16931-R010 + fatal + + + + Buyer electronic address MUST be provided + + + + + + + + + + + + + + + + PEPPOL-EN16931-R020 + fatal + + + + Seller electronic address MUST be provided + + + + + + + + + + + + + + + + PEPPOL-EN16931-R041 + fatal + + + + Allowance/charge base amount MUST be provided when + allowance/charge percentage is provided. + + + + + + + + + + + + + + + + PEPPOL-EN16931-R042 + fatal + + + + Allowance/charge percentage MUST be provided when + allowance/charge base amount is provided. + + + + + + + + + + + + + + + + PEPPOL-EN16931-R040 + fatal + + + + Allowance/charge amount must equal base amount * percentage/100 + if base amount and percentage exists + + + + + + + + + + PEPPOL-EN16931-R043 + fatal + + + + Allowance/charge ChargeIndicator value MUST equal 'true' or + 'false' + + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL007 + fatal + + + + Currency code must be according to ISO 4217:2005 + + + + + + + + + + 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-EN16931-R110 + fatal + + + + Start date of line period MUST be within invoice + period. + + + + + + + + + + + + + + + + PEPPOL-EN16931-R111 + fatal + + + + End date of line period MUST be within invoice period. + + + + + + + + + + + + + + + + + + + + + + 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-EN16931-R121 + fatal + + + + Base quantity MUST be a positive number above zero. + + + + + + + + + + PEPPOL-EN16931-R100 + fatal + + + + Only one invoiced object is allowed pr line + + + + + + + + + + PEPPOL-EN16931-R101 + fatal + + + + Element Document reference can only be used for Invoice line + object + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-R130 + fatal + + + + Unit code of price base quantity MUST be same as invoiced + quantity. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R040 + fatal + + + + GLN must have a valid format according to GS1 rules. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R041 + fatal + + + + Norwegian organization number MUST be stated in the correct + format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R043 + fatal + + + + Belgian enterprise number MUST be stated in the correct + format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R044 + warning + + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated + in the correct format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R045 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R046 + warning + + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R047 + warning + + + + Italian VAT Code (Partita Iva) must be stated in the correct + format + + + + + + + + + + + + + + + + PEPPOL-COMMON-R049 + fatal + + + + Swedish organization number MUST be stated in the correct + format. + + + + + + + + + + + + + + + + PEPPOL-COMMON-R050 + fatal + + + + Australian Business Number (ABN) MUST be stated in the correct + format. + + + + + + + + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL001 + fatal + + + + Mime code must be according to subset of IANA code + list. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL002 + fatal + + + + Reason code MUST be according to subset of UNCL 5189 + D.16B. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL003 + fatal + + + + Reason code MUST be according to UNCL 7161 D.16B. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL006 + fatal + + + + Invoice period description code must be according to UNCL 2005 + D.16B. + + + + + + + + + + + + + + + + PEPPOL-EN16931-F001 + fatal + + + + A date MUST be formatted YYYY-MM-DD. + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0104 + fatal + + + + Tax Category G MUST be used when exemption reason code is + VATEX-EU-G + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0105 + fatal + + + + Tax Category O MUST be used when exemption reason code is + VATEX-EU-O + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0106 + fatal + + + + Tax Category K MUST be used when exemption reason code is + VATEX-EU-IC + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0107 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-AE + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0108 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-D + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0109 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-F + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0110 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-I + + + + + + + + + + + + + + + + PEPPOL-EN16931-P0111 + fatal + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-J + + + + + + + + + + + + + + + + PEPPOL-EN16931-R061 + fatal + + + + Mandate reference MUST be provided for direct debit. + + + + + + + + + + + + + + + + PEPPOL-EN16931-CL008 + fatal + + + + Electronic address identifier scheme must be from the codelist + "Electronic Address Identifier Scheme" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-BIL-016 + fatal + + + + PayableAmount must be greater than 0 - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-005 + fatal + + + + For Danish suppliers the following Payment means codes are + allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97 + + + + + + + + + + OIOUBL-BIL-006 + fatal + + + + Bank account and registration account is + mandatory if payment means is 31 or 42 + + + + + + + + + + OIOUBL-BIL-007 + fatal + + + + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'IBAN' + + + + + + + + + + + + + + + + + OIOUBL-BIL-020 + fatal + + + + For Invoice the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:invoice:3.0' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-022 + fatal + + + + For CreditNote the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:creditnote:3.0' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-019 + fatal + + + + The value of UBLVersionID must be equal to 2.1 - Value + found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-023 + fatal + + + + The ProfileID must be qual either + 'urn:fdc:oioubl.dk:bis:billing_with_response:3' or + 'urn:fdc:oioubl.dk:bis:billing_private_without_response:3' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-017 + fatal + + + + Invoice type code MUST be set according to the + profile. + + + + + + + + + + + + + + + + OIOUBL-BIL-018 + fatal + + + + Credit note type code MUST be set according to the + profile. + + + + + + + + + + + + + + + + OIOUBL-BIL-098 + fatal + + + + The value of ' + + 'must not be negative - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-100 + fatal + + + + The element 'CompanyID' must not use schemeID='0237' under + 'AccountingCustomerParty' + + + + + + + + + + + + + + + + OIOUBL-BIL-106 + fatal + + + + + The value in '@unitCode' is not valid. It must be one from the codellist UNECERec20 - Value found: ' + + ' + + + + + + + + + + + + + + + + + OIOUBL-BIL-101 + fatal + + + + Only use Delivery/ActualDeliveryDate if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + + + + + + + + OIOUBL-BIL-102 + fatal + + + + Only use Delivery/DeliveryLocation if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + + + + + + + + OIOUBL-BIL-103 + fatal + + + + Only use Delivery/DeliveryParty if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + + + + + + + + OIOUBL-BIL-107 + fatal + + + + + The ID of each InvoiceLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + + + + + + + + OIOUBL-BIL-108 + fatal + + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + + + + + + + + OIOUBL-BIL-110 + fatal + + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + + + + + + + + OIOUBL-BIL-105 + fatal + + + + InvoicedQuantity/CreditedQuantity must not be 0 - Value found: + + + + + + + + + + + + + OIOUBL-BIL-130 + fatal + + + + Invoice/OrderReference is mandatory when OrderLineReference class is present + + + + + + + + + + + OIOUBL-BIL-131 + fatal + + + + One or more TaxTotal classes must be present on line level + + + + + + + + + + + + + + + + + OIOUBL-BIL-111 + fatal + + + + CalculationRate must be greater than zero and have exactly 4 decimal places + + + + + + + + + + OIOUBL-BIL-112 + fatal + + + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + OIOUBL-BIL-115 + fatal + + + + + Each VAT breakdown shall be defined through a VAT category code + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-BIL-124 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 1 + + + + + + + + + + + + + + + + OIOUBL-BIL-125 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 10 + + + + + + + + + + + + + + + + OIOUBL-BIL-028 + fatal + + + + InstructionNote is not allow when the PaymentMeansCode = '31' + + + + + + + + + + OIOUBL-BIL-029 + fatal + + + + PayeeFinancialAccount/ID is mandatory when the PaymentMeansCode = '31' + + + + + + + + + + OIOUBL-BIL-030 + fatal + + + + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-091 + fatal + + + + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-031 + fatal + + + + If PaymentMeansCode = 31 CreditAccount/AccountID must not be + more than 8 characters - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-024 + fatal + + + + If PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', then PayeeFinancialAccount/ID must not + be more than 34 digits - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-025 + fatal + + + + PaymentMeansCode = 31 then FinancialInstitutionBranch/ID is mandatory when PaymentChannelCode equals 'ZZZ' + + + + + + + + + + + OIOUBL-BIL-026 + fatal + + + + If PaymentMeansCode = 31 then FinancialInstitutionBranch/Name + element is mandatory + + + + + + + + + + OIOUBL-BIL-027 + fatal + + + + If PaymentMeansCode = 31 then + FinancialInstitutionBranch/Address class is mandatory + + + + + + + + + + OIOUBL-BIL-095 + fatal + + + + When PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', the ID element in PayeeFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ must be used + + + + + + + + + + OIOUBL-BIL-120 + fatal + + + + When PaymentMeansCode is = 31, then PaymentChannelCode is mandatory + + + + + + + + + + OIOUBL-BIL-121 + fatal + + + + When PaymentMeansCode = 31, then PaymentChannelCode should be either 'IBAN' or 'ZZZ' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-113 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:BANK' when PaymentMeansCode is '42' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-033 + fatal + + + + CreditAccount is not allow when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-034 + fatal + + + + InstructionNote is not allow when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-035 + fatal + + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-092 + fatal + + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-037 + fatal + + + + PayeeFinancialAccount is mandatory when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-038 + fatal + + + + PayeeFinancialAccount/ID is mandatory when the PaymentMeans = '42' + + + + + + + + + + OIOUBL-BIL-039 + fatal + + + + PayeeFinancialAccount/FinancialInstitutionBranch/ID must exist + and be 4 digits long when PaymentMeansCode = '42' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-040 + fatal + + + + PayeeFinancialAccount/ID must not be more than 10 characters when PaymentMeansCode = '42' - + Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-032 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 48 + + + + + + + + + + OIOUBL-BIL-041 + fatal + + + + InstructionID is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-042 + fatal + + + + InstructionNote is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-043 + fatal + + + + PayerFinancialAccount is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-044 + fatal + + + + PayeeFinancialAccount is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-045 + fatal + + + + CreditAccount is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-046 + fatal + + + + CardAccount must be used when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-047 + fatal + + + + CardAccount/CardTypeCode is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-048 + fatal + + + + CardAccount/ValidityStartDate is not allow when the + PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-049 + fatal + + + + CardAccount/ExpiryDate is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-050 + fatal + + + + CardAccount/IssuerID is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-051 + fatal + + + + CardAccount/IssueNumberID is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-052 + fatal + + + + CardAccount/CV2ID is not allow when the PaymentMeans = '48'> + + + + + + + + + + OIOUBL-BIL-053 + fatal + + + + CardAccount/CardChipCode is not allow when the PaymentMeans = '48' + + + + + + + + + + OIOUBL-BIL-054 + fatal + + + + CardAccount/ChipApplicationID is not allow when the + PaymentMeans = '48' + + + + + + + + + + + + + + + + OIOUBL-BIL-122 + fatal + + + + When PaymentMeansCode = 49 then PaymentChannelCode is mandatory + + + + + + + + + + OIOUBL-BIL-123 + fatal + + + + When PaymentMeansCode = 49 then PaymentChannelCode should be either 'DK:BANK' or 'IBAN' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-055 + fatal + + + + InstructionNote is not allow when the PaymentMeans = '49'/> + + + + + + + + + + OIOUBL-BIL-056 + fatal + + + + CreditAccount is not allowed when the PaymentMeans = '49'/> + + + + + + + + + + OIOUBL-BIL-057 + fatal + + + + InstructionID is mandatory when PaymentMeans = '49'"/> + + + + + + + + + + + OIOUBL-BIL-058 + fatal + + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '49' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-059 + fatal + + + + InstructionID must not be more than 60 characters when + PaymentMeansCode = '49' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-060 + fatal + + + + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'DK:BANK' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-061 + fatal + + + + If cbc:PaymentChannelCode is 'DK:BANK', then PaymentMandate/PayeeFinancialAccount/FinancialInstitutionBranch/ID must be 4 characters when + PaymentMeansCode = '49' - Value found:' + + ' + + + + + + + + + + OIOUBL-BIL-062 + fatal + + + + If PaymentChannelCode = 'IBAN' then PaymentMandate/ayerFinancialAccount/ID must be between 18 and 34 characters + when PaymentMeansCode = '49' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-063 + fatal + + + + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/ID is not + allowed when PaymentMeansCode = '49'"/> + + + + + + + + + + OIOUBL-BIL-064 + fatal + + + + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ID + must be present when PaymentMeansCode = '49'"/> + + + + + + + + + + + + + + + + OIOUBL-BIL-114 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:GIRO' when PaymentMeansCode is '50' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-065 + fatal + + + + CreditAccount is not allowed when the PaymentMeans = '50' + + + + + + + + + + OIOUBL-BIL-066 + fatal + + + + PaymentID must be present when PaymentMeansCode ='50' + + + + + + + + + + OIOUBL-BIL-067 + fatal + + + + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '50' + + + + + + + + + + OIOUBL-BIL-068 + fatal + + + + InstructionID is mandatory when PaymentID equals 04 or 15 and + PaymentMeansCode = '50' + + + + + + + + + + OIOUBL-BIL-069 + fatal + + + + PaymentID must equal 01, 04 or 15 when PaymentMeansCode = '50' + + + + + + + + + + OIOUBL-BIL-070 + fatal + + + + InstructionNote is only allowed if PaymentID equals 01 when + PaymentMeansCode = '50' + + + + + + + + + + OIOUBL-BIL-072 + fatal + + + + InstructionID must be 18 or less characters when + PaymentMeansCode = '50'- Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-073 + fatal + + + + InstructionID must be numeric when PaymentID = '04' or '15' and + PaymentMeansCode = '50' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-074 + fatal + + + + PayeeFinancialAccount/ID must consist of 7 or 8 numerical + characters when PaymentMeansCode = '50' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-094 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 58' + + + + + + + + + + OIOUBL-BIL-075 + fatal + + + + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '58' + + + + + + + + + + + + + + + + OIOUBL-BIL-126 + fatal + + + + PaymentChannelCode is not allow when the + PaymentMeans = 59 + + + + + + + + + + + + + + + + OIOUBL-BIL-1150 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:FIK' when PaymentMeansCode is '93' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-076 + fatal + + + + PaymentID must be present when PaymentMeansCode = '93' + + + + + + + + + + OIOUBL-BIL-077 + fatal + + + + InstructionID is mandatory when PaymentID equals 71 or 75 and + PaymentMeansCode = '93' + + + + + + + + + + OIOUBL-BIL-078 + fatal + + + + InstructionNote is only allowed when PaymentID equals 73 or 75 + and PaymentMeansCode = '93' + + + + + + + + + + OIOUBL-BIL-079 + fatal + + + + PaymentID must equal 71, 73 or 75 when PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-080 + fatal + + + + InstructionID must equal 15 characters when PaymentID equals 71 + and PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-081 + fatal + + + + InstructionID must equal 16 characters when PaymentID equals 75 + and PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-082 + fatal + + + + InstructionID must be a numeric value when PaymentID equals 71 + or 75 and PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + OIOUBL-BIL-083 + fatal + + + + InstructionID only allowed if PaymentID equals 71 or 75 when + PaymentMeansCode = '93'"/> + + + + + + + + + + OIOUBL-BIL-084 + fatal + + + + CreditAccount/AccountID must be 8 characters when + PaymentMeansCode = '93' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-BIL-116 + fatal + + + + If PaymentChannelCode is present, its value must be 'DK:NEMKONTO' when PaymentMeansCode is '97' - Value found = ' + + ' + + + + + + + + + + OIOUBL-BIL-085 + fatal + + + + InstructionID is not allowed when PaymentMeansCode = '97' + + + + + + + + + + OIOUBL-BIL-086 + fatal + + + + InstructionNote is not allowed when PaymentMeansCode = '97'> + + + + + + + + + + OIOUBL-BIL-087 + fatal + + + + PaymentID is not allowed when PaymentMeansCode = '97' + + + + + + + + + + OIOUBL-BIL-088 + fatal + + + + PayerFinancialAccount is not allowed when PaymentMeansCode = '97'> + + + + + + + + + + OIOUBL-BIL-089 + fatal + + + + PayeeFinancialAccount is not allowed when PaymentMeansCode = '97' + + + + + + + + + + OIOUBL-BIL-090 + fatal + + + + CreditAccount is not allowed when PaymentMeansCode = '97' + + + + + + + + + + + + + + + + OIOUBL-BIL-096 + fatal + + + + When ID equals 'Factoring', Note element is mandatory + (factoring note) + + + + + + + + + + OIOUBL-BIL-097 + fatal + + + + No more than one Note element may be present + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-001 + fatal + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-002 + fatal + + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: ' + + ' The + value in DocumentTypeCode must equal '130' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-003 + fatal + + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-004 + fatal + + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-013 + fatal + + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-005 + fatal + + + + The element must contain a valid UUID - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-006 + fatal + + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-007 + fatal + + + + SequenceNumeric must not be negative - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-008 + fatal + + + + CityName AND PostalZone MUST be present. + + + + + + + + + + OIOUBL-COMMON-009 + fatal + + + + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-010 + fatal + + + + IF Floor is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-011 + fatal + + + + IF Room is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-012 + fatal + + + + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-150 + fatal + + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + + + + + + + + + + OIOUBL-COMMON-014 + fatal + + + + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + + + + + + + + + + + + + + OIOUBL-COMMON-102 + fatal + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + + + + + + + + + + + + + + OIOUBL-COMMON-103 + fatal + + + + No more than one ManufacturersItemIdentification class may be present + + + + + + + + + + OIOUBL-COMMON-104 + fatal + + + + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-100 + fatal + + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + + + + + + + + + + OIOUBL-COMMON-101 + fatal + + + + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + + + + + + + + + + OIOUBL-COMMON-106 + fatal + + + + cac:Party/cac:PartyName/cbc:Name must be present. + + + + + + + + + + OIOUBL-COMMON-107 + fatal + + + + cac:Party/cac:PartyLegalEntity must be present. + + + + + + + + + + OIOUBL-COMMON-108 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-105 + fatal + + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-109 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + OIOUBL-COMMON-110 + fatal + + + + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + + + + + + + OIOUBL-COMMON-111 + fatal + + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-112 + fatal + + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-113 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-114 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + OIOUBL-COMMON-115 + fatal + + + + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-116 + fatal + + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-117 + fatal + + + + The element 'OriginalDocumentReference' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-118 + fatal + + + + The element 'SignatoryParty' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-119 + fatal + + + + The element 'CanonicalizationMethod' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-120 + fatal + + + + The element 'SignatureMethod' is mandatory in 'Signature' + + + + + + + + + + + + + + + + OIOUBL-COMMON-121 + fatal + + + + StartDate + StartTime must be before or the same as EndDate + EndTime + + + + + + + + + + OIOUBL-COMMON-122 + fatal + + + + If StartTime exists, StartDate must be present + + + + + + + + + + OIOUBL-COMMON-123 + fatal + + + + If EndTime exists, EndDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-124 + fatal + + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + + + + + + + + + + + + + + OIOUBL-COMMON-125 + fatal + + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + + + + + + + + + + OIOUBL-COMMON-126 + fatal + + + + Telephone must include country code (must start with '+' or '00') + + + + + + + + + + OIOUBL-COMMON-127 + fatal + + + + ElectronicMail must have valid format (like 'user123@example.com') + + + + + + + + + + + + + + + + OIOUBL-COMMON-128 + fatal + + + + Must not have both embedded document and external reference. + + + + + + + + + + + + + + + + OIOUBL-COMMON-129 + fatal + + + + EmbeddedDocumentBinaryObject must have filename attribute + + + + + + + + + + OIOUBL-COMMON-130 + fatal + + + + Attribute mimeCode must be a value from the code list + + + + + + + + + + + + + + + + OIOUBL-COMMON-131 + fatal + + + + When using ExternalReference, URI is mandatory + + + + + + + + + + OIOUBL-COMMON-132 + fatal + + + + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + + + + + + + + + + OIOUBL-COMMON-133 + fatal + + + + If ExpiryTime is present, ExpiryDate MUST be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-134 + fatal + + + + If IssueTime is present, IssueDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-140 + fatal + + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + + + + + + + + + + + + OIOUBL-COMMON-141 + fatal + + + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-Common-GP001 + fatal + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: ' + + ' + + + + + + + + + + OIOUBL-Common-GP002 + fatal + + + + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-Common-GP004 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + + + + + + + + + + OIOUBL-Common-GP005 + fatal + + + + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + + + - NetEmissionFactor value + + + - Quantity: + + + + + + + + + + + + + OIOUBL-Common-GP006 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + + + + + + + + + + OIOUBL-Common-GP007 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + + + + + + + + + + OIOUBL-Common-GP008 + fatal + + + + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Message-Level-Response.xslt b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Message-Level-Response.xslt new file mode 100644 index 00000000..6c018714 --- /dev/null +++ b/phive-rules-oioubl/src/main/resources/external/schematron/oioubl/3.0.1/xslt/OIOUBL-Message-Level-Response.xslt @@ -0,0 +1,2157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + profile + profile + + + + + + + + + + + message_level_response_network + message_level_response_network + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-001 + fatal + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-002 + fatal + + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: ' + + ' The + value in DocumentTypeCode must equal '130' - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-003 + fatal + + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-004 + fatal + + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-013 + fatal + + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-005 + fatal + + + + The element must contain a valid UUID - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-006 + fatal + + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-007 + fatal + + + + SequenceNumeric must not be negative - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-008 + fatal + + + + CityName AND PostalZone MUST be present. + + + + + + + + + + OIOUBL-COMMON-009 + fatal + + + + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-010 + fatal + + + + IF Floor is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-011 + fatal + + + + IF Room is present, StreetName and BuildingNumber MUST be present. + + + + + + + + + + OIOUBL-COMMON-012 + fatal + + + + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-150 + fatal + + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + + + + + + + + + + OIOUBL-COMMON-014 + fatal + + + + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + + + + + + + + + + + + + + OIOUBL-COMMON-102 + fatal + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + + + + + + + + + + + + + + OIOUBL-COMMON-103 + fatal + + + + No more than one ManufacturersItemIdentification class may be present + + + + + + + + + + OIOUBL-COMMON-104 + fatal + + + + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-100 + fatal + + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + + + + + + + + + + OIOUBL-COMMON-101 + fatal + + + + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + + + + + + + + + + OIOUBL-COMMON-106 + fatal + + + + cac:Party/cac:PartyName/cbc:Name must be present. + + + + + + + + + + OIOUBL-COMMON-107 + fatal + + + + cac:Party/cac:PartyLegalEntity must be present. + + + + + + + + + + OIOUBL-COMMON-108 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-105 + fatal + + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + + + + + + + + + + + + + + OIOUBL-COMMON-109 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + OIOUBL-COMMON-110 + fatal + + + + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + + + + + + + + + + + + + OIOUBL-COMMON-111 + fatal + + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-112 + fatal + + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-113 + fatal + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + + + + + + + OIOUBL-COMMON-114 + fatal + + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + + + + + + + + + + OIOUBL-COMMON-115 + fatal + + + + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + + + + + + + + + + + + + + OIOUBL-COMMON-116 + fatal + + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-117 + fatal + + + + The element 'OriginalDocumentReference' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-118 + fatal + + + + The element 'SignatoryParty' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-119 + fatal + + + + The element 'CanonicalizationMethod' is mandatory in 'Signature' + + + + + + + + + + OIOUBL-COMMON-120 + fatal + + + + The element 'SignatureMethod' is mandatory in 'Signature' + + + + + + + + + + + + + + + + OIOUBL-COMMON-121 + fatal + + + + StartDate + StartTime must be before or the same as EndDate + EndTime + + + + + + + + + + OIOUBL-COMMON-122 + fatal + + + + If StartTime exists, StartDate must be present + + + + + + + + + + OIOUBL-COMMON-123 + fatal + + + + If EndTime exists, EndDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-124 + fatal + + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + + + + + + + + + + + + + + OIOUBL-COMMON-125 + fatal + + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + + + + + + + + + + OIOUBL-COMMON-126 + fatal + + + + Telephone must include country code (must start with '+' or '00') + + + + + + + + + + OIOUBL-COMMON-127 + fatal + + + + ElectronicMail must have valid format (like 'user123@example.com') + + + + + + + + + + + + + + + + OIOUBL-COMMON-128 + fatal + + + + Must not have both embedded document and external reference. + + + + + + + + + + + + + + + + OIOUBL-COMMON-129 + fatal + + + + EmbeddedDocumentBinaryObject must have filename attribute + + + + + + + + + + OIOUBL-COMMON-130 + fatal + + + + Attribute mimeCode must be a value from the code list + + + + + + + + + + + + + + + + OIOUBL-COMMON-131 + fatal + + + + When using ExternalReference, URI is mandatory + + + + + + + + + + OIOUBL-COMMON-132 + fatal + + + + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + + + + + + + + + + OIOUBL-COMMON-133 + fatal + + + + If ExpiryTime is present, ExpiryDate MUST be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-134 + fatal + + + + If IssueTime is present, IssueDate must be present + + + + + + + + + + + + + + + + OIOUBL-COMMON-140 + fatal + + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + + + + + + + + + + + + OIOUBL-COMMON-141 + fatal + + + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-AR-001 + fatal + + + + + Root element must be ApplicationResponse + + + + + + + + + + + OIOUBL-AR-002 + fatal + + + + + The documenttype does not match an OIOUBL ApplicationResponse and can not be validated by this schematron. + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-020 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-021 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-022 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-023 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-024 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-025 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-026 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-027 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-028 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-029 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-030 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-031 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-032 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-033 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-034 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-035 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-037 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-038 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-039 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-040 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-041 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-043 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + OIOUBL-COMMON-052 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-053 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-054 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-055 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-056 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-057 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-058 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-059 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-060 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-061 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-062 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-063 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + OIOUBL-COMMON-064 + fatal + + + + The use of element is not allowed - + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-Common-GP001 + fatal + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: ' + + ' + + + + + + + + + + OIOUBL-Common-GP002 + fatal + + + + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: ' + + ' + + + + + + + + + + + + + + + + OIOUBL-Common-GP004 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + + + + + + + + + + OIOUBL-Common-GP005 + fatal + + + + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + + + - NetEmissionFactor value + + + - Quantity: + + + + + + + + + + + + + OIOUBL-Common-GP006 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + + + + + + + + + + OIOUBL-Common-GP007 + fatal + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + + + + + + + + + + OIOUBL-Common-GP008 + fatal + + + + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-MLR-001 + fatal + + + + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:message_level_response:3' or 'urn:fdc:oioubl.dk:bis:message_level_response_network:3'. + + + + + + + + + + + + + + + + + OIOUBL-MLR-002 + fatal + + + + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:mlr:3@urn:fdc:oioubl.dk:trns:message_level_response:3.0'. + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL-MLR-003 + fatal + + + + + If ProfileID is 'urn:fdc:oioubl.dk:bis:message_level_response_network:3' then ResponseCode MUST be 'RE' + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/java/com/helger/phive/oioubl/mock/CTestFiles.java b/phive-rules-oioubl/src/test/java/com/helger/phive/oioubl/mock/CTestFiles.java index d48d7a5a..f2fdba7b 100644 --- a/phive-rules-oioubl/src/test/java/com/helger/phive/oioubl/mock/CTestFiles.java +++ b/phive-rules-oioubl/src/test/java/com/helger/phive/oioubl/mock/CTestFiles.java @@ -18,6 +18,8 @@ import static org.junit.Assert.assertTrue; +import java.io.File; + import javax.annotation.Nonnull; import javax.annotation.concurrent.Immutable; @@ -25,11 +27,13 @@ import com.helger.commons.annotation.ReturnsMutableCopy; import com.helger.commons.collection.impl.CommonsArrayList; import com.helger.commons.collection.impl.ICommonsList; +import com.helger.commons.io.file.FileSystemIterator; import com.helger.commons.io.resource.ClassPathResource; import com.helger.commons.io.resource.IReadableResource; import com.helger.diver.api.coord.DVRCoordinate; import com.helger.phive.api.executorset.ValidationExecutorSetRegistry; import com.helger.phive.api.mock.PhiveTestFile; +import com.helger.phive.en16931.EN16931Validation; import com.helger.phive.oioubl.OIOUBLLegacyValidation; import com.helger.phive.oioubl.OIOUBLValidation; import com.helger.phive.xml.source.IValidationSourceXML; @@ -41,6 +45,7 @@ public final class CTestFiles public static final ValidationExecutorSetRegistry VES_REGISTRY = new ValidationExecutorSetRegistry <> (); static { + EN16931Validation.initEN16931 (VES_REGISTRY); OIOUBLValidation.initOIOUBL (VES_REGISTRY); OIOUBLLegacyValidation.initLegacyOIOUBL (VES_REGISTRY); } @@ -140,7 +145,13 @@ public static ICommonsList getAllTestFiles () OIOUBLValidation.VID_OIOUBL_ORDER_RESPONSE_SIMPLE_1_14_2, OIOUBLValidation.VID_OIOUBL_REMINDER_1_14_2, OIOUBLValidation.VID_OIOUBL_STATEMENT_1_14_2, - OIOUBLValidation.VID_OIOUBL_UTILITY_STATEMENT_1_14_2 }) + OIOUBLValidation.VID_OIOUBL_UTILITY_STATEMENT_1_14_2, + + // 3.0.1 + OIOUBLValidation.VID_OIOUBL_CREDIT_NOTE_3_0_1, + OIOUBLValidation.VID_OIOUBL_INVOICE_3_0_1, + OIOUBLValidation.VID_OIOUBL_INVOICE_RESPONSE_3_0_1, + OIOUBLValidation.VID_OIOUBL_MLR_3_0_1 }) for (final IReadableResource aRes : getAllMatchingTestFiles (aESID)) { assertTrue ("Not existing test file: " + aRes.getPath (), aRes.exists ()); @@ -794,6 +805,38 @@ public static ICommonsList getAllMatchingTestFiles } } + // 3.0.1 + { + final String sVerPrefix = sPrefix0 + "3.0.1/"; + if (aVESID.equals (OIOUBLValidation.VID_OIOUBL_CREDIT_NOTE_3_0_1)) + { + final String sPrefix = sVerPrefix + "creditnote/"; + for (final File f : new FileSystemIterator (new File ("src/test/resources" + sPrefix))) + ret.add (new ClassPathResource (sPrefix + f.getName ())); + } + else + if (aVESID.equals (OIOUBLValidation.VID_OIOUBL_INVOICE_3_0_1)) + { + final String sPrefix = sVerPrefix + "invoice/"; + for (final File f : new FileSystemIterator (new File ("src/test/resources" + sPrefix))) + ret.add (new ClassPathResource (sPrefix + f.getName ())); + } + else + if (aVESID.equals (OIOUBLValidation.VID_OIOUBL_INVOICE_RESPONSE_3_0_1)) + { + final String sPrefix = sVerPrefix + "ir/"; + for (final File f : new FileSystemIterator (new File ("src/test/resources" + sPrefix))) + ret.add (new ClassPathResource (sPrefix + f.getName ())); + } + else + if (aVESID.equals (OIOUBLValidation.VID_OIOUBL_MLR_3_0_1)) + { + final String sPrefix = sVerPrefix + "mlr/"; + for (final File f : new FileSystemIterator (new File ("src/test/resources" + sPrefix))) + ret.add (new ClassPathResource (sPrefix + f.getName ())); + } + } + return ret; } } diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/DK-PEPPOLBIS-T111.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/DK-PEPPOLBIS-T111.sch new file mode 100644 index 00000000..84920e4e --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/DK-PEPPOLBIS-T111.sch @@ -0,0 +1,435 @@ + + + Rules for PEPPOL Invoice Response transaction 3.1 + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document MUST not contain empty elements. + + + + + + + Document SHOULD not contain schema location. + + + + + A date must be formatted YYYY-MM-DD. + + + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct format. + + + Belgian enterprise number MUST be stated in the correct format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + Swedish organization number MUST be stated in the correct format. + + + Australian Business Number (ABN) MUST be stated in the correct format. + + + + + + + + + + + + Element 'cbc:CustomizationID' MUST be provided. + Element 'cbc:ProfileID' MUST be provided. + Element 'cbc:ID' MUST be provided. + Element 'cbc:IssueDate' MUST be provided. + Element 'cac:SenderParty' MUST be provided. + Element 'cac:ReceiverParty' MUST be provided. + Element 'cac:DocumentResponse' MUST be provided. + Document MUST not contain schema location. + + + + + + + + + + + Element 'cbc:EndpointID' MUST be provided. + Element 'cac:PartyLegalEntity' MUST be provided. + + + Attribute 'schemeID' MUST be present. + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + Element 'cbc:ID' MUST be provided. + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + Element 'cbc:RegistrationName' MUST be provided. + + + + Document MUST NOT contain elements not part of the data model. + + + + + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cbc:EndpointID' MUST be provided. + Element 'cac:PartyLegalEntity' MUST be provided. + + + Attribute 'schemeID' MUST be present. + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + Element 'cbc:ID' MUST be provided. + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + Element 'cbc:RegistrationName' MUST be provided. + + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cac:Response' MUST be provided. + Element 'cac:DocumentReference' MUST be provided. + + + Element 'cbc:ResponseCode' MUST be provided. + + + Value MUST be part of code list 'Invoice status code (UNCL4343 Subset)'. + + + + + Value MUST be part of code list 'Status Clarification Reason (OpenPEPPOL)' or 'Status Clarification Action (OpenPEPPOL)'. + Attribute 'listID' MUST be present. + Value MUST be part of code list 'Clarification list identifier (openPEPPOL)'. + + + + Element 'cbc:AttributeID' MUST be provided. + + + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cbc:ID' MUST be provided. + Element 'cbc:DocumentTypeCode' MUST be provided. + + + + + Value MUST be part of code list 'Document name code, full list (UNCL1001)'. + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cac:PartyName' MUST be provided. + + + Element 'cbc:ID' MUST be provided. + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + Element 'cbc:Name' MUST be provided. + + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cac:PartyName' MUST be provided. + + + Element 'cbc:ID' MUST be provided. + + + Value MUST be part of code list 'ISO 6523 ICD list'. + + + Element 'cbc:Name' MUST be provided. + + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + + + + If status code is one of: CA, UQ or RE then there SHALL be at a clarification code in Invoice Response. + + + + If Clarification code is OTH then Clarification reason SHOULD be provided. + + + + Specification identifier SHALL start with the value 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3'. + + + + If Clarification code is PPD, indicating partial payment, then Clarification reason SHALL be provided. + Clarification Reason "PPD" SHALL only be used in compination with Status "PD". + + + + + + + Clarification Reason code shall exist in the OPStatusAction code lists as identified by listID. + + + + Clarification Reason code shall exist in the OPStatusReason code lists as identified by listID. + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/DK-PEPPOLBIS-T71.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/DK-PEPPOLBIS-T71.sch new file mode 100644 index 00000000..632ed402 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/DK-PEPPOLBIS-T71.sch @@ -0,0 +1,330 @@ + + + Rules for PEPPOL Message Level Response transaction 3.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document MUST not contain empty elements. + + + + + + + Document SHOULD not contain schema location. + + + + + A date must be formatted YYYY-MM-DD. + + + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct format. + + + Belgian enterprise number MUST be stated in the correct format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + Swedish organization number MUST be stated in the correct format. + + + Australian Business Number (ABN) MUST be stated in the correct format. + + + + + + + + + Element 'cbc:CustomizationID' MUST be provided. + Element 'cbc:ProfileID' MUST be provided. + Element 'cbc:ID' MUST be provided. + Element 'cbc:IssueDate' MUST be provided. + Element 'cac:SenderParty' MUST be provided. + Element 'cac:ReceiverParty' MUST be provided. + Element 'cac:DocumentResponse' MUST be provided. + Document MUST not contain schema location. + + + + + + + + + + Element 'cbc:EndpointID' MUST be provided. + + + Attribute 'schemeID' MUST be present. + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cbc:EndpointID' MUST be provided. + + + Attribute 'schemeID' MUST be present. + Value MUST be part of code list 'Electronic Address Scheme (EAS)'. + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cac:Response' MUST be provided. + Element 'cac:DocumentReference' MUST be provided. + + + Element 'cbc:ResponseCode' MUST be provided. + + + Value MUST be part of code list 'Application Response type code (UNCL4343 Subset)'. + + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cbc:ID' MUST be provided. + + + + Value MUST be part of code list 'Document name code, full list (UNCL1001)'. + + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cac:LineReference' MUST be provided. + Element 'cac:Response' MUST be provided. + + + Element 'cbc:LineID' MUST be provided. + + + + Document MUST NOT contain elements not part of the data model. + + + Element 'cbc:Description' MUST be provided. + Element 'cac:Status' MUST be provided. + + + Value MUST be part of code list 'Application Response type code (UNCL4343 Subset)'. + + + + Element 'cbc:StatusReasonCode' MUST be provided. + + + Value MUST be part of code list 'Status reason code (openPEPPOL)'. + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + Document MUST NOT contain elements not part of the data model. + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Creditnote.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Creditnote.sch new file mode 100644 index 00000000..3788e760 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Creditnote.sch @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL 3 CreditNote validation + + + + The root element + must be 'CreditNote'. + + + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Invoice-Response.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Invoice-Response.sch new file mode 100644 index 00000000..5d3fd5be --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Invoice-Response.sch @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + +

Schematron for validating OIOUBL-3 documents.

+ Checking OIOUBL-3 Invoice Response + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Pattern for validating root element, Profile and UBL version

+ + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:billing_with_response:3'. + + + + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3@urn:fdc:oioubl.dk:trns:billing:invoice_response:3.0'. + + +
+ +
diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Invoice.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Invoice.sch new file mode 100644 index 00000000..e22686af --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Invoice.sch @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OIOUBL 3 Invoice validation + + + + The root element + must be 'Invoice'. + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Message-Level-Response.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Message-Level-Response.sch new file mode 100644 index 00000000..980baf05 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/OIOUBL-Message-Level-Response.sch @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + +

Schematron for validating OIOUBL-3 documents.

+ Checking OIOUBL-3 Message Level Response + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Pattern for validating Profile

+ + + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:message_level_response:3' or 'urn:fdc:oioubl.dk:bis:message_level_response_network:3'. + + + + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:mlr:3@urn:fdc:oioubl.dk:trns:message_level_response:3.0'. + + +
+ + + +

Pattern for constraining message_level_response_network ResponseCode

+ + + If ProfileID is 'urn:fdc:oioubl.dk:bis:message_level_response_network:3' then ResponseCode MUST be 'RE' + + +
+ + +
diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Excluded-Elements.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Excluded-Elements.sch new file mode 100644 index 00000000..81f7f9a1 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Excluded-Elements.sch @@ -0,0 +1,194 @@ + + + Danish OIOUBL 3 - Excluded elements + + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + The use of element is not allowed - + + The use of element is not allowed - + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Miscellaneous.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Miscellaneous.sch new file mode 100644 index 00000000..11385694 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Miscellaneous.sch @@ -0,0 +1,24 @@ + + + Danish OIOUBL 3 - Common + + + Document MUST not + contain empty elements. + + + + + + The value of TaxInclusiveAmount must not be negative unless + DocumentTypeCode is 'PEPPOLBIS32OIOUBL' with listAgencyName 'ERST' - Value + found: '' + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Peppol-billing-EN16931-Common.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Peppol-billing-EN16931-Common.sch new file mode 100644 index 00000000..42ba4ba7 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Peppol-billing-EN16931-Common.sch @@ -0,0 +1,191 @@ + + + + Peppol BIS billinge EN16931 - Common + + + + Mime code must be according to subset of IANA code + list. + + + + Reason code MUST be according to subset of UNCL 5189 + D.16B. + + + + Reason code MUST be according to UNCL 7161 D.16B. + + + + Invoice period description code must be according to UNCL 2005 + D.16B. + + + + A date MUST be formatted YYYY-MM-DD. + + + + + Tax Category G MUST be used when exemption reason code is + VATEX-EU-G + + + + Tax Category O MUST be used when exemption reason code is + VATEX-EU-O + + + + Tax Category K MUST be used when exemption reason code is + VATEX-EU-IC + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-AE + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-D + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-F + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-I + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-J + + + + + Mandate reference MUST be provided for direct debit. + + + + + Electronic address identifier scheme must be from the codelist + "Electronic Address Identifier Scheme" + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Peppol-billing-EN16931-Main.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Peppol-billing-EN16931-Main.sch new file mode 100644 index 00000000..bd077441 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/Peppol-billing-EN16931-Main.sch @@ -0,0 +1,329 @@ + + + Peppol BIS billinge EN16931 + + + + + Only one project reference is allowed on document + level + + Business process MUST be provided. + + No more than one note is allowed on document level. + + A buyer reference or purchase order reference MUST be + provided. + Only one tax total with tax subtotals MUST be + provided. + + Only one tax total without tax subtotals MUST be provided when + tax currency code is provided. + + Invoice total VAT amount and Invoice total VAT amount in + accounting currency MUST have the same operational sign + + + + + VAT accounting currency code MUST be different from invoice + currency code when provided + + + + Buyer electronic address MUST be provided + + + + + Seller electronic address MUST be provided + + + + + Allowance/charge base amount MUST be provided when + allowance/charge percentage is provided. + + + Allowance/charge percentage MUST be provided when + allowance/charge base amount is provided. + + + + + Allowance/charge amount must equal base amount * percentage/100 + if base amount and percentage exists + + Allowance/charge ChargeIndicator value MUST equal 'true' or + 'false' + + + + + + + Currency code must be according to ISO 4217:2005 + + + 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). + + + + + + Start date of line period MUST be within invoice + period. + + + + + End date of line period MUST be within invoice period. + + + + + + + + + + + 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 + Base quantity MUST be a positive number above zero. + Only one invoiced object is allowed pr line + Element Document reference can only be used for Invoice line + object + + + + + + + Unit code of price base quantity MUST be same as invoiced + quantity. + + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct + format. + + + Belgian enterprise number MUST be stated in the correct + format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated + in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + Italian VAT Code (Partita Iva) must be stated in the correct + format + + + + Swedish organization number MUST be stated in the correct + format. + + + Australian Business Number (ABN) MUST be stated in the correct + format. + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL-billing-PaymentMeans.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL-billing-PaymentMeans.sch new file mode 100644 index 00000000..6ae2dbb6 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL-billing-PaymentMeans.sch @@ -0,0 +1,586 @@ + + + OIOUBL 3 - PaymentMeans + + PaymentMeans 31 - Main + + + + + PaymentChannelCode is not allow when the + PaymentMeans = 1 + + + + + + + PaymentChannelCode is not allow when the + PaymentMeans = 10 + + + + + + + + InstructionNote is not allow when the PaymentMeansCode = '31' + + PayeeFinancialAccount/ID is mandatory when the PaymentMeansCode = '31' + + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: '' + + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: '' + + If PaymentMeansCode = 31 CreditAccount/AccountID must not be + more than 8 characters - Value found: '' + + If PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', then PayeeFinancialAccount/ID must not + be more than 34 digits - Value found: '' + + PaymentMeansCode = 31 then FinancialInstitutionBranch/ID is mandatory when PaymentChannelCode equals 'ZZZ' + + + If PaymentMeansCode = 31 then FinancialInstitutionBranch/Name + element is mandatory + + If PaymentMeansCode = 31 then + FinancialInstitutionBranch/Address class is mandatory + + + When PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', the ID element in PayeeFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ must be used + + When PaymentMeansCode is = 31, then PaymentChannelCode is mandatory + + When PaymentMeansCode = 31, then PaymentChannelCode should be either 'IBAN' or 'ZZZ' - Value found: '' + + + + + + PaymentMeans 42 - Main + + + + + If PaymentChannelCode is present, its value must be 'DK:BANK' when PaymentMeansCode is '42' - Value found = '' + + CreditAccount is not allow when the PaymentMeans = '42' + + InstructionNote is not allow when the PaymentMeans = '42' + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: '' + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: '' + + PayeeFinancialAccount is mandatory when the PaymentMeans = '42' + + + PayeeFinancialAccount/ID is mandatory when the PaymentMeans = '42' + + PayeeFinancialAccount/FinancialInstitutionBranch/ID must exist + and be 4 digits long when PaymentMeansCode = '42' - Value found: '' + + PayeeFinancialAccount/ID must not be more than 10 characters when PaymentMeansCode = '42' - + Value found: '' + + + + + + PaymentMeans 48 - Main + + + + PaymentChannelCode is not allow when the + PaymentMeans = 48 + + InstructionID is not allow when the PaymentMeans = '48' + + InstructionNote is not allow when the PaymentMeans = '48' + + PayerFinancialAccount is not allow when the PaymentMeans = '48' + + PayeeFinancialAccount is not allow when the PaymentMeans = '48' + + CreditAccount is not allow when the PaymentMeans = '48' + + CardAccount must be used when the PaymentMeans = '48' + + CardAccount/CardTypeCode is not allow when the PaymentMeans = '48' + + CardAccount/ValidityStartDate is not allow when the + PaymentMeans = '48' + + CardAccount/ExpiryDate is not allow when the PaymentMeans = '48' + + CardAccount/IssuerID is not allow when the PaymentMeans = '48' + + CardAccount/IssueNumberID is not allow when the PaymentMeans = '48' + + CardAccount/CV2ID is not allow when the PaymentMeans = '48'> + + CardAccount/CardChipCode is not allow when the PaymentMeans = '48' + + CardAccount/ChipApplicationID is not allow when the + PaymentMeans = '48' + + + + + PaymentMeans 49 - Main + + + + When PaymentMeansCode = 49 then PaymentChannelCode is mandatory + + When PaymentMeansCode = 49 then PaymentChannelCode should be either 'DK:BANK' or 'IBAN' - Value found: '' + + InstructionNote is not allow when the PaymentMeans = '49'/> + + CreditAccount is not allowed when the PaymentMeans = '49'/> + + InstructionID is mandatory when PaymentMeans = '49'"/> + + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '49' - Value found: '' + + InstructionID must not be more than 60 characters when + PaymentMeansCode = '49' - Value found: '' + + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'DK:BANK' - Value found: '' + + If cbc:PaymentChannelCode is 'DK:BANK', then PaymentMandate/PayeeFinancialAccount/FinancialInstitutionBranch/ID must be 4 characters when + PaymentMeansCode = '49' - Value found:'' + + If PaymentChannelCode = 'IBAN' then PaymentMandate/ayerFinancialAccount/ID must be between 18 and 34 characters + when PaymentMeansCode = '49' - Value found: '' + + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/ID is not + allowed when PaymentMeansCode = '49'"/> + + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ID + must be present when PaymentMeansCode = '49'"/> + + + + + PaymentMeans 50 - Main + + + + If PaymentChannelCode is present, its value must be 'DK:GIRO' when PaymentMeansCode is '50' - Value found = '' + + CreditAccount is not allowed when the PaymentMeans = '50' + + PaymentID must be present when PaymentMeansCode ='50' + + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '50' + + InstructionID is mandatory when PaymentID equals 04 or 15 and + PaymentMeansCode = '50' + + PaymentID must equal 01, 04 or 15 when PaymentMeansCode = '50' + + InstructionNote is only allowed if PaymentID equals 01 when + PaymentMeansCode = '50' + + InstructionID must be 18 or less characters when + PaymentMeansCode = '50'- Value found: '' + + InstructionID must be numeric when PaymentID = '04' or '15' and + PaymentMeansCode = '50' - Value found: '' + + PayeeFinancialAccount/ID must consist of 7 or 8 numerical + characters when PaymentMeansCode = '50' - Value found: '' + + + + + + PaymentMeans 58 - Main + + + + PaymentChannelCode is not allow when the + PaymentMeans = 58' + + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '58' + + + + + PaymentMeans 59 - Main + + + + PaymentChannelCode is not allow when the + PaymentMeans = 59 + + + + + PaymentMeans 93 - Main + + + + If PaymentChannelCode is present, its value must be 'DK:FIK' when PaymentMeansCode is '93' - Value found = '' + + PaymentID must be present when PaymentMeansCode = '93' + + + InstructionID is mandatory when PaymentID equals 71 or 75 and + PaymentMeansCode = '93' + + InstructionNote is only allowed when PaymentID equals 73 or 75 + and PaymentMeansCode = '93' + + PaymentID must equal 71, 73 or 75 when PaymentMeansCode = '93' - Value found: '' + + InstructionID must equal 15 characters when PaymentID equals 71 + and PaymentMeansCode = '93' - Value found: '' + + InstructionID must equal 16 characters when PaymentID equals 75 + and PaymentMeansCode = '93' - Value found: '' + + InstructionID must be a numeric value when PaymentID equals 71 + or 75 and PaymentMeansCode = '93' - Value found: '' + + InstructionID only allowed if PaymentID equals 71 or 75 when + PaymentMeansCode = '93'"/> + + CreditAccount/AccountID must be 8 characters when + PaymentMeansCode = '93' - Value found: '' + + + + + + PaymentMeans 97 - Main + + + + If PaymentChannelCode is present, its value must be 'DK:NEMKONTO' when PaymentMeansCode is '97' - Value found = '' + + InstructionID is not allowed when PaymentMeansCode = '97' + + InstructionNote is not allowed when PaymentMeansCode = '97'> + + PaymentID is not allowed when PaymentMeansCode = '97' + + PayerFinancialAccount is not allowed when PaymentMeansCode = '97'> + + PayeeFinancialAccount is not allowed when PaymentMeansCode = '97' + + CreditAccount is not allowed when PaymentMeansCode = '97' + + + + + + PaymentTearm + + + + When ID equals 'Factoring', Note element is mandatory + (factoring note) + + No more than one Note element may be present + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL-billing.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL-billing.sch new file mode 100644 index 00000000..4e079902 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL-billing.sch @@ -0,0 +1,261 @@ + + + Danish spcific Common rules + + + + + + + + + + PayableAmount must be greater than 0 - Value found: '' + + + + + For Danish suppliers the following Payment means codes are + allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97 + + Bank account and registration account is + mandatory if payment means is 31 or 42 + + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'IBAN' + + + + + + + For Invoice the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:invoice:3.0' - Value found: '' + + + + + For CreditNote the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:creditnote:3.0' - Value found: '' + + + + + + The value of UBLVersionID must be equal to 2.1 - Value + found: '' + + + + The ProfileID must be qual either + 'urn:fdc:oioubl.dk:bis:billing_with_response:3' or + 'urn:fdc:oioubl.dk:bis:billing_private_without_response:3' - Value found: '' + + + + + Invoice type code MUST be set according to the + profile. + + + + + Credit note type code MUST be set according to the + profile. + + + + + + The value of ''must not be negative - Value found: '' + + + + + + The element 'CompanyID' must not use schemeID='0237' under + 'AccountingCustomerParty' + + + + + + The value in '@unitCode' is not valid. It must be one from the codellist UNECERec20 - Value found: '' + + + + + + + Only use Delivery/ActualDeliveryDate if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + Only use Delivery/DeliveryLocation if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + Only use Delivery/DeliveryParty if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + + The ID of each InvoiceLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + InvoicedQuantity/CreditedQuantity must not be 0 - Value found: + + Invoice/OrderReference is mandatory when OrderLineReference class is present + + + + One or more TaxTotal classes must be present on line level + + + + + + + + CalculationRate must be greater than zero and have exactly 4 decimal places + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + Each VAT breakdown shall be defined through a VAT category code + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL.sch new file mode 100644 index 00000000..8805973a --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-OIOUBL.sch @@ -0,0 +1,415 @@ + + + Danish OIOUBL 3 - Common + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: '' + + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: '' The + value in DocumentTypeCode must equal '130' - Value found: '' + + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: '' + + + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: '' + + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: '' + + + + The element must contain a valid UUID - Value found: '' + + + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: '' + + + + SequenceNumeric must not be negative - Value found: '' + + + + CityName AND PostalZone MUST be present. + + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + + IF Floor is present, StreetName and BuildingNumber MUST be present. + + IF Room is present, StreetName and BuildingNumber MUST be present. + + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + + + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + + + + + + No more than one ManufacturersItemIdentification class may be present + + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: '' + + + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + cac:Party/cac:PartyName/cbc:Name must be present. + cac:Party/cac:PartyLegalEntity must be present. + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + The element 'OriginalDocumentReference' is mandatory in 'Signature' + The element 'SignatoryParty' is mandatory in 'Signature' + The element 'CanonicalizationMethod' is mandatory in 'Signature' + The element 'SignatureMethod' is mandatory in 'Signature' + + + + + StartDate + StartTime must be before or the same as EndDate + EndTime + If StartTime exists, StartDate must be present + If EndTime exists, EndDate must be present + + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + Telephone must include country code (must start with '+' or '00') + ElectronicMail must have valid format (like 'user123@example.com') + + + + Must not have both embedded document and external reference. + + + + EmbeddedDocumentBinaryObject must have filename attribute + Attribute mimeCode must be a value from the code list + + + + When using ExternalReference, URI is mandatory + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + If ExpiryTime is present, ExpiryDate MUST be present + + + + If IssueTime is present, IssueDate must be present + + + + + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-application-response.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-application-response.sch new file mode 100644 index 00000000..cd55187b --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-application-response.sch @@ -0,0 +1,17 @@ + + + Common rules for ApplicationResponse + + + + Root element must be ApplicationResponse + + + The documenttype does not match an OIOUBL ApplicationResponse and can not be validated by this schematron. + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-billing.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-billing.sch new file mode 100644 index 00000000..c5f29a65 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/common-billing.sch @@ -0,0 +1,186 @@ + + + Common rules BIS Billing + + + + Mime code must be according to subset of IANA code list."/>' + + + + + + Reason code MUST be according to subset of UNCL 5189 + D.16B."/>' + + + + + Reason code MUST be according to UNCL 7161 D.16B."/>' + + + + + + Invoice period description code must be according to UNCL 2005 + D.16B."/>' + + + + + Tax Category G MUST be used when exemption reason code is + VATEX-EU-G"/>' + + + + + Tax Category O MUST be used when exemption reason code is + VATEX-EU-O"/>' + + + + Tax Category K MUST be used when exemption reason code is + VATEX-EU-IC"/>' + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-AE"/>' + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-D"/>' + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-F"/>' + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-I"/>' + + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-J"/>' + + + + Business process MUST be provided. + No more than one note is allowed on document + level. + A buyer reference or purchase order reference MUST be + provided. + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/environmental-aspects.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/environmental-aspects.sch new file mode 100644 index 00000000..730c05d9 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/environmental-aspects.sch @@ -0,0 +1,91 @@ + + + Danish OIOUBL 3 - Environmentally + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: '' + + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: '' + + + + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + - NetEmissionFactor value + - Quantity: + + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/abn.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/abn.xml new file mode 100644 index 00000000..72df5fd8 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/abn.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/addPIVA.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/addPIVA.xml new file mode 100644 index 00000000..2fa0d813 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/addPIVA.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/cat2str.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/cat2str.xml new file mode 100644 index 00000000..06825cde --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/cat2str.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCF.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCF.xml new file mode 100644 index 00000000..22ef1aa7 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCF.xml @@ -0,0 +1,31 @@ + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCF16.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCF16.xml new file mode 100644 index 00000000..1ef55020 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCF16.xml @@ -0,0 +1,16 @@ + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCodiceIPA.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCodiceIPA.xml new file mode 100644 index 00000000..dbf29d3c --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkCodiceIPA.xml @@ -0,0 +1,5 @@ + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkPIVA.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkPIVA.xml new file mode 100644 index 00000000..a1179560 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkPIVA.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkPIVAseIT.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkPIVAseIT.xml new file mode 100644 index 00000000..302f8888 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkPIVAseIT.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkSEOrgnr.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkSEOrgnr.xml new file mode 100644 index 00000000..e741db1e --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/checkSEOrgnr.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/gln.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/gln.xml new file mode 100644 index 00000000..328fb291 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/gln.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/mod11.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/mod11.xml new file mode 100644 index 00000000..6621d160 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/mod11.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/mod97-0208.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/mod97-0208.xml new file mode 100644 index 00000000..d3b4fa9c --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/mod97-0208.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/slack.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/slack.xml new file mode 100644 index 00000000..cb5512c9 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/function/slack.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T01.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T01.sch new file mode 100644 index 00000000..339e9b36 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T01.sch @@ -0,0 +1,193 @@ + + + + + + + + + + + An order transaction SHALL use profile order only, ordering or advanced_ordering. + + + + Specification identifier SHALL start with the value 'urn:fdc:peppol.eu:poacc:trns:order:3'. + + + + + An order SHALL be stated in a single currency + Elements of data type amount cannot have more than 2 decimals (I.e. all amounts except unit price amounts) + + + + + An order SHOULD provide information about its validity end date. + + + + + + An order SHALL have the originator party name or an identifier + + + + When TAX is VAT then Party VAT identifiers 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’. + + + + + + + + + + + + + + + + Expected total amount for payment SHALL NOT be negative + Expected total sum of line amounts SHALL NOT be negative + Expected total sum of line amounts SHALL equal the sum of the order line amounts at order line level + Expected total sum of allowance at document level SHALL be equal to the sum of allowance amounts at document level + Expected total sum of charges at document level SHALL be equal to the sum of charge amounts at document level + + Expected total amount without TAX = Expected total sum of line amounts - Sum of allowances on document level + Sum of charges on document level + Amount due for payment = Invoice total amount with TAX - Paid amount + Rounding amount. + Expected total amount with TAX = Expected total amount without TAX + Order total TAX amount. + + + + + + Allowance/charge base amount SHALL be provided when allowance/charge percentage is provided. + + + + Allowance/charge percentage SHALL be provided when allowance/charge base amount is provided. + + + + Allowance/charge amount SHALL equal base amount * percentage/100 if base amount and percentage exists + Each document or line level allowance SHALL have an allowance reason text or an allowance reason code. + Allowance or charge amounts SHALL NOT be negative. + + + + Each Tax Category SHALL have a TAX category rate, except if the order is not subject to TAX. + When TAX category code is "Standard rated" (S) the TAX rate SHALL be greater than zero. + + + + + + + + + + + + + Order line net amount SHALL equal (Ordered quantity * (Item net price/item price base quantity) + Order line charge amount - Order line allowance amount + Base quantity SHALL be a positive number above zero. + Each order line SHALL have a document line identifier that is unique within the order. + Each order line ordered quantity SHALL not be negative + Each order line SHOULD have an ordered quantity + + + + + + Item net price SHALL equal (Gross price - Allowance amount) when gross price is provided. + + + + + Each order line item net price SHALL not be negative + + The Item gross price SHALL NOT be negative. + Allowance or charge amounts SHALL NOT be negative. + + + + Reason code MUST be according to subset of UNCL 5189 D.16B. + + + + Reason code MUST be according to UNCL 7161 D.16B. + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T110.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T110.sch new file mode 100644 index 00000000..be9cfdbc --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T110.sch @@ -0,0 +1,199 @@ + + + + + + + + + + + Specification identifier SHALL start with the value 'urn:fdc:peppol.eu:poacc:trns:order_agreement:3'. + + + + + Each item in an Order agreement line SHALL be identifiable by either "item sellers identifier" or "item standard identifier" + + + + All amounts SHALL have same currency code as document currency + Elements of data type amount cannot have more than 2 decimals (I.e. all amounts except unit price amounts) + + + + + + + + TAX category tax amount = TAX category taxable amount x (TAX category rate / 100), rounded to two decimals. + + + + + If TAX breakdown is present, the order agreement TAX total amount = Σ TAX category tax amount. + + + + A TAX breakdown with TAX Category codes E, AE, K, G or O SHALL have a TAX exemption reason text + + + + A TAX breakdown with TAX Category codes S, Z, L and M SHALL NOT have a TAX exemption reason text + + + + + + + Tax category rates MUST match provided tax categories on document level when such exists. + + + Tax categories MUST match provided tax categories on document level when such exists. + + + Each Tax Category SHALL have a TAX category rate, except if the order is not subject to TAX. + When TAX category code is "Standard rated" (S) the TAX rate SHALL be greater than zero. + + + + + + + + + + + + + + + + + + + + + + + + + If document totals is provided, all order agreement lines SHALL have a line extension amount + + Total amount for payment SHALL NOT be negative, if expected total amount for payment is provided. + + Total amount for payment SHALL NOT be negative, if expected total amount for payment is provided. + + Total sum of line amounts SHALL equal the sum of the order line amounts at order line level, if total sum of line amounts is provided. + + Total sum of charges at document level SHALL be equal to the sum of charges at document level, if total sum of charges at document level is provided. + + Total sum of allowance at document level SHALL be equal to the sum of allowance amounts at document level, if total sum of allowance at document level is provided. + + Tax exclusive amount SHALL equal the sum of line amount plus total charge amount at document level less total allowance amount at document level if tax exclusive amount is provided. + + Tax inclusive amount SHALL equal tax exclusive amount plus total tax amount. + + Total amount for payment SHALL be equal to the tax inclusive amount minus the prepaid amount plus rounding amount + + + + + + Allowance/charge base amount SHALL be provided when allowance/charge percentage is provided. + + + + Allowance/charge percentage SHALL be provided when allowance/charge base amount is provided. + + + + Allowance/charge amount SHALL equal base amount * percentage/100 if base amount and percentage exists + Each document level allowance SHALL have an allowance reason text or an allowance reason code. + Document level allowance or charge amounts SHALL NOT be negative. + + + + + + + Each order agreement line item net price SHALL not be negative + + The Item gross price SHALL NOT be negative. + Allowance or charge price amounts SHALL NOT be negative. + + + + Reason code MUST be according to subset of UNCL 5189 D.16B. + + + + Reason code MUST be according to UNCL 7161 D.16B. + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T112-DRAFT.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T112-DRAFT.sch new file mode 100644 index 00000000..983a75d0 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T112-DRAFT.sch @@ -0,0 +1,11 @@ + + + + + Specification identifier SHALL start with the value 'urn:fdc:peppol.eu:poacc:trns:order_agreement_response:3'. + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T114.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T114.sch new file mode 100644 index 00000000..d1dee1dc --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T114.sch @@ -0,0 +1,192 @@ + + + + + + + + + + + An order change transaction MUST use profile advanced_ordering. + + + + Specification identifier MUST start with the value 'urn:fdc:peppol.eu:poacc:trns:order_change:3'. + + + + + An order MUST be stated in a single currency + Elements of data type amount cannot have more than 2 decimals (I.e. all amounts except unit price amounts) + + + + + An order change SHOULD provide information about its validity end date. + + + + + + An order change MUST have the originator party name or an identifier + + + + When TAX is VAT then Party VAT identifiers MUST 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’. + + + + + + + + + + + + + + + + Expected total amount for payment MUST NOT be negative + Expected total sum of line amounts MUST NOT be negative + Expected total sum of line amounts MUST equal the sum of the order line amounts at order line level + Expected total sum of allowance at document level MUST be equal to the sum of allowance amounts at document level + Expected total sum of charges at document level MUST be equal to the sum of charge amounts at document level + + Expected total amount without TAX = Expected total sum of line amounts - Sum of allowances on document level + Sum of charges on document level + Amount due for payment = Order change total amount with TAX - Paid amount + Rounding amount. + Expected total amount with TAX = Expected total amount without TAX + Order total TAX amount. + + + + + + Allowance/charge base amount MUST be provided when allowance/charge percentage is provided. + + + + Allowance/charge percentage MUST be provided when allowance/charge base amount is provided. + + + + Allowance/charge amount MUST equal base amount * percentage/100 if base amount and percentage exists + Each document or line level allowance MUST have an allowance reason text or an allowance reason code. + Allowance or charge amounts MUST NOT be negative. + + + + Each Tax Category MUST have a TAX category rate, except if the order is not subject to TAX. + When TAX category code is "Standard rated" (S) the TAX rate MUST be greater than zero. + + + + + + + + + + + + + Order line net amount MUST equal (Ordered quantity * (Item net price/item price base quantity) + Order line charge amount - Order line allowance amount + Base quantity MUST be a positive number above zero. + Each order line MUST have a document line identifier that is unique within the order. + Each order line ordered quantity MUST not be negative + Each order line SHOULD have an ordered quantity + + + + + + Item net price MUST equal (Gross price - Allowance amount) when gross price is provided. + + + + + Each order line item net price MUST not be negative + + The Item gross price MUST NOT be negative. + Allowance or charge amounts MUST NOT be negative. + + + + Reason code MUST be according to subset of UNCL 5189 D.16B. + + + + Reason code MUST be according to UNCL 7161 D.16B. + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T115.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T115.sch new file mode 100644 index 00000000..4aa868cd --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T115.sch @@ -0,0 +1,16 @@ + + + + + An order cancellation transaction MUST use profile advanced_ordering. + + + + Specification identifier MUST start with the value 'urn:fdc:peppol.eu:poacc:trns:order_cancellation:3'. + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T116.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T116.sch new file mode 100644 index 00000000..0db434cb --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T116.sch @@ -0,0 +1,72 @@ + + + + + + + + + + + Specification identifier MUST start with the value 'urn:fdc:peppol.eu:poacc:trns:order_response_advanced:3'. + + + + + An order response MUST be stated in a single currency + + + + + + An order response MUST have the buyer party official name or a buyer party identifier + + + + + An order response MUST have the seller party official name or a seller party identifier + + + + + If both delivery period start date and delivery period end date are given then the end date MUST be later or equal to the start date. + + + + + An order response with code CA (Conditionally accepted) must provide order lines. + An order response with code AP (Accepted) should NOT provide order lines. + An order response with code RE (Rejected) should NOT provide order lines. + An order response with code AB (Acknowledged) must NOT provide order lines. + + + + + + Each order response line MUST have a document line identifier that is unique within the order. + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T76.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T76.sch new file mode 100644 index 00000000..47cce744 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PEPPOL-M-T76.sch @@ -0,0 +1,64 @@ + + + + + + + + Specification identifier SHALL start with the value 'urn:fdc:peppol.eu:poacc:trns:order_response:3'. + + + + + An order response SHALL be stated in a single currency + + + + + + An order response SHALL have the buyer party official name or a buyer party identifier + + + + + An order response SHALL have the seller party official name or a seller party identifier + + + + + If both delivery period start date and delivery period end date are given then the end date SHALL be later or equal to the start date. + + + + + Each order response line SHALL have a document line identifier that is unique within the order. + + + + An order response with code CA (Conditionally accepted) must provide order lines. + An order response with code AP (Accepted) should NOT provide order lines. + An order response with code RE (Rejected) should NOT provide order lines. + An order response with code AB (Acknowledged) must NOT provide order lines. + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PartyIdentification-ID-check.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PartyIdentification-ID-check.sch new file mode 100644 index 00000000..3f974bc8 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PartyIdentification-ID-check.sch @@ -0,0 +1,4 @@ + + + [F-INV????] When the schmemaID are '' then 'cac:PartyIdentification/cbc:ID' must have the following syntax: DK######## - Value found: '' + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PartyIdentification-ID-check1.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PartyIdentification-ID-check1.sch new file mode 100644 index 00000000..1bb0a298 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/PartyIdentification-ID-check1.sch @@ -0,0 +1,4 @@ + + + [F-INV????] When the schmemaID are '' then 'cac:PartyIdentification/cbc:ID' must have the following syntax: DK######## - Value found: '' + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common.sch new file mode 100644 index 00000000..58506616 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common.sch @@ -0,0 +1,26 @@ + + + + Common PEPPOL rules for Post-Award + + + + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common/empty-elements.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common/empty-elements.sch new file mode 100644 index 00000000..17055295 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common/empty-elements.sch @@ -0,0 +1,8 @@ + + + + + Document MUST not contain empty elements. + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common/rules.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common/rules.sch new file mode 100644 index 00000000..d2a3f30a --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/common/rules.sch @@ -0,0 +1,52 @@ + + + + + Document SHOULD not contain schema location. + + + + + A date must be formatted YYYY-MM-DD. + + + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct format. + + + Belgian enterprise number MUST be stated in the correct format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + Swedish organization number MUST be stated in the correct format. + + + Australian Business Number (ABN) MUST be stated in the correct format. + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/abn.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/abn.xml new file mode 100644 index 00000000..72df5fd8 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/abn.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/addPIVA.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/addPIVA.xml new file mode 100644 index 00000000..2fa0d813 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/addPIVA.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/cat2str.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/cat2str.xml new file mode 100644 index 00000000..06825cde --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/cat2str.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCF.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCF.xml new file mode 100644 index 00000000..22ef1aa7 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCF.xml @@ -0,0 +1,31 @@ + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCF16.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCF16.xml new file mode 100644 index 00000000..1ef55020 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCF16.xml @@ -0,0 +1,16 @@ + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCodiceIPA.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCodiceIPA.xml new file mode 100644 index 00000000..dbf29d3c --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkCodiceIPA.xml @@ -0,0 +1,5 @@ + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkPIVA.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkPIVA.xml new file mode 100644 index 00000000..a1179560 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkPIVA.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkPIVAseIT.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkPIVAseIT.xml new file mode 100644 index 00000000..302f8888 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkPIVAseIT.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkSEOrgnr.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkSEOrgnr.xml new file mode 100644 index 00000000..e741db1e --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/checkSEOrgnr.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/gln.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/gln.xml new file mode 100644 index 00000000..328fb291 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/gln.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/mod11.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/mod11.xml new file mode 100644 index 00000000..6621d160 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/mod11.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/mod97-0208.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/mod97-0208.xml new file mode 100644 index 00000000..d3b4fa9c --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/mod97-0208.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/slack.xml b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/slack.xml new file mode 100644 index 00000000..cb5512c9 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/_common/Schematron/sch/parts/function/slack.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Creditnote.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Creditnote.sch new file mode 100644 index 00000000..eaadda6d --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Creditnote.sch @@ -0,0 +1,736 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The root element + must be 'CreditNote'. + + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + + + Document MUST not + contain empty elements. + + + The value of TaxInclusiveAmount must not be negative unless + DocumentTypeCode is 'PEPPOLBIS32OIOUBL' with listAgencyName 'ERST' - Value + found: '' + + + + + Only one project reference is allowed on document + level + Business process MUST be provided. + No more than one note is allowed on document level. + A buyer reference or purchase order reference MUST be + provided. + Only one tax total with tax subtotals MUST be + provided. + Only one tax total without tax subtotals MUST be provided when + tax currency code is provided. + Invoice total VAT amount and Invoice total VAT amount in + accounting currency MUST have the same operational sign + + + VAT accounting currency code MUST be different from invoice + currency code when provided + + + Buyer electronic address MUST be provided + + + Seller electronic address MUST be provided + + + Allowance/charge base amount MUST be provided when + allowance/charge percentage is provided. + + + Allowance/charge percentage MUST be provided when + allowance/charge base amount is provided. + + + Allowance/charge amount must equal base amount * percentage/100 + if base amount and percentage exists + Allowance/charge ChargeIndicator value MUST equal 'true' or + 'false' + + + + Currency code must be according to ISO 4217:2005 + 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). + + + Start date of line period MUST be within invoice + period. + + + End date of line period MUST be within invoice period. + + + + + + + + + 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 + Base quantity MUST be a positive number above zero. + Only one invoiced object is allowed pr line + Element Document reference can only be used for Invoice line + object + + + + + Unit code of price base quantity MUST be same as invoiced + quantity. + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct + format. + + + Belgian enterprise number MUST be stated in the correct + format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated + in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + Italian VAT Code (Partita Iva) must be stated in the correct + format + + + Swedish organization number MUST be stated in the correct + format. + + + Australian Business Number (ABN) MUST be stated in the correct + format. + + + + + Mime code must be according to subset of IANA code + list. + + + Reason code MUST be according to subset of UNCL 5189 + D.16B. + + + Reason code MUST be according to UNCL 7161 D.16B. + + + Invoice period description code must be according to UNCL 2005 + D.16B. + + + A date MUST be formatted YYYY-MM-DD. + + + Tax Category G MUST be used when exemption reason code is + VATEX-EU-G + + + Tax Category O MUST be used when exemption reason code is + VATEX-EU-O + + + Tax Category K MUST be used when exemption reason code is + VATEX-EU-IC + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-AE + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-D + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-F + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-I + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-J + + + Mandate reference MUST be provided for direct debit. + + + Electronic address identifier scheme must be from the codelist + "Electronic Address Identifier Scheme" + + + + + + + + + + + + + + PayableAmount must be greater than 0 - Value found: '' + + + For Danish suppliers the following Payment means codes are + allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97 + Bank account and registration account is + mandatory if payment means is 31 or 42 + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'IBAN' + + + + For Invoice the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:invoice:3.0' - Value found: '' + + + For CreditNote the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:creditnote:3.0' - Value found: '' + + + The value of UBLVersionID must be equal to 2.1 - Value + found: '' + + + The ProfileID must be qual either + 'urn:fdc:oioubl.dk:bis:billing_with_response:3' or + 'urn:fdc:oioubl.dk:bis:billing_private_without_response:3' - Value found: '' + + + Invoice type code MUST be set according to the + profile. + + + Credit note type code MUST be set according to the + profile. + + + The value of ''must not be negative - Value found: '' + + + The element 'CompanyID' must not use schemeID='0237' under + 'AccountingCustomerParty' + + + + The value in '@unitCode' is not valid. It must be one from the codellist UNECERec20 - Value found: '' + + + + Only use Delivery/ActualDeliveryDate if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + Only use Delivery/DeliveryLocation if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + Only use Delivery/DeliveryParty if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + The ID of each InvoiceLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + InvoicedQuantity/CreditedQuantity must not be 0 - Value found: + + Invoice/OrderReference is mandatory when OrderLineReference class is present + + One or more TaxTotal classes must be present on line level + + + + CalculationRate must be greater than zero and have exactly 4 decimal places + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + Each VAT breakdown shall be defined through a VAT category code + + + + + + PaymentChannelCode is not allow when the + PaymentMeans = 1 + + + PaymentChannelCode is not allow when the + PaymentMeans = 10 + + + InstructionNote is not allow when the PaymentMeansCode = '31' + PayeeFinancialAccount/ID is mandatory when the PaymentMeansCode = '31' + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: '' + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: '' + If PaymentMeansCode = 31 CreditAccount/AccountID must not be + more than 8 characters - Value found: '' + If PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', then PayeeFinancialAccount/ID must not + be more than 34 digits - Value found: '' + PaymentMeansCode = 31 then FinancialInstitutionBranch/ID is mandatory when PaymentChannelCode equals 'ZZZ' + + If PaymentMeansCode = 31 then FinancialInstitutionBranch/Name + element is mandatory + If PaymentMeansCode = 31 then + FinancialInstitutionBranch/Address class is mandatory + When PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', the ID element in PayeeFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ must be used + When PaymentMeansCode is = 31, then PaymentChannelCode is mandatory + When PaymentMeansCode = 31, then PaymentChannelCode should be either 'IBAN' or 'ZZZ' - Value found: '' + + + If PaymentChannelCode is present, its value must be 'DK:BANK' when PaymentMeansCode is '42' - Value found = '' + CreditAccount is not allow when the PaymentMeans = '42' + InstructionNote is not allow when the PaymentMeans = '42' + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: '' + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: '' + PayeeFinancialAccount is mandatory when the PaymentMeans = '42' + PayeeFinancialAccount/ID is mandatory when the PaymentMeans = '42' + PayeeFinancialAccount/FinancialInstitutionBranch/ID must exist + and be 4 digits long when PaymentMeansCode = '42' - Value found: '' + PayeeFinancialAccount/ID must not be more than 10 characters when PaymentMeansCode = '42' - + Value found: '' + + + PaymentChannelCode is not allow when the + PaymentMeans = 48 + InstructionID is not allow when the PaymentMeans = '48' + InstructionNote is not allow when the PaymentMeans = '48' + PayerFinancialAccount is not allow when the PaymentMeans = '48' + PayeeFinancialAccount is not allow when the PaymentMeans = '48' + CreditAccount is not allow when the PaymentMeans = '48' + CardAccount must be used when the PaymentMeans = '48' + CardAccount/CardTypeCode is not allow when the PaymentMeans = '48' + CardAccount/ValidityStartDate is not allow when the + PaymentMeans = '48' + CardAccount/ExpiryDate is not allow when the PaymentMeans = '48' + CardAccount/IssuerID is not allow when the PaymentMeans = '48' + CardAccount/IssueNumberID is not allow when the PaymentMeans = '48' + CardAccount/CV2ID is not allow when the PaymentMeans = '48'> + CardAccount/CardChipCode is not allow when the PaymentMeans = '48' + CardAccount/ChipApplicationID is not allow when the + PaymentMeans = '48' + + + When PaymentMeansCode = 49 then PaymentChannelCode is mandatory + When PaymentMeansCode = 49 then PaymentChannelCode should be either 'DK:BANK' or 'IBAN' - Value found: '' + InstructionNote is not allow when the PaymentMeans = '49'/> + CreditAccount is not allowed when the PaymentMeans = '49'/> + InstructionID is mandatory when PaymentMeans = '49'"/> + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '49' - Value found: '' + InstructionID must not be more than 60 characters when + PaymentMeansCode = '49' - Value found: '' + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'DK:BANK' - Value found: '' + If cbc:PaymentChannelCode is 'DK:BANK', then PaymentMandate/PayeeFinancialAccount/FinancialInstitutionBranch/ID must be 4 characters when + PaymentMeansCode = '49' - Value found:'' + If PaymentChannelCode = 'IBAN' then PaymentMandate/ayerFinancialAccount/ID must be between 18 and 34 characters + when PaymentMeansCode = '49' - Value found: '' + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/ID is not + allowed when PaymentMeansCode = '49'"/> + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ID + must be present when PaymentMeansCode = '49'"/> + + + If PaymentChannelCode is present, its value must be 'DK:GIRO' when PaymentMeansCode is '50' - Value found = '' + CreditAccount is not allowed when the PaymentMeans = '50' + PaymentID must be present when PaymentMeansCode ='50' + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '50' + InstructionID is mandatory when PaymentID equals 04 or 15 and + PaymentMeansCode = '50' + PaymentID must equal 01, 04 or 15 when PaymentMeansCode = '50' + InstructionNote is only allowed if PaymentID equals 01 when + PaymentMeansCode = '50' + InstructionID must be 18 or less characters when + PaymentMeansCode = '50'- Value found: '' + InstructionID must be numeric when PaymentID = '04' or '15' and + PaymentMeansCode = '50' - Value found: '' + PayeeFinancialAccount/ID must consist of 7 or 8 numerical + characters when PaymentMeansCode = '50' - Value found: '' + + + PaymentChannelCode is not allow when the + PaymentMeans = 58' + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '58' + + + PaymentChannelCode is not allow when the + PaymentMeans = 59 + + + If PaymentChannelCode is present, its value must be 'DK:FIK' when PaymentMeansCode is '93' - Value found = '' + PaymentID must be present when PaymentMeansCode = '93' + InstructionID is mandatory when PaymentID equals 71 or 75 and + PaymentMeansCode = '93' + InstructionNote is only allowed when PaymentID equals 73 or 75 + and PaymentMeansCode = '93' + PaymentID must equal 71, 73 or 75 when PaymentMeansCode = '93' - Value found: '' + InstructionID must equal 15 characters when PaymentID equals 71 + and PaymentMeansCode = '93' - Value found: '' + InstructionID must equal 16 characters when PaymentID equals 75 + and PaymentMeansCode = '93' - Value found: '' + InstructionID must be a numeric value when PaymentID equals 71 + or 75 and PaymentMeansCode = '93' - Value found: '' + InstructionID only allowed if PaymentID equals 71 or 75 when + PaymentMeansCode = '93'"/> + CreditAccount/AccountID must be 8 characters when + PaymentMeansCode = '93' - Value found: '' + + + If PaymentChannelCode is present, its value must be 'DK:NEMKONTO' when PaymentMeansCode is '97' - Value found = '' + InstructionID is not allowed when PaymentMeansCode = '97' + InstructionNote is not allowed when PaymentMeansCode = '97'> + PaymentID is not allowed when PaymentMeansCode = '97' + PayerFinancialAccount is not allowed when PaymentMeansCode = '97'> + PayeeFinancialAccount is not allowed when PaymentMeansCode = '97' + CreditAccount is not allowed when PaymentMeansCode = '97' + + + When ID equals 'Factoring', Note element is mandatory + (factoring note) + No more than one Note element may be present + + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: '' + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: '' The + value in DocumentTypeCode must equal '130' - Value found: '' + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: '' + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: '' + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: '' + + + The element must contain a valid UUID - Value found: '' + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: '' + + + SequenceNumeric must not be negative - Value found: '' + + + CityName AND PostalZone MUST be present. + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + IF Floor is present, StreetName and BuildingNumber MUST be present. + IF Room is present, StreetName and BuildingNumber MUST be present. + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + No more than one ManufacturersItemIdentification class may be present + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: '' + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + cac:Party/cac:PartyName/cbc:Name must be present. + cac:Party/cac:PartyLegalEntity must be present. + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + The element 'OriginalDocumentReference' is mandatory in 'Signature' + The element 'SignatoryParty' is mandatory in 'Signature' + The element 'CanonicalizationMethod' is mandatory in 'Signature' + The element 'SignatureMethod' is mandatory in 'Signature' + + + StartDate + StartTime must be before or the same as EndDate + EndTime + If StartTime exists, StartDate must be present + If EndTime exists, EndDate must be present + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + Telephone must include country code (must start with '+' or '00') + ElectronicMail must have valid format (like 'user123@example.com') + + + Must not have both embedded document and external reference. + + + EmbeddedDocumentBinaryObject must have filename attribute + Attribute mimeCode must be a value from the code list + + + When using ExternalReference, URI is mandatory + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + If ExpiryTime is present, ExpiryDate MUST be present + + + If IssueTime is present, IssueDate must be present + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: '' + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: '' + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + - NetEmissionFactor value + - Quantity: + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Invoice-Response.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Invoice-Response.sch new file mode 100644 index 00000000..075514bb --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Invoice-Response.sch @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: '' + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: '' The + value in DocumentTypeCode must equal '130' - Value found: '' + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: '' + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: '' + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: '' + + + The element must contain a valid UUID - Value found: '' + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: '' + + + SequenceNumeric must not be negative - Value found: '' + + + CityName AND PostalZone MUST be present. + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + IF Floor is present, StreetName and BuildingNumber MUST be present. + IF Room is present, StreetName and BuildingNumber MUST be present. + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + No more than one ManufacturersItemIdentification class may be present + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: '' + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + cac:Party/cac:PartyName/cbc:Name must be present. + cac:Party/cac:PartyLegalEntity must be present. + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + The element 'OriginalDocumentReference' is mandatory in 'Signature' + The element 'SignatoryParty' is mandatory in 'Signature' + The element 'CanonicalizationMethod' is mandatory in 'Signature' + The element 'SignatureMethod' is mandatory in 'Signature' + + + StartDate + StartTime must be before or the same as EndDate + EndTime + If StartTime exists, StartDate must be present + If EndTime exists, EndDate must be present + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + Telephone must include country code (must start with '+' or '00') + ElectronicMail must have valid format (like 'user123@example.com') + + + Must not have both embedded document and external reference. + + + EmbeddedDocumentBinaryObject must have filename attribute + Attribute mimeCode must be a value from the code list + + + When using ExternalReference, URI is mandatory + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + If ExpiryTime is present, ExpiryDate MUST be present + + + If IssueTime is present, IssueDate must be present + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + Root element must be ApplicationResponse + + + The documenttype does not match an OIOUBL ApplicationResponse and can not be validated by this schematron. + + + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: '' + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: '' + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + - NetEmissionFactor value + - Quantity: + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:billing_with_response:3'. + + + + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:invoice_response:3@urn:fdc:oioubl.dk:trns:billing:invoice_response:3.0'. + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Invoice.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Invoice.sch new file mode 100644 index 00000000..a4bb4fed --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Invoice.sch @@ -0,0 +1,736 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The root element + must be 'Invoice'. + + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + + + Document MUST not + contain empty elements. + + + The value of TaxInclusiveAmount must not be negative unless + DocumentTypeCode is 'PEPPOLBIS32OIOUBL' with listAgencyName 'ERST' - Value + found: '' + + + + + Only one project reference is allowed on document + level + Business process MUST be provided. + No more than one note is allowed on document level. + A buyer reference or purchase order reference MUST be + provided. + Only one tax total with tax subtotals MUST be + provided. + Only one tax total without tax subtotals MUST be provided when + tax currency code is provided. + Invoice total VAT amount and Invoice total VAT amount in + accounting currency MUST have the same operational sign + + + VAT accounting currency code MUST be different from invoice + currency code when provided + + + Buyer electronic address MUST be provided + + + Seller electronic address MUST be provided + + + Allowance/charge base amount MUST be provided when + allowance/charge percentage is provided. + + + Allowance/charge percentage MUST be provided when + allowance/charge base amount is provided. + + + Allowance/charge amount must equal base amount * percentage/100 + if base amount and percentage exists + Allowance/charge ChargeIndicator value MUST equal 'true' or + 'false' + + + + Currency code must be according to ISO 4217:2005 + 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). + + + Start date of line period MUST be within invoice + period. + + + End date of line period MUST be within invoice period. + + + + + + + + + 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 + Base quantity MUST be a positive number above zero. + Only one invoiced object is allowed pr line + Element Document reference can only be used for Invoice line + object + + + + + Unit code of price base quantity MUST be same as invoiced + quantity. + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct + format. + + + Belgian enterprise number MUST be stated in the correct + format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated + in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + Tax Code (Codice Fiscale) must be stated in the correct + format + + + Italian VAT Code (Partita Iva) must be stated in the correct + format + + + Swedish organization number MUST be stated in the correct + format. + + + Australian Business Number (ABN) MUST be stated in the correct + format. + + + + + Mime code must be according to subset of IANA code + list. + + + Reason code MUST be according to subset of UNCL 5189 + D.16B. + + + Reason code MUST be according to UNCL 7161 D.16B. + + + Invoice period description code must be according to UNCL 2005 + D.16B. + + + A date MUST be formatted YYYY-MM-DD. + + + Tax Category G MUST be used when exemption reason code is + VATEX-EU-G + + + Tax Category O MUST be used when exemption reason code is + VATEX-EU-O + + + Tax Category K MUST be used when exemption reason code is + VATEX-EU-IC + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-AE + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-D + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-F + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-I + + + Tax Category AE MUST be used when exemption reason code is + VATEX-EU-J + + + Mandate reference MUST be provided for direct debit. + + + Electronic address identifier scheme must be from the codelist + "Electronic Address Identifier Scheme" + + + + + + + + + + + + + + PayableAmount must be greater than 0 - Value found: '' + + + For Danish suppliers the following Payment means codes are + allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97 + Bank account and registration account is + mandatory if payment means is 31 or 42 + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'IBAN' + + + + For Invoice the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:invoice:3.0' - Value found: '' + + + For CreditNote the CustomizationID must be + 'urn:fdc:oioubl.dk:trns:billing:creditnote:3.0' - Value found: '' + + + The value of UBLVersionID must be equal to 2.1 - Value + found: '' + + + The ProfileID must be qual either + 'urn:fdc:oioubl.dk:bis:billing_with_response:3' or + 'urn:fdc:oioubl.dk:bis:billing_private_without_response:3' - Value found: '' + + + Invoice type code MUST be set according to the + profile. + + + Credit note type code MUST be set according to the + profile. + + + The value of ''must not be negative - Value found: '' + + + The element 'CompanyID' must not use schemeID='0237' under + 'AccountingCustomerParty' + + + + The value in '@unitCode' is not valid. It must be one from the codellist UNECERec20 - Value found: '' + + + + Only use Delivery/ActualDeliveryDate if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + Only use Delivery/DeliveryLocation if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + Only use Delivery/DeliveryParty if not specified on header level (Invoice/Delivery or CreditNote/Delivery) + + The ID of each InvoiceLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + + The ID of each CreditNoteLine must be unique, but the validation is only applied to the firste 5000 lines. + + + InvoicedQuantity/CreditedQuantity must not be 0 - Value found: + + Invoice/OrderReference is mandatory when OrderLineReference class is present + + One or more TaxTotal classes must be present on line level + + + + CalculationRate must be greater than zero and have exactly 4 decimal places + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + Each VAT breakdown shall be defined through a VAT category code + + + + + + PaymentChannelCode is not allow when the + PaymentMeans = 1 + + + PaymentChannelCode is not allow when the + PaymentMeans = 10 + + + InstructionNote is not allow when the PaymentMeansCode = '31' + PayeeFinancialAccount/ID is mandatory when the PaymentMeansCode = '31' + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: '' + PaymentNote must not be more than 20 characters when the + PaymentMeansCode = '31' - Value found: '' + If PaymentMeansCode = 31 CreditAccount/AccountID must not be + more than 8 characters - Value found: '' + If PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', then PayeeFinancialAccount/ID must not + be more than 34 digits - Value found: '' + PaymentMeansCode = 31 then FinancialInstitutionBranch/ID is mandatory when PaymentChannelCode equals 'ZZZ' + + If PaymentMeansCode = 31 then FinancialInstitutionBranch/Name + element is mandatory + If PaymentMeansCode = 31 then + FinancialInstitutionBranch/Address class is mandatory + When PaymentMeansCode = 31 and PaymentChannelCode is 'IBAN', the ID element in PayeeFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ must be used + When PaymentMeansCode is = 31, then PaymentChannelCode is mandatory + When PaymentMeansCode = 31, then PaymentChannelCode should be either 'IBAN' or 'ZZZ' - Value found: '' + + + If PaymentChannelCode is present, its value must be 'DK:BANK' when PaymentMeansCode is '42' - Value found = '' + CreditAccount is not allow when the PaymentMeans = '42' + InstructionNote is not allow when the PaymentMeans = '42' + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: '' + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '42' - Value found: '' + PayeeFinancialAccount is mandatory when the PaymentMeans = '42' + PayeeFinancialAccount/ID is mandatory when the PaymentMeans = '42' + PayeeFinancialAccount/FinancialInstitutionBranch/ID must exist + and be 4 digits long when PaymentMeansCode = '42' - Value found: '' + PayeeFinancialAccount/ID must not be more than 10 characters when PaymentMeansCode = '42' - + Value found: '' + + + PaymentChannelCode is not allow when the + PaymentMeans = 48 + InstructionID is not allow when the PaymentMeans = '48' + InstructionNote is not allow when the PaymentMeans = '48' + PayerFinancialAccount is not allow when the PaymentMeans = '48' + PayeeFinancialAccount is not allow when the PaymentMeans = '48' + CreditAccount is not allow when the PaymentMeans = '48' + CardAccount must be used when the PaymentMeans = '48' + CardAccount/CardTypeCode is not allow when the PaymentMeans = '48' + CardAccount/ValidityStartDate is not allow when the + PaymentMeans = '48' + CardAccount/ExpiryDate is not allow when the PaymentMeans = '48' + CardAccount/IssuerID is not allow when the PaymentMeans = '48' + CardAccount/IssueNumberID is not allow when the PaymentMeans = '48' + CardAccount/CV2ID is not allow when the PaymentMeans = '48'> + CardAccount/CardChipCode is not allow when the PaymentMeans = '48' + CardAccount/ChipApplicationID is not allow when the + PaymentMeans = '48' + + + When PaymentMeansCode = 49 then PaymentChannelCode is mandatory + When PaymentMeansCode = 49 then PaymentChannelCode should be either 'DK:BANK' or 'IBAN' - Value found: '' + InstructionNote is not allow when the PaymentMeans = '49'/> + CreditAccount is not allowed when the PaymentMeans = '49'/> + InstructionID is mandatory when PaymentMeans = '49'"/> + + PaymentNote must not be more than 20 characters when + PaymentMeansCode = '49' - Value found: '' + InstructionID must not be more than 60 characters when + PaymentMeansCode = '49' - Value found: '' + PaymentMandate/ID and PayerFinancialAccount/ID are mandatory when PaymentMeansCode is '49' and PaymentChannelCode is 'DK:BANK' - Value found: '' + If cbc:PaymentChannelCode is 'DK:BANK', then PaymentMandate/PayeeFinancialAccount/FinancialInstitutionBranch/ID must be 4 characters when + PaymentMeansCode = '49' - Value found:'' + If PaymentChannelCode = 'IBAN' then PaymentMandate/ayerFinancialAccount/ID must be between 18 and 34 characters + when PaymentMeansCode = '49' - Value found: '' + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/ID is not + allowed when PaymentMeansCode = '49'"/> + If PaymentChannelCode = 'IBAN' then PaymentMandate/PayerFinancialAccount/FinancialInstitutionBranch/FinancialInstitution/ID + must be present when PaymentMeansCode = '49'"/> + + + If PaymentChannelCode is present, its value must be 'DK:GIRO' when PaymentMeansCode is '50' - Value found = '' + CreditAccount is not allowed when the PaymentMeans = '50' + PaymentID must be present when PaymentMeansCode ='50' + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '50' + InstructionID is mandatory when PaymentID equals 04 or 15 and + PaymentMeansCode = '50' + PaymentID must equal 01, 04 or 15 when PaymentMeansCode = '50' + InstructionNote is only allowed if PaymentID equals 01 when + PaymentMeansCode = '50' + InstructionID must be 18 or less characters when + PaymentMeansCode = '50'- Value found: '' + InstructionID must be numeric when PaymentID = '04' or '15' and + PaymentMeansCode = '50' - Value found: '' + PayeeFinancialAccount/ID must consist of 7 or 8 numerical + characters when PaymentMeansCode = '50' - Value found: '' + + + PaymentChannelCode is not allow when the + PaymentMeans = 58' + PayeeFinancialAccount/ID must be present when PaymentMeansCode + = '58' + + + PaymentChannelCode is not allow when the + PaymentMeans = 59 + + + If PaymentChannelCode is present, its value must be 'DK:FIK' when PaymentMeansCode is '93' - Value found = '' + PaymentID must be present when PaymentMeansCode = '93' + InstructionID is mandatory when PaymentID equals 71 or 75 and + PaymentMeansCode = '93' + InstructionNote is only allowed when PaymentID equals 73 or 75 + and PaymentMeansCode = '93' + PaymentID must equal 71, 73 or 75 when PaymentMeansCode = '93' - Value found: '' + InstructionID must equal 15 characters when PaymentID equals 71 + and PaymentMeansCode = '93' - Value found: '' + InstructionID must equal 16 characters when PaymentID equals 75 + and PaymentMeansCode = '93' - Value found: '' + InstructionID must be a numeric value when PaymentID equals 71 + or 75 and PaymentMeansCode = '93' - Value found: '' + InstructionID only allowed if PaymentID equals 71 or 75 when + PaymentMeansCode = '93'"/> + CreditAccount/AccountID must be 8 characters when + PaymentMeansCode = '93' - Value found: '' + + + If PaymentChannelCode is present, its value must be 'DK:NEMKONTO' when PaymentMeansCode is '97' - Value found = '' + InstructionID is not allowed when PaymentMeansCode = '97' + InstructionNote is not allowed when PaymentMeansCode = '97'> + PaymentID is not allowed when PaymentMeansCode = '97' + PayerFinancialAccount is not allowed when PaymentMeansCode = '97'> + PayeeFinancialAccount is not allowed when PaymentMeansCode = '97' + CreditAccount is not allowed when PaymentMeansCode = '97' + + + When ID equals 'Factoring', Note element is mandatory + (factoring note) + No more than one Note element may be present + + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: '' + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: '' The + value in DocumentTypeCode must equal '130' - Value found: '' + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: '' + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: '' + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: '' + + + The element must contain a valid UUID - Value found: '' + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: '' + + + SequenceNumeric must not be negative - Value found: '' + + + CityName AND PostalZone MUST be present. + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + IF Floor is present, StreetName and BuildingNumber MUST be present. + IF Room is present, StreetName and BuildingNumber MUST be present. + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + No more than one ManufacturersItemIdentification class may be present + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: '' + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + cac:Party/cac:PartyName/cbc:Name must be present. + cac:Party/cac:PartyLegalEntity must be present. + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + The element 'OriginalDocumentReference' is mandatory in 'Signature' + The element 'SignatoryParty' is mandatory in 'Signature' + The element 'CanonicalizationMethod' is mandatory in 'Signature' + The element 'SignatureMethod' is mandatory in 'Signature' + + + StartDate + StartTime must be before or the same as EndDate + EndTime + If StartTime exists, StartDate must be present + If EndTime exists, EndDate must be present + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + Telephone must include country code (must start with '+' or '00') + ElectronicMail must have valid format (like 'user123@example.com') + + + Must not have both embedded document and external reference. + + + EmbeddedDocumentBinaryObject must have filename attribute + Attribute mimeCode must be a value from the code list + + + When using ExternalReference, URI is mandatory + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + If ExpiryTime is present, ExpiryDate MUST be present + + + If IssueTime is present, IssueDate must be present + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: '' + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: '' + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + - NetEmissionFactor value + - Quantity: + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Message-Level-Response.sch b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Message-Level-Response.sch new file mode 100644 index 00000000..85c0134c --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/rule-source/oioubl/3.0.1/pp/OIOUBL-Message-Level-Response.sch @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + The DK:CVR (0184) must be stated in the correct format (8 + digits) - Value found: '' + + + When 'cac:AdditionalDocumentReference/cbc:ID schemaID' equals 'ARR' The + value in ID must equal 10 digits - Value found: '' The + value in DocumentTypeCode must equal '130' - Value found: '' + + + The DK:P (0096) value must be stated in the correct format (10 + digits) - Value found: '' + + + The DK:SE (0198) value must be stated in the correct format (DK + followed by 8 digits) - Value found: '' + + + The DK:CPR (0237)value must be stated in the correct format (10 + digits) - Value found: '' + + + The element must contain a valid UUID - Value found: '' + + + Invalid UBLExtension/ID when UBLExtension/ExtensionAgencyID is + equal to 'ERST'. ID must be an assigned value between '1001' and '1999' - + Value found: '' + + + SequenceNumeric must not be negative - Value found: '' + + + CityName AND PostalZone MUST be present. + IF Postbox does not exist, StreetName AND BuildingNumber MUST be present. + IF Floor is present, StreetName and BuildingNumber MUST be present. + IF Room is present, StreetName and BuildingNumber MUST be present. + IF BuildingNumber is present, StreetName MUST be present. IF StreetName is present, BuildingNumber MUST be present. + + + When AllowanceChargeReasonCode = ZZZ is used, then AllowanceChargeReason must be present + AllowanceChargeReason must include a #, but the # is not allowed as first and last character + + + + SchemaID = '0237' is only allowed when ProfileID='urn:fdc:oioubl.dk:bis:billing_private_without_response:3' + + + No more than one ManufacturersItemIdentification class may be present + The value of CertificateTypeCode must be one of the PackagingMarkedLabelAccreditationCode from GS1 Global Data Dictionary - Value found: '' + + + The element 'PartyLegalEntity' is mandatory in the 'Party' + The element 'CompanyID' is mandatory in the 'PartyLegalEntity' + cac:Party/cac:PartyName/cbc:Name must be present. + cac:Party/cac:PartyLegalEntity must be present. + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must be present. + + + cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID must be present. + + + cac:PartyTaxScheme/cbc:CompanyID must be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + cac:PartyTaxScheme/cac:TaxScheme/cbc:ID mmust be present when cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID differ from 'O'. + + + cac:Party/cbc:EndpointID must have a @schemeID attribute. + + + cac:Party/cac:PartyIdentification/cbc:ID must have a @schemeID attribute. + + + cac:Party/cac:PartyLegalEntity/cbc:CompanyID must have a @schemeID attribute. + + + cac:PartyTaxScheme/cbc:CompanyID must have a @schemeID attribute. + @schemeID must be in ISO 6523 ICD code list or have the special DK value 'ZZZ' + + + The element 'DigitalSignatureAttachment' is mandatory in 'Signature' + The element 'OriginalDocumentReference' is mandatory in 'Signature' + The element 'SignatoryParty' is mandatory in 'Signature' + The element 'CanonicalizationMethod' is mandatory in 'Signature' + The element 'SignatureMethod' is mandatory in 'Signature' + + + StartDate + StartTime must be before or the same as EndDate + EndTime + If StartTime exists, StartDate must be present + If EndTime exists, EndDate must be present + + + IF StartTime exists or EndTime exists, format must follow time format (without date format) + + + ID must not be a CPR number (must not have format XXXXXXXXXX or XXXXXX-XXXX) + Telephone must include country code (must start with '+' or '00') + ElectronicMail must have valid format (like 'user123@example.com') + + + Must not have both embedded document and external reference. + + + EmbeddedDocumentBinaryObject must have filename attribute + Attribute mimeCode must be a value from the code list + + + When using ExternalReference, URI is mandatory + If DocumentHash or HashAlgorithmMethod is present, the other must also be present. + If ExpiryTime is present, ExpiryDate MUST be present + + + If IssueTime is present, IssueDate must be present + + + CalculationRate must be greater than zero and have exactly 4 decimal places - Value found: + MathematicOperatorCode must be either 'multiply' or 'divide' + + + + + + + + + Root element must be ApplicationResponse + + + The documenttype does not match an OIOUBL ApplicationResponse and can not be validated by this schematron. + + + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + The use of element is not allowed - + + + + + + When @listID is "TST", the value of @listVersionID must be on of the following: "19.05.01", "19.0501", "26.08.01", or "26.0801" - Value + found: '' + When ItemClassificationCodevalue/listID = 'TST' then the value must be 8 digits - Value found: '' + + + If AdditionalItemProperty/Name is 'EmissionFactor', then the AdditionalItemProperty/Value must be a valid numeric value + if Name is 'NetEmissionQuantity', then its Value must equal EmissionFactor * Quantity (InvoicedQuantity / CreditedQuantity)" + Values found + - NetEmissionQuantity value + - NetEmissionFactor value + - Quantity: + + If AdditionalItemProperty/Name is 'EmissionFactorSource', then AdditionalItemProperty/Value must be either 'Database' or + 'Internal' + If AdditionalItemProperty/Name is 'EmissionFactor', then another AdditionalItemProperty/Name = 'EmissionFactorSource' must exist + If AdditionalItemProperty/Name equal + 'EmissionFactorCalculationUnit' then AdditionalItemProperty/Value must have a valid UnitCode value from the codelist UNECERec20-11e + + + + + + + + Element 'cbc:ProfileID' MUST contain value 'urn:fdc:oioubl.dk:bis:message_level_response:3' or 'urn:fdc:oioubl.dk:bis:message_level_response_network:3'. + + + + + Element 'cbc:CustomizationID' MUST contain value 'urn:fdc:peppol.eu:poacc:trns:mlr:3@urn:fdc:oioubl.dk:trns:message_level_response:3.0'. + + + + + + + If ProfileID is 'urn:fdc:oioubl.dk:bis:message_level_response_network:3' then ResponseCode MUST be 'RE' + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_private_without_response_base_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_private_without_response_base_Example.xml new file mode 100644 index 00000000..8fb85dac --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_private_without_response_base_Example.xml @@ -0,0 +1,193 @@ + + + 2.1 + urn:fdc:oioubl.dk:trns:billing:creditnote:3.0 + urn:fdc:oioubl.dk:bis:billing_private_without_response:3 + 202400095679 + 2024-05-20 + 381 + DKK + 5250124502 + 9000001234 + + 2018-03-01 + 2018-03-31 + + + 5002701 + + + + 202400095678 + 2024-05-20 + + + + + 16356706 + + 16356706 + + + Supplier A/S + + + Leverandørvej + 11 + Dyssegård + 2870 + + DK + + + + DK-PRIVATE + + VAT + + + + Supplier A/S + 16356706 + + + Hugo Jensen + +4515812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Customer A/S + + + Fredericiavej + 11 + Helsingør + 3000 + + DK + + + + DK12345678 + + VAT + + + + Customer A A/S + 12345678 + + + Hans Hansen + 004526532147 + Hans@dls.dk + + + + + 1262.50 + + 5050.00 + 1262.50 + + S + 25 + + VAT + + + + + + 5050.00 + 5050.00 + 6312.50 + 6312.50 + + + + 1 + 1.00 + 5000.00 + + 1250.00 + + 5000.00 + 1250.00 + + S + 25 + + VAT + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + S + 25 + + VAT + + + + + 5000.00 + 1 + + + + 2 + 2.00 + 50.00 + + 12.50 + + 50.00 + 12.50 + + S + 25 + + VAT + + + + + + Beslag + Beslag + + 5712345780111 + + + S + 25 + + VAT + + + + + 25.00 + 1 + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_with_response_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_with_response_Example.xml new file mode 100644 index 00000000..5301560c --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_with_response_Example.xml @@ -0,0 +1,198 @@ + + + 2.1 + urn:fdc:oioubl.dk:trns:billing:creditnote:3.0 + urn:fdc:oioubl.dk:bis:billing_with_response:3 + 202400095679 + false + 9756b53a-8815-1029-857a-e388fe63f399 + 2024-05-20 + 12:35:00 + 381 + DKK + 5250124502 + 9000001234 + + 2018-03-01 + 2018-03-31 + + + 5002701 + 2024-05-01 + + + + 202400095678 + 2024-05-20 + + + + + 16356706 + + 16356706 + + + Supplier A/S + + + Leverandørvej + 11 + Dyssegård + 2870 + + DK + + + + DK16356706 + + VAT + + + + Supplier A/S + 16356706 + + + 23456 + Hugo Jensen + +4515812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Customer A/S + + + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + DK12345678 + + VAT + + + + Customer A A/S + 12345678 + + + 7778 + Hans Hansen + 004526532147 + Hans@dls.dk + + + + + 1262.50 + + 5050.00 + 1262.50 + + S + 25 + + VAT + + + + + + 5050.00 + 5050.00 + 6312.50 + 6312.50 + + + + 1 + 1.00 + 5000.00 + + 1250.00 + + 5000.00 + 1250.00 + + S + 25 + + VAT + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + S + 25 + + VAT + + + + + 5000.00 + 1 + + + + 2 + 2.00 + 50.00 + + 12.50 + + 50.00 + 12.50 + + S + 25 + + VAT + + + + + + Beslag + Beslag + + 5712345780111 + + + S + 25 + + VAT + + + + + 25.00 + 1 + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_with_response_base_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_with_response_base_Example.xml new file mode 100644 index 00000000..14d76aeb --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/creditnote/OIOUBL3_CreditNote_billing_with_response_base_Example.xml @@ -0,0 +1,192 @@ + + + 2.1 + urn:fdc:oioubl.dk:trns:billing:creditnote:3.0 + urn:fdc:oioubl.dk:bis:billing_with_response:3 + 202400095679 + 2024-05-20 + 381 + DKK + 5250124502 + 9000001234 + + 2018-03-01 + 2018-03-31 + + + 5002701 + + + + 202400095678 + 2024-05-20 + + + + + 16356706 + + 16356706 + + + Supplier A/S + + + Leverandørvej + 10 + Dyssegård + 2870 + + DK + + + + DK16356706 + + VAT + + + + Supplier A/S + 16356706 + + + Hugo Jensen + +4515812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Customer A/S + + + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + DK12345678 + + VAT + + + + Customer A A/S + 12345678 + + + Hans Hansen + 004526532147 + Hans@dls.dk + + + + + 1262.50 + + 5050.00 + 1262.50 + + S + 25 + + VAT + + + + + + 5050.00 + 5050.00 + 6312.50 + 6312.50 + + + + 1 + 1.00 + 5000.00 + + 1250.00 + + 5000.00 + 1250.00 + + S + 25 + + VAT + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + S + 25 + + VAT + + + + + 5000.00 + 1 + + + + 2 + 2.00 + 50.00 + + 12.50 + + 50.00 + 12.50 + + S + 25 + + VAT + + + + + + Beslag + Beslag + + 5712345780111 + + + S + 25 + + VAT + + + + + 25.00 + 1 + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_private_without_response_base_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_private_without_response_base_Example.xml new file mode 100644 index 00000000..b68b24ad --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_private_without_response_base_Example.xml @@ -0,0 +1,194 @@ + + + + 2.1 + urn:fdc:oioubl.dk:trns:billing:invoice:3.0 + urn:fdc:oioubl.dk:bis:billing_private_without_response:3 + 202400095678 + 2024-05-20 + 2024-05-25 + 380 + DKK + 5250124502 + + 5002701 + + + + 16356706 + + 16356706 + + + Tavleverandøren + + + Leverandørvej + 11 + Dyssegård + 2870 + + DK + + + + DK-PRIVATE + + VAT + + + + Tavleleverandøren + 16356706 + + + Hugo Jensen + +4515812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Customer A/S + + + Fredericiavej + 8 + Helsingør + 3000 + + DK + + + + DK12345678 + + VAT + + + + Customer A A/S + 12345678 + + + Hans Hansen + 004526532147 + Hans@dls.dk + + + + + 2024-05-15 + + + 42 + + 1234567890 + + 1234 + + + + + 1262.50 + + 5050.00 + 1262.50 + + S + 25 + + VAT + + + + + + 5050.00 + 5050.00 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + S + 25 + + VAT + + + + + + Hejsetavle + Hejsetavle + + S + 25 + + VAT + + + + + 5000.00 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + S + 25 + + VAT + + + + + + Beslag + Beslag + + S + 25 + + VAT + + + + + 25.00 + 1 + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_with_response_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_with_response_Example.xml new file mode 100644 index 00000000..a351af3e --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_with_response_Example.xml @@ -0,0 +1,214 @@ + + + + 2.1 + urn:fdc:oioubl.dk:trns:billing:invoice:3.0 + urn:fdc:oioubl.dk:bis:billing_with_response:3 + 202400095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2024-05-20 + 12:35:00 + 2024-07-01 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2024-05-01 + + + + 16356706 + + 16356706 + + + Tavleverandøren + + + Leverandørvej + 11 + Dyssegård + 2870 + + DK + + + + DK16356706 + + VAT + + + + Tavleleverandøren + 16356706 + + + 23456 + Hugo Jensen + +4515812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Customer A/S + + + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + DK12345678 + + VAT + + + + Customer A A/S + 12345678 + + + 7778 + Hans Hansen + 004526532147 + Hans@dls.dk + + + + + 2024-05-15 + + + 1 + 42 + + 1234567890 + 202400095678 + + 1234 + + + + + 1 + 1 + + + 1262.50 + + 5050.00 + 1262.50 + + S + 25 + + VAT + + + + + + 5050.00 + 5050.00 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + S + 25 + + VAT + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + S + 25 + + VAT + + + + + 5000.00 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + S + 25 + + VAT + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + S + 25 + + VAT + + + + + 25.00 + 1 + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_with_response_base_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_with_response_base_Example.xml new file mode 100644 index 00000000..6e92bea9 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/invoice/OIOUBL3_Invoice_billing_with_response_base_Example.xml @@ -0,0 +1,194 @@ + + + + 2.1 + urn:fdc:oioubl.dk:trns:billing:invoice:3.0 + urn:fdc:oioubl.dk:bis:billing_with_response:3 + 202400095678 + 2024-05-20 + 2024-05-25 + 380 + DKK + 5250124502 + + 5002701 + + + + 16356706 + + 16356706 + + + Tavleverandøren + + + Leverandørvej + 11 + Dyssegård + 2870 + + DK + + + + DK16356706 + + VAT + + + + Tavleleverandøren + 16356706 + + + Hugo Jensen + +4515812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Customer A/S + + + Fredericiavej + 8 + Helsingør + 3000 + + DK + + + + DK12345678 + + VAT + + + + Customer A A/S + 12345678 + + + Hans Hansen + 004526532147 + Hans@dls.dk + + + + + 2024-05-15 + + + 42 + + 1234567890 + + 1234 + + + + + 1262.50 + + 5050.00 + 1262.50 + + S + 25 + + VAT + + + + + + 5050.00 + 5050.00 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + S + 25 + + VAT + + + + + + Hejsetavle + Hejsetavle + + S + 25 + + VAT + + + + + 5000.00 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + S + 25 + + VAT + + + + + + Beslag + Beslag + + S + 25 + + VAT + + + + + 25.00 + 1 + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/ir/OIOUBL3_InvoiceResponse_billing_with_response_Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/ir/OIOUBL3_InvoiceResponse_billing_with_response_Example.xml new file mode 100644 index 00000000..f373c7d4 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/ir/OIOUBL3_InvoiceResponse_billing_with_response_Example.xml @@ -0,0 +1,72 @@ + + + + urn:fdc:peppol.eu:poacc:trns:invoice_response:3@urn:fdc:oioubl.dk:trns:billing:invoice_response:3.0 + urn:fdc:oioubl.dk:bis:billing_with_response:3 + imrid001 + 2024-05-01 + 12:00:00 + textual description of the reason of rejection + + 5798000012349 + + 88776655 + + + Buyer organization + + + Jens Jensen + +4523232323 + jj@test-company.dk + + + + 7330001000000 + + 987654325 + + + Seller company + + + + + RE + 2024-05-24 + + NIN + VAT Reference not found + + BT-48 + EU123456789 + + + + + inv021 + 2014-05-22 + 380 + + + + 123456785 + + + Test Company AS + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/mlr/OIOUBL-Message-Level-Response-Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/mlr/OIOUBL-Message-Level-Response-Example.xml new file mode 100644 index 00000000..d14be664 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/mlr/OIOUBL-Message-Level-Response-Example.xml @@ -0,0 +1,39 @@ + + + urn:fdc:peppol.eu:poacc:trns:mlr:3@urn:fdc:oioubl.dk:trns:message_level_response:3.0 + urn:fdc:oioubl.dk:bis:message_level_response:3 + MLR-ID123 + 2016-08-15 + 12:00:00 + + 7300010000001 + + + 7315458756328 + + + + RE + Rejected due to validation error + + + EnvelopeID-12456789 + 9 + 2 + + + + /Catalogue/cac:CatalogueLine[3]/cac:Item[1]/cac:ClassifiedTaxCategory[1]/cbc:ID[1] + + + RE + Validation gives error [CL-T77-R002]- Tax categories MUST be coded using UN/ECE 5305 code list + + BV + + + + + diff --git a/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/mlr/OIOUBL-Message-Level-Response-Network-Example.xml b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/mlr/OIOUBL-Message-Level-Response-Network-Example.xml new file mode 100644 index 00000000..8a9edce6 --- /dev/null +++ b/phive-rules-oioubl/src/test/resources/external/test-files/3.0.1/mlr/OIOUBL-Message-Level-Response-Network-Example.xml @@ -0,0 +1,39 @@ + + + urn:fdc:peppol.eu:poacc:trns:mlr:3@urn:fdc:oioubl.dk:trns:message_level_response:3.0 + urn:fdc:oioubl.dk:bis:message_level_response_network:3 + MLR-ID123 + 2016-08-15 + 12:00:00 + + 7300010000001 + + + 7315458756328 + + + + RE + Rejected due to validation error + + + EnvelopeID-12456789 + 9 + 2 + + + + /Catalogue/cac:CatalogueLine[3]/cac:Item[1]/cac:ClassifiedTaxCategory[1]/cbc:ID[1] + + + RE + Validation gives error [CL-T77-R002]- Tax categories MUST be coded using UN/ECE 5305 code list + + BV + + + + +