- allow Bank credentials without BIC

- allow minimum profile without delivery date
This commit is contained in:
jstaerk
2023-01-10 19:15:14 +01:00
parent 8479bf5a2e
commit b5ede93bf7
4 changed files with 22 additions and 9 deletions

View File

@@ -1,3 +1,6 @@
- allow Bank credentials without BIC
- allow minimum profile without delivery date
2.6.0 "Joyeux Noël"
=======
2022-12-23

View File

@@ -13,12 +13,19 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
/**
* BIC, I believe it's optional
*/
protected String BIC;
protected String BIC=null;
/**
* the "name" of the bank account (holder)
*/
protected String accountName=null;
/***
* constructor for IBAN only :-)
* @param IBAN the IBAN as string
*/
public BankDetails(String IBAN) {
this.IBAN = IBAN;
}
/***
* constructor for normal use :-)
* @param IBAN the IBAN as string

View File

@@ -72,13 +72,16 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement
+ "<ram:PayeePartyCreditorFinancialAccount>"
+ "<ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>";
xml+= accountNameStr;
xml+= "</ram:PayeePartyCreditorFinancialAccount>"
+ "<ram:PayeeSpecifiedCreditorFinancialInstitution>"
xml+= "</ram:PayeePartyCreditorFinancialAccount>";
if (getOwnBIC()!=null) {
xml+= "<ram:PayeeSpecifiedCreditorFinancialInstitution>"
+ "<ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>"
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>"
//
+ "</ram:PayeeSpecifiedCreditorFinancialInstitution>"
+ "</ram:SpecifiedTradeSettlementPaymentMeans>";
}
return xml;
}

View File

@@ -563,7 +563,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
xml += " </ram:ActualDeliverySupplyChainEvent>";
} else {
if (trans.getDocumentCode() != DocumentCodeTypeConstants.CREDITNOTE) {
if ((trans.getDocumentCode() != DocumentCodeTypeConstants.CREDITNOTE)&&(getProfile() != Profiles.getByName("Minimum"))) {
throw new IllegalStateException("No delivery date provided");
}
}