Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2370,7 +2370,9 @@ function getReportPreviewMessage(
if (isSettled(report.reportID) || (report.isWaitingOnBankAccount && isPreviewMessageForParentChatReport)) {
// A settled report preview message can come in three formats "paid ... elsewhere" or "paid ... with Expensify"
let translatePhraseKey: TranslationPaths = 'iou.paidElsewhereWithAmount';
if (
if (isPreviewMessageForParentChatReport) {
translatePhraseKey = 'iou.payerPaidAmount';
} else if (
[CONST.IOU.PAYMENT_TYPE.VBBA, CONST.IOU.PAYMENT_TYPE.EXPENSIFY].some((paymentType) => paymentType === originalMessage?.paymentType) ||
!!reportActionMessage.match(/ (with Expensify|using Expensify)$/) ||
report.isWaitingOnBankAccount
Expand Down Expand Up @@ -4704,7 +4706,6 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>)
// property. If it does, it indicates that this is a 'Send money' action.
const {amount, currency} = originalMessage.IOUDetails ?? originalMessage;
const formattedAmount = CurrencyUtils.convertToDisplayString(Math.abs(amount), currency) ?? '';
const payerName = isExpenseReport(iouReport) ? getPolicyName(iouReport) : getDisplayNameForParticipant(iouReport?.managerID, true);

switch (originalMessage.paymentType) {
case CONST.IOU.PAYMENT_TYPE.ELSEWHERE:
Expand All @@ -4718,7 +4719,7 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>)
translationKey = 'iou.payerPaidAmount';
break;
}
return Localize.translateLocal(translationKey, {amount: formattedAmount, payer: payerName ?? ''});
return Localize.translateLocal(translationKey, {amount: formattedAmount, payer: ''});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From #33819, I bring the getIOUReportActionDisplayMessage back and only remove the payerName for the paid message.

}

const transaction = TransactionUtils.getTransaction(originalMessage.IOUTransactionID ?? '');
Expand Down