fix: warehouse changed from 'silla' to 'algemesi'
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-06-15 14:24:35 +02:00
parent b64174ff5d
commit f3cca1c930
1 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,7 @@ module.exports = Self => {
});
Self.latestBuysFilter = async(ctx, filter, options) => {
const models = Self.app.models;
const myOptions = {};
if (typeof options == 'object')
@ -143,7 +144,10 @@ module.exports = Self => {
const stmts = [];
let stmt;
stmts.push('CALL cache.visible_refresh(@calc_id, FALSE, 1)');
const warehouse = await models.Warehouse.findOne({where: {code: 'ALG'}}, myOptions);
stmt = new ParameterizedSQL(`CALL cache.visible_refresh(@calc_id, FALSE, ?)`, [warehouse.id]);
console.log(stmt);
stmts.push(stmt);
const date = new Date();
date.setHours(0, 0, 0, 0);