From a5e08b3ab43f19e096adde4f3e6e7720409901e0 Mon Sep 17 00:00:00 2001 From: ridgarou Date: Fri, 22 Jan 2016 01:07:24 +0100 Subject: [PATCH] Update knockout.blade.php Contabilizar correctamente Impuestos Negativos en el total de la Factura --- resources/views/invoices/knockout.blade.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/resources/views/invoices/knockout.blade.php b/resources/views/invoices/knockout.blade.php index 24138c1af378..d9aec7fea5be 100644 --- a/resources/views/invoices/knockout.blade.php +++ b/resources/views/invoices/knockout.blade.php @@ -388,12 +388,14 @@ function InvoiceModel(data) { } var taxRate = parseFloat(self.tax_rate()); - if (taxRate > 0) { - var tax = roundToTwo(total * (taxRate/100)); - return self.formatMoney(tax); - } else { - return self.formatMoney(0); - } + //if (taxRate > 0) { + // var tax = roundToTwo(total * (taxRate/100)); + // return self.formatMoney(tax); + //} else { + // return self.formatMoney(0); + //} + var tax = roundToTwo(total * (taxRate/100)); + return self.formatMoney(tax); }); self.totals.itemTaxes = ko.computed(function() { @@ -482,9 +484,10 @@ function InvoiceModel(data) { } var taxRate = parseFloat(self.tax_rate()); - if (taxRate > 0) { - total = NINJA.parseFloat(total) + roundToTwo((total * (taxRate/100))); - } + //if (taxRate > 0) { + // total = NINJA.parseFloat(total) + roundToTwo((total * (taxRate/100))); + //} + total = NINJA.parseFloat(total) + roundToTwo((total * (taxRate/100))); var taxes = self.totals.itemTaxes(); for (var key in taxes) {