- allow Bank credentials without BIC
- allow minimum profile without delivery date
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
- allow Bank credentials without BIC
|
||||||
|
- allow minimum profile without delivery date
|
||||||
|
|
||||||
2.6.0 "Joyeux Noël"
|
2.6.0 "Joyeux Noël"
|
||||||
=======
|
=======
|
||||||
2022-12-23
|
2022-12-23
|
||||||
|
|||||||
@@ -13,12 +13,19 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
/**
|
/**
|
||||||
* BIC, I believe it's optional
|
* BIC, I believe it's optional
|
||||||
*/
|
*/
|
||||||
protected String BIC;
|
protected String BIC=null;
|
||||||
/**
|
/**
|
||||||
* the "name" of the bank account (holder)
|
* the "name" of the bank account (holder)
|
||||||
*/
|
*/
|
||||||
protected String accountName=null;
|
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 :-)
|
* constructor for normal use :-)
|
||||||
* @param IBAN the IBAN as string
|
* @param IBAN the IBAN as string
|
||||||
|
|||||||
@@ -72,13 +72,16 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement
|
|||||||
+ "<ram:PayeePartyCreditorFinancialAccount>"
|
+ "<ram:PayeePartyCreditorFinancialAccount>"
|
||||||
+ "<ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>";
|
+ "<ram:IBANID>" + XMLTools.encodeXML(getOwnIBAN()) + "</ram:IBANID>";
|
||||||
xml+= accountNameStr;
|
xml+= accountNameStr;
|
||||||
xml+= "</ram:PayeePartyCreditorFinancialAccount>"
|
xml+= "</ram:PayeePartyCreditorFinancialAccount>";
|
||||||
+ "<ram:PayeeSpecifiedCreditorFinancialInstitution>"
|
if (getOwnBIC()!=null) {
|
||||||
+ "<ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>"
|
xml+= "<ram:PayeeSpecifiedCreditorFinancialInstitution>"
|
||||||
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>"
|
+ "<ram:BICID>" + XMLTools.encodeXML(getOwnBIC()) + "</ram:BICID>"
|
||||||
//
|
// + " <ram:Name>"+trans.getOwnBankName()+"</ram:Name>"
|
||||||
+ "</ram:PayeeSpecifiedCreditorFinancialInstitution>"
|
//
|
||||||
+ "</ram:SpecifiedTradeSettlementPaymentMeans>";
|
+ "</ram:PayeeSpecifiedCreditorFinancialInstitution>"
|
||||||
|
+ "</ram:SpecifiedTradeSettlementPaymentMeans>";
|
||||||
|
|
||||||
|
}
|
||||||
return xml;
|
return xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -563,7 +563,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
xml += " </ram:ActualDeliverySupplyChainEvent>";
|
xml += " </ram:ActualDeliverySupplyChainEvent>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (trans.getDocumentCode() != DocumentCodeTypeConstants.CREDITNOTE) {
|
if ((trans.getDocumentCode() != DocumentCodeTypeConstants.CREDITNOTE)&&(getProfile() != Profiles.getByName("Minimum"))) {
|
||||||
throw new IllegalStateException("No delivery date provided");
|
throw new IllegalStateException("No delivery date provided");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user