Skip to content

Commit

Permalink
Merge pull request #32191 from Expensify/revert-31604-fix/30680
Browse files Browse the repository at this point in the history
Revert "Show merchant for split bill"

(cherry picked from commit 0f20f01)
  • Loading branch information
AndrewGable authored and OSBotify committed Nov 29, 2023
1 parent 13f5207 commit b2eb748
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/ReportActionItem/MoneyRequestPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)] : [];
Expand Down Expand Up @@ -321,7 +322,7 @@ function MoneyRequestPreview(props) {
</View>
)}
</View>
{shouldShowMerchant && !props.isBillSplit && (
{shouldShowMerchant && (
<View style={[styles.flexRow]}>
<Text style={[styles.textLabelSupporting, styles.mb1, styles.lh20, styles.breakWord]}>
{hasPendingWaypoints ? requestMerchant.replace(CONST.REGEX.FIRST_SPACE, props.translate('common.tbd')) : requestMerchant}
Expand All @@ -333,9 +334,7 @@ function MoneyRequestPreview(props) {
{!isCurrentUserManager && props.shouldShowPendingConversionMessage && (
<Text style={[styles.textLabel, styles.colorMuted]}>{props.translate('iou.pendingConversionMessage')}</Text>
)}
{(shouldShowDescription || (shouldShowMerchant && props.isBillSplit)) && (
<Text style={[styles.colorMuted]}>{shouldShowDescription ? description : requestMerchant}</Text>
)}
{shouldShowDescription && <Text style={[styles.colorMuted]}>{description}</Text>}
</View>
{props.isBillSplit && !_.isEmpty(participantAccountIDs) && requestAmount > 0 && (
<Text style={[styles.textLabel, styles.colorMuted, styles.ml1, styles.amountSplitPadding]}>
Expand Down

0 comments on commit b2eb748

Please sign in to comment.