Skip to content

FINERACT-2399: Add global config to block transactions on closed/overpaid loans#5349

Open
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-2399/block-transactions-closed-overpaid-loans
Open

FINERACT-2399: Add global config to block transactions on closed/overpaid loans#5349
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-2399/block-transactions-closed-overpaid-loans

Conversation

@airajena
Copy link
Contributor

Description

Fixes FINERACT-2399

This PR adds a new global configuration block-transactions-on-closed-overpaid-loans that allows organizations to prevent monetary transactions on loan accounts with closed or overpaid status.

Problem

Currently, Fineract allows monetary transactions (repayments, refunds, charges, etc.) on loans that are in closed or overpaid status. This can cause:

  • Data integrity issues
  • Accounting reconciliation problems
  • Unintended transactions on settled accounts

Solution

Added a global configuration toggle:

  • When disabled (default): Current behavior preserved - transactions allowed on closed/overpaid loans
  • When enabled: Monetary transactions are blocked with appropriate error message

@adamsaghy
Copy link
Contributor

Please dont forget to run ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest before ALL commits!

@airajena airajena force-pushed the FINERACT-2399/block-transactions-closed-overpaid-loans branch from 00f29ec to 7a00cba Compare January 21, 2026 18:46
@adamsaghy
Copy link
Contributor

adamsaghy commented Jan 23, 2026

Please dont forget to run ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest before ALL commits!

@airajena
Copy link
Contributor Author

Please dont forget to run ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest before ALL commits!

Thanks for the reminder! Just a quick clarification: Is it sufficient to run these checks specifically on the modules I've modified (e.g., ./gradlew :integration-tests:spotlessApply ...), or do you require them to be run on the entire project root? Running them on the root seems to trigger issues in unrelated modules.

@adamsaghy
Copy link
Contributor

Please dont forget to run ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest before ALL commits!

Thanks for the reminder! Just a quick clarification: Is it sufficient to run these checks specifically on the modules I've modified (e.g., ./gradlew :integration-tests:spotlessApply ...), or do you require them to be run on the entire project root? Running them on the root seems to trigger issues in unrelated modules.

Its just easier to run this as i shared and fix all places ;)

@airajena airajena force-pushed the FINERACT-2399/block-transactions-closed-overpaid-loans branch from 7a00cba to b28f4e5 Compare January 24, 2026 06:33
Copy link
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.

Credit Balance Refund txn cannot be blocked! That is for handle overpaid status correctly!

Comment on lines 26 to 28
<sql>
SELECT SETVAL('c_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM c_configuration;
</sql>
Copy link
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. Are you sure this should be here?

Copy link
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 add proper testing to ensure correct behavior!

@airajena airajena force-pushed the FINERACT-2399/block-transactions-closed-overpaid-loans branch 2 times, most recently from ebb2fc9 to eac6fa3 Compare February 3, 2026 06:48
@airajena
Copy link
Contributor Author

airajena commented Feb 3, 2026

Please add proper testing to ensure correct behavior!

Done

@airajena airajena force-pushed the FINERACT-2399/block-transactions-closed-overpaid-loans branch from eac6fa3 to ba77770 Compare February 3, 2026 12:30
@airajena airajena force-pushed the FINERACT-2399/block-transactions-closed-overpaid-loans branch from ba77770 to 5407dfb Compare February 5, 2026 11:12
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