|
|
@@ -410,9 +410,13 @@ open class PickOrderService( |
|
|
|
|
|
|
|
val inventoryLotLines = inventoryLotLineRepository.findAllByIdIn(saveSuggestedPickLots.mapNotNull { it.suggestedLotLine?.id }) |
|
|
|
|
|
|
|
inventoryLotLines.forEach { line -> |
|
|
|
line.holdQty = (line.holdQty ?: zero)?.plus(saveSuggestedPickLots.find { it.suggestedLotLine == line }?.qty ?: zero) |
|
|
|
saveSuggestedPickLots.forEach { lot -> |
|
|
|
val lineIndex = inventoryLotLines.indexOf(lot.suggestedLotLine) |
|
|
|
inventoryLotLines[lineIndex].holdQty = (inventoryLotLines[lineIndex].holdQty ?: zero).plus(lot.qty ?: zero) |
|
|
|
} |
|
|
|
// inventoryLotLines.forEach { line -> |
|
|
|
// line.holdQty = (line.holdQty ?: zero)?.plus(saveSuggestedPickLots.find { it.suggestedLotLine == line }?.qty ?: zero) |
|
|
|
// } |
|
|
|
|
|
|
|
inventoryLotLineRepository.saveAll(inventoryLotLines) |
|
|
|
|
|
|
|