Skip to content

[$175] Web - Report - Options in payment submenu are inconsistent on header and floating menu. #102490

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.95-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #101893
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has a workspace.
Prerequisite 2: Approvals and payments enabled.

  1. Open the staging.new.expensify.com website.
  2. Navigate to workspace chat.
  3. Create at least two manual expenses.
  4. Open the report of the just created expenses.
  5. Submit and approve the expenses.
  6. Click on the "Pay" button on top of report.
  7. Note that payment options are "Pay with business account" and "Mark as paid". None of the options show the amount to pay,
  8. Select the created expenses.
  9. Click on the "Pay" button on the floating menu.
  10. Note that the payment options now are "Pay XX as a business" and "Mark XX as paid". Both options show the amount to pay.

Expected Result:

Payment options in submenu should be displayed in a consistent way on header button and on floating menu.

Actual Result:

Payment options in submenu are displayed in inconsistent way on header button and on floating menu. Options in floating menu show the amount to pay, while options in header don´t.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7272035_1790637495580.Float_5.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7272035

Upwork Automation - Do Not Edit

Activity

  1. applause-bot commented on Sep 29, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/7e3702ed3aaaad1fa64c510fce7d7fc1a32ed631f3fb7f7eef7042c2b29b89d0

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 29, 2026
  3. MelvinBot commented on Sep 29, 2026

    @MelvinBot
    Contributor

    Proposal

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

    On an approved report, the header Pay $XX submenu shows "Pay with business account" and "Mark as paid". The floating bulk action bar Pay $XX submenu shows "Pay $XX as a business" and "Mark $XX as paid". The two menus should match.

    What is the root cause of that problem?

    The two menus build their options in different places.

    • Header: SettlementButton gets its options from useSettlementButtonPaymentMethods, which always passes '' as the amount (SettlementButtonUtils.ts:24, :31).
    • Floating bar: the options come from useSelectionModePayment → usePaymentOptions. That hook still passes formattedAmount to iou.settleBusiness and iou.payElsewhere (usePaymentOptions.ts:123, :128).

    Leaving the amount out is the app-wide convention. feat: standardize pay button for expenses and IOUs set it, and usePaymentOptions was never updated to follow it. Its own personal-account option at line 118 already passes ''.

    This has been wrong for a while. It became visible after Use the floating bulk action bar for the report view table, because the header now stays on screen next to the floating bar (MoneyReportHeaderActions/index.tsx:71).

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

    In usePaymentOptions, pass '' instead of formattedAmount for the VBBA (settleBusiness) and ELSEWHERE (payElsewhere) options. Keep the invoice options that include the amount, because every builder shows the amount for invoices.

    Every caller already shows the amount in the parent Pay $XX item, so nothing is lost. This one change also fixes the same inconsistency in:

    • the narrow-layout selection dropdown
    • the header More menu when Pay is a secondary action

    What alternative solutions did you explore? (Optional)

    Add the amount to SettlementButtonUtils instead. I don't recommend it. It goes against the standardize pay button convention and would change the report preview, the Search Pay cell, and Search bulk Pay.

    Supporting evidence
    • The header renders AnimatedSettlementButton with formattedAmount, but only uses it for the "Pay $XX" button label (PayPrimaryAction.tsx:204-222).
    • The floating bar passes formattedAmount: totalAmount into useSelectionModePayment and builds the "Pay $XX" parent item with paymentSubMenuItems (useSelectionModeReportActions.ts:274-284).
    • Search bulk Pay uses useSettlementButtonPaymentMethods with no amounts (useBulkPayOptions.ts:79).
    • The strings fall back to the no-amount wording when the amount is empty (en.ts:1585-1586).
    • tests/unit/hooks/useSelectionModeReportActions.test.ts mocks usePaymentOptions, so it should not break.

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/102490) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 29, 2026
  5. melvin-bot commented on Sep 29, 2026

    @melvin-bot

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

  6. changed the title [-]Web - Report - Options in payment submenu are inconsistent on header and floating menu.[/-] [+][$175] Web - Report - Options in payment submenu are inconsistent on header and floating menu.[/+] on Sep 29, 2026
  7. melvin-bot commented on Sep 29, 2026

    @melvin-bot
  8. bconnnnn commented on Sep 29, 2026

    @bconnnnn

    Proposal

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

    On an approved report, the header Pay $XX submenu shows “Pay with business account” and “Mark as paid,” while the floating bulk-action submenu shows “Pay $XX as a business” and “Mark $XX as paid.” Both menus should use the same option labels.

    What is the root cause of that problem?

    The two menus build the same payment actions through different hooks. useSettlementButtonPaymentMethods passes an empty amount to the business-account and pay-elsewhere translations in the header. The floating menu uses usePaymentOptions, which passes formattedAmount to those same two translation keys. The parent Pay button already displays the amount, so including it again in only the floating submenu creates the inconsistency.

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

    In usePaymentOptions, pass an empty amount to the VBBA (settleBusiness) and ELSEWHERE (payElsewhere) options, matching the header hook. Keep the amount on the parent Pay action and preserve amounts in invoice options where they are part of the established label.

    What tests should be added?

    Add coverage for the payment option labels returned by usePaymentOptions: business-account and pay-elsewhere submenu labels should omit the amount, while the parent Pay action still shows it. Include invoice options in the test to ensure their amount labels remain unchanged, and verify the header and floating menus present matching text.

    Concrete code change

    In src/hooks/usePaymentOptions.ts, keep the amount on the parent Pay action, but use the same empty amount argument as useSettlementButtonPaymentMethods for these two submenu entries:

    [CONST.IOU.PAYMENT_TYPE.VBBA]: {
        text: translate('iou.settleBusiness', ''),
        icon: icons.Building,
        value: CONST.IOU.PAYMENT_TYPE.VBBA,
    },
    [CONST.IOU.PAYMENT_TYPE.ELSEWHERE]: {
        text: translate('iou.payElsewhere', ''),
        icon: icons.CheckCircle,
        value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
    },

    Keep formattedAmount for the approval and invoice labels that use it. Add a test with a non-empty amount proving the floating submenu matches the header while the parent Pay button still shows the amount.

  9. franklincg commented on Sep 29, 2026

    @franklincg

    Proposal

    Root cause

    The inconsistency comes from the two payment menus formatting the same actions differently.

    The report header path already follows the app-wide convention and omits the amount from submenu labels. The floating selection-mode path still passes formattedAmount into the business-account and pay-elsewhere translation keys, so it renders labels such as “Pay $XX as a business” / “Mark $XX as paid”.

    The amount is already shown by the parent Pay action, so repeating it only in the floating submenu makes the two menus diverge.

    Fix

    Align the floating-menu payment options with the header:

    • in usePaymentOptions, pass an empty amount for the business-account and pay-elsewhere submenu labels;
    • keep the parent Pay action amount unchanged;
    • leave invoice-specific labels untouched where the amount is intentionally part of the existing wording.

    This keeps the change scoped to label formatting and avoids changing settlement behavior.

    Validation

    I would cover:

    1. floating business-account option omits the amount;
    2. floating pay-elsewhere option omits the amount;
    3. header and floating payment submenus render matching text;
    4. parent Pay button still shows the amount;
    5. invoice payment labels keep their existing amount behavior.
  10. bonnhatnguyen commented on Sep 29, 2026

    @bonnhatnguyen

    Proposal

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

    On an approved expense report, clicking the Pay $XX primary button in the report header displays payment submenu options without amounts ("Pay with business account", "Mark as paid"), whereas selecting expenses and clicking Pay $XX on the floating bulk action bar displays submenu options with amounts ("Pay $XX as a business", "Mark $XX as paid"). The payment submenus between the header and floating menu diverge, creating an inconsistent user experience.


    What is the root cause of that problem?

    1. Header Settlement Button Convention:
      In src/libs/SettlementButtonUtils.ts (lines 24 & 31), useSettlementButtonPaymentMethods passes an empty string '' to translate('iou.settleBusiness', '') and translate('iou.payElsewhere', ''):

      [CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT]: {
          text: translate('iou.settleBusiness', ''),
          icon: icons.Building,
          ...
      },
      [CONST.IOU.PAYMENT_TYPE.ELSEWHERE]: {
          text: translate('iou.payElsewhere', ''),
          icon: icons.CheckCircle,
          ...
      },

      Per app-wide convention, because the parent button already displays the total settlement amount ("Pay $XX"), the submenu options omit the redundant amount to keep the menu items concise and clean ("Pay with business account", "Mark as paid").

    2. Inconsistency in usePaymentOptions.ts:
      The floating bulk action bar derives its payment submenu items via useSelectionModePayment → usePaymentOptions.ts (lines 116–132).
      Notice that line 118 (CONST.IOU.PAYMENT_TYPE.EXPENSIFY) was already updated to pass '':

      [CONST.IOU.PAYMENT_TYPE.EXPENSIFY]: {
          text: hasActivatedWallet || hasPersonalBankAccount ? translate('iou.settleWallet', '') : translate('iou.settlePersonal', ''),
          icon: hasActivatedWallet || hasPersonalBankAccount ? icons.Wallet : icons.User,
          value: CONST.IOU.PAYMENT_TYPE.EXPENSIFY,
      },

      However, VBBA (line 123) and ELSEWHERE (line 128) were missed and continued to pass formattedAmount:

      [CONST.IOU.PAYMENT_TYPE.VBBA]: {
          text: translate('iou.settleBusiness', formattedAmount),
          icon: icons.Building,
          value: CONST.IOU.PAYMENT_TYPE.VBBA,
      },
      [CONST.IOU.PAYMENT_TYPE.ELSEWHERE]: {
          text: translate('iou.payElsewhere', formattedAmount),
          icon: icons.CheckCircle,
          value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
      },

      Because translate('iou.settleBusiness', formattedAmount) evaluates to "Pay ${formattedAmount} as a business" when formattedAmount is non-empty, and "Pay with business account" when empty, passing formattedAmount causes the floating submenu to diverge from the header submenu.

      Furthermore, MoneyReportHeaderSecondaryActions.tsx (when Pay is placed inside the secondary More menu) also consumes usePaymentOptions, inheriting this same repetitive label format.


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

    In src/hooks/usePaymentOptions.ts, update paymentMethods for CONST.IOU.PAYMENT_TYPE.VBBA and CONST.IOU.PAYMENT_TYPE.ELSEWHERE to pass an empty string '' instead of formattedAmount:

    --- a/src/hooks/usePaymentOptions.ts
    +++ b/src/hooks/usePaymentOptions.ts
    @@ -120,12 +120,12 @@ function usePaymentOptions({
                     value: CONST.IOU.PAYMENT_TYPE.EXPENSIFY,
                 },
                 [CONST.IOU.PAYMENT_TYPE.VBBA]: {
    -                text: translate('iou.settleBusiness', formattedAmount),
    +                text: translate('iou.settleBusiness', ''),
                     icon: icons.Building,
                     value: CONST.IOU.PAYMENT_TYPE.VBBA,
                 },
                 [CONST.IOU.PAYMENT_TYPE.ELSEWHERE]: {
    -                text: translate('iou.payElsewhere', formattedAmount),
    +                text: translate('iou.payElsewhere', ''),
                     icon: icons.CheckCircle,
                     value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
                 },

    Why this is the complete and robust fix:

    1. Consistency: Aligns the floating bulk action bar submenu with the header submenu so both show "Pay with business account" and "Mark as paid".
    2. Internal Harmony: Matches CONST.IOU.PAYMENT_TYPE.EXPENSIFY at line 118 in the same hook, which already passes ''.
    3. Secondary Actions: Automatically fixes the submenu inside MoneyReportHeaderSecondaryActions without touching secondary action plumbing.
    4. Preserves Invoices: Leaves invoice category options untouched (lines 198–233, where invoice categories intentionally display the amount per category, and lines 207 & 226 already pass '' for their sub-items).

    Automated Unit Tests:

    Add unit test coverage in tests/unit/hooks/usePaymentOptionsTest.ts:

    • Test 1: For an expense report with formattedAmount = '$50.00', verify that VBBA returns text: 'Pay with business account' and ELSEWHERE returns text: 'Mark as paid'.
    • Test 2: Verify that the parent Approve button option (approveButtonOption) continues to receive {formattedAmount}.
    • Test 3: Verify that for invoice reports, category header options retain their formatted amounts.

    What alternative solutions did you explore? (Optional)

    • Adding formattedAmount to SettlementButtonUtils.ts:
      Rejected because the parent button already displays "Pay $XX". Repeating the amount on every child submenu row adds visual clutter and contradicts the established design pattern introduced in PR feat: standardize pay button for expenses and IOUs #66790.

    Contributor details
    Your Expensify account email: bonnhatnguyen0@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~0139ed4098bdc50182

  11. melvin-bot commented on Sep 29, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  12. bconnnnn commented on Sep 30, 2026

    @bconnnnn

    @MelvinBot @mananjadhav I added the exact label change and regression-test coverage to my proposal above. I’m available to implement it. Could you review the updated proposal and let me know if I should take this issue?

  13. 17 remaining items

  14. jeffrey-graham commented on Nov 7, 2026

    @jeffrey-graham
  15. melvin-bot commented on Nov 7, 2026

    @melvin-bot
  16. melvin-bot commented on Nov 10, 2026

    @melvin-bot

    @mananjadhav Whoops! This issue is 2 days overdue. Let's get this updated quick!

  17. mananjadhav commented on Nov 12, 2026

    @mananjadhav
    Collaborator

    @MelvinBot implement this

  18. MelvinBot commented on Nov 12, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Verified app access and workspace chat on dev NewDot web. Expense creation was blocked by dialog-targeting errors; the payment submenu fix remains unverified.
    Expense creation blocked at the location-access dialog

    Step Status
    1. Open the web appAuthenticated Home screen confirmed.
    ✅
    2. Navigate to workspace chatWorkspace expense chat confirmed.
    ✅
    3. Create two manual expensesAutomation could not dismiss the location-access dialog. No expenses created.
    Expense creation blocked at the location-access dialog
    ❌
    4. Open their reportNot verified: expenses unavailable.
    ❌
    5. Submit and approve expensesNot verified: report unavailable.
    ❌
    6. Open header PayNot verified: approved report unavailable.
    ❌
    7. Check header submenu labelsPayment submenu not reached.
    ❌
    8. Select both expensesNot verified: expenses unavailable.
    ❌
    9. Open floating PaySelection prerequisite unavailable.
    ❌
    10. Compare submenu labels and parent amountNeither payment submenu was reached.
    ❌

    Implemented in Draft PR: Align expense payment submenu labels with report header, assigned to mananjadhav.

    59 targeted tests, lint, typecheck, spelling, and Storybook smoke passed. Full-suite testing timed out; remaining tooling limitations are documented in the PR. Manual payment-menu verification is still required.


    view run · no recording available

  19. expensify-chore-bot commented on Nov 15, 2026

    @expensify-chore-bot

    Triggered auto assignment to @NicolasBonet, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions