From 0225d287d914f651242598969ea5a05b75852433 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Mon, 5 Aug 2024 10:37:18 +0200 Subject: [PATCH] bugfixing ratios --- .../stocks/[tickerID]/stats/ratios/+page.svelte | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte b/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte index 7dbfb147..c44818bf 100644 --- a/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte @@ -604,7 +604,7 @@ $: { Return on Equity (ROE) {#each ratios as item} - {filterRule === 'annual' ? (item?.returnOnEquity*100)?.toFixed(2): (item?.returnOnEquity*100)?.toFixed(2)}% + {(item?.returnOnEquity*100)?.toFixed(2)}% {/each} @@ -629,19 +629,25 @@ $: { Payout Ratio {#each ratios as item} - {(item?.payoutRatio*100)?.toFixed(2)}% + + {filterRule === 'annual' ? (item?.payoutRatio/4*100)?.toFixed(2): (item?.payoutRatio*100)?.toFixed(2)}% + {/each} Gross Profit Margin {#each ratios as item} - {(item?.grossProfitMargin*100)?.toFixed(2)}% + + {filterRule === 'annual' ? (item?.grossProfitMargin/4*100)?.toFixed(2): (item?.grossProfitMargin*100)?.toFixed(2)}% + {/each} Net Profit Margin {#each ratios as item} - {(item?.netProfitMargin*100)?.toFixed(2)}% + + {filterRule === 'annual' ? (item?.netProfitMargin/4*100)?.toFixed(2): (item?.netProfitMargin*100)?.toFixed(2)}% + {/each}