Skip to content

Travel invoicing is not displayed in Sage/ Export after enabling Central invoicing #90551

Closed

Description

@lanitochka17

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


Version Number: 9.3.73-4
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: #88483
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: MacBook Air 15.7.4 Chrome, iPhone 15 iOS 26.3.1
App Component: Workspace Settings

Action Performed:

  1. Sign in to ND with expensifail account
  2. Create a workspace
  3. Enable Accounting in More features, connect to Sage Intacct
  4. Enable Travel in More features, click "Lets's go", fill the required information
  5. Open the Travel page, toggle on "Central invoicing", connect to bank account
  6. Navigate to the Accounting - Sage - Export

Expected Result:

"Travel Invoicing" menu item appears in the Sage Export RHP after enabling Central invoicing in Travel

Actual Result:

"Travel Invoicing" menu item does not appear in the Sage Export RHP after enabling Central invoicing in Travel. Only
"Export Expensify Travel Payable To" row appears in Export

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7153207_1778691376164.No_travel_invoicing_in_Sage.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @brunovjk

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 13, 2026
  2. melvin-bot commented on May 13, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #88483

  3. melvin-bot commented on May 13, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on May 13, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on May 13, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #88483 - "Sage Intacct - Add Travel Invoicing vendor & payable account selectors" by @brunovjk (High confidence)
    Related Issues: #88269

    Recommendation: REVERT

    PR #88483 introduced the Travel Invoicing menu item to the Sage Intacct export page but the item never appears, meaning the feature is completely non-functional. The fix lives entirely in the App repo — reverting the PR restores the previous working state with no impact on other functionality.

    Assigned: @brunovjk (PR author), @ishpaul777 (approving reviewer), @blimpich (approving reviewer)
    Labels: DeployBlockerCash kept (Frontend bug — App PR is the cause). DeployBlocker not present, no change needed.

    Detailed Analysis

    Evidence

    Verification

    • Affected file: src/pages/workspace/accounting/intacct/export/DynamicSageIntacctExportPage.tsx
    • PR Sage Intacct - Add Travel Invoicing vendor & payable account selectors #88483 modifies this file, adding the isTravelInvoicingEnabled guard and conditional section for the "Travel Invoicing" menu item.
    • The condition is: isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING) && getIsTravelInvoicingEnabled(travelSettings)
    • travelSettings is derived from getCardSettings(cardSettings, CONST.TRAVEL.PROGRAM_TRAVEL_US), which looks for data nested under the TRAVEL_US key in the card settings Onyx object.

    Root Cause

    The most likely root cause is that isTravelInvoicingEnabled evaluates to false during QA even after enabling Central Invoicing through the Travel page. Two possible sub-causes:

    1. The TRAVEL_INVOICING beta (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING)) may not be enabled for the test account, even though Central Invoicing can be toggled on via the Travel page (which uses a different beta check). This would cause the condition to short-circuit to false.

    2. If the beta is enabled, getCardSettings(cardSettings, CONST.TRAVEL.PROGRAM_TRAVEL_US) may return undefined because the Travel Invoicing card settings for this test account are not nested under the TRAVEL_US key, causing getIsTravelInvoicingEnabled to return false.

    Either way, the Travel Invoicing menu item is never rendered in the Sage Intacct Export RHP, making the feature completely broken for the QA test case linked in the issue. Reverting PR #88483 is the safe path forward.

  6. MelvinBot commented on May 13, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Sage Intacct Export page (DynamicSageIntacctExportPage.tsx:33-35) reads the travel invoicing enabled state from PRIVATE_EXPENSIFY_CARD_SETTINGS via useOnyx, but no API call is made from this page to fetch that data. The only place that fetches card settings is openPolicyTravelPage on the Travel page.

    Additionally, configureTravelInvoicingForPolicy does not optimistically set isEnabled: true in the TRAVEL_US nested key — it only sets loading/pending flags at the top level. In contrast, deactivateTravelInvoicing correctly sets isEnabled: false in the nested key. This asymmetry means getIsTravelInvoicingEnabled returns false because cardSettings is either undefined (never fetched) or missing the isEnabled field.

    What changes do you think we should make in order to solve the problem?

    Two changes are needed:

    1. Ensure the Export page has access to card settings data. Either call openPolicyTravelPage (or an equivalent fetch) from the accounting export pages that need travel invoicing state, or ensure the backend includes PRIVATE_EXPENSIFY_CARD_SETTINGS in the OpenPolicyAccountingPage response.

    2. Fix the optimistic data in configureTravelInvoicingForPolicy to include [CONST.TRAVEL.PROGRAM_TRAVEL_US]: { isEnabled: true } in the optimistic update, matching the pattern already used by deactivateTravelInvoicing. This ensures the UI reflects the enabled state immediately.

    What alternative solutions did you explore? (Optional)

    An alternative is relying solely on the paymentBankAccountID fallback in getIsTravelInvoicingEnabled — but this still requires the card settings data to be fetched first, so the data availability problem must be solved regardless.

    Investigation details

    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.

  7. Beamanator commented on May 13, 2026

    @Beamanator
    Contributor

    Not a blocker b/c this is behind a beta - but let me know if i'm misunderstanding @blimpich @brunovjk @ishpaul777 🙏

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on May 13, 2026
  9. blimpich commented on May 13, 2026

    @blimpich
    Contributor

    You are correct, not a blocker 👍

  10. blimpich commented on May 13, 2026

    @blimpich
    Contributor

    @brunovjk you mind implementing a fix? And then @ishpaul777 @rlinoz and I can review?

  11. added theissue type on May 13, 2026
  12. blimpich commented on May 13, 2026

    @blimpich
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions