fix: dueDate may occur on CreditNote and CorrectedInvoice
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user