diff --git a/modules/item/front/locale/es.yml b/modules/item/front/locale/es.yml index 56c96c403..c922656c4 100644 --- a/modules/item/front/locale/es.yml +++ b/modules/item/front/locale/es.yml @@ -3,7 +3,7 @@ View item: Ver artículo Category: Reino Description: Descripción Size: Medida -Type: Familia +Item family: Familia Name: Nombre Full name: Nombre completo Relevancy: Relevancia diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html index 294509f05..4a1e4fb56 100644 --- a/modules/item/front/summary/index.html +++ b/modules/item/front/summary/index.html @@ -26,7 +26,7 @@ - { if (sale.quantity > originalSale.quantity) throw new UserError('Invalid quantity'); + // Update original sale const rest = originalSale.quantity - sale.quantity; const updatedSale = await models.Sale.updateAll({ @@ -173,7 +174,7 @@ module.exports = Self => { newSale.ticketFk = ticketId; newSale.quantity = sale.quantity; - await models.Sale.create(newSale, options); + const createdSale = await models.Sale.create(newSale, options); // Clone sale components const saleComponents = await models.SaleComponent.find({ @@ -187,6 +188,6 @@ module.exports = Self => { await models.SaleComponent.create(newComponents, options); - return [updatedSale, createdSale]; + return updatedSale; } };