Fix NetSuite/QBO/QBD journal entry default account display on company card export row#93703
Fix NetSuite/QBO/QBD journal entry default account display on company card export row#93703MelvinBot wants to merge 1 commit into
Conversation
…t type Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
@MelvinBot request my review |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot set the test steps to Precondition
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb Chrome2026-06-16.17-09-57.mp4iOS: HybridAppiOS: mWeb Safari2026-06-16.17-06-26.mp4MacOS: Chrome / Safari2026-06-16.17-05-02.mp4 |
|
@MelvinBot set the test steps to Precondition
complete the author checklist |
|
@MelvinBot make it ready |
|
@grgia Ready for you |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dbb4f47fd
ℹ️ 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".
| return; | ||
| } | ||
| const isDefaultSelected = value === defaultCard || value === defaultVendor; | ||
| const isDefaultSelected = value === defaultCard || value === defaultVendor || value === defaultAccount; |
There was a problem hiding this comment.
Handle already-saved default account labels
For users who selected the Default account row before this change, the card NVP already contains the localized label (for example "Default account"). This patch only normalizes future selections here; on the next render getExportMenuItem still treats only empty or CONST.COMPANY_CARDS.DEFAULT_EXPORT_TYPE as default for the NetSuite/QBO/QBD account fields, so those existing cards keep falling through to selectedAccount undefined and the export row remains blank until the user manually reselects it. Please also read/normalize the previously saved default-account label.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is just caused by a recent pr. It won't be a real problem.
Explanation of Change
Follow-up to #91743. That PR fixed the blank NetSuite company-card export row for vendor bill export, and introduced a third default label —
defaultAccount("Default account") — for journal entry / check export. However, the company-card account select page was not updated to recognize the new label, so the original bug still reproduced for journal entry.In
WorkspaceCompanyCardAccountSelectCardPage.tsx, the "is the default option selected?" check only covereddefaultCardanddefaultVendor:When a user on journal-entry export picked "Default account",
valuewas the translated label"Default account", soisDefaultSelectedwasfalseand the literal label was written tonetsuite_export_payable_accountinstead ofCONST.COMPANY_CARDS.DEFAULT_EXPORT_TYPE('default'). On the details page,getExportMenuItemthen computedisDefaultTitle = false(NVP was neither empty nor'default'), found no matching payable account, and rendered a blank row — the original bug.This adds the
defaultAccountlabel to the default-detection check so "Default account" round-trips to the'default'sentinel like the other two labels. The same gate also covers the QuickBooks Online / Desktop journal-entry and check exports, which reuse thedefaultAccountlabel.Fixed Issues
$ #91420
PROPOSAL: #91420 (comment)
Tests
Precondition
Steps:
Offline tests
N/A — this change only affects which value is saved when selecting a NetSuite/QBO/QBD company-card export account, which requires an active accounting connection.
QA Steps
Precondition
Steps:
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))Avataris modified, I verified thatAvataris working as expected in all cases)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari