parent
e30c66313f
commit
888f15049a
|
@ -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(', ');
|
||||
|
|
Loading…
Reference in New Issue