Ashutosh-Panda2004 opened a new pull request, #6614: URL: https://github.com/apache/fineract/pull/6614
The Post Interest For Savings job never withholds tax. SavingAccountMapperForInterestPosting built the account's tax group with TaxGroupData.lookup(taxGroupId, null), so the tax associations were always null and SavingsAccountInterestPostingServiceImpl.createWithHoldTransaction returned without creating a withhold tax transaction. Posting interest through the API works because that path loads the tax group with its mappings. This change loads the tax group mappings, components (percentage, validity dates, credit account) and component history in the interest posting mapper, so the job creates the withhold tax transaction the same way the manual path does. SavingsSchedularInterestPoster now also inserts the transaction's rows into m_savings_account_transaction_tax_details in its batch update, and books the journal entries the way the savings accounting processors do: Savings Control is debited with the total withheld tax, and each tax component's credit account is credited with that component's share, falling back to the product's savings reference account when a component has no credit account. SavingsAccountData gains the glAccountIdForSavingsReference needed for that fallback. A unit test in SavingsSchedularInterestPosterTest covers the batch persistence and the per-component journal entries for a withhold tax transaction. Note on local verification: I could not run the Gradle build locally (no network access to fetch the dependencies in my environment), so the change was verified by static analysis against the current develop sources. CI will have to be the build check. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
