Pass default tax code in skip-confirmation expense creation paths#87064
Conversation
Quick-scan expense creation paths (createTransaction, distance quick-scan)
were not passing taxCode/taxAmount to the downstream action functions
(requestMoney, trackExpense, createDistanceRequest). This caused the
backend to store an empty taxCode, making the {expense:tax:code} custom
export formula produce blank output.
Compute the default tax code from the policy (matching the confirmation
page logic in IOURequestStepConfirmation.tsx) and pass it through all
three affected paths.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64a8c611b5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-04-04.at.18.54.44.mov |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
🚧 @mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.3.54-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is an internal bug fix that ensures |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.54-7 🚀
|
Explanation of Change
When creating expenses via quick scan (skip-confirmation) or distance request paths, the tax code and tax amount were not being passed to
trackExpenseandrequestMoney. This caused the default workspace tax code to be missing from the created transaction, resulting in incorrect or empty tax fields when exported using{expense:tax:code}.This fix computes the default tax code using
getDefaultTaxCodeand passes bothtaxCodeandtaxAmountto the expense creation calls increateTransactionandhandleMoneyRequestStepDistanceNavigation.Fixed Issues
$ #86891
PROPOSAL: #86891 (comment)
Tests
Preconditions:
{expense:tax:code}Scan expense (confirmation flow - baseline):
5. In ND, go to the workspace chat and create a scan expense (this goes through the confirmation page and sets up the Quick Action for the next step)
Scan expense (Quick Action - skips confirmation):
6. Click the global (+) FAB — at the bottom there should now be a Quick Action "Scan expense" (this appears because step 5 set the last used action)
7. Add a receipt and create (this skips the confirmation page and creates the expense immediately)
Distance expense (Quick Action - skips confirmation):
8. First create a distance expense from the workspace chat (to set up the Quick Action), then use the (+) FAB Quick Action to create another distance expense
Export verification:
9. Go to Reports, select the report containing the above expenses
10. Export using the export format created in step 1
11. Verify
{expense:tax:code}is populated for all expenses — including those created via Quick Action (steps 7 and 8), not just the ones from the confirmation flowOffline tests
The tax code is applied locally before the API call, so offline behavior should be unchanged. The expense will be created with the correct tax code optimistically.
QA Steps
Same as tests above, using a workspace with tax tracking enabled on staging.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Kapture.2026-04-04.at.10.50.58_compressed.mp4
Android: mWeb Chrome
Kapture.2026-04-04.at.10.57.06_compressed.mp4
iOS: Native
Kapture.2026-04-04.at.10.34.45_compressed.mp4
iOS: mWeb Safari
Kapture.2026-04-04.at.10.39.42_compressed.mp4
MacOS: Chrome / Safari
Kapture.2026-04-04.at.10.17.47_compressed.mp4