From fe6deb787b1bcd726b227e2e7f4aa896e13472b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 24 Jul 2020 23:38:01 +0300 Subject: [PATCH] close #1547 Fixed: Invoice/bill edit item issue --- resources/assets/js/views/purchases/bills.js | 5 +++-- resources/assets/js/views/sales/invoices.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/views/purchases/bills.js b/resources/assets/js/views/purchases/bills.js index 73a85b2f0..8436bc9ca 100644 --- a/resources/assets/js/views/purchases/bills.js +++ b/resources/assets/js/views/purchases/bills.js @@ -64,6 +64,7 @@ const app = new Vue({ let items = []; let item_backup = this.form.item_backup[0]; let currency_code = this.form.currency_code; + let currency = this.currency; this.edit.status = true; @@ -73,11 +74,11 @@ const app = new Vue({ currency: currency_code, item_id: item.item_id, name: item.name, - price: (item.price).toFixed(this.currency.precision), + price: (item.price).toFixed(currency.precision), quantity: item.quantity, tax_id: item.tax_id, discount: item.discount_rate, - total: (item.total).toFixed(this.currency.precision) + total: (item.total).toFixed(currency.precision) }); }); diff --git a/resources/assets/js/views/sales/invoices.js b/resources/assets/js/views/sales/invoices.js index 6eafabdde..580ec7884 100644 --- a/resources/assets/js/views/sales/invoices.js +++ b/resources/assets/js/views/sales/invoices.js @@ -65,6 +65,7 @@ const app = new Vue({ let items = []; let item_backup = this.form.item_backup[0]; let currency_code = this.form.currency_code; + let currency = this.currency; this.edit.status = true; @@ -74,11 +75,11 @@ const app = new Vue({ currency: currency_code, item_id: item.item_id, name: item.name, - price: (item.price).toFixed(this.currency.precision), + price: (item.price).toFixed(currency.precision), quantity: item.quantity, tax_id: item.tax_id, discount: item.discount_rate, - total: (item.total).toFixed(this.currency.precision) + total: (item.total).toFixed(currency.precision) }); });