Skip to content

Show payment details and stored names on invoices linked to bills - #105968

Merged
roryabraham merged 20 commits into
mainfrom
carlos-invoice-payment-details
Nov 18, 2026
Merged

roryabraham merged 20 commits into
mainfrom
carlos-invoice-payment-details

Conversation

@cead22

@cead22 cead22 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR shows payment details and stored names on invoices that are linked to bills.

When someone pays a bill, the vendor's invoice gets no IOU PAY action. The same is true when Classic pays an invoice with ReimburseReport or MarkReimbursed. So the vendor had no payment record on the invoice in NewDot. This PR fixes that and a few related gaps.

  1. Payment actions. REIMBURSED and MARKED_REIMBURSED actions now show on invoices, because they are the only payment record there. They stay hidden on expense reports and IOUs. A MARKED_REIMBURSED action stays hidden when an IOU PAY action exists for the same payment, so an invoice paid in NewDot shows one payment line. These actions skip the visible actions cache, because their visibility depends on the report type.
  2. Waiting for a bank account. On an invoice, the message now says "started payment, but is waiting for to add a bank account." It no longer says "personal". The invoice header shows the vendor's next step while the payment waits. The vendor gets a green dot on the invoice when Auth sends isAwaitingActionFromCurrentUser. Copying the message from a thread uses the parent invoice, like the screen does.
  3. Payer name. The Inbox uses the name saved on the action when the actor's personal details have no name or login. This happens when the payer belongs to another company.
  4. Stored names. An invoice linked to a bill shows its stored reportName even when it has an invoice room. New Bill Pay invoices are named Invoice #<short reportID>. Other invoices keep names like " owes $X".

Related Auth PRs:

Nothing breaks without them. The green dot and the invoice waiting message just don't show until they ship.

Fixed Issues

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

Tests

  1. In Expensify Classic, pay an invoice with ReimburseReport.
  2. Open that invoice in NewDot.
  3. Verify that the payment line shows on the invoice.
image
  1. In Expensify Classic, mark another invoice as reimbursed.
  2. Open that invoice in NewDot.
  3. Verify that the payment line shows on the invoice.
image
  1. As the sender, send an invoice from NewDot with Send invoice
  2. Log in as the invoice's receiver and open the invoice in the invoice room.
  3. Click Pay and pay the invoice.
  4. Verify that the invoice shows only one paid line.
Sender Receiver
image image
  1. Go to a bill that has already been paid with a bank account, linked to an invoice from an account that doesn't have a bank account.
  2. Log in as the vendor and open the bill's linked invoice.
  3. Verify that the message says the payer is waiting for the vendor to add a bank account, and names the vendor.
  4. Verify that the message does not say "personal".
  5. Verify that the header shows the vendor's next step.
  6. Go to the Inbox as the vendor.
  7. Verify that the invoice has a green dot.
image
  1. Open an invoice whose last actor has no name in personal details.
  2. Verify that the Inbox shows the name saved on the action, not "Hidden".
image
  1. Log in as the vendor of a Bill Pay invoice that has an invoice room, and open the invoice.
  2. Verify that the header shows the invoice's stored name, such as "Invoice 2026-10-26", not <payer> owes <amount>.
  3. Verify that the Inbox shows the same name.
  4. Verify that Search shows the same name.
image
  1. Open an invoice sent from NewDot with Send invoice that isn't linked to a bill.
  2. Verify that its name still shows the payer and the amount, such as <payer> paid <amount>
image
  1. In NewDot, pay an expense report with Pay or Mark as paid.
  2. Verify that the expense report does not show the REIMBURSED or MARKED_REIMBURSED payment action.
image
  1. Start a bank payment on an expense report whose submitter has no bank account.
  2. Verify that the message still says "personal bank account".
image
  • Verify that no errors appear in the JS console

Offline tests

  1. Open an invoice that Classic paid with ReimburseReport.
  2. Go offline.
  3. Verify that the payment line still shows.
  4. Open a Bill Pay invoice that has an invoice room.
  5. Verify that the header still shows the stored name.

