@@ -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 [ ] > ;
@@ -571,6 +572,7 @@ type GetSectionsParams = {
571572 translate : LocalizedTranslate ;
572573 formatPhoneNumber : LocaleContextProps [ 'formatPhoneNumber' ] ;
573574 bankAccountList : OnyxEntry < OnyxTypes . BankAccountList > ;
575+ convertToDisplayString : CurrencyListActionsContextType [ 'convertToDisplayString' ] ;
574576 groupBy ?: SearchGroupBy ;
575577 reportActions ?: Record < string , OnyxTypes . ReportAction [ ] > ;
576578 currentSearch ?: SearchKey ;
@@ -1566,7 +1568,12 @@ function shouldShowYear(
15661568 * @private
15671569 * Generates a display name for IOU reports considering the personal details of the payer and the transaction details.
15681570 */
1569- function getIOUReportName ( translate : LocalizedTranslate , data : OnyxTypes . SearchResults [ 'data' ] , reportItem : TransactionReportGroupListItemType ) {
1571+ function getIOUReportName (
1572+ translate : LocalizedTranslate ,
1573+ convertToDisplayString : CurrencyListActionsContextType [ 'convertToDisplayString' ] ,
1574+ data : OnyxTypes . SearchResults [ 'data' ] ,
1575+ reportItem : TransactionReportGroupListItemType ,
1576+ ) {
15701577 const payerPersonalDetails = reportItem . managerID ? data . personalDetailsList ?. [ reportItem . managerID ] : emptyPersonalDetails ;
15711578 // For cases where the data personal detail for manager ID do not exist in search data.personalDetailsList
15721579 // we fallback to the display name of the personal detail data from onyx.
@@ -2607,6 +2614,7 @@ function getReportSections({
26072614 allReportMetadata,
26082615 queryJSON,
26092616 onyxPersonalDetailsList,
2617+ convertToDisplayString,
26102618} : GetReportSectionsParams ) : [ TransactionGroupListItemType [ ] , number , boolean ] {
26112619 const {
26122620 transactionKeys,
@@ -2741,7 +2749,7 @@ function getReportSections({
27412749 } ;
27422750
27432751 if ( isIOUReport ) {
2744- reportIDToTransactions [ reportKey ] . reportName = getIOUReportName ( translate , data , reportIDToTransactions [ reportKey ] ) ;
2752+ reportIDToTransactions [ reportKey ] . reportName = getIOUReportName ( translate , convertToDisplayString , data , reportIDToTransactions [ reportKey ] ) ;
27452753 }
27462754 }
27472755 } else if ( isTransactionEntry ( key ) ) {
@@ -3392,6 +3400,7 @@ function getSections({
33923400 conciergeReportID,
33933401 onyxPersonalDetailsList,
33943402 policyForMovingExpenses,
3403+ convertToDisplayString,
33953404} : GetSectionsParams ) : GetSectionsResult {
33963405 if ( type === CONST . SEARCH . DATA_TYPES . CHAT ) {
33973406 return [ ...getReportActionsSections ( data , visibleReportActionsData ) , false ] ;
@@ -3417,6 +3426,7 @@ function getSections({
34173426 allReportMetadata,
34183427 queryJSON,
34193428 onyxPersonalDetailsList,
3429+ convertToDisplayString,
34203430 } ) ;
34213431 }
34223432
0 commit comments