From b0a60fc94a54cfc8a8e531901c8d85fe14a6ed1e Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 22 Jan 2019 10:31:12 +0100 Subject: [PATCH] #1023 claim.detail cantidad total parecer ser erronea --- modules/claim/front/detail/index.html | 66 ++++++++++++++------------- modules/claim/front/detail/index.js | 17 +++++-- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/modules/claim/front/detail/index.html b/modules/claim/front/detail/index.html index 857e1a93e..2c62a5abb 100644 --- a/modules/claim/front/detail/index.html +++ b/modules/claim/front/detail/index.html @@ -82,38 +82,42 @@ - + -

Claimable sales from ticket {{$ctrl.claim.ticketFk}}

- - - - Id - Landed - Quantity - Description - Price - Disc. - Total - - - - - {{sale.saleFk}} {{$index}} - {{sale.landed | dateTime: 'dd/MM/yyyy'}} - {{sale.quantity}} - {{sale.concept}} - {{sale.price | currency:'€':2}} - {{sale.discount}} % - - {{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency:'€':2}} - - - - - No results - - + +
Claimable sales from ticket {{$ctrl.claim.ticketFk}}
+
+ + + + + Id + Landed + Quantity + Description + Price + Disc. + Total + + + + + {{sale.saleFk}} {{$index}} + {{sale.landed | dateTime: 'dd/MM/yyyy'}} + {{sale.quantity}} + {{sale.concept}} + {{sale.price | currency:'€':2}} + {{sale.discount}} % + + {{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency:'€':2}} + + + + + No results + + +
{ + 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); @@ -81,7 +92,7 @@ class Controller { } getSaleTotal(sale) { - return sale.quantity * sale.price - ((100 - sale.discount) / 100); + return (sale.quantity * sale.price) - ((100 - sale.discount) / 100); } // Item Descriptor