Skip to content

Commit

Permalink
Merge pull request #30478 from dukenv0307/fix/29878
Browse files Browse the repository at this point in the history
Fix: Copy to clipboard paid IOU in IOU page, instead of paid text requested text shown
  • Loading branch information
MonilBhavsar authored Nov 1, 2023
2 parents c8e7ee5 + 233f97a commit 347df0c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4080,10 +4080,17 @@ function getIOUReportActionDisplayMessage(reportAction) {
const transaction = TransactionUtils.getTransaction(originalMessage.IOUTransactionID);
const {amount, currency, comment} = getTransactionDetails(transaction);
const formattedAmount = CurrencyUtils.convertToDisplayString(amount, currency);
displayMessage = Localize.translateLocal('iou.requestedAmount', {
formattedAmount,
comment,
});
const isRequestSettled = isSettled(originalMessage.IOUReportID);
if (isRequestSettled) {
displayMessage = Localize.translateLocal('iou.payerSettled', {
amount: formattedAmount,
});
} else {
displayMessage = Localize.translateLocal('iou.requestedAmount', {
formattedAmount,
comment,
});
}
}
return displayMessage;
}
Expand Down

0 comments on commit 347df0c

Please sign in to comment.