diff --git a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-1.tsx b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-1.tsx
index 64ece9aa4..52f3e38c9 100644
--- a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-1.tsx
+++ b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-1.tsx
@@ -3,7 +3,7 @@ import { Card, CardContent, Typography } from '@socialincome/ui';
import _ from 'lodash';
import { SectionProps } from './page';
-export const roundAmount = (amount: number) => Math.round(amount / 10) * 10;
+export const roundAmount = (amount: number) => (amount ? Math.round(amount / 10) * 10 : 0);
export async function Section1({ params, paymentStats, contributionStats }: SectionProps) {
const translator = await Translator.getInstance({ language: params.lang, namespaces: ['website-finances'] });
@@ -22,6 +22,7 @@ export async function Section1({ params, paymentStats, contributionStats }: Sect
contributorCount: contributionStats.totalContributorsCount,
value: roundAmount(contributionStats.totalContributionsAmount),
currency: params.currency,
+ maximumFractionDigits: 0,
},
}),
];
diff --git a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-2.tsx b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-2.tsx
index 597acb8e4..11737b35f 100644
--- a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-2.tsx
+++ b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-2.tsx
@@ -18,7 +18,11 @@ export async function Section2({ params, contributionStats, expensesStats, payme
}
@@ -30,6 +34,7 @@ export async function Section2({ params, contributionStats, expensesStats, payme
context: {
value: roundAmount(contributionStats.totalIndividualContributionsAmount),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -44,6 +49,7 @@ export async function Section2({ params, contributionStats, expensesStats, payme
context: {
value: roundAmount(paymentStats.totalPaymentsAmount),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -54,6 +60,7 @@ export async function Section2({ params, contributionStats, expensesStats, payme
contributionStats.totalIndividualContributionsAmount - paymentStats.totalPaymentsAmount,
),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -68,6 +75,7 @@ export async function Section2({ params, contributionStats, expensesStats, payme
context: {
value: roundAmount(contributionStats.totalInstitutionalContributionsAmount),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -82,6 +90,7 @@ export async function Section2({ params, contributionStats, expensesStats, payme
context: {
value: roundAmount(expensesProject),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -90,6 +99,7 @@ export async function Section2({ params, contributionStats, expensesStats, payme
context: {
value: roundAmount(contributionStats.totalInstitutionalContributionsAmount - expensesProject),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
diff --git a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-3.tsx b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-3.tsx
index e83b7d025..cbdeacdfb 100644
--- a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-3.tsx
+++ b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-3.tsx
@@ -34,9 +34,10 @@ export async function Section3({ params, contributionStats }: SectionProps) {
country: translator.t(entry.country),
total: translator.t('section-3.country-amount', {
context: {
+ contributorsCount: entry.usersCount,
value: roundAmount(entry.amount),
currency: params.currency,
- contributorsCount: entry.usersCount,
+ maximumFractionDigits: 0,
},
}),
}}
diff --git a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-4.tsx b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-4.tsx
index fe4d6ac4f..bc78c42c7 100644
--- a/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-4.tsx
+++ b/website/src/app/[lang]/[region]/(website)/transparency/finances/[currency]/section-4.tsx
@@ -29,6 +29,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesTotal),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
text={translator.t('section-4.amount-since-march-2020')}
@@ -41,6 +42,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(paymentStats.totalPaymentsAmount),
currency: params.currency,
+ maximumFractionDigits: 0,
recipientsCount: paymentStats.totalRecipientsCount,
},
})}
@@ -51,6 +53,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(_.last(paymentStats.totalPaymentsByMonth)?.amount as number),
currency: params.currency,
+ maximumFractionDigits: 0,
recipientsCount: _.last(paymentStats.totalPaymentsByMonth)?.recipientsCount,
},
})}
@@ -62,6 +65,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
contributionStats.totalIndividualContributionsAmount - paymentStats.totalPaymentsAmount,
),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -76,6 +80,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(_.sum(Object.values(expensesStats.totalExpensesByType))),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -85,6 +90,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesStats.totalExpensesByType.donation_fees),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -101,6 +107,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesStats.totalExpensesByType.delivery_fees),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -117,6 +124,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesStats.totalExpensesByType.exchange_rate_loss),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -133,6 +141,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesStats.totalExpensesByType.account_fees),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -147,7 +156,11 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
{translator.t('section-4.staff-costs', {
- context: { value: roundAmount(expensesStats.totalExpensesByType.staff), currency: params.currency },
+ context: {
+ value: roundAmount(expensesStats.totalExpensesByType.staff),
+ currency: params.currency,
+ maximumFractionDigits: 0,
+ },
})}
@@ -163,6 +176,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesStats.totalExpensesByType.fundraising_advertising),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -179,6 +193,7 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
context: {
value: roundAmount(expensesStats.totalExpensesByType.administrative),
currency: params.currency,
+ maximumFractionDigits: 0,
},
})}
@@ -197,7 +212,11 @@ export async function Section4({ params, expensesStats, paymentStats, contributi
}