fix(componentUpdate): updated filter where sintax
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-12-01 09:24:56 +01:00
parent e9c189a963
commit e815292d6b
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ module.exports = Self => {
const params = [args.id, args.shipped, args.warehouseFk]; const params = [args.id, args.shipped, args.warehouseFk];
const [salesMovable] = await Self.rawSql(query, params, myOptions); const [salesMovable] = await Self.rawSql(query, params, myOptions);
const sales = await models.Sale.find({ticketFk: args.id}, myOptions); const sales = await models.Sale.find({where: {ticketFk: args.id}}, myOptions);
const salesNewTicket = salesMovable.filter(sale => (sale.movable ? sale.movable : 0) >= sale.quantity); const salesNewTicket = salesMovable.filter(sale => (sale.movable ? sale.movable : 0) >= sale.quantity);
const salesNewTicketLength = salesNewTicket.length; const salesNewTicketLength = salesNewTicket.length;