Skip to content

Commit

Permalink
Added Peppol A-NZ-PEPPOL 1.0.11 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jun 23, 2024
1 parent cd56a10 commit 4b83d82
Show file tree
Hide file tree
Showing 45 changed files with 27,384 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ I hope that with the introduction of PINT, the versioning problem will be solved

* v3.1.11 - work in progress
* Added Peppol May 2024 release (Billing 3.0.17 and Upgrade 3.0.13)
* Added Peppol A-NZ-PEPPOL 1.0.11 rules
* Deprecated Peppol A-NZ-PEPPOL 1.0.9 rules
* v3.1.10 - 2024-05-16
* Added support for EN 16931 rules v1.3.12 format and deprecated v1.3.10
* All OIOUBL 1.x validations are now correctly based on UBL 2.1 instead of UBL 2.0
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions phive-rules-peppol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@
<goal>convert</goal>
</goals>
<configuration>
<schematronDirectory>src/test/resources/external/rule-source/aunz-peppol/1.0.10</schematronDirectory>
<xsltDirectory>src/main/resources/external/schematron/peppol-aunz/1.0.10/xslt</xsltDirectory>
<schematronDirectory>src/test/resources/external/rule-source/aunz-peppol/1.0.11</schematronDirectory>
<xsltDirectory>src/main/resources/external/schematron/peppol-aunz/1.0.11/xslt</xsltDirectory>
</configuration>
</execution>
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,19 @@ private static ClassLoader _getCL ()
private static final String BASE_PATH = "external/schematron/peppol-aunz/";

// 1.0.9
@Deprecated
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_109 = new VESID ("eu.peppol.bis3.aunz.ubl",
"invoice",
"1.0.9");
@Deprecated
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_SELF_BILLING_109 = new VESID ("eu.peppol.bis3.aunz.ubl",
"invoice-self-billing",
"1.0.9");
@Deprecated
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_109 = new VESID ("eu.peppol.bis3.aunz.ubl",
"creditnote",
"1.0.9");
@Deprecated
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_SELF_BILLING_109 = new VESID ("eu.peppol.bis3.aunz.ubl",
"creditnote-self-billing",
"1.0.9");
Expand All @@ -78,6 +82,20 @@ private static ClassLoader _getCL ()
"creditnote-self-billing",
"1.0.10");

// 1.0.11
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_1_0_11 = new VESID ("eu.peppol.bis3.aunz.ubl",
"invoice",
"1.0.11");
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_SELF_BILLING_1_0_11 = new VESID ("eu.peppol.bis3.aunz.ubl",
"invoice-self-billing",
"1.0.11");
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_1_0_11 = new VESID ("eu.peppol.bis3.aunz.ubl",
"creditnote",
"1.0.11");
public static final VESID VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_SELF_BILLING_1_0_11 = new VESID ("eu.peppol.bis3.aunz.ubl",
"creditnote-self-billing",
"1.0.11");

private PeppolValidationAUNZ ()
{}

Expand All @@ -99,7 +117,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
// For better error messages (merge both)
SchematronNamespaceBeautifier.addMappings (aNSCtxCreditNote.getClone ().setMappings (aNSCtxInvoice));

// final boolean bDeprecated = true;
final boolean bDeprecated = true;
final boolean bNotDeprecated = false;

// 1.0.9
Expand All @@ -118,7 +136,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_109,
"A-NZ Peppol BIS3 Invoice (UBL) " +
sVersion109,
_createStatus (bNotDeprecated),
_createStatus (bDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_109,
aNSCtxInvoice),
Expand All @@ -127,7 +145,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_109,
"A-NZ Peppol BIS3 Credit Note (UBL) " +
sVersion109,
_createStatus (bNotDeprecated),
_createStatus (bDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_109,
aNSCtxCreditNote),
Expand All @@ -138,7 +156,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_SELF_BILLING_109,
"A-NZ Peppol BIS3 Invoice Self-Billing (UBL) " +
sVersion109,
_createStatus (bNotDeprecated),
_createStatus (bDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_SELF_BILLING_109,
aNSCtxInvoice),
Expand All @@ -147,7 +165,7 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_SELF_BILLING_109,
"A-NZ Peppol BIS3 Credit Note Self-Billing (UBL) " +
sVersion109,
_createStatus (bNotDeprecated),
_createStatus (bDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_SELF_BILLING_109,
aNSCtxCreditNote),
Expand Down Expand Up @@ -207,5 +225,58 @@ public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidat
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_UBL_1_0_10,
aNSCtxCreditNote)));
}

// 1.0.11
{
final IReadableResource BIS3_BILLING_AUNZ_PEPPOL_SELF_BILLING_1_0_11 = new ClassPathResource (BASE_PATH +
"1.0.11/xslt/AUNZ-PEPPOL-SB-validation.xslt",
_getCL ());
final IReadableResource BIS3_BILLING_AUNZ_PEPPOL_1_0_11 = new ClassPathResource (BASE_PATH +
"1.0.11/xslt/AUNZ-PEPPOL-validation.xslt",
_getCL ());
final IReadableResource BIS3_BILLING_AUNZ_UBL_1_0_11 = new ClassPathResource (BASE_PATH +
"1.0.11/xslt/AUNZ-UBL-validation.xslt",
_getCL ());

final String sVersion1111 = VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_1_0_11.getVersionString ();
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_1_0_11,
"A-NZ Peppol BIS3 Invoice (UBL) " +
sVersion1111,
_createStatus (bNotDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_1_0_11,
aNSCtxInvoice),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_UBL_1_0_11,
aNSCtxInvoice)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_1_0_11,
"A-NZ Peppol BIS3 Credit Note (UBL) " +
sVersion1111,
_createStatus (bNotDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_1_0_11,
aNSCtxCreditNote),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_UBL_1_0_11,
aNSCtxCreditNote)));

// Self-billing
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_INVOICE_SELF_BILLING_1_0_11,
"A-NZ Peppol BIS3 Invoice Self-Billing (UBL) " +
sVersion1111,
_createStatus (bNotDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllInvoiceXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_SELF_BILLING_1_0_11,
aNSCtxInvoice),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_UBL_1_0_11,
aNSCtxInvoice)));
aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_OPENPEPPOL_BIS3_AUNZ_UBL_CREDIT_NOTE_SELF_BILLING_1_0_11,
"A-NZ Peppol BIS3 Credit Note Self-Billing (UBL) " +
sVersion1111,
_createStatus (bNotDeprecated),
ValidationExecutorXSD.create (UBL21Marshaller.getAllCreditNoteXSDs ()),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_PEPPOL_SELF_BILLING_1_0_11,
aNSCtxCreditNote),
ValidationExecutorSchematron.createXSLT (BIS3_BILLING_AUNZ_UBL_1_0_11,
aNSCtxCreditNote)));
}
}
}
Loading

0 comments on commit 4b83d82

Please sign in to comment.