Skip to content

Commit

Permalink
Show invoice room under receiver workspace reports
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyStash committed Aug 6, 2024
1 parent 7d19455 commit a39aa22
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,8 @@ function findSelfDMReportID(): string | undefined {
* In this case report and workspace members must be compared to determine whether the report belongs to the workspace.
*/
function doesReportBelongToWorkspace(report: OnyxEntry<Report>, policyMemberAccountIDs: number[], policyID?: string) {
return (
isConciergeChatReport(report) ||
(report?.policyID === CONST.POLICY.ID_FAKE || !report?.policyID ? hasParticipantInArray(report, policyMemberAccountIDs) : report?.policyID === policyID)
);
const isPolicyRelatedReport = report?.policyID === policyID || !!(report?.invoiceReceiver && 'policyID' in report.invoiceReceiver && report.invoiceReceiver.policyID === policyID);
return isConciergeChatReport(report) || (report?.policyID === CONST.POLICY.ID_FAKE || !report?.policyID ? hasParticipantInArray(report, policyMemberAccountIDs) : isPolicyRelatedReport);
}

/**
Expand Down

0 comments on commit a39aa22

Please sign in to comment.