-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into srikar-moveAllHeaderItemsToOverflow
- Loading branch information
Showing
22 changed files
with
283 additions
and
244 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
docs/articles/expensify-classic/policy-and-domain-settings/Tax.md
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
docs/articles/expensify-classic/policy-and-domain-settings/tax-tracking.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Tax | ||
description: How to track expense taxes | ||
--- | ||
# Overview | ||
Expensify’s tax tracking feature allows you to: | ||
- Add tax names, rates, and codes whether you’re connected to an accounting system or not. | ||
- Enable/disable taxes you’d like to make available to users. | ||
- Set a default tax for Workspace currency expenses and, optionally, another default tax (including exempt) for foreign currency expenses which - will automatically apply to all new expenses. | ||
|
||
# How to Enable Tax Tracking | ||
Tax tracking can be enabled in the Tax section of the Workspace settings of any Workspace, whether group or individual. | ||
## If Connected to an Accounting Integration | ||
If your group Workspace is connected to Xero, QuickBooks Online, Sage Intacct, or NetSuite, make sure to first enable tax via the connection configuration page (Settings > Policies > Group > [Workspace Name] > Connections > Configure) and then sync the connection. Your tax rates will be imported from the accounting system and indicated by its logo. | ||
## Not Connected to an Accounting Integration | ||
If your Workspace is not connected to an accounting system, go to Settings > Policies > Group > [Workspace Name] > Tax to enable tax. | ||
|
||
# Tracking Tax by Expense Category | ||
To set a different tax rate for a specific expense type in the Workspace currency, go to Settings > Workspaces > Group > [Workspace Name] > Categories page. Click "Edit Rules" next to the desired category and set the "Category default tax". This will be applied to new expenses, overriding the default Workspace currency tax rate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import React, {useEffect} from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import {View} from 'react-native'; | ||
import styles from '../styles/styles'; | ||
import Navigation from '../libs/Navigation/Navigation'; | ||
import ROUTES from '../ROUTES'; | ||
import useLocalize from '../hooks/useLocalize'; | ||
import MenuItemWithTopDescription from './MenuItemWithTopDescription'; | ||
import FormHelpMessage from './FormHelpMessage'; | ||
|
||
const propTypes = { | ||
/** Form error text. e.g when no country is selected */ | ||
errorText: PropTypes.string, | ||
|
||
/** Callback called when the country changes. */ | ||
onInputChange: PropTypes.func.isRequired, | ||
|
||
/** Current selected country */ | ||
value: PropTypes.string, | ||
|
||
/** inputID used by the Form component */ | ||
// eslint-disable-next-line react/no-unused-prop-types | ||
inputID: PropTypes.string.isRequired, | ||
|
||
/** React ref being forwarded to the MenuItemWithTopDescription */ | ||
forwardedRef: PropTypes.func, | ||
}; | ||
|
||
const defaultProps = { | ||
errorText: '', | ||
value: undefined, | ||
forwardedRef: () => {}, | ||
}; | ||
|
||
function CountrySelector({errorText, value: countryCode, onInputChange, forwardedRef}) { | ||
const {translate} = useLocalize(); | ||
|
||
const title = countryCode ? translate(`allCountries.${countryCode}`) : ''; | ||
const countryTitleDescStyle = title.length === 0 ? styles.textNormal : null; | ||
|
||
useEffect(() => { | ||
// This will cause the form to revalidate and remove any error related to country name | ||
onInputChange(countryCode); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [countryCode]); | ||
|
||
return ( | ||
<View> | ||
<MenuItemWithTopDescription | ||
shouldShowRightIcon | ||
title={title} | ||
ref={forwardedRef} | ||
descriptionTextStyle={countryTitleDescStyle} | ||
description={translate('common.country')} | ||
onPress={() => { | ||
const activeRoute = Navigation.getActiveRoute().replace(/\?.*/, ''); | ||
Navigation.navigate(ROUTES.SETTINGS_PERSONAL_DETAILS_ADDRESS_COUNTRY.getRoute(countryCode, activeRoute)); | ||
}} | ||
/> | ||
<View style={styles.ml5}> | ||
<FormHelpMessage message={errorText} /> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
CountrySelector.propTypes = propTypes; | ||
CountrySelector.defaultProps = defaultProps; | ||
CountrySelector.displayName = 'CountrySelector'; | ||
|
||
export default React.forwardRef((props, ref) => ( | ||
<CountrySelector | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
forwardedRef={ref} | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.