Skip to content

FINERACT-2421: Working Capital loan details extended#5859

Open
alberto-art3ch wants to merge 1 commit into
apache:developfrom
openMF:FINERACT-2421/working-capital-loan-extend-details
Open

FINERACT-2421: Working Capital loan details extended#5859
alberto-art3ch wants to merge 1 commit into
apache:developfrom
openMF:FINERACT-2421/working-capital-loan-extend-details

Conversation

@alberto-art3ch
Copy link
Copy Markdown
Contributor

Description

Working Capital loan details extended to be used mainly for UI, like summary, account details, transactions

FINERACT-2421

Screenshot 2026-05-17 at 10 54 03 PM

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.

@alberto-art3ch alberto-art3ch changed the title FINERACT-2421: Working Capital loan details extended WEB-954: Performance, Subscription management migration May 19, 2026
@alberto-art3ch alberto-art3ch changed the title WEB-954: Performance, Subscription management migration FINERACT-2421: Working Capital loan details extended May 19, 2026
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/working-capital-loan-extend-details branch from 365d2a9 to f59370b Compare May 19, 2026 14:06
"null",
"bigdecimal"
]
},
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.

I dont think we need this

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 removed!

private boolean isLoanProductLinkedToFloatingRate;
private Long fundId;
private String fundName;
private String officeName;
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.

Seems irrelevant...

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 removed!

@Schema(example = "0.0", description = "Approved discount set during loan approval")
public BigDecimal discountApproved;
@Schema(example = "90", description = "Loan term in days (originalPaymentNumber from amortization schedule); null if schedule not yet generated")
public Integer totalDays;
Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy May 20, 2026

Choose a reason for hiding this comment

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

Please rename to "totalNoPayments"

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!

@Schema(example = "0.00", description = "Penalty charges portion from allocation")
public BigDecimal penaltyChargesPortion;
@Schema(example = "500.00", description = "Amortized income portion (discount fee for transactions with an income relation, zero otherwise)")
public BigDecimal amortizedIncomePortion;
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.

I dont think we need this field

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 removed!

private final BigDecimal actualAmortizationAmount;
private final BigDecimal incomeModification;
private final BigDecimal deferredBalance;
private final BigDecimal feesAmount;
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.

We are not planning to add fees to Amortization schedule...

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 removed!

private BigDecimal discount;
private BigDecimal discountProposed;
private BigDecimal discountApproved;
private Integer totalDays;
Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy May 20, 2026

Choose a reason for hiding this comment

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

Please rename to "totalNoPayments"

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!

// Income recognition
private BigDecimal realizedIncome;
private BigDecimal unrealizedIncome;
private BigDecimal overpaymentAmount;
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.

Wrong group... overpayment does not belong to "Income recognition"

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 updated!

private BigDecimal principalOutstanding;
private BigDecimal principalOverdue;

// Discount fee (cargo financiero del WC loan)
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 remove: (cargo financiero del WC loan)

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!

private BigDecimal principalDisbursed;
private BigDecimal principalPaid;
private BigDecimal principalOutstanding;
private BigDecimal principalOverdue;
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.

We can remove: principalOverdue, not applicable to Working Capital loans

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!

private BigDecimal discountCharged;
private BigDecimal discountPaid;
private BigDecimal discountOutstanding;
private BigDecimal discountOverdue;
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.

We can remove discountOverdue. Not applicable to Working Capital loans.

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!

private BigDecimal totalExpectedRepayment;
private BigDecimal totalRepayment;
private BigDecimal totalOutstanding;
private BigDecimal totalOverdue;
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.

totalOverdue we can remove, not applicable for working capital loans.

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!

private BigDecimal totalRepayment;
private BigDecimal totalOutstanding;
private BigDecimal totalOverdue;
private BigDecimal totalRecovered;
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.

totalRecovered we can remove, not applicable for working capital loans.

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!

// Transaction summaries
private BigDecimal totalDisbursement;
private BigDecimal totalRepaymentTransaction;
private BigDecimal totalRepaymentTransactionReversed;
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.

We can remove this field, not bringing any value...

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!

private BigDecimal feeChargesPortion;
private BigDecimal penaltyChargesPortion;
// Income recognized in this transaction (e.g. discount fee on disbursement).
private BigDecimal amortizedIncomePortion;
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 for this field...

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 removed!

.actualAmortizationAmount(roundMoney(payment.actualAmortizationAmount())) //
.incomeModification(roundMoney(payment.incomeModification())) //
.deferredBalance(roundMoney(payment.deferredBalance())) //
.feesAmount(BigDecimal.ZERO) //
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 remove

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!

@Mapping(target = "delinquencyGraceDays", source = "loanProductRelatedDetails.delinquencyGraceDays")
@Mapping(target = "delinquencyStartType", source = "loanProductRelatedDetails", qualifiedByName = "delinquencyStartTypeData")
@Mapping(target = "collectionData", ignore = true)
@Mapping(target = "totalDays", ignore = true)
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.

Rename to totalNoPayments

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!

Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

Please review my concerns.

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/working-capital-loan-extend-details branch 2 times, most recently from c4989ab to 52fecb4 Compare May 22, 2026 03:20
@adamsaghy
Copy link
Copy Markdown
Contributor

> Task :fineract-working-capital-loan:compileTestJava
/home/runner/work/fineract/fineract/fineract-working-capital-loan/src/test/java/org/apache/fineract/portfolio/workingcapitalloan/mapper/WorkingCapitalLoanTransactionMapperTest.java:103: error: cannot find symbol
        assertEquals(BigDecimal.ZERO, data.getAmortizedIncomePortion());
                                          ^
  symbol:   method getAmortizedIncomePortion()
  location: variable data of type WorkingCapitalLoanTransactionData
/home/runner/work/fineract/fineract/fineract-working-capital-loan/src/test/java/org/apache/fineract/portfolio/workingcapitalloan/mapper/WorkingCapitalLoanTransactionMapperTest.java:132: error: cannot find symbol
        assertEquals(BigDecimal.ZERO, data.getAmortizedIncomePortion());
                                          ^
  symbol:   method getAmortizedIncomePortion()
  location: variable data of type WorkingCapitalLoanTransactionData
/home/runner/work/fineract/fineract/fineract-working-capital-loan/src/test/java/org/apache/fineract/portfolio/workingcapitalloan/mapper/WorkingCapitalLoanTransactionMapperTest.java:158: error: cannot find symbol
        assertEquals(discountAmount, data.getAmortizedIncomePortion());
                                         ^
  symbol:   method getAmortizedIncomePortion()
  location: variable data of type WorkingCapitalLoanTransactionData
3 errors

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/working-capital-loan-extend-details branch 2 times, most recently from b578bfe to 975cc92 Compare May 22, 2026 14:52
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/working-capital-loan-extend-details branch from 975cc92 to ca3ae07 Compare May 22, 2026 16:04
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