feat: add sync script for procurement tables including orders, lines, and reordering plans

This commit is contained in:
Michael committed 2026-04-09 08:19:55 +02:00
1 parent d74cdeb7b3
commit 5a5bc8b6f3
1 file changed
+3
+3
View File
@@ -115,6 +115,7 @@ async function syncAppro(force) {
// === COMMANDE_AUTO_QTEPROPO (full refresh — état courant) ===
try {
const ms = await getMssql();
const res = await ms.request().query(`
SELECT FOU_CODE, ART_NO_ID, CODESITE, QTEPROPO,
PARAMETRE_NUMERO, SUIVIDATECREATION, SUIVIDATEMODIF
@@ -141,6 +142,7 @@ async function syncAppro(force) {
// === FOUCAD (full refresh — config commande auto par fournisseur) ===
try {
const ms = await getMssql();
const res = await ms.request().query(`
SELECT FOUCODE, FRANCO, ACTIF, DUREE, UNITE, DATEREF, DATECOM,
MONTANTCDEAUTO, DATECDEAUTO, SUIVIDATECREATION, SUIVIDATEMODIF
@@ -171,6 +173,7 @@ async function syncAppro(force) {
// === PLAN_REAPPRO (full refresh — état courant) ===
try {
const ms = await getMssql();
const res = await ms.request().query(`
SELECT id, Magasin, Codein, BU_no_id, StockMag, EncoursPaletteMag,
AttentePrepaMag, ColisRea, ColisAjoutWeb, StockDispo,