From 1144a197a56dca6844fcbce040f4922938a189e1 Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 14 Feb 2019 12:06:14 +0100 Subject: [PATCH] #1112 ticket.sale --- modules/ticket/back/methods/sale/updateDiscount.js | 6 ++++-- modules/ticket/front/sale/editDiscount.js | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/ticket/back/methods/sale/updateDiscount.js b/modules/ticket/back/methods/sale/updateDiscount.js index a90597726..1c1db1927 100644 --- a/modules/ticket/back/methods/sale/updateDiscount.js +++ b/modules/ticket/back/methods/sale/updateDiscount.js @@ -60,8 +60,10 @@ module.exports = Self => { await model.Sale.update({id: params.editLines[i].id}, {discount: params.editLines[i].discount}); } - query = ` + if (usesMana) { + query = ` call vn.manaSpellersRequery(?)`; - await Self.rawSql(query, [ticket[0].client().salesPersonFk]); + await Self.rawSql(query, [ticket[0].client().salesPersonFk]); + } }; }; diff --git a/modules/ticket/front/sale/editDiscount.js b/modules/ticket/front/sale/editDiscount.js index 9f41230e9..c4c73b016 100644 --- a/modules/ticket/front/sale/editDiscount.js +++ b/modules/ticket/front/sale/editDiscount.js @@ -51,9 +51,8 @@ class Controller { }).catch(e => { this.vnApp.showError(e.data.error.message); }); - } else { + } else this.vnApp.showError(this.$translate.instant('There is no changes to save')); - } } clear() {