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] Tax rate - System message does not show the correct tax rate when category has tax rate #54515
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 and Taxes are enabled.
There are three tax rates - A, B and C.
Tax rate A belongs to Workspace currency default.
Tax rate B belongs to Foreign currency default.
Go to staging.new.expensify.com
Go to workspace settings > Categories.
Click Advertising category.
Click Default tax rate.
Select Tax rate C.
Go to workspace chat.
Submit an expense in foreign currency, and with "Advertising" category from Step 3.
Go to transaction thread.
Click Category.
Click on Advertising category to unselect it.
Note that tax field shows Tax rate B, but the system message shows "changed the tax rate to Tax rate A".
Click Category.
Select any other category except Advertising.
Note that tax field shows Tax rate B, but the system message shows "changed the tax rate to Tax rate A".
Expected Result:
In Step 11 and 14, the system message should correctly reflect the current state of selected tax rate.
Actual Result:
In Step 11 and 14, the system message shows that the tax rate is changed to Tax rate A, when the tax field shows that Tax rate B is selected.
👋 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.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We need another test case for getCategoryTaxCodeAndAmount when the transaction currency is different with the policy currency and verify that the default tax rate will be the Foreign tax rate if it exists.
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 [-]Tax rate - System message does not show the correct tax rate when category has tax rate[/-][+][HOLD for payment 2025-01-13] Tax rate - System message does not show the correct tax rate when category has tax rate[/+]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:
@grgia@sakluger@grgia 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]
Activity
melvin-bot commentedon Dec 24, 2024
Triggered auto assignment to @grgia (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Dec 24, 2024
Triggered auto assignment to @sakluger (
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
💬 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:
sakluger commentedon Dec 24, 2024
Discussing in Slack.
nkdengineer commentedon Dec 25, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 11 and 14, the system message shows that the tax rate is changed to Tax rate A, when the tax field shows that Tax rate B is selected.
What is the root cause of that problem?
We always pass the
defaultTaxRateparam aspolicy?.taxRates?.defaultExternalIDthen the system message is updated wronglyApp/src/libs/TransactionUtils/index.ts
Line 1262 in 12e0941
What changes do you think we should make in order to solve the problem?
We should use
getDefaultTaxCodefunction that already handled the case foreign currency to get the correct default tax rate.App/src/libs/TransactionUtils/index.ts
Line 1262 in 12e0941
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We need another test case for
getCategoryTaxCodeAndAmountwhen the transaction currency is different with the policy currency and verify that the default tax rate will be the Foreign tax rate if it exists.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.
bernhardoj commentedon Dec 26, 2024
I'm fixing it here
9 remaining items
jasperhuangg commentedon Dec 27, 2024
@MonilBhavsar #54579 (comment) what about this comment? Or is that going to be a separate concern handled elsewhere?
bernhardoj commentedon Dec 28, 2024
@jasperhuangg I think #54513 is the only one that needs a BE fix. This issue is fully FE.
sakluger commentedon Jan 2, 2025
@bernhardoj, just to confirm, no additional payment is required for this issue, right?
[-]Tax rate - System message does not show the correct tax rate when category has tax rate[/-][+][HOLD for payment 2025-01-13] Tax rate - System message does not show the correct tax rate when category has tax rate[/+]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
@grgia @sakluger @grgia 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]
bernhardoj commentedon Jan 7, 2025
@sakluger yes, no payment here.
sakluger commentedon Jan 8, 2025
Perfect, thank you for confirming!