From b2eb74853fe0600fce5d9130e44050169127511e Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Wed, 29 Nov 2023 16:26:06 -0700 Subject: [PATCH] Merge pull request #32191 from Expensify/revert-31604-fix/30680 Revert "Show merchant for split bill" (cherry picked from commit 0f20f01826e14bcc9f0196d834f294cd16c8f9f1) --- src/components/ReportActionItem/MoneyRequestPreview.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.js b/src/components/ReportActionItem/MoneyRequestPreview.js index 652fb5a84e76..466a5a6eec51 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.js +++ b/src/components/ReportActionItem/MoneyRequestPreview.js @@ -170,7 +170,8 @@ function MoneyRequestPreview(props) { const isDeleted = lodashGet(props.action, 'pendingAction', null) === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; // Show the merchant for IOUs and expenses only if they are custom or not related to scanning smartscan - const shouldShowMerchant = !_.isEmpty(requestMerchant) && requestMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && requestMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT; + const shouldShowMerchant = + !_.isEmpty(requestMerchant) && !props.isBillSplit && requestMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && requestMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT; const shouldShowDescription = !_.isEmpty(description) && !shouldShowMerchant && !isScanning; const receiptImages = hasReceipt ? [ReceiptUtils.getThumbnailAndImageURIs(props.transaction)] : []; @@ -321,7 +322,7 @@ function MoneyRequestPreview(props) { )} - {shouldShowMerchant && !props.isBillSplit && ( + {shouldShowMerchant && ( {hasPendingWaypoints ? requestMerchant.replace(CONST.REGEX.FIRST_SPACE, props.translate('common.tbd')) : requestMerchant} @@ -333,9 +334,7 @@ function MoneyRequestPreview(props) { {!isCurrentUserManager && props.shouldShowPendingConversionMessage && ( {props.translate('iou.pendingConversionMessage')} )} - {(shouldShowDescription || (shouldShowMerchant && props.isBillSplit)) && ( - {shouldShowDescription ? description : requestMerchant} - )} + {shouldShowDescription && {description}} {props.isBillSplit && !_.isEmpty(participantAccountIDs) && requestAmount > 0 && (