Vendor matching CC - R2: App (Sage Intacct extension)#91976
Draft
Beamanator wants to merge 2 commits into
Draft
Conversation
Mirrors the existing Vendor Bill default vendor flow, gated by the `vendorMatching` beta + QBO Credit/Debit-card export config so the row only appears for workspaces where the Phase 1 fuzzy matcher can actually use it. Uses the `updateQuickbooksOnlineNonReimbursableCreditCardDefaultVendor` action shipped in Phase 1 (#91235).
Extends hasVendorFeature to also return true for Sage Intacct workspaces with non-reimbursable export = Credit Card Charge. Renames getQBOVendors / getQBOVendorByID to getMatchingVendors / getMatchingVendorByID and routes them to whichever supported integration (QBO or Intacct) is active, normalizing Intacct's SageIntacctDataElementWithValue to the Vendor shape consumers expect. Mirrors the R2 PHP fuzzy-matcher extension on the App side so the Vendor row, IOURequestStepVendor RHP, and inactiveVendor violation all work for Intacct workspaces. Extends PolicyUtilsTest's Vendor matching helpers describe block with Intacct branches across all three helpers (hasVendorFeature, getMatchingVendors, getMatchingVendorByID).
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
App side of R2 (Sage Intacct) for vendor matching CC: extends the R1 (QBO) vendor feature gate + helpers to also cover Sage Intacct workspaces with non-reimbursable export = Credit Card Charge.
Three things:
hasVendorFeature(policy, beta)now matches Intacct too. Returns true if either:export.nonReimbursable = CREDIT_CARD_CHARGE(R2, new).getQBOVendors→getMatchingVendorsandgetQBOVendorByID→getMatchingVendorByID. Same callers, integration-aware return — prefers QBO vendors when QBO is connected, falls back to Intacct vendors (normalized fromSageIntacctDataElementWithValueto theVendorshape consumers expect by dropping the redundantvaluefield and zeroingcurrency/email).ViolationsUtils.getViolationsOnyxDatainactive-vendor check, Phase 2's QBO Default vendor row, Phase 3'sIOURequestStepVendorRHP selector +MoneyRequestViewVendor row + transaction-vendor name resolution.The Intacct workspace already has its own Default Vendor flow (
SageIntacctNonReimbursableExpensesPage), so this PR adds no new Intacct UI — the existing flow keeps working as-is. The R2 PHP fuzzy-matcher extension + R2 Java QBO-vs-Intacct exporter changes are separate tracks per the R2 tracking issue.What's NOT in this PR
IntacctReportExporterRunnable.javachange (deferred to GA per the same wait-for-clean-cutover decision as R1's Java track)Cross-PR dependencies
getQBOVendors/getQBOVendorByIDhelpers that R2 generalizes.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/638609
PROPOSAL: N/A (internal feature, no external proposal)
Tests
Prerequisite: a workspace with the
vendorMatchingbeta enabled, Sage Intacct connected, and non-reimbursable export = Credit Card Charge.hasVendorFeature).IOURequestStepVendorRHP opens with the Intacct vendor list (sourced frompolicy.connections.intacct.data.vendors, normalized to{id, name}).Unit tests: the existing
Vendor matching helpersdescribe intests/unit/PolicyUtilsTest.tsis extended to cover Intacct across all three helpers — 6 new Intacct-specific cases (CC Charge true, beta-off false, Vendor Bill false; both vendor-list and vendor-by-id helpers verify normalized shape).Offline tests
Same as Tests, executed with the network disabled after step 1. The Intacct selector RHP behaves identically to the QBO selector for offline state (uses the same
OfflineWithFeedback+ Phase 1 optimistic-data path).QA Steps
Same as Tests, but on staging with the
vendorMatchingbeta enabled. Internal QA only — feature is gated by beta opt-in and only meaningful on workspaces with Intacct + CC Charge export.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
No new UI in this PR — the existing Vendor row, IOURequestStepVendor RHP, and Default vendor flows from R1 + Phase 2/3 are now reachable for Intacct workspaces; visual is identical to QBO. Will add Intacct-specific screenshots once a real Intacct + CC Charge workspace can be set up alongside the PHP-side fuzzy matcher extension.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari