preliminary updates
This commit is contained in:
@@ -41,6 +41,7 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
public Invoice() {
|
||||
ZFItems = new ArrayList<IZUGFeRDExportableItem>();
|
||||
setCurrency("EUR");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,7 @@ public interface IExportableTransaction {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return Code of Document
|
||||
* @return Code number of Document type, e.g. "380" for invoiceF
|
||||
*/
|
||||
default String getDocumentCode() {
|
||||
return DocumentCodeTypeConstants.INVOICE;
|
||||
|
||||
@@ -43,26 +43,6 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* BLZ of the sender
|
||||
*
|
||||
* @return the BLZ code of the recipient sender's bank
|
||||
*/
|
||||
default String getOwnBLZ() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bank name of the sender
|
||||
*
|
||||
* @return the name of the sender's bank
|
||||
*/
|
||||
default String getOwnBankName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IBAN of the sender
|
||||
*
|
||||
@@ -73,25 +53,12 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IBAN of the sender
|
||||
*
|
||||
* @return the Account Number of the invoice sender's bank account
|
||||
*/
|
||||
default String getOwnKto() {
|
||||
return null;
|
||||
}
|
||||
|
||||
default String getSettlementXML() {
|
||||
String xml = " <ram:SpecifiedTradeSettlementPaymentMeans>\n"
|
||||
+ " <ram:TypeCode>42</ram:TypeCode>\n"
|
||||
+ " <ram:Information>Überweisung</ram:Information>\n"
|
||||
+ " <ram:PayeePartyCreditorFinancialAccount>\n"
|
||||
+ " <ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>\n"; //$NON-NLS-2$
|
||||
if (getOwnKto()!=null) {
|
||||
xml+= " <ram:ProprietaryID>" + XMLTools.encodeXML(getOwnKto()) + "</ram:ProprietaryID>\n"; //$NON-NLS-2$
|
||||
|
||||
}
|
||||
xml+= " </ram:PayeePartyCreditorFinancialAccount>\n"
|
||||
+ " <ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
|
||||
+ " <ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>\n" //$NON-NLS-2$
|
||||
|
||||
@@ -113,6 +113,11 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
||||
return xmlProvider;
|
||||
}
|
||||
|
||||
public ZUGFeRDExporterFromA3 addAdditionalFile(String name, byte[] content) {
|
||||
|
||||
additionalFiles.put(name,content);
|
||||
return this;
|
||||
}
|
||||
|
||||
/***
|
||||
* internal helper function: get namespace for given zugferd or factur-x version
|
||||
@@ -512,6 +517,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
||||
PDFAttachGenericFile(doc, filename, "Alternative",
|
||||
"Invoice metadata conforming to ZUGFeRD standard (http://www.ferd-net.de/front_content.php?idcat=231&lang=4)",
|
||||
"text/xml", xmlProvider.getXML());
|
||||
|
||||
for (String filenameAdditional : additionalFiles.keySet()) {
|
||||
PDFAttachGenericFile(doc, filenameAdditional, "Supplement", "ZUGFeRD extension/additional data", "text/xml", additionalFiles.get(filenameAdditional));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user