Skip to content

Commit

Permalink
Merge pull request #2080 from moneymanagerex/2079-broken-report-filte…
Browse files Browse the repository at this point in the history
…r-for-current-financial-year

Correct Handling for Financial Year
  • Loading branch information
guanlisheng authored Jan 15, 2025
2 parents 96c3c69 + 2571c4d commit 1028bcf
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 1028bcf

Please sign in to comment.