#6321 - Negative tickets #1945

Open
jsegarra wants to merge 93 commits from 6321_negative_tickets into dev
1 changed files with 7 additions and 2 deletions
Showing only changes of commit 888f15049a - Show all commits

View File

@ -53,6 +53,11 @@ module.exports = Self => {
arg: 'lack',
type: 'number',
description: 'The item id',
},
{
arg: 'days',
type: 'number',
description: 'The range days',
}
],
returns: [
@ -74,7 +79,7 @@ module.exports = Self => {
if (typeof options == 'object')
Object.assign(myOptions, options);
const filterKeyOrder = ['id', 'longname', 'supplier', 'colour', 'size', 'origen', 'lack', 'warehouse'];
const filterKeyOrder = ['days', 'id', 'longname', 'supplier', 'colour', 'size', 'origen', 'lack', 'warehouse'];
delete ctx?.args?.ctx;
@ -82,7 +87,7 @@ module.exports = Self => {
if (filter)
ctx.args = Object.assign(ctx.args ?? {}, filter);
let procedureParams = [true, 2];
let procedureParams = [true];
procedureParams.push(...filterKeyOrder.map(clave => ctx.args[clave] ?? null));
const procedureArgs = Array(procedureParams.length).fill('?').join(', ');