@@ -16,7 +16,7 @@ import {isMovingTransactionFromTrackExpense} from '@libs/IOUUtils';
1616import Navigation from '@libs/Navigation/Navigation' ;
1717import type { TaxRatesOption } from '@libs/TaxOptionsListUtils' ;
1818import { calculateTaxAmount , getAmount , getCurrency , getTaxRateTitle , getTaxValue } from '@libs/TransactionUtils' ;
19- import { setMoneyRequestTaxRateValues } from '@userActions/IOU/MoneyRequest' ;
19+ import { getIOURequestPolicyID , setMoneyRequestTaxRateValues } from '@userActions/IOU/MoneyRequest' ;
2020import { setDraftSplitTransaction } from '@userActions/IOU/Split' ;
2121import { updateMoneyRequestTaxRate } from '@userActions/IOU/UpdateMoneyRequest' ;
2222import CONST from '@src/CONST' ;
@@ -49,7 +49,9 @@ function IOURequestStepTaxRatePage({
4949} : IOURequestStepTaxRatePageProps ) {
5050 const { translate} = useLocalize ( ) ;
5151 const { getCurrencyDecimals} = useCurrencyListActions ( ) ;
52- const { policy} = usePolicyForTransaction ( { transaction, reportPolicyID : report ?. policyID , action, iouType} ) ;
52+
53+ const [ participantReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ getNonEmptyStringOnyxID ( transaction ?. participants ?. at ( 0 ) ?. reportID ) } ` ) ;
54+ const { policy} = usePolicyForTransaction ( { transaction, reportPolicyID : getIOURequestPolicyID ( transaction , report ?. policyID ? report : participantReport ) , action, iouType} ) ;
5355
5456 const [ policyCategories ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY_CATEGORIES } ${ policy ?. id } ` ) ;
5557 const [ policyTags ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY_TAGS } ${ policy ?. id } ` ) ;
0 commit comments