bugfixing
This commit is contained in:
parent
9517b0fdf9
commit
48e8831128
@ -194,8 +194,8 @@ export function sumQuarterlyResultsByYear(quarterlyResults, namingList) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Filter out years with less than 4 quarters
|
// Filter out years with less than 4 quarters
|
||||||
const validYears = Object.keys(quarterCounts).filter(year => quarterCounts[year] === 4);
|
const validYears = Object?.keys(quarterCounts)?.filter(year => quarterCounts[year] === 4);
|
||||||
const annualResults = validYears.map(year => yearlySummaries[year]);
|
const annualResults = validYears?.map(year => yearlySummaries[year]);
|
||||||
|
|
||||||
// Sort the results by year in descending order
|
// Sort the results by year in descending order
|
||||||
annualResults.sort((a, b) => b?.calendarYear?.localeCompare(a?.calendarYear));
|
annualResults.sort((a, b) => b?.calendarYear?.localeCompare(a?.calendarYear));
|
||||||
|
|||||||
@ -498,7 +498,7 @@ const changeTab = (state) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const trialEndDate = addDays(data, 7, 'date');
|
const trialEndDate = addDays(data, 30, 'date');
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
|
||||||
|
|||||||
@ -569,33 +569,43 @@ $: {
|
|||||||
<tr class="text-white odd:bg-[#27272A]">
|
<tr class="text-white odd:bg-[#27272A]">
|
||||||
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Quick Ratio</td>
|
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Quick Ratio</td>
|
||||||
{#each ratios as item}
|
{#each ratios as item}
|
||||||
<td class="text-xs sm:text-sm"> {item?.quickRatio?.toFixed(2)}</td>
|
<td class="text-xs sm:text-sm">
|
||||||
|
{filterRule === 'annual' ? (item?.quickRatio/4)?.toFixed(2): item?.quickRatio?.toFixed(2)}
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<tr class="text-white odd:bg-[#27272A]">
|
<tr class="text-white odd:bg-[#27272A]">
|
||||||
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Current Ratio</td>
|
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Current Ratio</td>
|
||||||
{#each ratios as item}
|
{#each ratios as item}
|
||||||
<td class="text-xs sm:text-sm"> {item?.currentRatio?.toFixed(2)}</td>
|
<td class="text-xs sm:text-sm">
|
||||||
|
{filterRule === 'annual' ? (item?.currentRatio/4)?.toFixed(2): item?.currentRatio?.toFixed(2)}
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="text-white odd:bg-[#27272A]">
|
<tr class="text-white odd:bg-[#27272A]">
|
||||||
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm whitespace-nowrap">Asset Turnover</td>
|
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm whitespace-nowrap">Asset Turnover</td>
|
||||||
{#each ratios as item}
|
{#each ratios as item}
|
||||||
<td class="text-xs sm:text-sm"> {item?.assetTurnover?.toFixed(2)}</td>
|
<td class="text-xs sm:text-sm">
|
||||||
|
{item?.assetTurnover?.toFixed(2)}
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="text-white odd:bg-[#27272A]">
|
<tr class="text-white odd:bg-[#27272A]">
|
||||||
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Interest Coverage</td>
|
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Interest Coverage</td>
|
||||||
{#each ratios as item}
|
{#each ratios as item}
|
||||||
<td class="text-xs sm:text-sm"> {item?.interestCoverage?.toFixed(2)}</td>
|
<td class="text-xs sm:text-sm">
|
||||||
|
{filterRule === 'annual' ? (item?.interestCoverage/4)?.toFixed(2): item?.interestCoverage?.toFixed(2)}
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<tr class="text-white odd:bg-[#27272A]">
|
<tr class="text-white odd:bg-[#27272A]">
|
||||||
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Return on Equity (ROE)</td>
|
<td class="text-start border-r border-[#191E24] text-xs sm:text-sm">Return on Equity (ROE)</td>
|
||||||
{#each ratios as item}
|
{#each ratios as item}
|
||||||
<td class="text-xs sm:text-sm"> {(item?.returnOnEquity*100)?.toFixed(2)}%</td>
|
<td class="text-xs sm:text-sm">
|
||||||
|
{filterRule === 'annual' ? (item?.returnOnEquity*100)?.toFixed(2): (item?.returnOnEquity*100)?.toFixed(2)}%
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="text-white odd:bg-[#27272A]">
|
<tr class="text-white odd:bg-[#27272A]">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user