Skip to content

Commit 627ba6e

Browse files
committed
remove RBR violations if report is of type invoice.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
1 parent 5030690 commit 627ba6e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7592,9 +7592,10 @@ function shouldDisplayViolationsRBRInLHN(report: OnyxEntry<Report>, transactionV
75927592
const potentialReports = reportsByPolicyID[report.policyID] ?? [];
75937593
return potentialReports.some((potentialReport) => {
75947594
return (
7595-
hasViolations(potentialReport.reportID, transactionViolations, true) ||
7596-
hasWarningTypeViolations(potentialReport.reportID, transactionViolations, true) ||
7597-
hasNoticeTypeViolations(potentialReport.reportID, transactionViolations, true)
7595+
!isInvoiceReport(potentialReport) &&
7596+
(hasViolations(potentialReport.reportID, transactionViolations, true) ||
7597+
hasWarningTypeViolations(potentialReport.reportID, transactionViolations, true) ||
7598+
hasNoticeTypeViolations(potentialReport.reportID, transactionViolations, true))
75987599
);
75997600
});
76007601
}

0 commit comments

Comments
 (0)