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 2025-01-13] Distance - Inconsistency in Tax field when both distance rate and category have different tax #54513
Version Number: 9.0.78-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+kh03120001@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Windows 11 App Component: Money Requests
Action Performed:
Precondition:
Rules, Distance rates, and Taxes are enabled.
There are two non-zero tax rates - Tax rate A and Tax rate B.
On confirmation page, note that the distance tax rate is Tax rate A (follows distance rate track tax).
Click Category.
Select Advertising category from Step 3.
Note that the distance tax rate is Tax rate B (follows the category).
Submit the expense.
Go to transaction thread.
Note that the distance tax rate is back to Tax rate A.
Expected Result:
When submitting distance expense with distance rate that has tax rate and category with its own tax rate, the tax field should follow the tax rate from distance rate.
Actual Result:
In Step 12, after selecting category with own tax rate, the Tax field changes to the rate from the selected category, while the tax amount remains unchanged.
In Step 15, after submitting the distance expense, the Tax field changes back to the tax rate that follows distance rate.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Edited by proposal-police: This proposal was edited at 2024-12-25 08:13:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 12, after selecting category with own tax rate, the Tax field changes to the rate from the selected category, while the tax amount remains unchanged.
In Step 15, after submitting the distance expense, the Tax field changes back to the tax rate that follows distance rate.
What is the root cause of that problem?
Here, we always update tax code and tax amount when we change the category without checking the correct tax is the distance rate tax or not.
What changes do you think we should make in order to solve the problem?
Since the distance rate tax should be prioritized, we should update getCategoryTaxCodeAndAmount to return categoryTaxCode and categoryTaxAmount as undefined if the current tax code is distance rate tax.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a test case for getCategoryTaxCodeAndAmount and confirm that it returns categoryTaxCode and categoryTaxAmount as undefined if the current tax code is distance rate tax.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Distance - Inconsistency in Tax field when both distance rate and category have different tax[/-][+][HOLD for payment 2025-01-13] Distance - Inconsistency in Tax field when both distance rate and category have different tax[/+]on Jan 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@youssef-lr / @MonilBhavsar@Christinadobrzyn@youssef-lr / @MonilBhavsar The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.
Activity
melvin-bot commentedon Dec 24, 2024
Triggered auto assignment to @Christinadobrzyn (
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.melvin-bot commentedon Dec 24, 2024
Triggered auto assignment to @youssef-lr (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Dec 24, 2024
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Dec 24, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Christinadobrzyn commentedon Dec 24, 2024
hum... maybe related to - #53789? Asking
Christinadobrzyn commentedon Dec 24, 2024
Neil and the contributor of #53789 don't think it's related... I'll keep digging to see if I can find the culprit..
nkdengineer commentedon Dec 25, 2024
Edited by proposal-police: This proposal was edited at 2024-12-25 08:13:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 12, after selecting category with own tax rate, the Tax field changes to the rate from the selected category, while the tax amount remains unchanged.
In Step 15, after submitting the distance expense, the Tax field changes back to the tax rate that follows distance rate.
What is the root cause of that problem?
Here, we always update tax code and tax amount when we change the category without checking the correct tax is the distance rate tax or not.
App/src/libs/actions/IOU.ts
Line 601 in 12e0941
What changes do you think we should make in order to solve the problem?
Since the distance rate tax should be prioritized, we should update
getCategoryTaxCodeAndAmountto returncategoryTaxCodeandcategoryTaxAmountasundefinedif the current tax code is distance rate tax.App/src/libs/actions/IOU.ts
Line 601 in 12e0941
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a test case for
getCategoryTaxCodeAndAmountand confirm that it returnscategoryTaxCodeandcategoryTaxAmountasundefinedif the current tax code is distance rate tax.What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
17 remaining items
[-]Distance - Inconsistency in Tax field when both distance rate and category have different tax[/-][+][HOLD for payment 2025-01-13] Distance - Inconsistency in Tax field when both distance rate and category have different tax[/+]melvin-bot commentedon Jan 6, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 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 2025-01-13. 🎊
melvin-bot commentedon Jan 6, 2025
@youssef-lr / @MonilBhavsar @Christinadobrzyn @youssef-lr / @MonilBhavsar The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Jan 13, 2025
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.
Christinadobrzyn commentedon Jan 13, 2025
Looks like this can be closed! No payment needed.