Skip to content

[HOLD] Search, approve and pay bills from type:bill searches - #105500

Open
cead22 wants to merge 13 commits into
carlos-billpay-existing-billsfrom
carlos-billpay-search
Open

cead22 wants to merge 13 commits into
carlos-billpay-existing-billsfrom
carlos-billpay-search

Conversation

@cead22

@cead22 cead22 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR adds type:bill searches, so users can find, approve and pay bills from a search table. It adds no navigation entry. The Create bill PR adds Spend > Bills, because Bills shouldn't ship without a way to create a bill. Until then, users reach these searches only by URL, for example /search?q=type:bill.

  • Bill rows. Bills use the expense report table: columns, sorting, the Created date label, column settings, grouping and empty states. From shows the vendor's email and To shows the current approver's email. The receiver's linked invoice doesn't appear.
  • Filters. Bills support the same filters as invoices, and keep the footer totals. The Done status now includes reports that are Submitted and Closed, which is what a canceled bill payment leaves on a policy without approvals.
  • Suggested searches. This PR defines the Bills, Needs approval and Ready to pay searches. Approving or paying a bill removes it from those searches right away.
  • Bulk pay. Paying selected bills calls payBill, before the chat report lookup that bills don't need. ACH pays only USD bills, like the Pay button.

Fixed Issues

For https://github.com/Expensify/Expensify/issues/684654
PROPOSAL:

Tests

  1. Sign in as a policy admin whose domain has submitted and approved bills.
  2. Go to /search?q=type:bill.
  3. Verify the table lists the bills with the vendor's email in From and the current approver's email in To.
  4. Verify the linked invoices don't appear.
  5. Sort by Created and by Total, and filter by Status > Outstanding.
  6. Verify the results update.
  7. Press Approve on a submitted bill row.
  8. Verify the row updates and no longer offers Approve.
  9. Press Pay > Mark as paid on an approved bill row.
  10. Verify the row shows Paid.
  11. Select 2 approved bills, then select Pay > Mark as paid in the bulk menu.
  12. Verify both bills show Paid.
  13. Verify the Spend menu and the Type filter don't show Bills yet.
  • Verify that no errors appear in the JS console

Offline tests

  1. Go to /search?q=type:bill and go offline.
  2. Press Pay > Mark as paid on an approved bill row.
  3. Verify the row shows a pending state.
  4. Go online and verify the payment finishes.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@cead22
cead22 requested review from a team as code owners October 30, 2026 15:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T15:14:53.169915Z 5334cb7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@melvin-bot

melvin-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

