fix: dueDate may occur on CreditNote and CorrectedInvoice

This commit is contained in:
burak
2026-01-15 13:01:09 +03:00
parent 61267edb8d
commit 7c811f9835

View File

@@ -749,10 +749,6 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
} }
} }
} }
if (trans.getDocumentCode() != null
&& Arrays.asList(DocumentCodeTypeConstants.CORRECTEDINVOICE, DocumentCodeTypeConstants.CREDITNOTE).contains(trans.getDocumentCode())) {
hasDueDate = false;
}
final List<VATAmount> vatAmounts = calc.getVATAmountList(); final List<VATAmount> vatAmounts = calc.getVATAmountList();
for (final VATAmount amount : vatAmounts) { for (final VATAmount amount : vatAmounts) {
@@ -1055,7 +1051,10 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
throw new IllegalStateException( throw new IllegalStateException(
"if paymentTerms.dueDate is specified, paymentTerms.discountTerms.baseDate has not to be specified"); "if paymentTerms.dueDate is specified, paymentTerms.discountTerms.baseDate has not to be specified");
} }
paymentTermsXml += "<ram:Description>" + pt.getDescription() + "</ram:Description>";
if(pt.getDescription() != null) {
paymentTermsXml += "<ram:Description>" + pt.getDescription() + "</ram:Description>";
}
if (dueDate != null) if (dueDate != null)
{ {