|
|
|
@@ -239,7 +239,10 @@ open class PurchaseOrderService( |
|
|
|
itemNo = thisPol.itemNo!!, |
|
|
|
itemName = thisPol.item!!.name, |
|
|
|
qty = thisPol.qty!!, |
|
|
|
processed = inLine.filter{ it.status == StockInLineStatus.COMPLETE.status}.sumOf { it.acceptedQty }, |
|
|
|
// processed = inLine.filter{ it.status == StockInLineStatus.COMPLETE.status}.sumOf { it.acceptedQty }, |
|
|
|
processed = inLine |
|
|
|
.filter { line -> line.putAwayLines.any { it.qty?.let { qty -> qty > BigDecimal.ZERO } == true } } |
|
|
|
.sumOf { line -> line.putAwayLines.sumOf { it.qty?.takeIf { qty -> qty > BigDecimal.ZERO } ?: BigDecimal.ZERO } }, |
|
|
|
receivedQty = thisPol.stockInLines.sumOf { it.acceptedQty ?: BigDecimal.ZERO }, |
|
|
|
uom = thisPol.uom!!, |
|
|
|
price = thisPol.price!!, |
|
|
|
|