@@ -272,6 +272,12 @@ async function resubmitAfterReject(id, w, { by, byName }) {
|
||||
stage, JSON.stringify(log), now,
|
||||
parseInt(id),
|
||||
]);
|
||||
// Keep an already-generated Production Order's batch snapshot in sync —
|
||||
// see syncBatchFromWorkOrder()'s comment for why this can still be needed
|
||||
// even after a Production Order exists.
|
||||
await require('./productionOrderStore').syncBatchFromWorkOrder(id, {
|
||||
batchNumber: w.batchNumber || '', mfgDate: w.mfgDate || '', expDate: w.expDate || '',
|
||||
}).catch(e => console.error('[WO-STORE] syncBatchFromWorkOrder failed:', e.message));
|
||||
return findById(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user