|
|
@@ -1470,9 +1470,13 @@ open class StockInLineService( |
|
|
val (warehouseId, qty) = targets.first() |
|
|
val (warehouseId, qty) = targets.first() |
|
|
stockInLine.pendingAutoPutawayWarehouseId = warehouseId |
|
|
stockInLine.pendingAutoPutawayWarehouseId = warehouseId |
|
|
stockInLine.pendingAutoPutawayQty = qty |
|
|
stockInLine.pendingAutoPutawayQty = qty |
|
|
|
|
|
// Keep JO in STORING until releasePendingAutoPutaways actually puts away; |
|
|
|
|
|
// do not mark COMPLETED here or the JO vanishes from Waiting QC Put Away. |
|
|
stockInLine.jobOrder?.let { jo -> |
|
|
stockInLine.jobOrder?.let { jo -> |
|
|
jo.status = JobOrderStatus.COMPLETED |
|
|
|
|
|
jobOrderRepository.save(jo) |
|
|
|
|
|
|
|
|
if (jo.status != JobOrderStatus.STORING) { |
|
|
|
|
|
jo.status = JobOrderStatus.STORING |
|
|
|
|
|
jobOrderRepository.save(jo) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
val saved = saveAndFlush(stockInLine) |
|
|
val saved = saveAndFlush(stockInLine) |
|
|
val lineInfo = stockInLineRepository.findStockInLineInfoByIdAndDeletedFalse(saved.id!!) |
|
|
val lineInfo = stockInLineRepository.findStockInLineInfoByIdAndDeletedFalse(saved.id!!) |
|
|
|