Skip to content

Commit

Permalink
Merge pull request #51217 from nkdengineer/fix/invoice-48465
Browse files Browse the repository at this point in the history
fix: expense is shown when sending send invoice
  • Loading branch information
puneetlath authored Oct 29, 2024
2 parents 65fa00a + ef34cc1 commit 038b21b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,11 @@ function ReportPreview({
if (formattedDescription ?? moneyRequestComment) {
return {supportText: truncate(StringUtils.lineBreaksToSpaces(formattedDescription ?? moneyRequestComment), {length: CONST.REQUEST_PREVIEW.MAX_LENGTH})};
}
if (formattedMerchant === CONST.TRANSACTION.DEFAULT_MERCHANT) {
return {supportText: formattedMerchant};

if (numberOfRequests === 1) {
return {
supportText: '',
};
}
return {
supportText: translate('iou.expenseCount', {
Expand Down Expand Up @@ -507,7 +510,7 @@ function ReportPreview({
)}
</View>
</View>
{shouldShowSubtitle && supportText && (
{shouldShowSubtitle && !!supportText && (
<View style={styles.flexRow}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text style={[styles.textLabelSupporting, styles.textNormal, styles.lh20]}>{supportText}</Text>
Expand Down

0 comments on commit 038b21b

Please sign in to comment.