Skip to content

Commit

Permalink
feat: add description to function
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Oct 14, 2024
1 parent 4cba817 commit b10e703
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Report>, policyID?: string) {
return report?.policyID === policyID || !!(report?.invoiceReceiver && 'policyID' in report.invoiceReceiver && report.invoiceReceiver.policyID === policyID);
}
Expand Down

0 comments on commit b10e703

Please sign in to comment.