From 44c7b87726c22efea2c115bd2f8277c88e4508b4 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 21 Jan 2025 23:08:42 +0100 Subject: [PATCH] perf: refs #7134 use where to get only EUR currency --- src/pages/Supplier/Card/SupplierBalance.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/Supplier/Card/SupplierBalance.vue b/src/pages/Supplier/Card/SupplierBalance.vue index fcc22f9cb..87eac2abf 100644 --- a/src/pages/Supplier/Card/SupplierBalance.vue +++ b/src/pages/Supplier/Card/SupplierBalance.vue @@ -112,9 +112,8 @@ async function onFetch(data) { function round(value) { return Math.round(value * 100) / 100; } -const onFetchCurrencies = (data) => { - const eur = data.find((currency) => currency.code === 'EUR'); - userParams.value.currencyFk = eur?.id; +const onFetchCurrencies = ([currency]) => { + userParams.value.currencyFk = currency?.id; }; @@ -124,7 +123,7 @@ const onFetchCurrencies = (data) => {