Skip to content

FINERACT-1185: Add anniversary interest posting period types#5761

Open
SamaSVM wants to merge 1 commit intoapache:developfrom
SamaSVM:FINERACT-1185/anniversary-interest-posting
Open

FINERACT-1185: Add anniversary interest posting period types#5761
SamaSVM wants to merge 1 commit intoapache:developfrom
SamaSVM:FINERACT-1185/anniversary-interest-posting

Conversation

@SamaSVM
Copy link
Copy Markdown
Contributor

@SamaSVM SamaSVM commented Apr 10, 2026

Description

Added four new SavingsPostingInterestPeriodType values that post interest on the same day of the month as the account opening date (the "anniversary" date).

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@SamaSVM SamaSVM force-pushed the FINERACT-1185/anniversary-interest-posting branch 3 times, most recently from d2e1c89 to 2081a59 Compare April 17, 2026 10:07
periodEndDate = periodEndDate.with(TemporalAdjusters.lastDayOfMonth());
break;
case ANNIVERSARY_MONTHLY:
periodEndDate = adjustToAnniversaryDay(periodStartDate.plusMonths(1), anniversaryDayOfMonth).minusDays(1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minusDays(1) seems a hack to circumvent:

// interest posting always occurs on next day after the period end date.
        periodEndDate = periodEndDate.plusDays(1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont mark it as resolved without any answer, please...

@adamsaghy
Copy link
Copy Markdown
Contributor

@bharathc27 FYI

@adamsaghy
Copy link
Copy Markdown
Contributor

@SamaSVM Can you please make sure you are updating the Fineract JIRA story and the documentation in fineract-doc module to cover these new posting periods?

@SamaSVM SamaSVM force-pushed the FINERACT-1185/anniversary-interest-posting branch 2 times, most recently from f025c53 to 8e6bb4f Compare April 22, 2026 10:38
@adamsaghy
Copy link
Copy Markdown
Contributor

@SamaSVM Please rebase this PR.

@SamaSVM SamaSVM force-pushed the FINERACT-1185/anniversary-interest-posting branch from 8e6bb4f to 05a165e Compare May 4, 2026 09:47
// produce period end date on current day
periodEndDate = periodStartDate;
// interest posting occurs on the next day after current day
periodEndDate = periodStartDate.plusDays(1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes looks quite breaking ones... you are effectively shifting all period end date by 1 day. Why??

Copy link
Copy Markdown
Contributor Author

@SamaSVM SamaSVM May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve left this logic unchanged for all non-ANNIVERSARY period types. I can try removing the plusDays(1) for the old types, but I’m not confident about the impact this might have on the rest of the logic.
Earlier we simply had the following at the end:
periodEndDate = periodEndDate.plusDays(1);
return periodEndDate;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm... i see.. i might need to understand this part of the logic more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants