@@ -20,9 +20,8 @@ import {convertToDisplayString} from '@libs/CurrencyUtils';
2020import DateUtils from '@libs/DateUtils' ;
2121import { canUseTouchScreen } from '@libs/DeviceCapabilities' ;
2222import Navigation from '@libs/Navigation/Navigation' ;
23- import { getMoneyRequestSpendBreakdown } from '@libs/ReportUtils' ;
2423import type { ReservationData } from '@libs/TripReservationUtils' ;
25- import { getReservationsFromTripReport , getTripReservationIcon } from '@libs/TripReservationUtils' ;
24+ import { getReservationsFromTripReport , getTripReservationIcon , getTripTotal } from '@libs/TripReservationUtils' ;
2625import type { ContextMenuAnchor } from '@pages/home/report/ContextMenu/ReportActionContextMenu' ;
2726import variables from '@styles/variables' ;
2827import * as Expensicons from '@src/components/Icon/Expensicons' ;
@@ -159,9 +158,10 @@ function TripRoomPreview({
159158 chatReport ?. tripData ?. startDate && chatReport ?. tripData ?. endDate
160159 ? DateUtils . getFormattedDateRange ( new Date ( chatReport . tripData . startDate ) , new Date ( chatReport . tripData . endDate ) )
161160 : '' ;
162- const { totalDisplaySpend} = getMoneyRequestSpendBreakdown ( chatReport ) ;
161+ const reportCurrency = iouReport ?. currency ?? chatReport ?. currency ;
162+
163+ const { totalDisplaySpend = 0 , currency = reportCurrency } = chatReport ? getTripTotal ( chatReport ) : { } ;
163164
164- const currency = iouReport ?. currency ?? chatReport ?. currency ;
165165 const displayAmount = useMemo ( ( ) => {
166166 if ( totalDisplaySpend ) {
167167 return convertToDisplayString ( totalDisplaySpend , currency ) ;
@@ -181,6 +181,7 @@ function TripRoomPreview({
181181 />
182182 ) ;
183183
184+ console . debug ( 'displayAmount' , totalDisplaySpend , displayAmount ) ;
184185 return (
185186 < OfflineWithFeedback
186187 pendingAction = { action ?. pendingAction }
0 commit comments