Avoid NullPointerException if dueDate is not set.

This commit is contained in:
langfr
2024-08-08 12:20:53 +01:00
parent 63e0ecb42d
commit b50bb39743

View File

@@ -318,8 +318,9 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
paymentTermsDescription += discount.getAsXRechnung();
}
} else if ((paymentTermsDescription == null) && (trans.getDocumentCode() != DocumentCodeTypeConstants.CORRECTEDINVOICE) && (trans.getDocumentCode() != DocumentCodeTypeConstants.CREDITNOTE)) {
paymentTermsDescription = "Please remit until " + germanDateFormat.format(trans.getDueDate());
if ( trans.getDueDate() != null ) {
paymentTermsDescription = "Please remit until " + germanDateFormat.format(trans.getDueDate());
}
}