Skip to content

Commit

Permalink
Merge pull request #41006 from Expensify/hayata-do-not-show-tax-optio…
Browse files Browse the repository at this point in the history
…n-for-non-us-entity

Show tax option only for non-US entities
  • Loading branch information
aldo-expensify authored Apr 25, 2024
2 parents 9ea868b + 8162226 commit f275f3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/pages/workspace/WorkspaceMoreFeaturesPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {useFocusEffect} from '@react-navigation/native';
import type {StackScreenProps} from '@react-navigation/stack';
import {CONST} from 'expensify-common/lib/CONST';
import React, {useCallback} from 'react';
import {View} from 'react-native';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
Expand Down Expand Up @@ -101,7 +102,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
titleTranslationKey: 'workspace.moreFeatures.taxes.title',
subtitleTranslationKey: 'workspace.moreFeatures.taxes.subtitle',
isActive: (policy?.tax?.trackingEnabled ?? false) || isSyncTaxEnabled,
disabled: isSyncTaxEnabled,
disabled: isSyncTaxEnabled || policy?.connections?.quickbooksOnline.data.country === CONST.COUNTRY.US,
pendingAction: policy?.pendingFields?.tax,
action: (isEnabled: boolean) => {
Policy.enablePolicyTaxes(policy?.id ?? '', isEnabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,17 @@ function QuickbooksImportPage({policy}: WithPolicyProps) {
title: syncLocations,
pendingAction: pendingFields?.syncLocations,
},
{
];

if (policy?.connections?.quickbooksOnline.data.country !== CONST.COUNTRY.US) {
sections.push({
description: translate('workspace.qbo.taxes'),
action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_TAXES.getRoute(policyID)),
hasError: Boolean(policy?.errors?.syncTaxes),
title: syncTaxes,
pendingAction: pendingFields?.syncTaxes,
},
];
});
}

return (
<AdminPolicyAccessOrNotFoundWrapper policyID={policyID}>
Expand Down

0 comments on commit f275f3d

Please sign in to comment.