Bugfix in ZUGFeRD2PullProvider.generateXML(): try getPaymentTermDescription() before constructing one
or the program throws a NullPointerException if 'trans' only overwrites 'getPaymentTermDescription()' but not the default 'getDueDate()'.
This commit is contained in:
@@ -252,13 +252,14 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
|
||||
SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd"); //$NON-NLS-1$
|
||||
String exemptionReason="";
|
||||
|
||||
if (trans.getPaymentTermDescription()!=null) {
|
||||
paymentTermsDescription=trans.getPaymentTermDescription();
|
||||
}
|
||||
|
||||
if (paymentTermsDescription==null) {
|
||||
paymentTermsDescription= "Zahlbar ohne Abzug bis " + germanDateFormat.format(trans.getDueDate());
|
||||
|
||||
}
|
||||
if (trans.getPaymentTermDescription()!=null) {
|
||||
paymentTermsDescription=trans.getPaymentTermDescription();
|
||||
}
|
||||
|
||||
String senderReg = "";
|
||||
if (trans.getOwnOrganisationFullPlaintextInfo() != null) {
|
||||
|
||||
Reference in New Issue
Block a user