additionalReferencedDocuments according to BG-24 XRechnung
(Rechnungsbegruendende Unterlagen) included in IExportableTransaction.java and ZUGFeRD2PullProvider.java
This commit is contained in:
@@ -36,7 +36,7 @@ public interface IExportableTransaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* appears in /rsm:CrossIndustryDocument/rsm:HeaderExchangedDocument/ram:Name
|
* appears in /rsm:CrossIndustryDocument/rsm:HeaderExchangedDocument/ram:Name
|
||||||
*
|
*
|
||||||
* @return Name of document
|
* @return Name of document
|
||||||
*/
|
*/
|
||||||
default String getDocumentName() {
|
default String getDocumentName() {
|
||||||
@@ -113,7 +113,7 @@ public interface IExportableTransaction {
|
|||||||
/**
|
/**
|
||||||
* subject of the document e.g. invoice and order
|
* subject of the document e.g. invoice and order
|
||||||
* number as human readable text
|
* number as human readable text
|
||||||
*
|
*
|
||||||
* @return string with document subject
|
* @return string with document subject
|
||||||
*/
|
*/
|
||||||
default String getSubjectNote() {
|
default String getSubjectNote() {
|
||||||
@@ -146,7 +146,7 @@ public interface IExportableTransaction {
|
|||||||
* @return an array of IZUGFeRDTradeSettlementPayment
|
* @return an array of IZUGFeRDTradeSettlementPayment
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default IZUGFeRDTradeSettlementPayment[] getTradeSettlementPayment() {
|
default IZUGFeRDTradeSettlementPayment[] getTradeSettlementPayment() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -300,7 +300,7 @@ public interface IExportableTransaction {
|
|||||||
/**
|
/**
|
||||||
* get payment terms. if set, getPaymentTermDescription() and getDueDate() are
|
* get payment terms. if set, getPaymentTermDescription() and getDueDate() are
|
||||||
* ignored
|
* ignored
|
||||||
*
|
*
|
||||||
* @return the IZUGFeRDPaymentTerms of the invoice
|
* @return the IZUGFeRDPaymentTerms of the invoice
|
||||||
*/
|
*/
|
||||||
default IZUGFeRDPaymentTerms getPaymentTerms() {
|
default IZUGFeRDPaymentTerms getPaymentTerms() {
|
||||||
@@ -309,7 +309,7 @@ public interface IExportableTransaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* returns if a rebate agreements exists
|
* returns if a rebate agreements exists
|
||||||
*
|
*
|
||||||
* @return true if a agreement exists
|
* @return true if a agreement exists
|
||||||
*/
|
*/
|
||||||
default boolean rebateAgreementExists() {
|
default boolean rebateAgreementExists() {
|
||||||
@@ -388,7 +388,7 @@ public interface IExportableTransaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* get the ID of the BuyerOrderReferencedDocument, which sits in the ApplicableSupplyChainTradeAgreement
|
* get the ID of the BuyerOrderReferencedDocument, which sits in the ApplicableSupplyChainTradeAgreement
|
||||||
*
|
*
|
||||||
* @return the ID of the document
|
* @return the ID of the document
|
||||||
*/
|
*/
|
||||||
default String getBuyerOrderReferencedDocumentID() {
|
default String getBuyerOrderReferencedDocumentID() {
|
||||||
@@ -398,7 +398,7 @@ public interface IExportableTransaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* get the issue timestamp of the BuyerOrderReferencedDocument, which sits in the ApplicableSupplyChainTradeAgreement
|
* get the issue timestamp of the BuyerOrderReferencedDocument, which sits in the ApplicableSupplyChainTradeAgreement
|
||||||
*
|
*
|
||||||
* @return the IssueDateTime in format CCYY-MM-DDTHH:MM:SS
|
* @return the IssueDateTime in format CCYY-MM-DDTHH:MM:SS
|
||||||
*/
|
*/
|
||||||
default String getBuyerOrderReferencedDocumentIssueDateTime() {
|
default String getBuyerOrderReferencedDocumentIssueDateTime() {
|
||||||
@@ -408,14 +408,14 @@ public interface IExportableTransaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* get the TotalPrepaidAmount located in SpecifiedTradeSettlementMonetarySummation (v1) or SpecifiedTradeSettlementHeaderMonetarySummation (v2)
|
* get the TotalPrepaidAmount located in SpecifiedTradeSettlementMonetarySummation (v1) or SpecifiedTradeSettlementHeaderMonetarySummation (v2)
|
||||||
*
|
*
|
||||||
* @return the total sum (incl. VAT) of prepayments, i.e. the difference between GrandTotalAmount and DuePayableAmount
|
* @return the total sum (incl. VAT) of prepayments, i.e. the difference between GrandTotalAmount and DuePayableAmount
|
||||||
*/
|
*/
|
||||||
default BigDecimal getTotalPrepaidAmount() {
|
default BigDecimal getTotalPrepaidAmount() {
|
||||||
return BigDecimal.ZERO;
|
return BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* delivery address, i.e. ram:ShipToTradeParty (only supported for zf2)
|
* delivery address, i.e. ram:ShipToTradeParty (only supported for zf2)
|
||||||
* @return the IZUGFeRDExportableTradeParty delivery address
|
* @return the IZUGFeRDExportableTradeParty delivery address
|
||||||
@@ -436,5 +436,13 @@ public interface IExportableTransaction {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get additional referenced documents acccording to BG-24 XRechnung (Rechnungsbegruendende Unterlagen),
|
||||||
|
* i.e. <ram:AdditionalReferencedDocument> in <ram:ApplicableHeaderTradeAgreement> (only supported for zf2)
|
||||||
|
*
|
||||||
|
* @return a array of objects from class FileAttachment
|
||||||
|
*/
|
||||||
|
default FileAttachment[] getAdditionalReferencedDocuments() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -493,6 +493,20 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IAbsoluteValueProvide
|
|||||||
+ " </ram:ContractReferencedDocument>\n";
|
+ " </ram:ContractReferencedDocument>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Additional Documents of XRechnung (Rechnungsbegruendende Unterlagen - BG-24 XRechnung)
|
||||||
|
if (trans.getAdditionalReferencedDocuments() != null) {
|
||||||
|
for (FileAttachment f : trans.getAdditionalReferencedDocuments()) {
|
||||||
|
xml = xml + " <ram:AdditionalReferencedDocument>\n"
|
||||||
|
+ " <ram:IssuerAssignedID>" + f.getFilename() + "</ram:IssuerAssignedID>\n"
|
||||||
|
+ " <ram:TypeCode>916</ram:TypeCode>\n"
|
||||||
|
+ " <ram:Name>" + f.getDescription() + "</ram:Name>\n"
|
||||||
|
+ " <ram:AttachmentBinaryObject mimeCode=\"" + f.getMimetype() + "\"\n"
|
||||||
|
+ " filename=\"" + f.getFilename() + ">" + f.getData() + "\n"
|
||||||
|
+ " </ram:AdditionalReferencedDocument>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
xml = xml + " </ram:ApplicableHeaderTradeAgreement>\n"
|
xml = xml + " </ram:ApplicableHeaderTradeAgreement>\n"
|
||||||
+ " <ram:ApplicableHeaderTradeDelivery>\n";
|
+ " <ram:ApplicableHeaderTradeDelivery>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user