Merge pull request #729 from Socleo/feature_update_for_french_plateform_choruspro

Updates about SpecifiedTradeSettlementHeaderMonetarySummation and SpecifiedTradeSettlementPaymentMeans
This commit is contained in:
Jochen Staerk
2025-06-24 16:50:09 +02:00
committed by GitHub
3 changed files with 53 additions and 7 deletions

View File

@@ -23,6 +23,14 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
* the "name" of the bank account (holder) * the "name" of the bank account (holder)
*/ */
protected String accountName = null; protected String accountName = null;
/**
* payment means code
*/
protected String paymentMeansCode = "58";
/**
* payment means information
*/
protected String paymentMeansInformation = "SEPA credit transfer";
/*** /***
* bean constructor * bean constructor
@@ -123,5 +131,31 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
return accountName; return accountName;
} }
/**
* set payment means code
*
* @param paymentMeansCode the payment means code
* @return fluent setter
*/
public BankDetails setPaymentMeansCode(String paymentMeansCode) {
this.paymentMeansCode = paymentMeansCode;
return this;
}
@Override
public String getPaymentMeansCode() { return paymentMeansCode; }
/**
* set payment means information
*
* @param paymentMeansInformation the payment mean information
* @return fluent setter
*/
public BankDetails setPaymentMeansInformation(String paymentMeansInformation) {
this.paymentMeansInformation = paymentMeansInformation;
return this;
}
@Override
public String getPaymentMeansInformation() { return paymentMeansInformation; }
} }

View File

@@ -59,6 +59,16 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement
*/ */
default String getAccountName() { return null; } default String getAccountName() { return null; }
/***
* @return payment means code (BT-81 / UNTDID 4461)
*/
default String getPaymentMeansCode() { return null; };
/***
* @return payment means description (BT-82) (optional)
*/
default String getPaymentMeansInformation() { return null; };
@Override @Override
@JsonIgnore @JsonIgnore
@@ -70,12 +80,14 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement
} }
String xml = "<ram:SpecifiedTradeSettlementPaymentMeans>" String xml = "<ram:SpecifiedTradeSettlementPaymentMeans>"
+ "<ram:TypeCode>58</ram:TypeCode>" + "<ram:TypeCode>" + XMLTools.encodeXML(getPaymentMeansCode()) + "</ram:TypeCode>"
+ "<ram:Information>SEPA credit transfer</ram:Information>" + "<ram:Information>" + XMLTools.encodeXML(getPaymentMeansInformation()) + "</ram:Information>";
+ "<ram:PayeePartyCreditorFinancialAccount>" if (getOwnIBAN() != null) {
+ "<ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>"; xml += "<ram:PayeePartyCreditorFinancialAccount>"
xml+= accountNameStr; + "<ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>"
xml+= "</ram:PayeePartyCreditorFinancialAccount>"; + accountNameStr
+ "</ram:PayeePartyCreditorFinancialAccount>";
}
if (getOwnBIC()!=null) { if (getOwnBIC()!=null) {
xml+= "<ram:PayeeSpecifiedCreditorFinancialInstitution>" xml+= "<ram:PayeeSpecifiedCreditorFinancialInstitution>"
+ "<ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>" + "<ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>"

View File

@@ -880,7 +880,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
final String chargesTotalLine = "<ram:ChargeTotalAmount>" + currencyFormat(calc.getChargesForPercent(null)) + "</ram:ChargeTotalAmount>"; final String chargesTotalLine = "<ram:ChargeTotalAmount>" + currencyFormat(calc.getChargesForPercent(null)) + "</ram:ChargeTotalAmount>";
xml += "<ram:SpecifiedTradeSettlementHeaderMonetarySummation>"; xml += "<ram:SpecifiedTradeSettlementHeaderMonetarySummation>";
if ((getProfile() != Profiles.getByName("Minimum")) && (getProfile() != Profiles.getByName("BASICWL"))) { if ((getProfile() != Profiles.getByName("Minimum"))) {
xml += "<ram:LineTotalAmount>" + currencyFormat(calc.getTotal()) + "</ram:LineTotalAmount>"; xml += "<ram:LineTotalAmount>" + currencyFormat(calc.getTotal()) + "</ram:LineTotalAmount>";
xml += chargesTotalLine xml += chargesTotalLine
+ allowanceTotalLine; + allowanceTotalLine;