|
|
|
@@ -303,6 +303,7 @@ open fun getPoSummariesByIds(ids: List<Long>): List<PurchaseOrderSummary> { |
|
|
|
id = iu?.id, |
|
|
|
stockUomCode = iu?.uom?.code, |
|
|
|
stockUomDesc = iu?.uom?.udfudesc, |
|
|
|
stockUomShortDesc = iu?.uom?.udfShortDesc, |
|
|
|
stockQty = if (stockQtyFromM18 > BigDecimal.ZERO) stockQtyFromM18 else { |
|
|
|
// fallback to legacy behavior when M18 fields are missing |
|
|
|
iu?.item?.id?.let { iId -> itemUomService.convertPurchaseQtyToStockQtyPrecise(iId, (thisPol.qty ?: BigDecimal.ZERO)) } ?: BigDecimal.ZERO |
|
|
|
|