add BLZ
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user