From 6aaecd16569ae27cbacc12e61ed2df047f06b004 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 25 Nov 2024 18:02:02 +0100 Subject: [PATCH] Fixed that zfCharges or zfAllowances may is null (why making a collection nullable?) --- .../main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt index b1114e1..2cd93ce 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt @@ -117,7 +117,8 @@ open class MustangMapper( ) protected open fun mapAmountAdjustments(invoice: Invoice): AmountAdjustments? { - if ((invoice.totalPrepaidAmount == null || invoice.totalPrepaidAmount == BigDecimal.ZERO) && invoice.zfCharges.isEmpty() && invoice.zfAllowances.isEmpty()) { + if ((invoice.totalPrepaidAmount == null || invoice.totalPrepaidAmount == BigDecimal.ZERO) + && invoice.zfCharges.isNullOrEmpty() && invoice.zfAllowances.isNullOrEmpty()) { return null }