From b10e7039e0de73257c8166ebb802172bff6b4eac Mon Sep 17 00:00:00 2001 From: daledah Date: Mon, 14 Oct 2024 10:55:28 +0700 Subject: [PATCH] feat: add description to function --- src/libs/ReportUtils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index e54bfbb3c7df..a7b3392d667b 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1251,6 +1251,9 @@ function findSelfDMReportID(): string | undefined { return selfDMReport?.reportID; } +/** + * Checks if the supplied report is from a policy or is an invoice report from a policy + */ function isPolicyRelatedReport(report: OnyxEntry, policyID?: string) { return report?.policyID === policyID || !!(report?.invoiceReceiver && 'policyID' in report.invoiceReceiver && report.invoiceReceiver.policyID === policyID); }