Skip to content

FINERACT-2455: Working Capital Breach grace days#5960

Open
alberto-art3ch wants to merge 1 commit into
apache:developfrom
openMF:FINERACT-2455/working-capital-breach-grace-days
Open

FINERACT-2455: Working Capital Breach grace days#5960
alberto-art3ch wants to merge 1 commit into
apache:developfrom
openMF:FINERACT-2455/working-capital-breach-grace-days

Conversation

@alberto-art3ch

Copy link
Copy Markdown
Contributor

Description

We are adding the Breach Grace Days field to Working Capital Loan product and account

This will be used, If Breach is allowed, the initial start date (start date of 1st period) is shifted by the number of grace days, and If the Near Breach is allowed, similarly the initial start date is shifted (implicitly included)

FINERACT-2455

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.

@adamsaghy

Copy link
Copy Markdown
Contributor
Execution failed for task ':fineract-working-capital-loan:compileJava'.
> Compilation failed; see the compiler output below.
  warning: No processor claimed any of these annotations: /io.swagger.v3.oas.annotations.Parameter,/org.mapstruct.Mapper,/jakarta.validation.constraints.NotNull,/io.swagger.v3.oas.annotations.responses.ApiResponses,/jakarta.ws.rs.QueryParam,/jakarta.persistence.PersistenceContext,/jakarta.ws.rs.GET,/jakarta.persistence.Entity,/jakarta.persistence.Convert,/org.springframework.data.jpa.repository.Query,/org.mapstruct.Mappings,/io.swagger.v3.oas.annotations.tags.Tag,/org.springframework.batch.integration.config.annotation.EnableBatchIntegration,/org.springframework.beans.factory.annotation.Value,/org.springframework.stereotype.Component,/org.springframework.transaction.annotation.Transactional,/io.swagger.v3.oas.annotations.media.Schema,/org.springframework.context.annotation.Bean,/jakarta.persistence.Column,/jakarta.persistence.JoinColumn,/org.springframework.beans.factory.annotation.Qualifier,/jakarta.persistence.Enumerated,/org.apache.fineract.commands.annotation.CommandType,/org.springframework.stereotype.Service,/io.swagger.v3.oas.annotations.responses.ApiResponse,/jakarta.persistence.Version,/org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean,/org.mapstruct.Named,/jakarta.ws.rs.core.Context,/jakarta.ws.rs.Consumes,/jakarta.ws.rs.PathParam,/jakarta.persistence.Converter,/jakarta.persistence.OneToOne,/edu.umd.cs.findbugs.annotations.SuppressFBWarnings,/com.google.gson.annotations.SerializedName,/org.springframework.context.annotation.Configuration,/jakarta.persistence.OneToMany,/org.springframework.data.repository.query.Param,/jakarta.persistence.Table,/jakarta.persistence.Embedded,/org.springframework.stereotype.Repository,/org.springframework.context.annotation.Conditional,/jakarta.persistence.Embeddable,/jakarta.persistence.ManyToOne,/org.apache.fineract.infrastructure.core.api.jersey.Pagination,/org.springframework.batch.core.annotation.BeforeStep,/jakarta.ws.rs.Path,/jakarta.ws.rs.Produces,/jakarta.ws.rs.PUT,/org.springframework.context.annotation.Profile,/org.springframework.data.jpa.repository.Modifying,/io.swagger.v3.oas.annotations.parameters.RequestBody,/org.springframework.lang.Nullable,/org.mapstruct.MappingTarget,/io.swagger.v3.oas.annotations.Operation,/org.springframework.web.bind.annotation.RequestBody,/org.mapstruct.AfterMapping,/org.mapstruct.Mapping,/org.springframework.lang.NonNull,/org.springframework.batch.core.configuration.annotation.StepScope,/jakarta.ws.rs.POST,/org.apache.fineract.infrastructure.core.serialization.gson.JsonExclude,/jakarta.ws.rs.DELETE
  1 error
  9 warnings

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2455/working-capital-breach-grace-days branch 4 times, most recently from b435391 to 04e4bd1 Compare June 10, 2026 02:00

private LocalDate calculateToDate(final LocalDate fromDate, final Integer frequency,
final WorkingCapitalLoanPeriodFrequencyType frequencyType) {
final WorkingCapitalLoanPeriodFrequencyType frequencyType, final Integer graceDays) {

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.

This looks incorrect. calculateToDate is used to calculate not just the 1st period, but grace days only affecting first from date, nothing further.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done! code updated

@adamsaghy adamsaghy left a comment

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.

Please review my concerns.

private WorkingCapitalLoanDelinquencyStartType delinquencyStartType;

@Column(name = "breach_grace_days", nullable = true)
private Integer breachGraceDays = 0;

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.

no need to set default value

private WorkingCapitalLoanDelinquencyStartType delinquencyStartType;

@Column(name = "breach_grace_days", nullable = true)
private Integer breachGraceDays = 0;

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.

no need to set default value

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2455/working-capital-breach-grace-days branch 2 times, most recently from 6a48f54 to a62eb66 Compare June 10, 2026 18:04
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2455/working-capital-breach-grace-days branch from a62eb66 to baee87d Compare June 10, 2026 20:40
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.

2 participants