Merge pull request #3255 from CihanSenturk/fix-date-filter-financial-start-date-issue

Fixed date filter financial start date issue
This commit is contained in:
Cihan Şentürk 2025-01-16 19:37:12 +03:00 committed by GitHub
commit fc8502da5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -65,7 +65,9 @@ trait DateTime
$financial_start = Date::create($year, $month, $day);
if ((setting('localisation.financial_denote') == 'ends') && ($financial_start->dayOfYear != 1)) {
if ((setting('localisation.financial_denote') == 'ends') && ($financial_start->dayOfYear != 1) ||
$financial_start->greaterThan(Date::now())
) {
$financial_start->subYear();
}