@@ -48,7 +48,7 @@ import {getLoginByAccountID} from './PersonalDetailsUtils';
4848import { isTaxTrackingEnabled } from './PolicyUtils' ;
4949import { getPolicyExpenseChat , getTransactionDetails , isMoneyRequestReport , isPolicyExpenseChat , isSelfDM , shouldEnableNegative } from './ReportUtils' ;
5050import shouldUseDefaultExpensePolicy from './shouldUseDefaultExpensePolicy' ;
51- import { calculateTaxAmount , getAmount , getCurrency , getDefaultTaxCode , getIsFromGlobalCreate , getTaxValue , hasReceipt } from './TransactionUtils' ;
51+ import { calculateTaxAmount , getAmount , getCurrency , getDefaultTaxCode , getIsFromGlobalCreate , getTaxValue , hasReceipt , isExpenseUnreported } from './TransactionUtils' ;
5252
5353type SubmitAmountArgs = {
5454 report : OnyxEntry < OnyxTypes . Report > ;
@@ -516,7 +516,15 @@ function submitCreateAmount(args: SubmitAmountArgs, ctx: SubmitAmountContext): v
516516 const previousCurrency = getCurrency ( transaction ) ;
517517 const isCurrentTaxAutoDefault = isTaxCodeAutoDefaultForCurrency ( policy , transaction , previousCurrency , transaction ?. taxCode ) ;
518518 const isPolicyExpenseChatParticipant = transaction ?. participants ?. some ( ( participant ) => participant . isPolicyExpenseChat ) ?? false ;
519- const isTaxEnabled = isTaxTrackingEnabled ( isPolicyExpenseChat ( report ) || isPolicyExpenseChatParticipant , policy , false ) ;
519+ // Mirror the tax contexts the confirmation list uses (see MoneyRequestConfirmationList's shouldShowTax): a Track
520+ // expense from a self-DM/default workspace isn't a policy expense chat, but the confirmation page still shows tax
521+ // for the track flow, so the currency recompute must run for it too. Otherwise Back → change currency → Next would
522+ // leave the stale previous-currency default tax on the draft.
523+ const isTaxEnabled = isTaxTrackingEnabled (
524+ isPolicyExpenseChat ( report ) || isPolicyExpenseChatParticipant || iouType === CONST . IOU . TYPE . TRACK || isExpenseUnreported ( transaction ) ,
525+ policy ,
526+ false ,
527+ ) ;
520528
521529 if ( isMovingTransactionFromTrackExpense ( action ) || ( isTaxEnabled && selectedCurrency !== previousCurrency && isCurrentTaxAutoDefault ) ) {
522530 const taxCode = getDefaultTaxCode ( policy , transaction , selectedCurrency ) ;
0 commit comments