mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -85,10 +85,10 @@ class ReconcileController extends Controller
|
||||
|
||||
return redirect(route('accounts.index', [config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type))]));
|
||||
}
|
||||
$currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
|
||||
$currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
|
||||
|
||||
// no start or end:
|
||||
$range = app('navigation')->getViewRange(false);
|
||||
$range = app('navigation')->getViewRange(false);
|
||||
|
||||
// get start and end
|
||||
|
||||
@@ -97,7 +97,7 @@ class ReconcileController extends Controller
|
||||
$start = clone session('start', app('navigation')->startOfPeriod(new Carbon(), $range));
|
||||
|
||||
/** @var Carbon $end */
|
||||
$end = clone session('end', app('navigation')->endOfPeriod(new Carbon(), $range));
|
||||
$end = clone session('end', app('navigation')->endOfPeriod(new Carbon(), $range));
|
||||
}
|
||||
if (null === $end) {
|
||||
/** @var Carbon $end */
|
||||
@@ -108,12 +108,12 @@ class ReconcileController extends Controller
|
||||
[$start, $end] = [$end, $start];
|
||||
}
|
||||
|
||||
$startDate = clone $start;
|
||||
$startDate = clone $start;
|
||||
$startDate->subDay();
|
||||
$startBalance = app('steam')->bcround(app('steam')->balance($account, $startDate), $currency->decimal_places);
|
||||
$endBalance = app('steam')->bcround(app('steam')->balance($account, $end), $currency->decimal_places);
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type));
|
||||
$subTitle = (string)trans('firefly.reconcile_account', ['account' => $account->name]);
|
||||
$startBalance = app('steam')->bcround(app('steam')->balance($account, $startDate), $currency->decimal_places);
|
||||
$endBalance = app('steam')->bcround(app('steam')->balance($account, $end), $currency->decimal_places);
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type));
|
||||
$subTitle = (string)trans('firefly.reconcile_account', ['account' => $account->name]);
|
||||
|
||||
// various links
|
||||
$transactionsUrl = route('accounts.reconcile.transactions', [$account->id, '%start%', '%end%']);
|
||||
@@ -154,7 +154,7 @@ class ReconcileController extends Controller
|
||||
}
|
||||
|
||||
app('log')->debug('In ReconcileController::submit()');
|
||||
$data = $request->getAll();
|
||||
$data = $request->getAll();
|
||||
|
||||
/** @var string $journalId */
|
||||
foreach ($data['journals'] as $journalId) {
|
||||
@@ -209,14 +209,14 @@ class ReconcileController extends Controller
|
||||
}
|
||||
|
||||
// title:
|
||||
$description = trans(
|
||||
$description = trans(
|
||||
'firefly.reconciliation_transaction_title',
|
||||
[
|
||||
'from' => $start->isoFormat($this->monthAndDayFormat),
|
||||
'to' => $end->isoFormat($this->monthAndDayFormat),
|
||||
]
|
||||
);
|
||||
$submission = [
|
||||
$submission = [
|
||||
'user' => auth()->user()->id,
|
||||
'group_title' => null,
|
||||
'transactions' => [
|
||||
@@ -238,10 +238,10 @@ class ReconcileController extends Controller
|
||||
];
|
||||
|
||||
/** @var TransactionGroupFactory $factory */
|
||||
$factory = app(TransactionGroupFactory::class);
|
||||
$factory = app(TransactionGroupFactory::class);
|
||||
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$user = auth()->user();
|
||||
$factory->setUser($user);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user