make document name and globalID configurable by implementers
This commit is contained in:
@@ -38,6 +38,24 @@ public interface IZUGFeRDExportableContact {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* customer global identification assigned by the seller
|
||||||
|
*
|
||||||
|
* @return customer identification
|
||||||
|
*/
|
||||||
|
default String getGlobalID() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* customer global identification scheme
|
||||||
|
*
|
||||||
|
* @return customer identification
|
||||||
|
*/
|
||||||
|
default String getGlobalIDScheme() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* First and last name of the recipient
|
* First and last name of the recipient
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ import java.util.Date;
|
|||||||
|
|
||||||
public interface IZUGFeRDExportableTransaction {
|
public interface IZUGFeRDExportableTransaction {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* appears in /rsm:CrossIndustryDocument/rsm:HeaderExchangedDocument/ram:Name
|
||||||
|
* @return Name of document
|
||||||
|
*/
|
||||||
|
default String getDocumentName() {
|
||||||
|
return "RECHNUNG";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
document.setTypeCode(documentCodeType);
|
document.setTypeCode(documentCodeType);
|
||||||
|
|
||||||
TextType name = xmlFactory.createTextType();
|
TextType name = xmlFactory.createTextType();
|
||||||
name.setValue("RECHNUNG");
|
name.setValue(trans.getDocumentName());
|
||||||
document.getName().add(name);
|
document.getName().add(name);
|
||||||
|
|
||||||
if (trans.getOwnOrganisationFullPlaintextInfo() != null) {
|
if (trans.getOwnOrganisationFullPlaintextInfo() != null) {
|
||||||
@@ -212,6 +212,12 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
buyerID.setValue(trans.getRecipient().getID());
|
buyerID.setValue(trans.getRecipient().getID());
|
||||||
buyerTradeParty.getID().add(buyerID);
|
buyerTradeParty.getID().add(buyerID);
|
||||||
}
|
}
|
||||||
|
if (trans.getRecipient().getGlobalID() != null) {
|
||||||
|
IDType globalID = xmlFactory.createIDType();
|
||||||
|
globalID.setValue(trans.getRecipient().getGlobalID());
|
||||||
|
globalID.setSchemeID(trans.getRecipient().getGlobalIDScheme());
|
||||||
|
buyerTradeParty.getGlobalID().add(globalID);
|
||||||
|
}
|
||||||
|
|
||||||
TextType buyerName = xmlFactory.createTextType();
|
TextType buyerName = xmlFactory.createTextType();
|
||||||
buyerName.setValue(trans.getRecipient().getName());
|
buyerName.setValue(trans.getRecipient().getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user