QA Steps

  1. In Expensify Classic, pay an invoice with ReimburseReport.
  2. Open that invoice in NewDot.
  3. Verify that the payment line shows on the invoice.
  4. In Expensify Classic, mark another invoice as reimbursed.
  5. Open that invoice in NewDot.
  6. Verify that the payment line shows on the invoice.
  7. As the sender, send an invoice from NewDot with Send invoice. Don't use a bill, because paying bills in NewDot comes in a later PR.
  8. Log in as the invoice's receiver and open the invoice in the invoice room.
  9. Click Pay and pay the invoice.
  10. Verify that the invoice shows only one paid line.
  11. Open an invoice whose last actor has no name in personal details.
  12. Verify that the Inbox shows the name saved on the action, not "Hidden".
  13. Log in as the vendor of a Bill Pay invoice that has an invoice room, and open the invoice.
  14. Verify that the header, Inbox, and Search show the invoice's stored name, such as "Invoice 2026-10-26", not " owes ".
  15. Open an invoice sent from NewDot with Send invoice that isn't linked to a bill.
  16. Verify that its name still shows the payer and the amount, such as " owes ", or " paid " once it's paid, not its stored name.
  17. In NewDot, pay an expense report with Pay or Mark as paid.
  18. Verify that the expense report does not show the REIMBURSED or MARKED_REIMBURSED payment action.
  19. Start a bank payment on an expense report whose submitter has no bank account.
  20. Verify that the message still says "personal bank account".
  • 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

The author adds screenshots or videos here.

Android: mWeb Chrome

The author adds screenshots or videos here.

iOS: Native

The author adds screenshots or videos here.

iOS: mWeb Safari

The author adds screenshots or videos here.

MacOS: Chrome / Safari: in line with test steps

@cead22
cead22 requested review from a team as code owners November 4, 2026 20:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T04:51:51.251959Z 56c5ea6 Manual request
ℹ️ 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 requested review from JmillsExpensify and MariaHCD and removed request for a team November 4, 2026 20:07
@melvin-bot

melvin-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

@MariaHCD 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]

@JmillsExpensify
JmillsExpensify requested review from trjExpensify and removed request for JmillsExpensify November 4, 2026 20:08

Copy link
Copy Markdown
Contributor

@trjExpensify adding you for reivew.

@OSBotify

