@@ -99,7 +99,7 @@ import type {CardFeedForDisplay} from './CardFeedUtils';
9999import { getCardFeedsForDisplay } from './CardFeedUtils' ;
100100import { getCardDescriptionForSearchTable , getFeedNameForDisplay } from './CardUtils' ;
101101import { getDecodedCategoryName } from './CategoryUtils' ;
102- import { convertToDisplayString , convertToDisplayStringWithoutCurrency } from './CurrencyUtils' ;
102+ import { convertToDisplayStringWithoutCurrency } from './CurrencyUtils' ;
103103import DateUtils from './DateUtils' ;
104104import interceptAnonymousUser from './interceptAnonymousUser' ;
105105import isSearchTopmostFullScreenRoute from './Navigation/helpers/isSearchTopmostFullScreenRoute' ;
@@ -239,6 +239,7 @@ type GetReportSectionsParams = {
239239 currentUserEmail : string ;
240240 translate : LocalizedTranslate ;
241241 formatPhoneNumber : LocaleContextProps [ 'formatPhoneNumber' ] ;
242+ convertToDisplayString : CurrencyListActionsContextType [ 'convertToDisplayString' ] ;
242243 isActionLoadingSet : ReadonlySet < string > | undefined ;
243244 isOffline : boolean | undefined ;
244245 allTransactionViolations : OnyxCollection < OnyxTypes . TransactionViolation [ ] > ;
@@ -570,6 +571,7 @@ type GetSectionsParams = {
570571 translate : LocalizedTranslate ;
571572 formatPhoneNumber : LocaleContextProps [ 'formatPhoneNumber' ] ;
572573 bankAccountList : OnyxEntry < OnyxTypes . BankAccountList > ;
574+ convertToDisplayString : CurrencyListActionsContextType [ 'convertToDisplayString' ] ;
573575 groupBy ?: SearchGroupBy ;
574576 reportActions ?: Record < string , OnyxTypes . ReportAction [ ] > ;
575577 currentSearch ?: SearchKey ;
@@ -1565,7 +1567,12 @@ function shouldShowYear(
15651567 * @private
15661568 * Generates a display name for IOU reports considering the personal details of the payer and the transaction details.
15671569 */
1568- function getIOUReportName ( translate : LocalizedTranslate , data : OnyxTypes . SearchResults [ 'data' ] , reportItem : TransactionReportGroupListItemType ) {
1570+ function getIOUReportName (
1571+ translate : LocalizedTranslate ,
1572+ convertToDisplayString : CurrencyListActionsContextType [ 'convertToDisplayString' ] ,
1573+ data : OnyxTypes . SearchResults [ 'data' ] ,
1574+ reportItem : TransactionReportGroupListItemType ,
1575+ ) {
15691576 const payerPersonalDetails = reportItem . managerID ? data . personalDetailsList ?. [ reportItem . managerID ] : emptyPersonalDetails ;
15701577 // For cases where the data personal detail for manager ID do not exist in search data.personalDetailsList
15711578 // we fallback to the display name of the personal detail data from onyx.
@@ -2606,6 +2613,7 @@ function getReportSections({
26062613 allReportMetadata,
26072614 queryJSON,
26082615 onyxPersonalDetailsList,
2616+ convertToDisplayString,
26092617} : GetReportSectionsParams ) : [ TransactionGroupListItemType [ ] , number , boolean ] {
26102618 const {
26112619 transactionKeys,
@@ -2740,7 +2748,7 @@ function getReportSections({
27402748 } ;
27412749
27422750 if ( isIOUReport ) {
2743- reportIDToTransactions [ reportKey ] . reportName = getIOUReportName ( translate , data , reportIDToTransactions [ reportKey ] ) ;
2751+ reportIDToTransactions [ reportKey ] . reportName = getIOUReportName ( translate , convertToDisplayString , data , reportIDToTransactions [ reportKey ] ) ;
27442752 }
27452753 }
27462754 } else if ( isTransactionEntry ( key ) ) {
@@ -3391,6 +3399,7 @@ function getSections({
33913399 conciergeReportID,
33923400 onyxPersonalDetailsList,
33933401 policyForMovingExpenses,
3402+ convertToDisplayString,
33943403} : GetSectionsParams ) : GetSectionsResult {
33953404 if ( type === CONST . SEARCH . DATA_TYPES . CHAT ) {
33963405 return [ ...getReportActionsSections ( data , visibleReportActionsData ) , false ] ;
@@ -3416,6 +3425,7 @@ function getSections({
34163425 allReportMetadata,
34173426 queryJSON,
34183427 onyxPersonalDetailsList,
3428+ convertToDisplayString,
34193429 } ) ;
34203430 }
34213431
0 commit comments