Repository navigation
Show payment details and stored names on invoices linked to bills - #105968
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@trjExpensify adding you for reivew. |
🦜 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 diffdiff --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 |
There was a problem hiding this comment.
💡 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".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
trjExpensify
left a comment
There was a problem hiding this comment.
@cead22 confirming... does this need an adhoc or a beta to test?
|
@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 |
…ments on invoices
|
Updated |
| // 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))) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| isPaymentActionHiddenOutsideInvoices(action) || | ||
| isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED) |
There was a problem hiding this comment.
I think these two conditions can be removed after we fix the shouldShow logic
There was a problem hiding this comment.
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.
Auth sends billID with every report name value pairs update, so the Search snapshot fallback isn't needed.
…he invoice green dot
…t-details # Conflicts: # tests/unit/ContextMenuActionsCopyMessageTest.ts # tests/unit/OnyxDerived/visibleReportActionsTest.ts
|
@s77rt updated |
This comment has been minimized.
This comment has been minimized.
| /** Whether the receiver must not see this invoice, because they pay it through its linked bill */ | ||
| isHiddenForBillReceiver?: boolean; |
There was a problem hiding this comment.
This is coming from Auth but why we are sending this report in the first place?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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:
- The current user isn't the invoice's owner. The vendor still sees it.
- The bill exists, is a bill, and its invoiceID points back to this invoice. A stale billID doesn't count.
- 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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
This should not happen. That would be a bug in Auth.
We have had this types of bugs
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.43-0 🚀
|
|
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. |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.47-0 🚀
|
|
Deploy Blocker #107513 was identified to be related to this PR. |
|
This PR failing because of the issue #107513 |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.51-1 🚀
Bundle Size Analysis (Sentry): |







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.
isAwaitingActionFromCurrentUser. Copying the message from a thread uses the parent invoice, like the screen does.reportNameeven when it has an invoice room. New Bill Pay invoices are namedInvoice #<short reportID>. Other invoices keep names like " owes $X".Related Auth PRs:
isAwaitingActionFromCurrentUser.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
<payer> owes <amount>.<payer> paid <amount>Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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