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
Expense - Tax amount field does not update after bulk editing tax rate offline #84666
Version Number: 9.3.34-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82948 Email or phone of affected tester (no customers):jsiodjsojndoiosnj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable Taxes.
Go to staging.new.expensify.com
Go to workspace chat.
Create two expenses with 0% tax rate.
Open the report.
Go offline.
Bulk select the expenses.
Click dropdown button > Edit multiple.
Click Tax rate.
Select 5% rate.
Click Save.
Open any expense.
Expected Result:
Tax amount field will update because tax rate is changed.
Actual Result:
Tax amount field does not update after bulk editing tax rate offline.
👋 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.
Classification: Frontend bug Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence) Related Issues: None
Recommendation: REVERT
The bulk edit feature is missing critical tax amount calculation logic when editing tax rates offline. This causes the tax amount field to not update when users bulk edit the tax rate, which is a core functionality issue that will confuse users and lead to incorrect expense data.
Labels: No label changes made (keeping both DeployBlockerCash and DeployBlocker since this is a frontend bug that needs a fix in the App repo)
📋 Detailed Analysis
Evidence
The issue reproduces when bulk editing tax rate offline:
User creates expenses with 0% tax rate
Goes offline
Bulk selects expenses and changes tax rate to 5%
Opens an expense and sees tax amount field did not update
The causing PR introduced the bulk edit feature which includes SearchEditMultipleTaxPage.tsx and the updateMultipleMoneyRequests function.
Verification
I verified that PR #82948 modified the following key files that are directly involved in this bug:
src/pages/Search/SearchEditMultiple/SearchEditMultipleTaxPage.tsx (new file)
When category is changed, the code properly recalculates both taxCode AND taxAmount. The same logic is missing for when taxCode is changed directly.
Also compare to single expense tax rate editing:
The updateMoneyRequestTaxRate function (lines 5698-5733 in IOU/index.ts) receives taxCode, taxAmount, AND taxValue as pre-calculated parameters, meaning the caller computes the tax amount before updating. The bulk edit flow fails to do this calculation.
Expected Behavior
When a tax rate is bulk edited:
The taxCode should be updated
The taxAmount should be calculated as: (transaction.amount * taxRate.value) / 100
Both fields should be updated optimistically so users see the change immediately
Label Update: Removed DeployBlocker label and keeping DeployBlockerCash since this is a frontend bug in the App repository that blocks the mobile app deploy. The backend API can deploy safely.
Please re-state the problem that we are trying to solve in this issue.
When bulk editing the tax rate of multiple expenses while offline, the tax amount field does not update to reflect the new tax rate. For example, changing from 0% to 5% updates the tax rate label but the tax amount stays at $0.00.
What is the root cause of that problem?
The bulk edit tax rate flow only passes taxCode in the transaction changes — it never computes or includes taxAmount or taxValue.
In the single-transaction edit path (src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx), the UI explicitly calculates the new taxAmount using calculateTaxAmount() from TransactionUtils, then passes all three fields (taxCode, taxAmount, taxValue) to updateMoneyRequestTaxRate().
In the bulk edit path, SearchEditMultipleTaxPage.tsx only stores taxCode in the draft transaction (line ~46). Then SearchEditMultiplePage.tsxsave() only adds taxCode to the changes object (line ~121). Finally, updateMultipleMoneyRequests() in src/libs/actions/IOU/index.ts (line ~14050) forwards only taxCode to getUpdatedTransaction().
Since getUpdatedTransaction() in TransactionUtils/index.ts (line ~803) only updates fields that are explicitly present in transactionChanges, the taxAmount remains unchanged because it was never included.
What changes do you think we should make in order to solve the problem?
In updateMultipleMoneyRequests() in src/libs/actions/IOU/index.ts, when processing a taxCode change for each transaction, we should:
Look up the tax rate percentage for the new taxCode from the policy's tax rates
Call calculateTaxAmount() with that percentage and the transaction's amount to compute the new taxAmount
Get the taxValue (the percentage string) for the new taxCode
Include both taxAmount and taxValue in transactionChanges alongside taxCode
This mirrors what the single-transaction edit already does in IOURequestStepTaxRatePage.tsx, ensuring the optimistic update correctly reflects the recalculated tax amount for each transaction.
What alternative solutions did you explore? (Optional)
An alternative would be to make getUpdatedTransaction() automatically recalculate taxAmount whenever taxCode changes. However, this would require getUpdatedTransaction() to have access to the policy's tax rates (which it currently doesn't take as a parameter), and it would change behavior for all callers. The more targeted fix in updateMultipleMoneyRequests() is safer and consistent with how the single-edit path handles this.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 10, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82948
melvin-bot commentedon Mar 10, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Mar 10, 2026
Triggered auto assignment to @bfitzexpensify (
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.github-actions commentedon Mar 10, 2026
👋 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:
OSBotify commentedon Mar 10, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence)
Related Issues: None
Recommendation: REVERT
The bulk edit feature is missing critical tax amount calculation logic when editing tax rates offline. This causes the tax amount field to not update when users bulk edit the tax rate, which is a core functionality issue that will confuse users and lead to incorrect expense data.
Labels: No label changes made (keeping both DeployBlockerCash and DeployBlocker since this is a frontend bug that needs a fix in the App repo)
📋 Detailed Analysis
Evidence
The issue reproduces when bulk editing tax rate offline:
The causing PR introduced the bulk edit feature which includes
SearchEditMultipleTaxPage.tsxand theupdateMultipleMoneyRequestsfunction.Verification
I verified that PR #82948 modified the following key files that are directly involved in this bug:
src/pages/Search/SearchEditMultiple/SearchEditMultipleTaxPage.tsx(new file)src/libs/actions/IOU/index.ts(addedupdateMultipleMoneyRequestsfunction)src/libs/TransactionUtils/index.ts(modifiedgetUpdatedTransactionfunction)Root Cause
The bug occurs because the bulk edit tax flow only updates
taxCodebut does not calculate the correspondingtaxAmount:In SearchEditMultipleTaxPage.tsx (lines 46-48):
This only stores the tax code, without calculating what the tax amount should be.
In TransactionUtils/index.ts getUpdatedTransaction function (lines 807-809):
This only updates the tax code on the transaction, but does NOT recalculate the
taxAmountbased on the new tax rate and the expense amount.Compare this to how category changes handle taxes (lines 825-829):
When category is changed, the code properly recalculates both
taxCodeANDtaxAmount. The same logic is missing for whentaxCodeis changed directly.Also compare to single expense tax rate editing:
The
updateMoneyRequestTaxRatefunction (lines 5698-5733 in IOU/index.ts) receivestaxCode,taxAmount, ANDtaxValueas pre-calculated parameters, meaning the caller computes the tax amount before updating. The bulk edit flow fails to do this calculation.Expected Behavior
When a tax rate is bulk edited:
taxCodeshould be updatedtaxAmountshould be calculated as:(transaction.amount * taxRate.value) / 100OSBotify commentedon Mar 10, 2026
Label Update: Removed
DeployBlockerlabel and keepingDeployBlockerCashsince this is a frontend bug in the App repository that blocks the mobile app deploy. The backend API can deploy safely.MelvinBot commentedon Mar 10, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When bulk editing the tax rate of multiple expenses while offline, the tax amount field does not update to reflect the new tax rate. For example, changing from 0% to 5% updates the tax rate label but the tax amount stays at $0.00.
What is the root cause of that problem?
The bulk edit tax rate flow only passes
taxCodein the transaction changes — it never computes or includestaxAmountortaxValue.In the single-transaction edit path (
src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx), the UI explicitly calculates the newtaxAmountusingcalculateTaxAmount()fromTransactionUtils, then passes all three fields (taxCode,taxAmount,taxValue) toupdateMoneyRequestTaxRate().In the bulk edit path,
SearchEditMultipleTaxPage.tsxonly storestaxCodein the draft transaction (line ~46). ThenSearchEditMultiplePage.tsxsave()only addstaxCodeto the changes object (line ~121). Finally,updateMultipleMoneyRequests()insrc/libs/actions/IOU/index.ts(line ~14050) forwards onlytaxCodetogetUpdatedTransaction().Since
getUpdatedTransaction()inTransactionUtils/index.ts(line ~803) only updates fields that are explicitly present intransactionChanges, thetaxAmountremains unchanged because it was never included.What changes do you think we should make in order to solve the problem?
In
updateMultipleMoneyRequests()insrc/libs/actions/IOU/index.ts, when processing ataxCodechange for each transaction, we should:taxCodefrom the policy's tax ratescalculateTaxAmount()with that percentage and the transaction's amount to compute the newtaxAmounttaxValue(the percentage string) for the newtaxCodetaxAmountandtaxValueintransactionChangesalongsidetaxCodeThis mirrors what the single-transaction edit already does in
IOURequestStepTaxRatePage.tsx, ensuring the optimistic update correctly reflects the recalculated tax amount for each transaction.What alternative solutions did you explore? (Optional)
An alternative would be to make
getUpdatedTransaction()automatically recalculatetaxAmountwhenevertaxCodechanges. However, this would requiregetUpdatedTransaction()to have access to the policy's tax rates (which it currently doesn't take as a parameter), and it would change behavior for all callers. The more targeted fix inupdateMultipleMoneyRequests()is safer and consistent with how the single-edit path handles this.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.IuliiaHerets commentedon Mar 10, 2026
Chrome / 9.3.34-1
No Edit multiple option
Screen.Recording.2026-03-10.at.20.03.00.mp4
marcaaron commentedon Apr 3, 2026
Fixed in #84756