fixed date filter financial start date issue

This commit is contained in:
Cihan Şentürk 2025-01-10 23:57:16 +03:00 committed by GitHub
parent 9abd5f4ab4
commit 4d5ea3857a
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();
}