Skip to content

[HOLD for payment 2025-01-13] [HOLD for payment 2025-01-02] [$250] Apply tax expense rules associated with category #53220

Description

@MonilBhavsar

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Linked to internal issue https://github.com/Expensify/Expensify/issues/338213
Version Number:
Reproducible in staging?:
Reproducible in production?:
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation (hyperlinked to channel name):

Now that we have tax expense rules for categories, we do want to apply them when user creates an expense with that category or updates any existing expense with a specific category.

The expense rules are stored in policy_ collection inside rules > expenseRules key

When user creates or updates an expense associated with a policy and we have expenseRules with tax, we want to check and apply them.

We do have a isMatch() function in expensify-common repo and we could utilise it https://github.com/Expensify/expensify-common/blob/302e37e40d9d7e718e7c1c3d98faaa644b51da9d/lib/ExpenseRule.jsx#L40

Action Performed:

Break down in numbered steps

  1. Create a control workspace
  2. Enable Rules
  3. Enable Taxes and create couple of tax rates
  4. Go to categories, click on it and update the tax rate associated with category
  5. Go to this workspace chat, create a money request and on confirmation page, change the category

Expected Result:

Describe what you think should've happened
Tax rate should change to the tax rate associated with category in step 4 above

Actual Result:

Describe what actually happened
Tax rate does not change

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
None

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @JmillsExpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.WeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions