Fix Revenue null currency crash on user profile
Some checks failed
Frontend / Frontend verification (push) Has been cancelled
Lint PHP / Linting (8.2) (push) Has been cancelled
Check .lock files / Verify lock file integrity (push) Has been cancelled
Release Drafter / Verify repository (push) Has been cancelled
Tests / Integration (8.2) (push) Has been cancelled
Tests / Integration (8.3) (push) Has been cancelled
Tests / Integration (8.4) (push) Has been cancelled
Tests / Integration (8.5) (push) Has been cancelled
Actions Security Analysis / Scan workflows (push) Has been cancelled
Release Drafter / Draft next release (push) Has been cancelled
Lock Threads / Lock inactive issues (push) Has been cancelled
Renovate / renovate (push) Has been cancelled

- TimesheetRepository::getRevenue(): default to ZAR when currency is null
- Set all customer currencies to ZAR (was EUR from old K1 DB)
This commit is contained in:
root
2026-06-20 17:53:05 +00:00
parent 86f3e3c9f3
commit c0f03bc64d

View File

@@ -224,7 +224,8 @@ class TimesheetRepository extends EntityRepository
$all = []; $all = [];
foreach ($qb->getQuery()->getArrayResult() as $item) { foreach ($qb->getQuery()->getArrayResult() as $item) {
$all[] = new Revenue($item['currency'], $item['revenue']); $currency = $item['currency'] ?? 'ZAR';
$all[] = new Revenue($currency, $item['revenue']);
} }
return $all; return $all;