From 314b6090600de3ce5da68bae953ee4e26f6225d5 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 24 Sep 2019 08:34:14 +0200 Subject: [PATCH 1/2] fixed family translation --- modules/item/front/locale/es.yml | 2 +- modules/item/front/summary/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 @@ - Date: Tue, 24 Sep 2019 08:51:21 +0200 Subject: [PATCH 2/2] transfer sales error fixed --- modules/ticket/back/methods/ticket/transferSales.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ticket/back/methods/ticket/transferSales.js b/modules/ticket/back/methods/ticket/transferSales.js index ae9000834..815d5fb4b 100644 --- a/modules/ticket/back/methods/ticket/transferSales.js +++ b/modules/ticket/back/methods/ticket/transferSales.js @@ -162,6 +162,7 @@ module.exports = Self => { 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; } };