From 6259ee6f2a53b6c81a41b37a9c75499fa4ab9d61 Mon Sep 17 00:00:00 2001 From: jstaerk Date: Tue, 10 Jan 2023 19:25:01 +0100 Subject: [PATCH] - allow prepaid amount in invoice class --- History.md | 1 + .../main/java/org/mustangproject/Invoice.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/History.md b/History.md index 943f8c01..e3d71ef6 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,6 @@ - allow Bank credentials without BIC - allow minimum profile without delivery date +- allow prepaid amount in invoice class 2.6.0 "Joyeux Noël" ======= diff --git a/library/src/main/java/org/mustangproject/Invoice.java b/library/src/main/java/org/mustangproject/Invoice.java index 5809c829..42490ed1 100644 --- a/library/src/main/java/org/mustangproject/Invoice.java +++ b/library/src/main/java/org/mustangproject/Invoice.java @@ -52,6 +52,7 @@ public class Invoice implements IExportableTransaction { protected String contractReferencedDocument = null; protected ArrayList xmlEmbeddedFiles=null; + protected BigDecimal totalPrepaidAmount = null; protected Date detailedDeliveryDateStart = null; protected Date detailedDeliveryPeriodEnd = null; @@ -273,6 +274,22 @@ public class Invoice implements IExportableTransaction { return buyerOrderReferencedDocumentIssueDateTime; } + + /*** + * allow to set a amount which has already been paid + * @param prepaid null is possible to omit + * @return fluent setter + */ + public Invoice setTotalPrepaidAmount(BigDecimal prepaid) { + totalPrepaidAmount=prepaid; + return this; + } + + @Override + public BigDecimal getTotalPrepaidAmount() { + return totalPrepaidAmount; + } + /*** * when the order (or whatever reference in BuyerOrderReferencedDocumentID) was issued (@todo switch to date?) * @param buyerOrderReferencedDocumentIssueDateTime IssueDateTime in format CCYY-MM-DDTHH:MM:SS