Merge pull request '4197-entry.lastetBuysFilter' (#1002) from 4197-entry.lastetBuysFilter into dev
gitea/salix/pipeline/head This commit is unstable
Details
gitea/salix/pipeline/head This commit is unstable
Details
Reviewed-on: #1002 Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
commit
f12d686c33
|
@ -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,9 @@ 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]);
|
||||
stmts.push(stmt);
|
||||
|
||||
const date = new Date();
|
||||
date.setHours(0, 0, 0, 0);
|
||||
|
|
Loading…
Reference in New Issue