This commit is contained in:
Andre Kemper
2019-03-27 15:01:06 +01:00
parent de56dfcf60
commit 80710bd984
12 changed files with 87 additions and 10 deletions

View File

@@ -83,7 +83,13 @@ public interface IZUGFeRDExportableTransaction {
*/
String getOwnBIC();
/***
/***
* BLZ of the sender
* @return the BLZ code of the recipient sender's bank
*/
String getOwnBLZ();
/***
* Bank name of the sender
* @return the name of the sender's bank
*/

View File

@@ -63,6 +63,7 @@ public class ZUGFeRDImporter {
private boolean containsMeta = false;
/** @var the reference (i.e. invoice number) of the sender */
private String foreignReference;
private String BLZ;
private String BIC;
private String IBAN;
private String holder;
@@ -127,7 +128,7 @@ public class ZUGFeRDImporter {
//start
InputStream XMP=doc.getDocumentCatalog().getMetadata().exportXMPMetadata();
xmpString=convertStreamToString(XMP);
xmpString=convertStreamToString(XMP);
etn = names.getEmbeddedFiles();
if (etn == null) {
return;
@@ -299,6 +300,9 @@ public class ZUGFeRDImporter {
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("BICID"))) { //$NON-NLS-1$
setBIC(detail.getTextContent());
}
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("GermanBankleitzahlID"))) { //$NON-NLS-1$
setBLZ(detail.getTextContent());
}
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("Name"))) { //$NON-NLS-1$
setBankName(detail.getTextContent());
}
@@ -393,6 +397,24 @@ public class ZUGFeRDImporter {
this.foreignReference = foreignReference;
}
/**
*
* @return the sender's bank's BLZ code
*/
public String getBLZ() {
if (!parsed) {
throw new RuntimeException("use extract() before requesting a value");
}
if (BLZ==null) {
parse();
}
return BLZ;
}
private void setBLZ(String blz) {
this.BLZ = blz;
}
/**
*
* @return the sender's bank's BIC code

View File

@@ -373,6 +373,10 @@ class ZUGFeRDTransactionModelConverter {
TextType bankName = xmlFactory.createTextType();
bankName.setValue(trans.getOwnBankName());
bankData.setName(bankName);
IDType blz = xmlFactory.createIDType();
blz.setValue(trans.getOwnBLZ());
bankData.setGermanBankleitzahlID(blz);
paymentData.setPayeeSpecifiedCreditorFinancialInstitution(bankData);
return paymentData;
}