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