@@ -1946,7 +1946,8 @@ function getMoneyRequestReportName(report: OnyxEntry<Report>, policy: OnyxEntry<
1946
1946
1947
1947
const moneyRequestTotal = getMoneyRequestSpendBreakdown ( report ) . totalDisplaySpend ;
1948
1948
const formattedAmount = CurrencyUtils . convertToDisplayString ( moneyRequestTotal , report ?. currency , hasOnlyDistanceRequestTransactions ( report ?. reportID ) ) ;
1949
- const payerOrApproverName = isExpenseReport ( report ) ? getPolicyName ( report , false , policy ) : getDisplayNameForParticipant ( report ?. managerID ) ?? '' ;
1949
+ const payerOrApproverName =
1950
+ isExpenseReport ( report ) && ! hasNonReimbursableTransactions ( report ?. reportID ?? '' ) ? getPolicyName ( report , false , policy ) : getDisplayNameForParticipant ( report ?. managerID ) ?? '' ;
1950
1951
const payerPaidAmountMessage = Localize . translateLocal ( 'iou.payerPaidAmount' , {
1951
1952
payer : payerOrApproverName ,
1952
1953
amount : formattedAmount ,
@@ -2244,9 +2245,10 @@ function getReportPreviewMessage(
2244
2245
}
2245
2246
}
2246
2247
2248
+ const containsNonReimbursable = hasNonReimbursableTransactions ( report . reportID ) ;
2247
2249
const totalAmount = getMoneyRequestSpendBreakdown ( report ) . totalDisplaySpend ;
2248
2250
const policyName = getPolicyName ( report , false , policy ) ;
2249
- const payerName = isExpenseReport ( report ) ? policyName : getDisplayNameForParticipant ( report . managerID , ! isPreviewMessageForParentChatReport ) ;
2251
+ const payerName = isExpenseReport ( report ) && ! containsNonReimbursable ? policyName : getDisplayNameForParticipant ( report . managerID , ! isPreviewMessageForParentChatReport ) ;
2250
2252
2251
2253
const formattedAmount = CurrencyUtils . convertToDisplayString ( totalAmount , report . currency ) ;
2252
2254
0 commit comments