4081-ticket.setDeleted #1003

Merged
carlosjr merged 5 commits from 4081-ticket.setDeleted into dev 2022-06-17 11:30:24 +00:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit ba0975fe0e - Show all commits

View File

@ -96,6 +96,7 @@ module.exports = Self => {
}); });
Self.latestBuysFilter = async(ctx, filter, options) => { Self.latestBuysFilter = async(ctx, filter, options) => {
const models = Self.app.models;
const myOptions = {}; const myOptions = {};
if (typeof options == 'object') if (typeof options == 'object')
@ -143,7 +144,9 @@ module.exports = Self => {
const stmts = []; const stmts = [];
let stmt; 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(); const date = new Date();
date.setHours(0, 0, 0, 0); date.setHours(0, 0, 0, 0);