This commit is contained in:
Andre Kemper
2019-03-28 07:45:32 +01:00
parent 08956fd7a5
commit 543f1cd207
12 changed files with 86 additions and 8 deletions

View File

@@ -101,7 +101,13 @@ public interface IZUGFeRDExportableTransaction {
*/
String getOwnIBAN();
/**
/**
* IBAN of the sender
* @return the Account Number of the invoice sender's bank account
*/
String getOwnKto();
/**
* Tax ID (not VAT ID) of the sender
* @return Tax ID (not VAT ID) of the sender
*/

View File

@@ -344,9 +344,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
+ " <ram:Information>Überweisung</ram:Information>\n" //$NON-NLS-1$
+ " <ram:PayeePartyCreditorFinancialAccount>\n" //$NON-NLS-1$
+ " <ram:IBANID>"+trans.getOwnIBAN()+"</ram:IBANID>\n" //$NON-NLS-1$ //$NON-NLS-2$
+ " <ram:ProprietaryID>"+trans.getOwnKto()+"</ram:ProprietaryID>\n" //$NON-NLS-1$ //$NON-NLS-2$
+ " </ram:PayeePartyCreditorFinancialAccount>\n" //$NON-NLS-1$
+ " <ram:PayeeSpecifiedCreditorFinancialInstitution>\n" //$NON-NLS-1$
+ " <ram:BICID>"+trans.getOwnBIC()+"</ram:BICID>\n" //$NON-NLS-1$ //$NON-NLS-2$
+ " <ram:GermanBankleitzahlID>"+ trans.getOwnBLZ()+"</ram:GermanBankleitzahlID>\n" //$NON-NLS-1$ //$NON-NLS-2$
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>\n" //$NON-NLS-1$ //$NON-NLS-2$
+ " </ram:PayeeSpecifiedCreditorFinancialInstitution>\n" //$NON-NLS-1$
+ " </ram:SpecifiedTradeSettlementPaymentMeans>\n"; //$NON-NLS-1$

View File

@@ -66,6 +66,7 @@ public class ZUGFeRDImporter {
private String BLZ;
private String BIC;
private String IBAN;
private String KTO;
private String holder;
private String amount;
private String dueDate;
@@ -284,9 +285,12 @@ public class ZUGFeRDImporter {
Node detail = bookingDetails.item(detailIndex);
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("IBANID"))) { //$NON-NLS-1$
setIBAN(detail.getTextContent());
}
}
if ((detail.getLocalName() != null) && (detail.getLocalName().equals("ProprietaryID"))) { //$NON-NLS-1$
setKTO(detail.getTextContent());
}
}
}
ndList = document.getElementsByTagNameNS("*", "PayeeSpecifiedCreditorFinancialInstitution");// ZF1 //$NON-NLS-1$
@@ -455,7 +459,21 @@ public class ZUGFeRDImporter {
return IBAN;
}
/**
/**
*
* @return the sender's KTO
*/
public String getKTO() {
if (!parsed) {
throw new RuntimeException("use extract() before requesting a value");
}
if (KTO==null) {
parse();
}
return KTO;
}
/**
*
* @return the sender's bank name
*/
@@ -473,7 +491,11 @@ public class ZUGFeRDImporter {
this.IBAN = IBAN;
}
/**
private void setKTO(String KTO) {
this.KTO = KTO;
}
/**
*
* @return the name of the owner of the sender's bank account
*/

View File

@@ -363,6 +363,9 @@ class ZUGFeRDTransactionModelConverter {
IDType iban = xmlFactory.createIDType();
iban.setValue(trans.getOwnIBAN());
bankAccount.setIBANID(iban);
IDType kto = xmlFactory.createIDType();
kto.setValue(trans.getOwnKto());
bankAccount.setProprietaryID(kto);
paymentData.setPayeePartyCreditorFinancialAccount(bankAccount);
CreditorFinancialInstitutionType bankData = xmlFactory