2332 - Fixed on load error
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-06-16 08:50:59 +02:00
parent 1b71c1b3b1
commit 7fd77bdaef
2 changed files with 14 additions and 3 deletions

View File

@ -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;
});

View File

@ -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