fix stupid variable names
This commit is contained in:
2 files changed
+12
-12
No files matched your search
@@ -53,18 +53,18 @@ class CommunityController implements IAuthenticationRequired
|
||||
|
||||
$balanceCalculator = new BalanceCalculator($community);
|
||||
$debts = $balanceCalculator->calculate();
|
||||
$debtUsers = [];
|
||||
$debtItems = [];
|
||||
$debtBalance = 0.0;
|
||||
$outstandingUsers = [];
|
||||
$outstandingItems = [];
|
||||
$outstandingBalance = 0.0;
|
||||
foreach ($debts as $debt) {
|
||||
if ($debt['payer']->getId() === \Container::$request->user()->getUniqueId()) {
|
||||
$debtBalance += $debt['amount'];
|
||||
$debtUsers[] = $debt;
|
||||
$debtItems[] = $debt;
|
||||
}
|
||||
if ($debt['payee']->getId() === \Container::$request->user()->getUniqueId()) {
|
||||
$outstandingBalance += $debt['amount'];
|
||||
$outstandingUsers[] = $debt;
|
||||
$outstandingItems[] = $debt;
|
||||
}
|
||||
}
|
||||
$balance = $outstandingBalance - $debtBalance;
|
||||
@@ -74,9 +74,9 @@ class CommunityController implements IAuthenticationRequired
|
||||
'members' => $this->getMembers($community),
|
||||
'currencies' => $this->getCurrencies($community),
|
||||
'upcomingEvents' => [],
|
||||
'debtUsers' => $debtUsers,
|
||||
'debtItems' => $debtItems,
|
||||
'debtBalance' => $debtBalance,
|
||||
'outstandingUsers' => $outstandingUsers,
|
||||
'outstandingItems' => $outstandingItems,
|
||||
'outstandingBalance' => $outstandingBalance,
|
||||
'balance' => $balance,
|
||||
'editPermission' => $ownCommunityMember->getOwner()
|
||||
|
||||
Reference in new issue
Block a user