@puneetlath Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 4d0210df..0c7dddfb 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -36,8 +36,8 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
     billPay: {
-        bill: 'Eingangsrechnung',
-        bills: 'Eingangsrechnungen',
+        bill: 'Rechnung',
+        bills: 'Rechnungen',
         payByACH: 'Per ACH bezahlen',
         markAsPaid: 'Als bezahlt markieren',
         paymentFailed: 'Diese Rechnung konnte nicht bezahlt werden. Bitte versuche es erneut.',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index aeccc0df..39053a2d 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -33,7 +33,7 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
     billPay: {
-        bill: 'Λογαριασμός',
+        bill: 'Τιμολόγιο',
         bills: 'Λογαριασμοί',
         payByACH: 'Πληρωμή μέσω ACH',
         markAsPaid: 'Σήμανση ως πληρωμένο',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index edc1c1ac..ad5ac17e 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -21,13 +21,7 @@ import type {CompanyCardBalanceParams} from './params';
 import type {AllConnectionName, PolicyConnectionSyncStage} from './TranslationTypes';
 import type {TranslationDeepObject} from './types';
 const translations: TranslationDeepObject<typeof en> = {
-    billPay: {
-        bill: 'Factura por pagar',
-        bills: 'Facturas por pagar',
-        payByACH: 'Pagar por ACH',
-        markAsPaid: 'Marcar como pagada',
-        paymentFailed: 'No pudimos pagar esta factura. Inténtalo de nuevo.',
-    },
+    billPay: {bill: 'Factura', bills: 'Facturas', payByACH: 'Pagar por ACH', markAsPaid: 'Marcar como pagada', paymentFailed: 'No pudimos pagar esta factura. Inténtalo de nuevo.'},
     common: {
         durationDays: ({count}: {count: number}) => ({
             one: `1 día`,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index fcbc08b5..3d4a7f40 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -36,8 +36,8 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
     billPay: {
-        bill: 'Facture à payer',
-        bills: 'Factures à payer',
+        bill: 'Facture',
+        bills: 'Factures',
         payByACH: 'Payer par ACH',
         markAsPaid: 'Marquer comme payée',
         paymentFailed: 'Nous n’avons pas pu payer cette facture. Veuillez réessayer.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e0639648..69e0bf63 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -35,13 +35,7 @@ type StateValue = {
 type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
-    billPay: {
-        bill: 'Fattura da pagare',
-        bills: 'Fatture da pagare',
-        payByACH: 'Paga tramite ACH',
-        markAsPaid: 'Segna come pagata',
-        paymentFailed: 'Non è stato possibile pagare questa fattura. Riprova.',
-    },
+    billPay: {bill: 'Fattura', bills: 'Fatture', payByACH: 'Paga tramite ACH', markAsPaid: 'Segna come pagata', paymentFailed: 'Non è stato possibile pagare questa fattura. Riprova.'},
     common: {
         durationDays: ({count}: {count: number}) => ({
             one: `1 giorno`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index ad0ee7e8..4d4527b5 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -35,13 +35,7 @@ type StateValue = {
 type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
-    billPay: {
-        bill: '支払請求書',
-        bills: '支払請求書',
-        payByACH: 'ACHで支払う',
-        markAsPaid: '支払済みにする',
-        paymentFailed: 'この請求書を支払えませんでした。もう一度お試しください。',
-    },
+    billPay: {bill: '請求書', bills: '請求書', payByACH: 'ACHで支払う', markAsPaid: '支払済みにする', paymentFailed: 'この請求書を支払えませんでした。もう一度お試しください。'},
     common: {
         durationDays: ({count}: {count: number}) => ({
             one: `1 日`,
@@ -7462,7 +7456,6 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
                 title: 'メンバーをコピー',
                 prompt: ({count, targetWorkspaceName}: {count: number; targetWorkspaceName: string}) => ({
                     one: `${targetWorkspaceName}のメンバーをこのワークスペースのメンバーで置き換えてもよろしいですか?`,
-                    // Japanese has no "one" plural category, so handle the single-workspace case here
                     other:
                         count === 1
                             ? `${targetWorkspaceName}のメンバーをこのワークスペースのメンバーで置き換えてもよろしいですか?`
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 1cf1bace..6414aef8 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -36,8 +36,8 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
     billPay: {
-        bill: 'Te betalen factuur',
-        bills: 'Te betalen facturen',
+        bill: 'Factuur',
+        bills: 'Facturen',
         payByACH: 'Betalen via ACH',
         markAsPaid: 'Markeren als betaald',
         paymentFailed: 'We konden deze factuur niet betalen. Probeer het opnieuw.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index a12b8ceb..328521a4 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -35,13 +35,7 @@ type StateValue = {
 type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
-    billPay: {
-        bill: 'Rachunek',
-        bills: 'Rachunki',
-        payByACH: 'Zapłać przez ACH',
-        markAsPaid: 'Oznacz jako opłacone',
-        paymentFailed: 'Nie udało się opłacić tego rachunku. Spróbuj ponownie.',
-    },
+    billPay: {bill: 'Rachunek', bills: 'Rachunki', payByACH: 'Zapłać przez ACH', markAsPaid: 'Oznacz jako opłacone', paymentFailed: 'Nie udało się opłacić tego rachunku. Spróbuj ponownie.'},
     common: {
         durationDays: ({count}: {count: number}) => ({
             one: `1 dzień`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 76ef5da5..2b3e5a15 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -35,13 +35,7 @@ type StateValue = {
 type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
-    billPay: {
-        bill: 'Conta a pagar',
-        bills: 'Contas a pagar',
-        payByACH: 'Pagar por ACH',
-        markAsPaid: 'Marcar como paga',
-        paymentFailed: 'Não foi possível pagar esta conta. Tente novamente.',
-    },
+    billPay: {bill: 'Fatura', bills: 'Contas', payByACH: 'Pagar por ACH', markAsPaid: 'Marcar como paga', paymentFailed: 'Não foi possível pagar esta conta. Tente novamente.'},
     common: {
         durationDays: ({count}: {count: number}) => ({
             one: `${count} dia`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index f4426903..4d336d74 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -35,13 +35,7 @@ type StateValue = {
 type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
 type AllCountries = Record<Country, string>;
 const translations: TranslationDeepObject<typeof en> = {
-    billPay: {
-        bill: '账单',
-        bills: '账单',
-        payByACH: '通过 ACH 支付',
-        markAsPaid: '标记为已支付',
-        paymentFailed: '无法支付此账单。请重试。',
-    },
+    billPay: {bill: '账单', bills: '账单', payByACH: '通过 ACH 支付', markAsPaid: '标记为已支付', paymentFailed: '无法支付此账单。请重试。'},
     common: {
         durationDays: ({count}: {count: number}) => ({
             one: `1 天`,
@@ -7289,7 +7283,6 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
                 title: '复制成员',
                 prompt: ({count, targetWorkspaceName}: {count: number; targetWorkspaceName: string}) => ({
                     one: `确定要用此工作区的成员替换 ${targetWorkspaceName} 的成员吗?`,
-                    // Chinese has no "one" plural category, so handle the single-workspace case here
                     other: count === 1 ? `确定要用此工作区的成员替换 ${targetWorkspaceName} 的成员吗?` : `确定要用此工作区的成员替换 ${count} 个工作区的成员吗?`,
                 }),
             },

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

[CONST.SEARCH.STATUS.EXPENSE.PAID]: (expenseReport) =>
(expenseReport?.stateNum ?? 0) >= CONST.REPORT.STATE_NUM.APPROVED && expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.REIMBURSED,
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) => expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED && expenseReport.statusNum === CONST.REPORT.STATUS_NUM.CLOSED,
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CONSISTENCY-18 (docs)

The DONE predicate now also matches reports in STATE_NUM.SUBMITTED (not only APPROVED) when the status is CLOSED. Why a submitted report should count as "done" is not recoverable from the code. The PR's test hints at the reason ("a bill that closed after its payment was canceled"), but that context lives only in the test, not next to the branch future contributors will read.

Add a short comment explaining the scenario, e.g.:

// A bill that is closed after its payment is canceled stays in SUBMITTED state, so DONE must accept
// both SUBMITTED and APPROVED when the report is CLOSED.
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) =>
    (expenseReport?.stateNum === CONST.REPORT.STATE_NUM.SUBMITTED || expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED) &&
    expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED,

Reviewed at: 5334cb7 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

[CONST.SEARCH.STATUS.EXPENSE.PAID]: (expenseReport) =>
(expenseReport?.stateNum ?? 0) >= CONST.REPORT.STATE_NUM.APPROVED && expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.REIMBURSED,
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) => expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED && expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED,
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CONSISTENCY-18 (docs)

Same non-obvious change as in SearchSuggestionUtils.ts: the DONE filter predicate now accepts STATE_NUM.SUBMITTED in addition to APPROVED when the status is CLOSED, with no comment explaining why a submitted report can be considered done.

Add a comment describing the case (a bill closed after its payment was canceled remains in SUBMITTED state), so the expanded condition is understandable at the call site:

// A bill closed after a canceled payment stays SUBMITTED, so DONE accepts SUBMITTED or APPROVED when CLOSED.
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) =>
    (expenseReport?.stateNum === CONST.REPORT.STATE_NUM.SUBMITTED || expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED) &&
    expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED,

Reviewed at: 5334cb7 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 95.90% <ø> (+15.25%) ⬆️
...components/Search/FilterDropdowns/DisplayPopup.tsx 45.68% <100.00%> (+45.68%) ⬆️
...ponents/Search/SearchList/ListItem/GroupHeader.tsx 90.95% <100.00%> (+90.95%) ⬆️
...h/SearchList/ListItem/TransactionGroupListItem.tsx 85.93% <100.00%> (ø)
src/components/Search/hooks/useSearchSnapshot.ts 98.24% <100.00%> (+4.09%) ⬆️
src/components/Search/index.tsx 70.69% <100.00%> (ø)
src/hooks/useAdvancedSearchFilters.ts 97.82% <100.00%> (+2.17%) ⬆️
src/libs/SearchKeyUtils.ts 100.00% <ø> (+28.57%) ⬆️
src/pages/Search/EmptySearchView.tsx 84.15% <ø> (+0.07%) ⬆️
src/types/form/SearchAdvancedFiltersForm.ts 100.00% <100.00%> (ø)
... and 7 more
... and 4085 files with indirect coverage changes

Comment thread src/libs/SearchUIUtils.ts
const firstApproved = firstApprovedAction?.created ?? '';
const formattedFrom = temporaryGetDisplayNameOrDefault({passedPersonalDetails: fromDetails, translate, formatPhoneNumber});
const formattedTo = !shouldShowBlankTo ? temporaryGetDisplayNameOrDefault({passedPersonalDetails: toDetails, translate, formatPhoneNumber}) : '';
const formattedFrom =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CONSISTENCY-18 (docs)

For the BILL type, formattedFrom and formattedTo deliberately return the raw login (an email) instead of running the data through temporaryGetDisplayNameOrDefault like every other report type. This is a non-obvious divergence — a future contributor can't tell from the code why bills show emails rather than display names, and may "fix" it by removing the special case.

Add a comment explaining the intent, e.g.:

// Bills show the vendor/approver email (login) rather than a display name, so the receiver can identify the
// external parties even when no personal details are loaded for them.
const formattedFrom =
    currentQueryJSON?.type === CONST.SEARCH.DATA_TYPES.BILL
        ? (fromDetails?.login ?? '')
        : temporaryGetDisplayNameOrDefault({passedPersonalDetails: fromDetails, translate, formatPhoneNumber});

Reviewed at: 5334cb7 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5334cb7d4e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const [nonPersonalAndWorkspaceCards] = useOnyx(ONYXKEYS.DERIVED.NON_PERSONAL_AND_WORKSPACE_CARD_LIST);

const isExpenseReportType = type === CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT;
const isExpenseReportType = type === CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT || type === CONST.SEARCH.DATA_TYPES.BILL;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Treat bills as report searches in bulk actions

When a user selects all matching bills and then deselects one or more rows, this classification enables report-style exclusions, but useSearchBulkActions still defines isExpenseReportType as only expense-report. Its all-matching pay path therefore skips getAllMatchingReportQuery() and sends the original query to queueBulkPayReports, causing explicitly excluded bills to be paid. Include BILL in the bulk-actions report-type predicate before enabling report-style selection here.

Useful? React with 👍 / 👎.

Comment thread src/libs/SearchUIUtils.ts
Comment on lines +3002 to +3004
const fromAccountID = reportItem.billSenderAccountID ?? reportItem.ownerAccountID;
const fromDetails =
mergedPersonalDetails?.[reportItem.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID] ??
getPersonalDetailsForAccountID(reportItem.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID) ??
emptyPersonalDetails;
mergedPersonalDetails?.[fromAccountID ?? CONST.DEFAULT_NUMBER_ID] ?? getPersonalDetailsForAccountID(fromAccountID ?? CONST.DEFAULT_NUMBER_ID) ?? emptyPersonalDetails;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the vendor identity after attaching bill transactions

When a bill contains a transaction, this initially assigns the vendor from billSenderAccountID, but the transaction branch later unconditionally replaces reportSection.from with the report owner's personal details. The wide From cell consequently renders the vendor email from formattedFrom alongside the receiver's avatar and account ID, so avatar interactions identify the wrong person. Keep the bill sender in reportSection.from when transactions are appended.

Useful? React with 👍 / 👎.

# Conflicts:
#	src/languages/de.ts
#	src/languages/el.ts
#	src/languages/en.ts
#	src/languages/es.ts
#	src/languages/fr.ts
#	src/languages/it.ts
#	src/languages/ja.ts
#	src/languages/nl.ts
#	src/languages/pl.ts
#	src/languages/pt-BR.ts
#	src/languages/zh-hans.ts
#	tests/unit/BillPayTest.ts
@cead22
cead22 removed the request for review from puneetlath November 2, 2026 13:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants