This commit is contained in:
seb
2026-10-12 17:29:29 +02:00
parent 3d6bc97411
commit 2e961252f7
44 changed files with 1166 additions and 374 deletions

View File

@@ -1,12 +1,4 @@
import { queriesFor, requireId, requireText } from '../logistics/helpers.js';
import {
FIND_ARTICLES_FOR_HISTORY as MSSQL_FIND_ARTICLES,
INSERT_ARTICLE_HISTORY as MSSQL_INSERT_HISTORY,
} from '../../providers/mssql/queries/ledger.js';
import {
FIND_ARTICLES_FOR_HISTORY as SQLITE_FIND_ARTICLES,
INSERT_ARTICLE_HISTORY as SQLITE_INSERT_HISTORY,
} from '../../providers/sqlite3/queries/ledger.js';
import resolveSelectedCompanyAccess from '../companyuser/resolveSelectedCompanyAccess.js';
import ledgerAdd from '../ledger/add.js';
import makeRunner from '../runner.js';
@@ -32,9 +24,6 @@ export default function update(provider) {
const access = resolveSelectedCompanyAccess(provider);
const addLedger = ledgerAdd(provider);
const q = queriesFor(provider);
const isSqlite = provider?.dialect === 'sqlite3';
const findArticlesSql = isSqlite ? SQLITE_FIND_ARTICLES : MSSQL_FIND_ARTICLES;
const insertHistorySql = isSqlite ? SQLITE_INSERT_HISTORY : MSSQL_INSERT_HISTORY;
/**
* Updates a shipping record.