OSBotify commented Nov 4, 2026

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/fr.ts b/src/languages/fr.ts
index 5bcf52b8..7c448c03 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1638,7 +1638,7 @@ const translations: TranslationDeepObject<typeof en> = {
         forwarded: (memo?: string) => `approuvé${memo ? `, indiquant « ${memo} »` : ''}`,
         rejectedThisReport: 'rejeté',
         waitingOnBankAccount: (submitterDisplayName: string) => `a commencé le paiement, mais attend que ${submitterDisplayName} ajoute un compte bancaire personnel.`,
-        waitingOnVendorBankAccount: (vendorDisplayName: string) => `a commencé le paiement, mais attend que ${vendorDisplayName} ajoute un compte bancaire.`,
+        waitingOnVendorBankAccount: (vendorDisplayName: string) => `a démarré le paiement, mais attend que ${vendorDisplayName} ajoute un compte bancaire.`,
         adminCanceledRequest: 'a annulé le paiement',
         canceledRequest: (amount: string, submitterDisplayName: string) =>
             `a annulé le paiement de ${amount}, car ${submitterDisplayName} n’a pas activé son Portefeuille Expensify dans un délai de 30 jours`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 1746e6fd..ad3f1c23 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7496,7 +7496,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 3ce8494e..cce67db3 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1629,7 +1629,7 @@ const translations: TranslationDeepObject<typeof en> = {
         forwarded: (memo?: string) => `goedgekeurd${memo ? `, met de omschrijving ${memo}` : ''}`,
         rejectedThisReport: 'afgekeurd',
         waitingOnBankAccount: (submitterDisplayName: string) => `is met de betaling begonnen, maar wacht tot ${submitterDisplayName} een persoonlijke bankrekening toevoegt.`,
-        waitingOnVendorBankAccount: (vendorDisplayName: string) => `is met de betaling begonnen, maar wacht tot ${vendorDisplayName} een bankrekening toevoegt.`,
+        waitingOnVendorBankAccount: (vendorDisplayName: string) => `is een betaling gestart, maar wacht totdat ${vendorDisplayName} een bankrekening toevoegt.`,
         adminCanceledRequest: 'heeft de betaling geannuleerd',
         canceledRequest: (amount: string, submitterDisplayName: string) =>
             `heeft de betaling van ${amount} geannuleerd, omdat ${submitterDisplayName} hun Expensify Wallet niet binnen 30 dagen heeft geactiveerd`,
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 0cdf9db2..bb57d5bc 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1666,7 +1666,7 @@ const translations: TranslationDeepObject<typeof en> = {
         forwarded: (memo?: string) => `zatwierdzono${memo ? `, wpisując ${memo}` : ''}`,
         rejectedThisReport: 'odrzucono',
         waitingOnBankAccount: (submitterDisplayName: string) => `rozpoczął(-ęła) płatność, ale czeka, aż ${submitterDisplayName} doda osobiste konto bankowe.`,
-        waitingOnVendorBankAccount: (vendorDisplayName: string) => `rozpoczął(-ęła) płatność, ale czeka, aż ${vendorDisplayName} doda konto bankowe.`,
+        waitingOnVendorBankAccount: (vendorDisplayName: string) => `rozpoczął płatność, ale czeka, aż ${vendorDisplayName} doda konto bankowe.`,
         adminCanceledRequest: 'anulowano płatność',
         canceledRequest: (amount: string, submitterDisplayName: string) =>
             `anulowano płatność ${amount}, ponieważ ${submitterDisplayName} nie aktywował(-a) swojego portfela Expensify w ciągu 30 dni`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 6bf98402..9d2f7848 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1628,7 +1628,7 @@ const translations: TranslationDeepObject<typeof en> = {
         forwarded: (memo?: string) => `aprovado${memo ? `, dizendo ${memo}` : ''}`,
         rejectedThisReport: 'rejeitou',
         waitingOnBankAccount: (submitterDisplayName: string) => `iniciou o pagamento, mas está aguardando ${submitterDisplayName} adicionar uma conta bancária pessoal.`,
-        waitingOnVendorBankAccount: (vendorDisplayName: string) => `iniciou o pagamento, mas está aguardando ${vendorDisplayName} adicionar uma conta bancária.`,
+        waitingOnVendorBankAccount: (vendorDisplayName: string) => `iniciou o pagamento, mas está esperando ${vendorDisplayName} adicionar uma conta bancária.`,
         adminCanceledRequest: 'cancelou o pagamento',
         canceledRequest: (amount: string, submitterDisplayName: string) => `cancelou o pagamento de ${amount} porque ${submitterDisplayName} não ativou a Carteira Expensify em 30 dias`,
         settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} adicionou uma conta bancária. O pagamento de ${amount} foi efetuado.`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 7a0dc5f8..514cad5b 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1572,7 +1572,7 @@ const translations: TranslationDeepObject<typeof en> = {
         forwarded: (memo?: string) => `已批准${memo ? `,备注为 ${memo}` : ''}`,
         rejectedThisReport: '已拒绝',
         waitingOnBankAccount: (submitterDisplayName: string) => `已开始付款,但正在等待 ${submitterDisplayName} 添加个人银行账户。`,
-        waitingOnVendorBankAccount: (vendorDisplayName: string) => `已开始付款,但正在等待 ${vendorDisplayName} 添加银行账户。`,
+        waitingOnVendorBankAccount: (vendorDisplayName: string) => `已发起付款,但正在等待 ${vendorDisplayName} 添加银行账户。`,
         adminCanceledRequest: '已取消付款',
         canceledRequest: (amount: string, submitterDisplayName: string) => `已取消金额为 ${amount} 的付款,因为 ${submitterDisplayName} 未在 30 天内启用其 Expensify 钱包`,
         settledAfterAddedBankAccount: (submitterDisplayName: string, amount: string) => `${submitterDisplayName} 已添加了一个银行账户。已完成 ${amount} 付款。`,
@@ -7323,7 +7323,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

@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: 5a083b8eef

ℹ️ 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".

Comment thread src/libs/ReportActionsUtils.ts Resolved
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
...hooks/useMoneyReportHeaderMoreContentVisibility.ts 100.00% <100.00%> (ø)
src/libs/NextStepUtils.ts 82.03% <100.00%> (+0.28%) ⬆️
src/libs/ReportActionsUtils.ts 86.81% <100.00%> (+0.13%) ⬆️
src/libs/ReportAlternateTextUtils.ts 92.76% <100.00%> (ø)
src/libs/SearchUIUtils.ts 79.31% <100.00%> (+0.48%) ⬆️
...ctions/OnyxDerived/configs/visibleReportActions.ts 95.83% <100.00%> (+0.37%) ⬆️
src/libs/computeReportName.ts 78.22% <ø> (ø)
...es/inbox/report/ContextMenu/ContextMenuActions.tsx 46.24% <100.00%> (+0.32%) ⬆️
src/pages/inbox/report/SearchActionHeader.tsx 100.00% <100.00%> (ø)
...port/actionContents/ReimbursementQueuedContent.tsx 88.00% <100.00%> (ø)
... and 5 more
... and 300 files with indirect coverage changes

@cead22
cead22 removed the request for review from MariaHCD November 4, 2026 23:04

@trjExpensify trjExpensify left a comment

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.

@cead22 confirming... does this need an adhoc or a beta to test?

@cead22 cead22 changed the title Show payment details and stored names on invoices linked to bills [HOLD Tests] Show payment details and stored names on invoices linked to bills Nov 5, 2026
@cead22

cead22 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@trjExpensify I think it's better to wait for this one and a couple more PRs that I have lined up before the next round of thorough testing. These will address a lot of the front end bugs you reported on slack, but I haven't gotten to the notification emails yet

@cead22

cead22 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Updated

Comment thread src/types/onyx/Report.ts Resolved
Comment thread src/libs/ReportActionsUtils.ts Resolved
// Auth sets shouldShow to false on MARKED_REIMBURSED actions created from NewDot for the same reason, so invoices ignore it too.
if (isPaymentRecordedByReimbursedAction(reportAction)) {
// Search passes isInvoice because its invoice can exist only in the Search snapshot, not in Onyx.
if (isPaymentActionHiddenOutsideInvoices(reportAction) && !(isInvoice ?? isInvoiceReportID(reportAction.reportID ?? reportID))) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why we are excluding invoices here? It feels like we are patching Auth bugs in App. Why don't we just use the shouldShow as source of truth and have Auth set that according to the report type the action is added on

@cead22 cead22 Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll do that in a follow up PR (and the update App as well)

AI: Agreed, App shouldn't patch this. Auth https://github.com/Expensify/Auth/pull/26804 makes shouldShow depend on the report type, and covers REIMBURSED too. After it deploys, #107147 makes App read only shouldShow and removes the invoice exception. I'd like to merge this PR as it is, so Bill Pay invoices show their payments until then.

Comment on lines +27 to +28
isPaymentActionHiddenOutsideInvoices(action) ||
isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think these two conditions can be removed after we fix the shouldShow logic

@cead22 cead22 Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll do that in a follow up PR (and the update App as well)

AI: #107147 removes the payment action condition I added here. The MARKED_REIMBURSED condition was already on main. It stays, because that action's visibility also depends on whether an IOU PAY action sits next to it.

Comment thread src/libs/ReportUtils.ts Resolved
Comment thread src/libs/ReportUtils.ts Resolved
Auth sends billID with every report name value pairs update, so the Search snapshot fallback isn't needed.
…t-details

# Conflicts:
#	tests/unit/ContextMenuActionsCopyMessageTest.ts
#	tests/unit/OnyxDerived/visibleReportActionsTest.ts
@cead22

cead22 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@s77rt updated

@s77rt

This comment has been minimized.

Comment thread src/types/onyx/Report.ts
Comment on lines +215 to +216
/** Whether the receiver must not see this invoice, because they pay it through its linked bill */
isHiddenForBillReceiver?: boolean;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is coming from Auth but why we are sending this report in the first place?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The bill receiver still has access to the invoice, and they need to be able to open it, so Auth has to send it. App uses the flag to decide where to hide it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't App decide that this needs to be hidden on its own from the report type and report nvps (type=invoice and has linked bill)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AI: App can tell whether an invoice has a linked bill from the billID report name-value pair, and that's the better check for Pay. But it can't work out isHiddenForBillReceiver by itself, so the flag should stay for hiding the invoice from lists.

Why App can't work out the flag

Auth's rule (Report::getVisibleInvoiceFilter) hides the invoice only when all of these are true:

  1. The current user isn't the invoice's owner. The vendor still sees it.
  2. The bill exists, is a bill, and its invoiceID points back to this invoice. A stale billID doesn't count.
  3. The current user can see the bill: they own it, manage it, or it's shared with them.

App can check the first one. It can't check the second or third reliably, because they depend on the bill report and its sharing rows, which App often doesn't have. Search also uses the same filter on the server, so one definition in Auth keeps the inbox, Search, and other lists in agreement.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The bill exists, is a bill, and its invoiceID points back to this invoice. A stale billID doesn't count.

This should not happen. That would be a bug in Auth. An invoice with a linked bill should always point to a bill that exists. If that bill is removed the link should be removed too.

The current user can see the bill: they own it, manage it, or it's shared with them.

Same, this also should not happen or should not matter.

I think it's late to discuss this isHiddenForBillReceiver field as it's already on Auth so let's not block on that. It can be removed later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@s77rt

s77rt commented Nov 18, 2026

Copy link
Copy Markdown
Member

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • 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 verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari Screenshot 2026-11-17 at 9 54 45 PM Screenshot 2026-11-17 at 9 56 10 PM Screenshot 2026-11-17 at 9 59 32 PM Screenshot 2026-11-17 at 10 44 31 PM Screenshot 2026-11-17 at 10 45 07 PM Screenshot 2026-11-17 at 11 20 38 PM Screenshot 2026-11-17 at 11 23 32 PM

@roryabraham
roryabraham merged commit 95efb47 into main Nov 18, 2026
49 of 56 checks passed
@roryabraham
roryabraham deleted the carlos-invoice-payment-details branch November 18, 2026 23:37
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.43-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — these changes fix invoice payment details, displayed names, and bank-account guidance to match expected behavior, without adding a new workflow or making existing article instructions incorrect.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.47-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #107513 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

This PR failing because of the issue #107513
This issue is reproducible in: All platforms

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.51-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.51-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

8 participants