fix issues in core

This commit is contained in:
2025-12-23 11:25:08 +01:00
parent 1efd971032
commit 2854ae3c5c
113 changed files with 1142 additions and 458 deletions

View File

@@ -149,8 +149,8 @@ export class GetSponsorBillingUseCase
if (invoices.length === 0) return 0;
const sorted = [...invoices].sort((a, b) => a.date.localeCompare(b.date));
const first = new Date(sorted[0].date);
const last = new Date(sorted[sorted.length - 1].date);
const first = new Date(sorted[0]!.date);
const last = new Date(sorted[sorted.length - 1]!.date);
const months = this.monthDiff(first, last) || 1;
const total = sorted.reduce((sum, inv) => sum + inv.totalAmount, 0);