diff --git a/src/libs/actions/IOU/UpdateMoneyRequest.ts b/src/libs/actions/IOU/UpdateMoneyRequest.ts index 63fd59a8f2cf..40e1d96aff69 100644 --- a/src/libs/actions/IOU/UpdateMoneyRequest.ts +++ b/src/libs/actions/IOU/UpdateMoneyRequest.ts @@ -847,6 +847,7 @@ function updateMoneyRequestTaxAmount({ isASAPSubmitBetaEnabled, parentReportNextStep, delegateAccountID, + reportPolicyTags, isTrackIntentUser, }: { transactionID: string; @@ -862,6 +863,7 @@ function updateMoneyRequestTaxAmount({ isASAPSubmitBetaEnabled: boolean; parentReportNextStep: OnyxEntry; delegateAccountID: number | undefined; + reportPolicyTags: OnyxEntry; isTrackIntentUser: boolean | undefined; }) { const transactionChanges = { @@ -875,8 +877,7 @@ function updateMoneyRequestTaxAmount({ transactionChanges, policy, policyTagList, - // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - reportPolicyTags: getPolicyTagsData(parentReport?.policyID), + reportPolicyTags, policyCategories, currentUserAccountIDParam, currentUserEmailParam, diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx index e34dfd96900c..05f582dc2be0 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx @@ -73,6 +73,7 @@ function IOURequestStepTaxAmountPage({ const [splitDraftTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.SPLIT_TRANSACTION_DRAFT}${transactionID}`); const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(report?.parentReportID)}`); const [parentReportNextStep] = useOnyx(`${ONYXKEYS.COLLECTION.NEXT_STEP}${getNonEmptyStringOnyxID(report?.parentReportID)}`); + const [reportPolicyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${getNonEmptyStringOnyxID(parentReport?.policyID)}`); const [iouReportOwnerLogin] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(parentReport?.ownerAccountID)}); const [isTrackIntentUser] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED, {selector: isTrackIntentUserSelector}); @@ -142,6 +143,7 @@ function IOURequestStepTaxAmountPage({ isASAPSubmitBetaEnabled, parentReportNextStep, delegateAccountID, + reportPolicyTags, isTrackIntentUser, }); saveAndNavigateBack();