DespatchAdviceID

This commit is contained in:
jstaerk
2022-03-21 15:30:24 +01:00
parent 58b13598b3
commit 3ee042df8a
5 changed files with 41 additions and 10 deletions

View File

@@ -56,8 +56,9 @@ public class Invoice implements IExportableTransaction {
protected Date invoiceReferencedIssueDate;
protected String specifiedProcuringProjectID = null;
protected String specifiedProcuringProjectName = null;
protected String despatchAdviceReferencedDocumentID = null;
public Invoice() {
public Invoice() {
ZFItems = new ArrayList<>();
setCurrency("EUR");
}
@@ -667,6 +668,18 @@ public class Invoice implements IExportableTransaction {
return this;
}
@Override
public String getDespatchAdviceReferencedDocumentID() {
return despatchAdviceReferencedDocumentID;
}
public Invoice setDespatchAdviceReferencedDocumentID(String despatchAdviceReferencedDocumentID) {
this.despatchAdviceReferencedDocumentID = despatchAdviceReferencedDocumentID;
return this;
}
@Override
public String getSpecifiedProcuringProjectName() {
return specifiedProcuringProjectName;

View File

@@ -481,7 +481,9 @@ public interface IExportableTransaction {
return null;
}
default String getDespatchAdviceReferencedDocumentID() {
return null;
}
/***
* additional text description
* @return an array of strings of document wide "includedNotes" (descriptive text values)

View File

@@ -512,16 +512,23 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
throw new IllegalStateException("No delivery date provided");
}
xml += "</ram:OccurrenceDateTime>\n";
xml += " </ram:ActualDeliverySupplyChainEvent>\n"
xml += " </ram:ActualDeliverySupplyChainEvent>\n";
/*
* + " <DeliveryNoteReferencedDocument>\n" +
* " <IssueDateTime format=\"102\">20130603</IssueDateTime>\n" +
* " <ID>2013-51112</ID>\n" +
* " </DeliveryNoteReferencedDocument>\n"
* + " <DeliveryNoteReferencedDocument>\n" +
* " <IssueDateTime format=\"102\">20130603</IssueDateTime>\n" +
* " <ID>2013-51112</ID>\n" +
* " </DeliveryNoteReferencedDocument>\n"
*/
+ " </ram:ApplicableHeaderTradeDelivery>\n" + " <ram:ApplicableHeaderTradeSettlement>\n"
+ " <ram:PaymentReference>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:PaymentReference>\n"
+ " <ram:InvoiceCurrencyCode>" + trans.getCurrency() + "</ram:InvoiceCurrencyCode>\n";
if (trans.getDespatchAdviceReferencedDocumentID() != null) {
xml += "<ram:DespatchAdviceReferencedDocument>";
xml += "<ram:IssuerAssignedID>"+XMLTools.encodeXML(trans.getDespatchAdviceReferencedDocumentID())+"</ram:IssuerAssignedID>";
xml += "</ram:DespatchAdviceReferencedDocument>";
}
xml += " </ram:ApplicableHeaderTradeDelivery>\n" + " <ram:ApplicableHeaderTradeSettlement>\n"
+ " <ram:PaymentReference>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:PaymentReference>\n"
+ " <ram:InvoiceCurrencyCode>" + trans.getCurrency() + "</ram:InvoiceCurrencyCode>\n";
if (trans.getTradeSettlementPayment() != null) {
for (final IZUGFeRDTradeSettlementPayment payment : trans.getTradeSettlementPayment()) {