App icon indicating copy to clipboard operation
App copied to clipboard

[$250] Cannot Select Bank Account to Reimburse From in NewDot (Only Default Account Shown)

Open m-natarajan opened this issue 1 month ago • 8 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: Reproducible in staging?: Needs Reproduction (No second bank credentials) Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @Liz-Canary Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Open NewDot (Web)
  2. Go to an Approved Report
  3. Click More → Pay
  4. Attempt to select a bank account to reimburse from

Expected Result:

User should be able to choose which verified business bank account to use for reimbursement, just like in Classic. All eligible reimbursement VBAs should be listed for selection.

Actual Result:

Only the default reimbursement account appears. No ability to select a different VBA, even if multiple are linked.

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • [ ] Android: App
  • [ ] Android: mWeb Chrome
  • [ ] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] 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
  • [x] Windows: Chrome
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Image Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022000989686606526581
  • Upwork Job ID: 2000989686606526581
  • Last Price Increase: 2025-12-23
Issue OwnerCurrent Issue Owner: @dominictb

m-natarajan avatar Dec 11 '25 17:12 m-natarajan

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] avatar Dec 11 '25 17:12 melvin-bot[bot]

Proposal

Please re-state the problem that we are trying to solve in this issue.

When paying an approved expense from a workspace that has multiple business bank accounts (VBBA), the Pay menu only shows a single option and always routes to the default VBBA.

What is the root cause of that problem?

The Pay menu builds the business option from the workspace’s achAccount.bankAccountID only, and ignores the rest of the business bank accounts in bankAccountList. The helper that feeds the button (getLatestBankAccountItem) filters by the single default ID and produces one entry, so additional VBBA options never appear. https://github.com/Expensify/App/blob/0c92ee767ee420c5ba4cb50a1ed9e0695c4f2077/src/components/SettlementButton/index.tsx#L165-L199

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

List every business bank account tied to the current workspace and show them under the “Pay with business account” option, instead of only the default. Use the policy ID to pick the accounts, and pass the chosen methodID into the pay handler. Updated code:

function getPolicyBusinessBankAccounts() {
    if (!policyID) {
        return [];
    }

    const policyBankAccounts = formattedPaymentMethods.filter((method) => {
        const accountData = method?.accountData as AccountData;
        return accountData?.type === CONST.BANK_ACCOUNT.TYPE.BUSINESS && accountData?.additionalData?.policyID === policyID;
    });

    return policyBankAccounts.map((formattedPaymentMethod) => {
        const {icon, iconStyles, iconSize, title, description, methodID, accountType} = formattedPaymentMethod ?? {};

        return {
            text: title ?? '',
            description: description ?? '',
            icon: typeof icon === 'number' ? Bank : icon,
            iconStyles: typeof icon === 'number' ? undefined : iconStyles,
            iconSize: typeof icon === 'number' ? undefined : iconSize,
            onSelected: () => {
                if (checkForNecessaryAction()) {
                    return;
                }
                onPress(CONST.IOU.PAYMENT_TYPE.EXPENSIFY, true, methodID, accountType, policyIDKey);
            },
            methodID,
            value: CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT,
        };
    });
}

// When building the Pay button options
const policyBusinessBankAccounts = getPolicyBusinessBankAccounts();
const shouldShowBusinessBankAccountOptions = isExpenseReport && shouldShowPayWithExpensifyOption && !isPersonalOnlyOption;

if (shouldShowBusinessBankAccountOptions) {
    if (policyBusinessBankAccounts.length > 0) {
        const [primaryBusinessAccount] = policyBusinessBankAccounts;
        buttonOptions.push({
            text: primaryBusinessAccount.text,
            icon: primaryBusinessAccount.icon,
            iconStyles: primaryBusinessAccount.iconStyles,
            iconWidth: primaryBusinessAccount.iconSize,
            iconHeight: primaryBusinessAccount.iconSize,
            value: CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT,
            description: primaryBusinessAccount.description,
            subMenuItems: policyBusinessBankAccounts,
        });
    } else {
        buttonOptions.push(paymentMethods[CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT]);
    }
}
  • We key by accountData.additionalData.policyID === policyID so only the workspace’s business accounts show up.
  • Each submenu item calls the pay handler with the selected methodID, so the backend receives the correct bank account.
  • Existing flows stay the same when there is only one VBBA (it still shows a single item).

ShridharGoel avatar Dec 13 '25 14:12 ShridharGoel

Job added to Upwork: https://www.upwork.com/jobs/~022000989686606526581

melvin-bot[bot] avatar Dec 16 '25 18:12 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb (External)

melvin-bot[bot] avatar Dec 16 '25 18:12 melvin-bot[bot]

So this is a feature request.

@joekaufmanexpensify In OldDot, we can choose a reimbursement account in case there're multiple BBA connected (from different worksapces) and we want to bring that to NewDot.

Image

This sounds like something we can work on as part of the Better BBA project. But I need confirmation whether we want to implement this.

dominictb avatar Dec 18 '25 15:12 dominictb

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 23 '25 16:12 melvin-bot[bot]

@dominictb Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Dec 24 '25 00:12 melvin-bot[bot]

@bfitzexpensify @dominictb this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Dec 25 '25 21:12 melvin-bot[bot]

@dominictb 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

melvin-bot[bot] avatar Dec 26 '25 00:12 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 30 '25 16:12 melvin-bot[bot]

@dominictb 12 days overdue now... This issue's end is nigh!

melvin-bot[bot] avatar Jan 01 '26 00:01 melvin-bot[bot]