From 7fd77bdaef1ed8d091e504fe7bf9762eadfced43 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 16 Jun 2020 08:50:59 +0200 Subject: [PATCH 1/2] 2332 - Fixed on load error --- modules/claim/front/detail/index.js | 14 ++++++++++++-- modules/claim/front/locale/es.yml | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/claim/front/detail/index.js b/modules/claim/front/detail/index.js index f73cfd996..591072e6e 100644 --- a/modules/claim/front/detail/index.js +++ b/modules/claim/front/detail/index.js @@ -99,13 +99,21 @@ class Controller extends Section { this._salesClaimed.forEach(sale => { let orgSale = sale.sale; this.paidTotal += this.getSaleTotal(orgSale); - this.claimedTotal += sale.quantity * orgSale.price - ((orgSale.discount * (sale.quantity * orgSale.price)) / 100); + + const price = sale.quantity * orgSale.price; + const discount = ((orgSale.discount * price) / 100); + + this.claimedTotal += price - discount; }); } getSaleTotal(sale) { let total = 0.0; - total += sale.quantity * sale.price - ((sale.discount * (sale.quantity * sale.price)) / 100); + + const price = sale.quantity * sale.price; + const discount = ((sale.discount * price) / 100); + + total += price - discount; return total; } @@ -127,6 +135,8 @@ class Controller extends Section { } isClaimEditable() { + if (!this.claim) return; + this.$http.get(`Tickets/${this.claim.ticketFk}/isEditable`).then(res => { this.isEditable = res.data; }); diff --git a/modules/claim/front/locale/es.yml b/modules/claim/front/locale/es.yml index b65593bbd..338342eb5 100644 --- a/modules/claim/front/locale/es.yml +++ b/modules/claim/front/locale/es.yml @@ -14,5 +14,6 @@ Send Pickup order: Enviar orden de recogida Show Pickup order: Ver orden de recogida Search claim by id or client name: Buscar reclamaciones por identificador o nombre de cliente Claim deleted!: Reclamación eliminada! -claim: reclamacióm +claim: reclamación +Photos: Fotos From 552828a1baec5bbed9092588e29c72d110a27f04 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 16 Jun 2020 10:47:01 +0200 Subject: [PATCH 2/2] hasta precio --- modules/client/back/models/address.js | 2 - modules/order/front/catalog-view/index.html | 2 +- modules/order/front/locale/es.yml | 2 +- package-lock.json | 43 ++++++++++----------- 4 files changed, 23 insertions(+), 26 deletions(-) diff --git a/modules/client/back/models/address.js b/modules/client/back/models/address.js index 384a2e686..3a1157add 100644 --- a/modules/client/back/models/address.js +++ b/modules/client/back/models/address.js @@ -16,7 +16,6 @@ module.exports = Self => { } else cannotHaveET = false; - if (cannotHaveET && this.isEqualizated) err(); done(); @@ -37,7 +36,6 @@ module.exports = Self => { done(); } - Self.beforeRemote('findById', function(ctx, modelInstance, next) { ctx.args.filter = { include: [{ diff --git a/modules/order/front/catalog-view/index.html b/modules/order/front/catalog-view/index.html index 739fdfe8e..459a61f59 100644 --- a/modules/order/front/catalog-view/index.html +++ b/modules/order/front/catalog-view/index.html @@ -37,7 +37,7 @@
{{::item.available}} - from + to {{::item.price | currency:'EUR':2}}