diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 8d6632135bde..aa72fc88d8cc 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1338,6 +1338,11 @@ function getModifiedExpenseMessage(reportAction) { return `changed the request description to "${reportActionOriginalMessage.newComment}" (previously "${reportActionOriginalMessage.oldComment}")`; } + const hasModifiedMerchant = _.has(reportActionOriginalMessage, 'oldMerchant') && _.has(reportActionOriginalMessage, 'merchant'); + if (hasModifiedMerchant) { + return `changed the request merchant to "${reportActionOriginalMessage.merchant}" (previously "${reportActionOriginalMessage.oldMerchant}")`; + } + const hasModifiedCreated = _.has(reportActionOriginalMessage, 'oldCreated') && _.has(reportActionOriginalMessage, 'created'); if (hasModifiedCreated) { // Take only the YYYY-MM-DD value as the original date includes timestamp @@ -1345,11 +1350,6 @@ function getModifiedExpenseMessage(reportAction) { formattedOldCreated = format(formattedOldCreated, CONST.DATE.FNS_FORMAT_STRING); return `changed the request date to ${reportActionOriginalMessage.created} (previously ${formattedOldCreated})`; } - - const hasModifiedMerchant = _.has(reportActionOriginalMessage, 'oldMerchant') && _.has(reportActionOriginalMessage, 'merchant'); - if (hasModifiedMerchant) { - return `changed the request merchant to "${reportActionOriginalMessage.merchant}" (previously "${reportActionOriginalMessage.oldMerchant}")`; - } } /**