@@ -3975,7 +3975,7 @@ function getTransactionDetails(
39753975 const report = getReportOrDraftReport ( transaction ?. reportID ) ;
39763976 return {
39773977 created : getFormattedCreated ( transaction , createdDateFormat ) ,
3978- amount : getTransactionAmount ( transaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) ) ,
3978+ amount : getTransactionAmount ( transaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) , transaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ) ,
39793979 attendees : getAttendees ( transaction ) ,
39803980 taxAmount : getTaxAmount ( transaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) ) ,
39813981 taxCode : getTaxCode ( transaction ) ,
@@ -4235,8 +4235,8 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>
42354235
42364236 if ( fieldToEdit === CONST . EDIT_REQUEST_FIELD . REPORT ) {
42374237 // Unreported transaction from OldDot can have the reportID as an empty string
4238- const isUnreported = ! transaction ?. reportID || transaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ;
4239- return isUnreported
4238+ const isUnreportedExpense = ! transaction ?. reportID || transaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ;
4239+ return isUnreportedExpense
42404240 ? Object . values ( allPolicies ?? { } ) . flatMap ( ( currentPolicy ) =>
42414241 getOutstandingReportsForUser ( currentPolicy ?. id , currentUserAccountID , reportsByPolicyID ?. [ currentPolicy ?. id ?? CONST . DEFAULT_NUMBER_ID ] ?? { } ) ,
42424242 ) . length > 0
@@ -4487,7 +4487,7 @@ function getTransactionReportName({
44874487 }
44884488
44894489 const report = getReportOrDraftReport ( transaction ?. reportID , reports ) ;
4490- const amount = getTransactionAmount ( transaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) ) ?? 0 ;
4490+ const amount = getTransactionAmount ( transaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) , transaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ) ?? 0 ;
44914491 const formattedAmount = convertToDisplayString ( amount , getCurrency ( transaction ) ) ?? '' ;
44924492 const comment = getMerchantOrDescription ( transaction ) ;
44934493
@@ -4542,7 +4542,7 @@ function getReportPreviewMessage(
45424542 return translateLocal ( 'iou.receiptMissingDetails' ) ;
45434543 }
45444544
4545- const amount = getTransactionAmount ( linkedTransaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) ) ?? 0 ;
4545+ const amount = getTransactionAmount ( linkedTransaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) , linkedTransaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ) ?? 0 ;
45464546 const formattedAmount = convertToDisplayString ( amount , getCurrency ( linkedTransaction ) ) ?? '' ;
45474547 return translateLocal ( 'iou.didSplitAmount' , { formattedAmount, comment : getMerchantOrDescription ( linkedTransaction ) } ) ;
45484548 }
@@ -4564,7 +4564,7 @@ function getReportPreviewMessage(
45644564 return translateLocal ( 'iou.receiptMissingDetails' ) ;
45654565 }
45664566
4567- const amount = getTransactionAmount ( linkedTransaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) ) ?? 0 ;
4567+ const amount = getTransactionAmount ( linkedTransaction , ! isEmptyObject ( report ) && isExpenseReport ( report ) , linkedTransaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ) ?? 0 ;
45684568 const formattedAmount = convertToDisplayString ( amount , getCurrency ( linkedTransaction ) ) ?? '' ;
45694569 return translateLocal ( 'iou.trackedAmount' , { formattedAmount, comment : getMerchantOrDescription ( linkedTransaction ) } ) ;
45704570 }
@@ -9179,7 +9179,7 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>,
91799179 return translateLocal ( translationKey , { amount : formattedAmount , payer : '' } ) ;
91809180 }
91819181
9182- const amount = getTransactionAmount ( transaction , ! isEmptyObject ( iouReport ) && isExpenseReport ( iouReport ) ) ?? 0 ;
9182+ const amount = getTransactionAmount ( transaction , ! isEmptyObject ( iouReport ) && isExpenseReport ( iouReport ) , transaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ) ?? 0 ;
91839183 const formattedAmount = convertToDisplayString ( amount , getCurrency ( transaction ) ) ?? '' ;
91849184 const isRequestSettled = isSettled ( IOUReportID ) ;
91859185 const isApproved = isReportApproved ( { report : iouReport } ) ;
0 commit comments