You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-24] [$250] Split tax - Tax amount is negative when manually entering tax amount when splitting expense #44632
Version Number: 9.0-3.2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/4678911 Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Taxes feature is enabled.
Workspace has at least one non-zero tax rate
Go to staging.new.expensify.com
Go to workspace chat
Go to + > Split expense > Manual
Enter amount > Next
Click Show more > Tax rate
Select a non-zero tax rate
Click Tax amount
Manually enter the tax amount
Split the expense
Click on the split preview
Expected Result:
The tax amount will not be negative
Actual Result:
The tax amount is negative when manually entering tax amount when splitting expense
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@CortneyOfstad FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
BE returns negative tax amount when editing tax amount manually. And we convert the negative tax amount to formatted tax amount here in MoneyRequestConfimationListFooter without first converting the tax amount into positive value as we do in MoneyRequestView.
Note: Instead of passing false as isExpenseReport param to 'getTaxAmount', we can calculate isExpenseReport using TransactionUtils.isExpenseReport(report)).
What alternative solutions did you explore? (Optional)
What changes do you think we should make in order to solve the problem?
If we create a split bill with entering the tax amount manually, BE returns the tax amount as negative amount for expense report.
With this case BE returns the tax amount as negative amount for expense report. But if we don't enter the tax amount manually, BE returns it as positive amount. So here we should use getTaxAmountAbsValue to make sure that the displayed tax amount is always positive value
What alternative solutions did you explore? (Optional)
We can fix from BE side to always return the tax amount of split bill transaction in expense report as negative amount
And then here, we can use getTaxAmount function that had already covered the negative amount case for expense chat.
changed the title [-]Split tax - Tax amount is negative when manually entering tax amount when splitting expense[/-][+][$250] Split tax - Tax amount is negative when manually entering tax amount when splitting expense[/+]on Jul 2, 2024
Activity
melvin-bot commentedon Jun 28, 2024
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Jun 28, 2024
@CortneyOfstad FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
lanitochka17 commentedon Jun 28, 2024
We think that this bug might be related to #wave-collect - Release 1
etCoderDysto commentedon Jun 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
BE returns negative tax amount when editing tax amount manually. And we convert the negative tax amount to formatted tax amount here in
MoneyRequestConfimationListFooterwithout first converting the tax amount into positive value as we do in MoneyRequestView.App/src/components/MoneyRequestConfirmationListFooter.tsx
Line 254 in 937c418
And display the formatted value here
App/src/components/MoneyRequestConfirmationListFooter.tsx
Lines 484 to 487 in 937c418
What changes do you think we should make in order to solve the problem?
As we do in MoneyRequestView, we should first convert the taxAmount to positive following the same method used in Money RequestVeiw
getTaxAmount() returns the absolute value of
transaction.taxAmountThen we format it
here
https://github.com/Expensify/App/blob/937c4186409725b57fdaae6ae8e1d8c85a9d52a0/src/components/MoneyRequestConfirmationListFooter.tsx#L254C11-L254C29
Note: Instead of passing
falseasisExpenseReportparam to 'getTaxAmount', we can calculateisExpenseReportusingTransactionUtils.isExpenseReport(report)).What alternative solutions did you explore? (Optional)
nkdengineer commentedon Jul 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The tax amount is negative when manually entering tax amount when splitting expense
What is the root cause of that problem?
If we create a split bill with entering the tax amount manually, BE returns the tax amount as negative amount for expense report.
And in here, we doesn't convert the tax mount to positive value before getting the formatted string.
App/src/components/MoneyRequestConfirmationListFooter.tsx
Line 254 in 5cebd3e
What changes do you think we should make in order to solve the problem?
With this case BE returns the tax amount as negative amount for expense report. But if we don't enter the tax amount manually, BE returns it as positive amount. So here we should use
getTaxAmountAbsValueto make sure that the displayed tax amount is always positive valueApp/src/components/MoneyRequestConfirmationListFooter.tsx
Line 254 in 5cebd3e
What alternative solutions did you explore? (Optional)
We can fix from BE side to always return the tax amount of split bill transaction in expense report as negative amount
And then here, we can use
getTaxAmountfunction that had already covered the negative amount case for expense chat.App/src/components/MoneyRequestConfirmationListFooter.tsx
Line 254 in 5cebd3e
melvin-bot commentedon Jul 1, 2024
@CortneyOfstad Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
CortneyOfstad commentedon Jul 2, 2024
I was able to recreate so going to get eyes on this!
[-]Split tax - Tax amount is negative when manually entering tax amount when splitting expense[/-][+][$250] Split tax - Tax amount is negative when manually entering tax amount when splitting expense[/+]melvin-bot commentedon Jul 2, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01f472383a767ded73
32 remaining items
melvin-bot commentedon Jul 24, 2024
Payment Summary
Upwork Job
BugZero Checklist (@CortneyOfstad)
CortneyOfstad commentedon Jul 24, 2024
@aimane-chnaif — please complete the check ASAP so there is no further delay in payment. Thanks!
@etCoderDysto — I sent you an offer in Upwork, please let me know once you accept and I will get that paid ASAP. Thanks!
etCoderDysto commentedon Jul 24, 2024
@CortneyOfstad I have accepted the offer.
Thank you!
aimane-chnaif commentedon Jul 24, 2024
Offending PR with comment: #32550 (comment)
We already have regression test as stated in OP
CortneyOfstad commentedon Jul 25, 2024
Payment Summary
@etCoderDysto — paid $250 via Upwork
@aimane-chnaif — to be paid $250 via NewDot
Thanks all!
aimane-chnaif commentedon Oct 3, 2024
@CortneyOfstad I am still using upwork. Can you please reopen and sort payment? Thanks
mallenexpensify commentedon Nov 11, 2025
@aimane-chnaif can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~021988042361978261809
mallenexpensify commentedon Nov 11, 2025
Payment Summary
Contributor+: @aimane-chnaif paid $250 via Upwork