File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1054,6 +1054,9 @@ function changeTransactionsReport({
10541054
10551055 const { comment} = isUnreported ? recalculateUnreportedTransactionDetails ( ) : { } ;
10561056
1057+ const shouldCopyOriginalAmount = transaction . originalAmount !== undefined && transaction . originalAmount !== transaction . amount ;
1058+ const shouldCopyOriginalCurrency = transaction . originalCurrency !== undefined && transaction . originalCurrency !== transaction . currency ;
1059+
10571060 // 1. Optimistically update the transaction with full data and changed fields.
10581061 // Spreading the full transaction ensures the TRANSACTION collection has complete data
10591062 // (e.g. amount) even when the existing entry was incomplete from search results.
@@ -1064,6 +1067,8 @@ function changeTransactionsReport({
10641067 ...transaction ,
10651068 reportID,
10661069 comment,
1070+ originalAmount : shouldCopyOriginalAmount ? transaction . originalAmount : null ,
1071+ originalCurrency : shouldCopyOriginalCurrency ? transaction . originalCurrency : null ,
10671072 ...( shouldClearAmount && { pendingAction : CONST . RED_BRICK_ROAD_PENDING_ACTION . UPDATE } ) ,
10681073 ...( shouldClearAmount && { convertedAmount : null } ) ,
10691074 ...( oldIOUAction ? { linkedTrackedExpenseReportAction : newIOUAction } : { } ) ,
You can’t perform that action at this time.
0 commit comments