This commit is contained in:
James Cole
2025-10-06 20:43:47 +02:00
parent e420752991
commit 36e87f3383
4 changed files with 11 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ class AccountController extends Controller
$timer->start(sprintf('AC accounts "%s"', $query));
$result = $this->repository->searchAccount((string) $query, $types, $this->parameters->get('limit'));
// set date to subday + end-of-day for account balance. so it is at $date 23:59:59
// set date to end-of-day for account balance. so it is at $date 23:59:59
$date->endOfDay();
$allBalances = Steam::accountsBalancesOptimized($result, $date, $this->primaryCurrency, $this->convertToPrimary);

View File

@@ -87,6 +87,9 @@ class ShowController extends Controller
// TODO still need to figure out how to do this easily.
$accounts = $collection->slice(($this->parameters->get('page') - 1) * $params['limit'], $params['limit']);
// #11007 go to the end of the previous day.
$this->parameters->set('start', $this->parameters->get('start')->subSecond());
// enrich
/** @var User $admin */
$admin = auth()->user();
@@ -125,6 +128,9 @@ class ShowController extends Controller
$account->refresh();
$manager = $this->getManager();
// #11007 go to the end of the previous day.
$this->parameters->set('start', $this->parameters->get('start')->subSecond());
// enrich
/** @var User $admin */
$admin = auth()->user();

View File

@@ -314,7 +314,8 @@ trait ConvertsDataTypes
// is an atom string, I hope?
try {
$carbon = Carbon::parse($value, $value, config('app.timezone'));
$carbon = Carbon::parse($value);
$carbon->setTimezone(config('app.timezone'));
} catch (InvalidDateException $e) { // @phpstan-ignore-line
Log::error(sprintf('[3] "%s" is not a valid date or time: %s', $value, $e->getMessage()));

View File

@@ -29,6 +29,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- [Discussion 10988](https://github.com/orgs/firefly-iii/discussions/10988) (Call to a member function startOfDay() on null.) started by @molnarti
- [Issue 10990](https://github.com/firefly-iii/firefly-iii/issues/10990) (duplicate piggy event via API) reported by @4e868df3
- [Discussion 10994](https://github.com/orgs/firefly-iii/discussions/10994) (How does the save per month attribute from a piggy bank is calculated?) started by @AdriDevelopsThings
- #11005
- #11007
### API