Fixed that zfCharges or zfAllowances may is null (why making a collection nullable?)
This commit is contained in:
parent
2514e96b16
commit
6aaecd1656
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue