Repository navigation
[Due for payment 2026-08-19] [$250] Clean-up some tax related bugs. #94003
Description
Activity
- addedBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Jun 19, 2026 @MelvinBot do not add the
Externallabel to this issue.- addedInternalRequires API changes or must be handled by Expensify staffRequires API changes or must be handled by Expensify staff
on Jun 19, 2026 Issue Analysis
All four bugs are confirmed in code at
facfcc1. Three of them (#1, #3, #4) live in the tax-column rendering/visibility path (SearchUIUtils.ts+TransactionItemRowWide.tsx); #2 is independent (tax-rate edit page). Confidence: High on all four — each root cause was verified against the actual source.
Bug 1 — Per Diem expenses show a Tax rate + $0.00 Tax column
Root cause: The table cell renderer suppresses tax for time requests but never for per diem. In
TransactionItemRowWide.tsx:489(Tax rate),:498(Tax code) and:516(Tax amount), the guard isisTimeRequest(...)only. For a per diem row,getTaxNamefalls back to the policy's default tax rate (TransactionUtils/index.ts:2199-2214), so the Tax rate shows a calculated value and Tax shows$0.00. (The RHPMoneyRequestViewalready handles per diem correctly viaisTaxTrackingEnabled.)Recommended fix: Add
|| isPerDiemRequest(transactionItem)alongside the existingisTimeRequestguard in those three cases (isPerDiemRequestis already exported fromTransactionUtils). Optionally also exclude per-diemtaxCode/taxAmount/taxValuefrom the column-visibility check atSearchUIUtils.ts:5826so the column doesn't appear when all rows are per diem.
Bug 2 — Name / Value / Tax Code of the default tax rate aren't editable
Root cause:
WorkspaceEditTaxPage.tsx:45gates the Name/Value/Code edit menu items oncanEditTaxRate, butPolicyUtils.canEditTaxRateis documented as "whether the tax rate can be deleted and disabled" and returnsfalsefor the default/foreign-default rate. Reusing that one flag makes the three edit fields non-interactive for the default rate. Switching the workspace default flipsdefaultExternalID, which is exactly why the repro fields become editable after changing the default.Recommended fix: Decouple the two concerns. Keep
canEditTaxRatefor the enable Switch (:117/119) and Delete item (:47), but gate the Name/Value/CodeMenuItemWithTopDescriptionitems (:131/137,:147/153,:163/181) on a newcanEditTaxFields = !!canWriteTaxes && !!policyflag that does not include the default-rate check. Do not change the shared helper —WorkspaceTaxesPage.tsxcorrectly relies on it to block disabling/bulk-deleting the default rate.
Bug 3 — Tax columns appear automatically in the single-report table view
Root cause: Both the Spend > Expenses table and the report view call
getColumnsToShow, but the data-presence block that auto-enables tax columns runsif (customResult || isExpenseReportView)(SearchUIUtils.ts:5814). The Expenses table passes neither, so it's skipped (correct). The report view passesisExpenseReportView: true, so the block always runs, and the bare per-transaction checks!!transaction.taxCode || !!transaction.taxAmount || !!transaction.taxValue(:5826-5833) force the three tax columns on. Tax columns are otherwise defined as optional custom columns, absent from the default sets.Recommended fix: Gate the per-transaction tax detection behind
customResultso the default report view falls back to the seededfalsefor tax columns — i.e. only auto-show when the user has explicitly added them as custom columns. Verify the column picker atReportDetailsColumnsPage.tsxstill pre-checks correctly after the change.
Bug 4 — Platform default tax-code IDs shown in the Tax code column
Root cause:
TransactionItemRowWide.tsx:498renderstransactionItem.taxCoderaw. That field stores the platform-generated external ID (theid_{TAX_RATE_NAME}map key), not the user-setcodeattribute (Policy.ts:225-255). Classic shows only the user-set code (blank when unset). Note the Tax rate column right above resolves correctly viagetTaxName; only Tax code uses the raw value.Recommended fix: Resolve through the policy tax map and show the user code, falling back to empty — e.g. a
getTaxCodeForDisplay(policy, transaction)helper next togetTaxNamereturningtransformedTaxRates(policy, transaction)[transaction.taxCode]?.code ?? ''. Also check the TAX_CODE sort path inSearchUIUtils.tsso it sorts on the resolved code.The sub-symptom "Tax code column doesn't appear in Spend > Expenses when toggled" is a separate gating issue at
SearchUIUtils.ts:5831-5832(column only auto-shows whencustomResult && isPolicyTaxEnabledortransaction.taxCodeis set in that context) and should be confirmed separately.
Scope note & verification
- Each root cause above was confirmed by reading the cited lines at commit
facfcc1c9e4fff22ace8b603be0f05a2d5fc76c6. - Bugs 1, 3, 4 share the tax-column subsystem (
TransactionItemRowWide.tsx+getColumnsToShowinSearchUIUtils.ts), so a single PR could reasonably address all three; bug 2 is isolated to the tax-rate edit page. - Open product questions to confirm before merging: (a) per-diem tax should be fully blank everywhere (matches Classic); (b) Name/Value/Code editable on the default rate (matches Classic); (c) tax columns should be opt-in custom columns in the report view, not auto-shown.
Next Steps for Contributor+ team:
To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/94003)to create a draft PR.
To refine:@MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.- Each root cause above was confirmed by reading the cited lines at commit
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
on Jun 19, 2026 - addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Jun 19, 2026 - changed the title
[-]Clean-up some tax related bugs.[/-][+][$250] Clean-up some tax related bugs.[/+]on Jun 19, 2026 Job added to Upwork: https://www.upwork.com/jobs/~022067789366868051266
93 remaining items
- addedAwaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to production
on Aug 18, 2026 Triggered auto assignment to @mallenexpensify (
Awaiting Payment)Contributor: @dukenv0307 due $250 via NewDot
@mallenexpensify I think you meant to tag me here.
Reacted by Nguyen Van DucThx @dmkt9 , apologies for the mix up. can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022090906519670785006@truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Thx @dmkt9 , apologies for the mix up. can you please accept the job below? Please reply here and tag me once you have.
@mallenexpensify Thanks. I've accepted the offer.
@dmkt9 paid, summary updated above, inc. to correct tag for you. . Thx.
$250 approved for @truph01
Spawned from here.
Expected results:
Per Diem expenses do not have tax applied on them, so there shouldn't be tax related values anywhere on this expense type in the table.
2026-06-19_01-52-21.mp4
Classic reference, no tax customUnits on this expense:
Name,ValueandTax Codefields of a default tax rate on a workspace can’t be edited.Expected results:
The
Name,ValueandTax Codefields of the default rate should be editable.2026-06-19_00-50-53.mp4
Expected Result:
2026-06-19_02-43-52.mp4
Expected results:
Like Classic, we don't show these platform defaultIDs, only the user set Tax Code. (CC: @twisterdotcom as this was added as a column fairly recently).
Classic reference:

Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @truph01