bug solved

This commit is contained in:
gerard 2018-07-16 14:24:03 +02:00
parent 26e95bfa56
commit ee1ee77240
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ module.exports = Self => {
});
Self.updateQuantity = async(id, quantity) => {
if (isNaN(params.editLines[0].discount))
if (isNaN(quantity))
throw new Error(`The value should be a number`);
let currentLine = await Self.app.models.Sale.findOne({where: {id: id}, fields: ['quantity']});