Skip to content

Commit

Permalink
Merge pull request #267 from weclapp-dev/master
Browse files Browse the repository at this point in the history
Solution 3 to #266
  • Loading branch information
jstaerk authored Mar 24, 2022
2 parents 3ee042d + 3a6232a commit bbb28f7
Showing 7 changed files with 808 additions and 828 deletions.
Original file line number Diff line number Diff line change
@@ -24,20 +24,22 @@ public interface IZUGFeRDTradeSettlementDebit extends IZUGFeRDTradeSettlement {



@Override
default String getSettlementXML() {



String xml = " <ram:SpecifiedTradeSettlementPaymentMeans>\n"
+ " <ram:TypeCode>59</ram:TypeCode>\n"
+ " <ram:PayerPartyDebtorFinancialAccount>\n"
+ " <ram:IBANID>"+XMLTools.encodeXML(getIBAN())+"</ram:IBANID>\n"
+ " </ram:PayerPartyDebtorFinancialAccount>\n";
String xml = "<ram:SpecifiedTradeSettlementPaymentMeans>"
+ "<ram:TypeCode>59</ram:TypeCode>"
+ "<ram:PayerPartyDebtorFinancialAccount>"
+ "<ram:IBANID>"+XMLTools.encodeXML(getIBAN())+"</ram:IBANID>"
+ "</ram:PayerPartyDebtorFinancialAccount>";

xml = xml + " </ram:SpecifiedTradeSettlementPaymentMeans>\n";
xml += "</ram:SpecifiedTradeSettlementPaymentMeans>";
return xml;
}

@Override
default String getPaymentXML() {
return "<ram:DirectDebitMandateID>"+XMLTools.encodeXML(getMandate())+"</ram:DirectDebitMandateID>";
}
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@
*********************************************************************** */
package org.mustangproject.ZUGFeRD;

import java.text.SimpleDateFormat;

import org.mustangproject.XMLTools;

public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement {
@@ -60,26 +58,27 @@ default String getOwnIBAN() {
default String getAccountName() { return null; }


default String getSettlementXML() {
@Override
default String getSettlementXML() {
String accountNameStr="";
if (getAccountName()!=null) {
accountNameStr="<ram:AccountName>" + XMLTools.encodeXML(getAccountName()) + "</ram:AccountName>\n";
accountNameStr="<ram:AccountName>" + XMLTools.encodeXML(getAccountName()) + "</ram:AccountName>";

}

String xml = " <ram:SpecifiedTradeSettlementPaymentMeans>\n"
+ " <ram:TypeCode>58</ram:TypeCode>\n"
+ " <ram:Information>SEPA credit transfer</ram:Information>\n"
+ " <ram:PayeePartyCreditorFinancialAccount>\n"
+ " <ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>\n";
String xml = "<ram:SpecifiedTradeSettlementPaymentMeans>"
+ "<ram:TypeCode>58</ram:TypeCode>"
+ "<ram:Information>SEPA credit transfer</ram:Information>"
+ "<ram:PayeePartyCreditorFinancialAccount>"
+ "<ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>";
xml+= accountNameStr;
xml+= " </ram:PayeePartyCreditorFinancialAccount>\n"
+ " <ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
+ " <ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>\n"
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>\n"
xml+= "</ram:PayeePartyCreditorFinancialAccount>"
+ "<ram:PayeeSpecifiedCreditorFinancialInstitution>"
+ "<ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>"
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>"
//
+ " </ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
+ " </ram:SpecifiedTradeSettlementPaymentMeans>\n";
+ "</ram:PayeeSpecifiedCreditorFinancialInstitution>"
+ "</ram:SpecifiedTradeSettlementPaymentMeans>";
return xml;
}

Loading

0 comments on commit bbb28f7

Please sign in to comment.