Skip to content

Commit 50d81ef

Browse files
Merge pull request #35360 from DylanDylann/fix/34415
Fix/34415: Hide error if request is paid
2 parents d338621 + faf0ad4 commit 50d81ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/ReportActionItem/MoneyRequestView.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ function MoneyRequestView({
295295
shouldShowRightIcon={canEditMerchant}
296296
titleStyle={styles.flex1}
297297
onPress={() => Navigation.navigate(ROUTES.EDIT_REQUEST.getRoute(report.reportID, CONST.EDIT_REQUEST_FIELD.MERCHANT))}
298-
brickRoadIndicator={hasViolations('merchant') || (hasErrors && isEmptyMerchant && isPolicyExpenseChat) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
299-
error={hasErrors && isPolicyExpenseChat && isEmptyMerchant ? translate('common.error.enterMerchant') : ''}
298+
brickRoadIndicator={
299+
hasViolations('merchant') || (!isSettled && !isCancelled && hasErrors && isEmptyMerchant && isPolicyExpenseChat)
300+
? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR
301+
: undefined
302+
}
303+
error={!isSettled && !isCancelled && hasErrors && isPolicyExpenseChat && isEmptyMerchant ? translate('common.error.enterMerchant') : ''}
300304
/>
301305
{canUseViolations && <ViolationMessages violations={getViolationsForField('merchant')} />}
302306
</OfflineWithFeedback>

0 commit comments

Comments
 (0)