diff --git a/src/routes/(app)/companies/[companyId]/+page.svelte b/src/routes/(app)/companies/[companyId]/+page.svelte index 812103a..627abcf 100644 --- a/src/routes/(app)/companies/[companyId]/+page.svelte +++ b/src/routes/(app)/companies/[companyId]/+page.svelte @@ -11,6 +11,8 @@ const income = $derived(parseFloat(data.totalIncome ?? '0')); const remaining = $derived(total - spent); const remainingPct = $derived(total > 0 ? (remaining / total) * 100 : 0); + const net = $derived(income - spent); + const netPositive = $derived(net >= 0); const tone = $derived(remaining < 0 ? 'red' : remainingPct < 20 ? 'amber' : 'green'); @@ -36,11 +38,58 @@
- -
-
+ +
+
+
+

+ Income +

+ +
+

+ {formatCurrency(income, currency)} +

+

+ Net of withholding · from confirmed sales +

+
+ +
+
+

+ Expenses +

+ +
+

+ {formatCurrency(spent, currency)} +

+

+ Approved · across {data.projects.length} {data.projects.length === 1 ? 'project' : 'projects'} +

+
+ + +
+

+ Net Position (Income − Expenses) +

+

+ {netPositive ? '+' : ''}{formatCurrency(net, currency)} +

+
+
+ + +
+

- Remaining + Remaining Budget

{formatCurrency(remaining, currency)} @@ -63,19 +112,7 @@

{formatCurrency(total, currency)}

-

Company-wide

-
- -
-

- Spent -

-

- {formatCurrency(spent, currency)} -

-

- Across {data.projects.length} {data.projects.length === 1 ? 'project' : 'projects'} -

+

From account balances

@@ -89,16 +126,6 @@ {total > 0 ? ((allocated / total) * 100).toFixed(1) : '0'}% of total

- -
-

- Income (from confirmed sales) -

-

- {formatCurrency(income, currency)} -

-

Net of withholding tax

-