parent
e30c66313f
commit
888f15049a
|
@ -53,6 +53,11 @@ module.exports = Self => {
|
||||||
arg: 'lack',
|
arg: 'lack',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
description: 'The item id',
|
description: 'The item id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
arg: 'days',
|
||||||
|
type: 'number',
|
||||||
|
description: 'The range days',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: [
|
returns: [
|
||||||
|
@ -74,7 +79,7 @@ module.exports = Self => {
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
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;
|
delete ctx?.args?.ctx;
|
||||||
|
|
||||||
|
@ -82,7 +87,7 @@ module.exports = Self => {
|
||||||
if (filter)
|
if (filter)
|
||||||
ctx.args = Object.assign(ctx.args ?? {}, filter);
|
ctx.args = Object.assign(ctx.args ?? {}, filter);
|
||||||
|
|
||||||
let procedureParams = [true, 2];
|
let procedureParams = [true];
|
||||||
procedureParams.push(...filterKeyOrder.map(clave => ctx.args[clave] ?? null));
|
procedureParams.push(...filterKeyOrder.map(clave => ctx.args[clave] ?? null));
|
||||||
|
|
||||||
const procedureArgs = Array(procedureParams.length).fill('?').join(', ');
|
const procedureArgs = Array(procedureParams.length).fill('?').join(', ');
|
||||||
|
|
Loading…
Reference in New Issue