[
https://issues.apache.org/jira/browse/FINERACT-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072987#comment-18072987
]
Jose Alberto Hernandez commented on FINERACT-1289:
--------------------------------------------------
Hello! [~kapilpanchal] and [~bgowda] Please review the next Integration Tests,
In this case we are having the Loan Charge amount + Tax amount, I mean If the
Tax is 10% and the Loan Charge amount is 100, the Loan Charge outstanding will
be 110.00
*Is this OK? This is only the calcultaion, If this is OK, then we can go with
the accounting*
_publicvoidtestLoanChargeAmountIncludesTax_singleComponent() {_
_runAt(LOAN_DATE, () -> {_
_// Given – tax infrastructure_
_PostTaxesComponentsResponsetaxComponent=createTaxComponent(10.0f);_
_PostTaxesGroupResponsetaxGroup=createTaxGroup(taxComponent.getResourceId());_
*_// Given – charge definition with 10 % tax group, base = 100_*
_PostChargesResponsechargeResponse=createFlatLoanCharge(100.0,
taxGroup.getResourceId());_
_LongchargeDefinitionId=chargeResponse.getResourceId();_
_// Given – a disbursed loan_
_LongclientId=ClientHelper.createClient(ClientHelper.defaultClientCreationRequest()).getClientId();_
_LongloanProductId=loanProductHelper.createLoanProduct(createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct())_
_.getResourceId();_
_LongloanId=applyAndApproveLoan(clientId, loanProductId, LOAN_DATE, 1000.0);_
_disburseLoan(loanId, BigDecimal.valueOf(1000.0), LOAN_DATE);_
*_// When – the taxed charge is added to the loan_*
_PostLoansLoanIdChargesResponseaddResult=loanTransactionHelper.addChargesForLoan(loanId,
newPostLoansLoanIdChargesRequest()_
_.chargeId(chargeDefinitionId).amount(100.0).dueDate(DUE_DATE).dateFormat(DATE_FORMAT).locale("en"));_
_assertNotNull(addResult);_
_LongloanChargeId=addResult.getResourceId();_
_assertNotNull(loanChargeId);_
*_// Then – the loan charge amount must include the 10 % tax (100 + 10 = 110)_*
_GetLoansLoanIdChargesChargeIdResponseloanCharge=loanTransactionHelper.getLoanCharge(loanId,
loanChargeId);_
_assertNotNull(loanCharge);_
_assertEquals(110.0, loanCharge.getAmount(), 0.01, "Expected charge amount to
be inflated by 10% tax: 100 + 10 = 110");_
_assertEquals(110.0, loanCharge.getAmountOutstanding(), 0.01,_
_"Expected outstanding amount to equal the total charge+tax amount");_
_});_
_}_
> Tax component not working as expected
> -------------------------------------
>
> Key: FINERACT-1289
> URL: https://issues.apache.org/jira/browse/FINERACT-1289
> Project: Apache Fineract
> Issue Type: Bug
> Components: Accounting, Charges
> Affects Versions: 1.4.0
> Reporter: Bharath Gowda
> Assignee: Kapil Panchal
> Priority: Major
> Fix For: 1.15.0
>
> Attachments: Screenshot from 2026-01-04 14-00-13.png, Screenshot from
> 2026-01-04 14-00-49.png, Screenshot from 2026-01-04 14-02-22.png, Screenshot
> from 2026-01-04 14-02-51.png, image-2026-01-05-19-13-39-523.png, loan charge
> config.png, loan charge split not happening.png, loan product config -1.png,
> loan product config -2.png, repaymentschedule-2026-01-04.pdf, tax component
> config.jpeg, tax group config.png
>
> Time Spent: 8h
> Remaining Estimate: 0h
>
> tax attached to the loan charge is not getting affected at the
> loan/accounting level
> To reproduce
> 1. Create a tax component-> create a tax group with the component created.
> 2. Create loan charge(any parameter, refer to the attachment for the
> parameters I used) and map the tax group created.
> 3. Add the charge to the loan product (with periodic accrual accounting)
> enabled
> 4. create/approve/disburse a loan from that loan product.
> 5. Ideally the charge with the tax attached should have JE splits for charge
> amount and tax amount separated.
> But the tax bifurcation is not happening
>
> Have attached
> product config screenshot, charge config screenshot, tax config screenshot,
> and loan issue screenshot for more understanding
> Please add a comment if you need any help
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)