Issue #458 Allow multiple PaymentTerms for in Invoice
This commit is contained in:
@@ -28,6 +28,7 @@ import org.mustangproject.ZUGFeRD.*;
|
||||
import org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
/***
|
||||
@@ -56,7 +57,7 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
protected ArrayList<IZUGFeRDAllowanceCharge> Allowances = new ArrayList<>(),
|
||||
Charges = new ArrayList<>(), LogisticsServiceCharges = new ArrayList<>();
|
||||
protected IZUGFeRDPaymentTerms paymentTerms = null;
|
||||
protected IZUGFeRDPaymentTerms[] paymentTerms = null;
|
||||
|
||||
protected String invoiceReferencedDocumentID = null;
|
||||
protected Date invoiceReferencedIssueDate;
|
||||
@@ -641,15 +642,22 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
|
||||
@Override
|
||||
public IZUGFeRDPaymentTerms getPaymentTerms() {
|
||||
public IZUGFeRDPaymentTerms[] getPaymentTerms() {
|
||||
return paymentTerms;
|
||||
}
|
||||
|
||||
public Invoice setPaymentTerms(IZUGFeRDPaymentTerms paymentTerms) {
|
||||
@JsonProperty
|
||||
public Invoice setPaymentTerms(IZUGFeRDPaymentTerms[] paymentTerms) {
|
||||
this.paymentTerms = paymentTerms;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Invoice setPaymentTerms(IZUGFeRDPaymentTerms paymentTerms) {
|
||||
this.paymentTerms = new IZUGFeRDPaymentTerms[] { paymentTerms };
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TradeParty getDeliveryAddress() {
|
||||
return deliveryAddress;
|
||||
|
||||
Reference in New Issue
Block a user