Skip to content

FINERACT-2764: Loan tax is only deducted on disbursement - #6285

Open
rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-336-loan-tax-on-non-disbursement-charges
Open

FINERACT-2764: Loan tax is only deducted on disbursement#6285
rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-336-loan-tax-on-non-disbursement-charges

Conversation

@rymghosn

Copy link
Copy Markdown
Contributor

Tax configured on a loan charge (via a tax group) was only being applied when the charge was collected at disbursement. When a charge was instead
paid on its own due date, on repayment, or transferred from a linked savings account by the scheduled fee job, the tax component was silently
dropped and only the pre-tax base amount was charged/transferred.

This PR makes tax calculation consistent across all loan-charge payment paths by applying TaxUtils.calculateChargeAmountWithTax(...) wherever a
charge amount is finalized for payment or transfer:

  • LoanChargeWritePlatformServiceImpl – direct charge payment (payLoanCharge)
  • LoanWritePlatformServiceJpaRepositoryImpl – linked-account charge amounts computed for disbursement-time account transfer
  • LoanAccountDomainServiceJpa – charge paid as part of a repayment-at-disbursement transaction
  • TransferFeeChargeForLoansTasklet / TransferFeeChargeForLoansConfig – the scheduled job that transfers due fee charges (including installment
    fees) from a linked savings account, wired with a new LoanChargeRepository dependency to look up the charge's tax group
  • TaxUtils – adds getApplicableTaxComponentSummaries(...), used only for the diagnostic log statements above (which components/percentages were
    considered applicable for a given transaction date); no change to existing tax math

TaxUtils.calculateChargeAmountWithTax(...) itself already existed and was already in use for disbursement charges and savings-account charges —
this PR extends its use to the loan-charge-payment paths that were bypassing it.
PR:(https://issues.apache.org/jira/browse/FINERACT-2764)

@rymghosn
rymghosn force-pushed the port/CBS-336-loan-tax-on-non-disbursement-charges branch from 874e4f8 to 6eb733f Compare August 18, 2026 14:53
…bursement

Extend tax-inclusive charge amount calculation (TaxUtils.calculateChargeAmountWithTax)
to loan charge payment paths that were bypassing it: charge payment via account
transfer, scheduled fee transfer jobs, repayment-at-disbursement charge handling,
and disbursement-linked-account charge transfers. Previously tax was only applied
at loan disbursement time; charges paid on a specific date or via repayment had
their tax component silently dropped.
@rymghosn
rymghosn force-pushed the port/CBS-336-loan-tax-on-non-disbursement-charges branch from 6eb733f to 52d485e Compare August 19, 2026 11:38
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.

1 participant