Skip to content

Commit

Permalink
Correct Handling for Financial Year
Browse files Browse the repository at this point in the history
close #2079
  • Loading branch information
wolfsolver committed Jan 15, 2025
1 parent 96c3c69 commit 2571c4d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
itemId == R.id.menu_last_fin_year) {
InfoService infoService = new InfoService(getActivity());
int financialYearStartDay = new Integer(infoService.getInfoValue(InfoKeys.FINANCIAL_YEAR_START_DAY, "1"));
int financialYearStartMonth = new Integer(infoService.getInfoValue(InfoKeys.FINANCIAL_YEAR_START_MONTH, "0"))-1;
MmxDate newDate = dateTime;
int financialYearStartMonth = new Integer(infoService.getInfoValue(InfoKeys.FINANCIAL_YEAR_START_MONTH, "1"))-1;
if (financialYearStartMonth < 0) financialYearStartMonth = 0;
MmxDate newDate = MmxDate.newDate();
newDate.setDate(financialYearStartDay);
newDate.setMonth(financialYearStartMonth);
if (newDate.toDate().after(dateTime.toDate())) {
Expand Down

0 comments on commit 2571c4d

Please sign in to comment.