sale order
SAP-ERP Portal CI/CD / build (push) Successful in 3m57s

This commit is contained in:
John
2026-10-05 18:45:17 +05:30
parent e725a6571b
commit eead8f5ffd
129 changed files with 14252 additions and 452 deletions
+8 -1
View File
@@ -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() {