u
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
import {
|
||||
TOUCH_UPDATED_AT as MSSQL_TOUCH,
|
||||
TOUCH_STUECKLISTE_ARTICLES_UPDATED_AT as MSSQL_TOUCH_STUECKLISTE,
|
||||
} from '../../providers/mssql/queries/article.js';
|
||||
import {
|
||||
TOUCH_UPDATED_AT as SQLITE_TOUCH,
|
||||
TOUCH_STUECKLISTE_ARTICLES_UPDATED_AT as SQLITE_TOUCH_STUECKLISTE,
|
||||
} from '../../providers/sqlite3/queries/article.js';
|
||||
|
||||
/**
|
||||
* Centralized sync and rebuild logic for the materialized `articlewarehousesummary` table.
|
||||
*
|
||||
@@ -142,6 +151,11 @@ export async function syncArticleWarehouseSummaryForLedger(runner, { companyId,
|
||||
warehouseId,
|
||||
stock,
|
||||
});
|
||||
|
||||
const touchSql = isSqlite ? SQLITE_TOUCH : MSSQL_TOUCH;
|
||||
const touchStuecklisteSql = isSqlite ? SQLITE_TOUCH_STUECKLISTE : MSSQL_TOUCH_STUECKLISTE;
|
||||
await runner.query(touchSql, { articleId });
|
||||
await runner.query(touchStuecklisteSql, { articleId });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user