Skip to content

Commit

Permalink
Improved UBL OrderLineReference creation
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Oct 10, 2024
1 parent 90b83aa commit 7ebe417
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 11 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ Add the following to your pom.xml to use this artifact, replacing `x.y.z` with t

# News and noteworthy

* v5.2.4 - 20240-09-05
* v5.2.5 - work in progress
* The UBL `OrderLineReference` element is only created if the mandatory `LineID` element is present
* v5.2.4 - 2024-09-05
* Payment Conditions are also created in ebInterface 4.2 onwards, if any other field then just the DueDate is set
* v5.2.3 - 2024-07-30
* Fixed BIC mapping for output format ebInterface 4.0
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>com.helger.commons</groupId>
<artifactId>ph-commons-parent-pom</artifactId>
<version>11.1.6</version>
<version>11.1.8</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -85,14 +85,14 @@
<dependency>
<groupId>com.helger.ubl</groupId>
<artifactId>ph-ubl-parent-pom</artifactId>
<version>9.0.1</version>
<version>9.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.helger.peppol</groupId>
<artifactId>peppol-commons-parent-pom</artifactId>
<version>9.5.0</version>
<version>9.5.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi40InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi41InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi42InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi43InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi50InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi60InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ public InvoiceType convertInvoice (@Nonnull final Ebi61InvoiceType aEbiDoc)
aUBLOrderLineRef.setLineID (aEbiORLine.getOrderPositionNumber ());
bAny1 = true;
}
if (bAny1)
// Line ID is a mandatory element
if (bAny1 && aUBLOrderLineRef.getLineID () != null)
aUBLLine.addOrderLineReference (aUBLOrderLineRef);
}

Expand Down

0 comments on commit 7ebe417

Please sign in to comment.