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
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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user