-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2024-07-24] [$250] Split tax - Tax amount is negative when manually entering tax amount when splitting expense #44632
Comments
Triggered auto assignment to @CortneyOfstad ( |
@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 |
We think that this bug might be related to #wave-collect - Release 1 |
ProposalPlease 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
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 const taxAmount = TransactionUtils.getTaxAmount(transaction, false); getTaxAmount() returns the absolute value of Then we format it const formattedTaxAmount = CurrencyUtils.convertToDisplayString(taxAmount, iouCurrencyCode); here Note: Instead of passing What alternative solutions did you explore? (Optional) |
ProposalPlease 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.
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
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
|
@CortneyOfstad Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
I was able to recreate so going to get eyes on this! |
Job added to Upwork: https://www.upwork.com/jobs/~01f472383a767ded73 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
@aimane-chnaif there are two proposals here and here for review when you have a chance — thank you! |
Thanks for the proposals.
@nkdengineer have you found any case where @etCoderDysto's solution is not working? - const formattedTaxAmount = CurrencyUtils.convertToDisplayString(transaction?.taxAmount, iouCurrencyCode);
+ const formattedTaxAmount = CurrencyUtils.convertToDisplayString(TransactionUtils.getTaxAmount(transaction, false), iouCurrencyCode); |
@aimane-chnaif I can't find. |
@etCoderDysto's proposal looks good. They're the first to provide root cause and working solution. |
Triggered auto assignment to @hayata-suenaga, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Hi @hayata-suenaga, should I go on with creating the PR? |
sorry I have been sick for a while. yes! let's go with your proposal, @etCoderDysto! 😄 |
📣 @etCoderDysto You have been assigned to this job! |
Np 😁. I hope you are feeling better now. |
PR will be ready for review in few hours. |
@aimane-chnaif PR is ready for review. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-07-24. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payment Summary
BugZero Checklist (@CortneyOfstad)
|
@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! |
@CortneyOfstad I have accepted the offer. |
Offending PR with comment: #32550 (comment) We already have regression test as stated in OP |
Payment Summary@etCoderDysto — paid $250 via Upwork Thanks all! |
@CortneyOfstad I am still using upwork. Can you please reopen and sort payment? Thanks |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
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:
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?
Screenshots/Videos
Add any screenshot/video evidence
Bug6527444_1719582486649.20240628_214259.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @CortneyOfstadThe text was updated successfully, but these errors were encountered: