Various code cleanup.

This commit is contained in:
James Cole
2016-04-27 19:21:47 +02:00
parent 84f299c33b
commit e3437ba697
9 changed files with 154 additions and 107 deletions

View File

@@ -65,7 +65,7 @@ class AccountController extends Controller
{
$typeName = config('firefly.shortNamesByFullName.' . $account->accountType->type);
$subTitle = trans('firefly.delete_' . $typeName . '_account', ['name' => $account->name]);
$accountList = ExpandedForm::makeSelectList($repository->getAccounts([$account->accountType->type]), true);
$accountList = ExpandedForm::makeSelectListWithEmpty($repository->getAccounts([$account->accountType->type]));
unset($accountList[$account->id]);
// put previous url in session

View File

@@ -183,7 +183,7 @@ class PiggyBankController extends Controller
if (!isset($accounts[$account->id])) {
$accounts[$account->id] = [
'name' => $account->name,
'balance' => Steam::balance($account, $end, true),
'balance' => Steam::balanceIgnoreVirtual($account, $end),
'leftForPiggyBanks' => $repository->leftOnAccount($account, $end),
'sumOfSaved' => strval($piggyBank->savedSoFar),
'sumOfTargets' => strval(round($piggyBank->targetamount, 2)),

View File

@@ -64,7 +64,7 @@ class RuleGroupController extends Controller
{
$subTitle = trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]);
$ruleGroupList = ExpandedForm::makeSelectList($repository->get(), true);
$ruleGroupList = ExpandedForm::makeSelectListWithEmpty($repository->get());
unset($ruleGroupList[$ruleGroup->id]);
// put previous url in session