Skip to content

[Hold for BZ checklist] [Due for payment 2025-09-02] Reports with credit card expenses are failing to export to QuickBooks Online #68704

@trjExpensify

Description

@trjExpensify

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: v9.1.95-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): See thread for details
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @MitchExpensify @clarajones-expensify
Slack conversation (hyperlinked to channel name): #convert

Action Performed:

  1. Connect a workspace to QuickBooks Online
  2. Connect a third-party card feed in Company Cards
  3. Create an expense report with card transactions
  4. Export to QBO
  5. Observe the report fail to export.

Expected Result:

The report should export to the card account specified for the card.

Actual Result:

The report fails to export with an error that looks like this.

Exporting report <reportID> failed: Account not found on policy <policyID>, make sure the QBO connection is synced and all centrally-managed cards are correctly configured under Domains > Company Cards.

It appears as those in the quickbooks_online_export_account NVP we're storing the name of the credit card account and not the ID as we should be.

"nameValuePairs": {
                "quickbooks_online_export_account": "Credit Card Payable Account Name",
                "quickbooks_online_export_account_policy_id": "09C377F506F31F99"

The accountID is what we need to export to the right account in QBO, and as such it should look like this:

"nameValuePairs": {
                "quickbooks_online_export_account": "964",
                "quickbooks_online_export_account_policy_id": "09C377F506F31F99"

Investigating with @francoisl for a bit, it appears as though the bug might lie here. If we compare that to QuickBooks Desktop, we see that row.accounts.at(0)?.id is used here, not just row.accounts.at(0).

Workaround:

N/A

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

See thread for details.

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @dylanexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions