From b748d4407257220bfa728451608a099cd900880b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Thu, 29 Jul 2021 19:39:16 +0300 Subject: [PATCH] close #2207 Fixed: Item Currency show is wrong in Invoice Page #pqf471 --- .../js/components/AkauntingItemButton.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/resources/assets/js/components/AkauntingItemButton.vue b/resources/assets/js/components/AkauntingItemButton.vue index 23df15eaf..64fe00314 100644 --- a/resources/assets/js/components/AkauntingItemButton.vue +++ b/resources/assets/js/components/AkauntingItemButton.vue @@ -220,6 +220,23 @@ export default { }; }, + mounted() { + if (this.dynamicCurrency.code != this.currency.code) { + if (!this.dynamicCurrency.decimal) { + this.money = { + decimal: this.dynamicCurrency.decimal_mark, + thousands: this.dynamicCurrency.thousands_separator, + prefix: (this.dynamicCurrency.symbol_first) ? this.dynamicCurrency.symbol : '', + suffix: (!this.dynamicCurrency.symbol_first) ? this.dynamicCurrency.symbol : '', + precision: parseInt(this.dynamicCurrency.precision), + masked: this.masked + }; + } else { + this.money = this.dynamicCurrency; + } + } + }, + methods: { setItemList(items) { this.item_list = []; @@ -509,6 +526,7 @@ export default { this.setItemList(this.items); } }, + sortItems() { this.item_list.sort(function (a, b) { var nameA = a.value.toUpperCase(); // ignore upper and lowercase