diff --git a/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt b/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt index 5ccfe23..539bfcd 100644 --- a/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt +++ b/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt @@ -848,8 +848,8 @@ open class ProductionScheduleService( tempObj.scheduleAt = LocalDateTime.now() tempObj.totalFGType = fgCount; tempObj.totalEstProdCount = accProdCount; - tempObj.id = saveProductionScheduleToDatabase(tempObj); tempObj.type = "rough" + tempObj.id = saveProductionScheduleToDatabase(tempObj); for ((roughScheduleRecord, totalDifference) in sortedEntries) { saveRoughScheduleLineToDatabase(tempObj.id ?: -1, roughScheduleRecord)