Fixed that zfCharges or zfAllowances may is null (why making a collection nullable?)

This commit is contained in:
dankito 2024-11-25 18:02:02 +01:00
parent 2514e96b16
commit 6aaecd1656
1 changed files with 2 additions and 1 deletions

View File

@ -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
}