@@ -12,7 +12,14 @@
|
||||
const sql = require('mssql');
|
||||
|
||||
const TABLE = `[dbo].[ZPRODUCTION_DEVIATIONS]`;
|
||||
const TYPES = ['SHORTAGE', 'SUBSTITUTION', 'DAMAGE'];
|
||||
// ADDITION: a genuinely new item/component that was never on the Production
|
||||
// Order at all — distinct from Substitution (which replaces an EXISTING
|
||||
// component) and Shortage (which tops up an EXISTING component's qty).
|
||||
// Reuses ITEM_CODE/ITEM_NAME for the new item (no "old" item involved, so no
|
||||
// OLD_LINE_NUM either), and shares Substitution's own "add a real component
|
||||
// line" SAP posting/apply/reversal logic in routes/sap.js — just always with
|
||||
// oldLineNum=null, since applySubstitutionLine() already handles that case.
|
||||
const TYPES = ['SHORTAGE', 'SUBSTITUTION', 'DAMAGE', 'ADDITION'];
|
||||
|
||||
let _conn = null;
|
||||
async function getConn() {
|
||||
|
||||
Reference in New Issue
Block a user