mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
This commit is contained in:
@@ -108,6 +108,9 @@ class ReconcileController extends Controller
|
||||
if ($end->lt($start)) {
|
||||
[$start, $end] = [$end, $start];
|
||||
}
|
||||
// move dates to end of day and start of day:
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
$startDate = clone $start;
|
||||
$startDate->subDay();
|
||||
|
||||
@@ -93,6 +93,11 @@ class ShowController extends Controller
|
||||
if ($end->lt($start)) {
|
||||
[$start, $end] = [$end, $start];
|
||||
}
|
||||
|
||||
// make sure dates are end of day and start of day:
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
$location = $this->repository->getLocation($account);
|
||||
$attachments = $this->repository->getAttachments($account);
|
||||
$today = today(config('app.timezone'));
|
||||
@@ -181,6 +186,8 @@ class ShowController extends Controller
|
||||
$subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]);
|
||||
$periods = new Collection();
|
||||
|
||||
$end->endOfDay();
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page)->withAccountInformation()->withCategoryInformation();
|
||||
|
||||
@@ -416,6 +416,8 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function period(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
Log::debug(sprintf('Now in period("%s", "%s")', $start->format('Y-m-d'), $end->format('Y-m-d')));
|
||||
$chartData = [];
|
||||
$cache = new CacheProperties();
|
||||
@@ -442,11 +444,8 @@ class AccountController extends Controller
|
||||
$format = (string) trans('config.month_and_day_js', [], $locale);
|
||||
$accountCurrency = $this->accountRepository->getAccountCurrency($account);
|
||||
|
||||
Log::debug('One');
|
||||
$range = Steam::finalAccountBalanceInRange($account, $start, $end, $this->convertToNative);
|
||||
Log::debug('Two');
|
||||
$range = Steam::filterAccountBalances($range, $account, $this->convertToNative, $accountCurrency);
|
||||
Log::debug('Three');
|
||||
|
||||
// temp, get end balance.
|
||||
Log::debug('temp get end balance');
|
||||
|
||||
@@ -189,9 +189,10 @@ class ReconcileController extends Controller
|
||||
if ($end->lt($start)) {
|
||||
[$end, $start] = [$start, $end];
|
||||
}
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
$startDate = clone $start;
|
||||
$startDate->subDay();
|
||||
$end->endOfDay();
|
||||
|
||||
$currency = $this->accountRepos->getAccountCurrency($account) ?? $this->defaultCurrency;
|
||||
$startBalance = Steam::finalAccountBalance($account, $startDate)['balance'];
|
||||
|
||||
@@ -83,6 +83,8 @@ class ReportController extends Controller
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle',
|
||||
@@ -114,6 +116,8 @@ class ReportController extends Controller
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle',
|
||||
@@ -146,6 +150,8 @@ class ReportController extends Controller
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle',
|
||||
@@ -179,6 +185,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle',
|
||||
@@ -211,6 +219,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle',
|
||||
@@ -367,6 +377,8 @@ class ReportController extends Controller
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle',
|
||||
|
||||
Reference in New Issue
Block a user