File tree 1 file changed +5
-5
lines changed
src/components/TransactionItemRow/DataCells
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,24 +3,24 @@ import TextWithTooltip from '@components/TextWithTooltip';
3
3
import useLocalize from '@hooks/useLocalize' ;
4
4
import useThemeStyles from '@hooks/useThemeStyles' ;
5
5
import { convertToDisplayString } from '@libs/CurrencyUtils' ;
6
+ import { getTransactionDetails } from '@libs/ReportUtils' ;
6
7
import { getCurrency as getTransactionCurrency , hasReceipt , isReceiptBeingScanned } from '@libs/TransactionUtils' ;
7
8
import type TransactionDataCellProps from './TransactionDataCellProps' ;
8
9
9
10
function TotalCell ( { shouldShowTooltip, transactionItem} : TransactionDataCellProps ) {
10
11
const styles = useThemeStyles ( ) ;
11
12
const { translate} = useLocalize ( ) ;
12
13
const currency = getTransactionCurrency ( transactionItem ) ;
13
-
14
- let amount = convertToDisplayString ( Math . abs ( transactionItem . amount ) , currency ) ;
15
-
14
+ const amount = getTransactionDetails ( transactionItem ) ?. amount ;
15
+ let amountToDisplay = convertToDisplayString ( amount , currency ) ;
16
16
if ( hasReceipt ( transactionItem ) && isReceiptBeingScanned ( transactionItem ) ) {
17
- amount = translate ( 'iou.receiptStatusTitle' ) ;
17
+ amountToDisplay = translate ( 'iou.receiptStatusTitle' ) ;
18
18
}
19
19
20
20
return (
21
21
< TextWithTooltip
22
22
shouldShowTooltip = { shouldShowTooltip }
23
- text = { amount }
23
+ text = { amountToDisplay }
24
24
style = { [ styles . optionDisplayName , styles . justifyContentCenter ] }
25
25
/>
26
26
) ;
You can’t perform that action at this time.
0 commit comments