Skip to content

Commit

Permalink
Merge pull request #44952 from Expensify/lucien/fix-mobile-qbo-taxes
Browse files Browse the repository at this point in the history
Fix disconnect QBO on native devices
  • Loading branch information
bondydaa authored Jul 9, 2024
2 parents 932e657 + f3774aa commit 31a20b5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import useNetwork from '@hooks/useNetwork';
import useThemeStyles from '@hooks/useThemeStyles';
import {removePolicyConnection} from '@libs/actions/connections';
import getQuickBooksOnlineSetupLink from '@libs/actions/connections/QuickBooksOnline';
import * as PolicyAction from '@userActions/Policy/Policy';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Session} from '@src/types/onyx';
Expand Down Expand Up @@ -49,6 +50,8 @@ function ConnectToQuickbooksOnlineButton({
setIsDisconnectModalOpen(true);
return;
}
// Since QBO doesn't support Taxes, we should disable them from the LHN when connecting to QBO
PolicyAction.enablePolicyTaxes(policyID, false);
setWebViewOpen(true);
}}
text={translate('workspace.accounting.setup')}
Expand All @@ -59,6 +62,8 @@ function ConnectToQuickbooksOnlineButton({
{shouldDisconnectIntegrationBeforeConnecting && integrationToDisconnect && isDisconnectModalOpen && (
<AccountingConnectionConfirmationModal
onConfirm={() => {
// Since QBO doesn't support Taxes, we should disable them from the LHN when connecting to QBO
PolicyAction.enablePolicyTaxes(policyID, false);
removePolicyConnection(policyID, integrationToDisconnect);
setIsDisconnectModalOpen(false);
setWebViewOpen(true);
Expand Down

0 comments on commit 31a20b5

Please sign in to comment.