From 5990e1889a3bcd6f6ce7b78d2ec361793ca768ec Mon Sep 17 00:00:00 2001 From: Maruf Sharifi Date: Sun, 15 Mar 2026 11:00:10 +0430 Subject: [PATCH 1/2] fix(invoice-room): show only workspace name in subheader instead of receiver name --- src/libs/ReportUtils.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 22eb7007262f0..2ca4abcca0875 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6150,7 +6150,16 @@ function getParentNavigationSubtitle(report: OnyxEntry, isParentReportAr } if (isInvoiceReport(report) || isInvoiceRoom(parentReport)) { - let reportName = `${getPolicyName({report: parentReport})} & ${getInvoicePayerName(parentReport)}`; + const senderWorkspaceName = getPolicyName({report: parentReport}); + const invoiceReceiverPolicyID = parentReport?.invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.BUSINESS ? parentReport.invoiceReceiver.policyID : undefined; + const invoiceReceiverPolicy = invoiceReceiverPolicyID ? getPolicy(invoiceReceiverPolicyID) : undefined; + const isCurrentUserReceiver = isCurrentUserInvoiceReceiver(parentReport); + const invoicePayerName = getInvoicePayerName(parentReport, invoiceReceiverPolicy); + + let reportName = senderWorkspaceName; + if (!isCurrentUserReceiver && invoicePayerName) { + reportName = `${senderWorkspaceName} & ${invoicePayerName}`; + } if (isArchivedNonExpenseReport(parentReport, isParentReportArchived)) { // eslint-disable-next-line @typescript-eslint/no-deprecated From ac26e4960c7180236f7fb3eb090d0a1f3c382db1 Mon Sep 17 00:00:00 2001 From: marufsharifi Date: Sun, 15 Mar 2026 14:29:05 +0430 Subject: [PATCH 2/2] fix: avoid deprecated policy lookup in invoice subtitle --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 2ca4abcca0875..1a7a7bbd41394 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6152,7 +6152,7 @@ function getParentNavigationSubtitle(report: OnyxEntry, isParentReportAr if (isInvoiceReport(report) || isInvoiceRoom(parentReport)) { const senderWorkspaceName = getPolicyName({report: parentReport}); const invoiceReceiverPolicyID = parentReport?.invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.BUSINESS ? parentReport.invoiceReceiver.policyID : undefined; - const invoiceReceiverPolicy = invoiceReceiverPolicyID ? getPolicy(invoiceReceiverPolicyID) : undefined; + const invoiceReceiverPolicy = invoiceReceiverPolicyID ? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${invoiceReceiverPolicyID}`] : undefined; const isCurrentUserReceiver = isCurrentUserInvoiceReceiver(parentReport); const invoicePayerName = getInvoicePayerName(parentReport, invoiceReceiverPolicy);