@@ -117,6 +117,7 @@ function MoneyRequestPreviewContent({
117
117
const isPartialHold = isSettlementOrApprovalPartial && isOnHold ;
118
118
const hasViolations = TransactionUtils . hasViolation ( transaction ?. transactionID ?? '-1' , transactionViolations , true ) ;
119
119
const hasNoticeTypeViolations = TransactionUtils . hasNoticeTypeViolation ( transaction ?. transactionID ?? '-1' , transactionViolations , true ) && ReportUtils . isPaidGroupPolicy ( iouReport ) ;
120
+ const hasWarningTypeViolations = TransactionUtils . hasWarningTypeViolation ( transaction ?. transactionID ?? '-1' , transactionViolations , true ) ;
120
121
const hasFieldErrors = TransactionUtils . hasMissingSmartscanFields ( transaction ) ;
121
122
const isDistanceRequest = TransactionUtils . isDistanceRequest ( transaction ) ;
122
123
const isFetchingWaypointsFromServer = TransactionUtils . isFetchingWaypointsFromServer ( transaction ) ;
@@ -144,9 +145,7 @@ function MoneyRequestPreviewContent({
144
145
// When there are no settled transactions in duplicates, show the "Keep this one" button
145
146
const shouldShowKeepButton = ! ! ( allDuplicates . length && duplicates . length && allDuplicates . length === duplicates . length ) ;
146
147
147
- const hasDuplicates = duplicates . length > 0 ;
148
-
149
- const shouldShowRBR = hasNoticeTypeViolations || hasViolations || hasFieldErrors || ( ! isFullySettled && ! isFullyApproved && isOnHold ) || hasDuplicates ;
148
+ const shouldShowRBR = hasNoticeTypeViolations || hasWarningTypeViolations || hasViolations || hasFieldErrors || ( ! isFullySettled && ! isFullyApproved && isOnHold ) ;
150
149
const showCashOrCard = isCardTransaction ? translate ( 'iou.card' ) : translate ( 'iou.cash' ) ;
151
150
// We don't use isOnHold because it's true for duplicated transaction too and we only want to show hold message if the transaction is truly on hold
152
151
const shouldShowHoldMessage = ! ( isSettled && ! isSettlementOrApprovalPartial ) && ! ! transaction ?. comment ?. hold ;
0 commit comments