Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#3922 Fix fiscal year end when fiscal year starts on Jan 1. #24766

Conversation

larssandergreen
Copy link
Contributor

Before

With previous_n.fiscal_year, the dates were correct if a fiscal year start date other than Jan 1 was set. If Jan 1 was the FY start date, then the year was one too large.

After

Correct fiscal year end date for Jan 1 and other FY start dates.

Thanks @demeritcowboy for noticing this one.

@civibot
Copy link

civibot bot commented Oct 18, 2022

(Standard links)

@civibot civibot bot added the master label Oct 18, 2022
@larssandergreen larssandergreen marked this pull request as ready for review October 18, 2022 15:58
@larssandergreen larssandergreen force-pushed the Fix-fiscal-year-end-problem-when-FY-is-Jan-1 branch from cbcaf74 to b325d63 Compare October 18, 2022 19:36
@demeritcowboy
Copy link
Contributor

Unit test is at #24769

I might suggest adding a code comment in here because someone will come along and say "hey we can simplify this because $from['Y'] + $relativeTermSuffix is the same as $fYear"

@larssandergreen larssandergreen force-pushed the Fix-fiscal-year-end-problem-when-FY-is-Jan-1 branch from b325d63 to 8f9b61f Compare October 19, 2022 19:33
@larssandergreen
Copy link
Contributor Author

Done, thanks Dave.

@demeritcowboy demeritcowboy merged commit d94dea3 into civicrm:master Oct 19, 2022
@larssandergreen larssandergreen deleted the Fix-fiscal-year-end-problem-when-FY-is-Jan-1 branch November 5, 2022 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants