Skip to content

Commit

Permalink
Merge branch 'main' into Rory-AutomatedThemeHookMigration
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Nov 15, 2023
2 parents e06e562 + 0b0518d commit 9ce4246
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 105 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths: ['**.ts', '**.tsx', 'package.json', 'package-lock.json', 'tsconfig.json']
paths: ['**.js', '**.ts', '**.tsx', 'package.json', 'package-lock.json', 'tsconfig.json']

jobs:
typecheck:
Expand All @@ -20,3 +20,12 @@ jobs:
run: npm run typecheck
env:
CI: true

- name: Check for new JavaScript files
run: |
git fetch origin main --no-tags --depth=1
count_new_js=$(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/libs/*.js' 'src/hooks/*.js' 'src/styles/*.js' 'src/languages/*.js' | wc -l)
if [ "$count_new_js" -gt "0" ]; then
echo "ERROR: Found new JavaScript files in the /src/libs, /src/hooks, /src/styles, or /src/languages directories; use TypeScript instead."
exit 1
fi
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001039900
versionName "1.3.99-0"
versionCode 1001040000
versionName "1.4.0-0"
}

flavorDimensions "default"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,91 @@
---
title: Connect Company Cards
description: Connect Company Cards
title: Company-Card-Settings.md
description: Company card settings
---
## Resource Coming Soon!
# Overview
Once you’ve imported your company cards via commercial card feed, direct bank feed, or CSV import, the next step is to configure the cards’ settings.

As a Domain Admin, you can access the company card settings by navigating to Settings > Domains> Domain Name > Company Card > Settings.

If you cannot access Domains, you will need to request Domain Admin access my the Domain Admin.

# How to configure company card settings
You can manage company cards and set and adjust the settings from the Domains page by navigating to Settings > Domains > [Domain name] > Settings

## Reimbursable preference

You can control how your employees' company card expenses are flagged for reimbursement:

Force Yes: All expenses will be marked as reimbursable, and employees cannot change this setting.
Force No: All expenses will be marked as non-reimbursable, and employees cannot change this setting.
Do Not Force: Expenses will default to either reimbursable or non-reimbursable (your choice), but employees can adjust if necessary.

## Liability type

Choose the liability type that suits your needs:

Corporate Liability: Users cannot delete company card expenses.
Personal Liability: Users are allowed to delete company card expenses.

If you update the settings on an existing company card feed, the changes will apply to expenses imported after the date the setting is saved. The update will not affect previously imported expenses.

## Preferred policy

Setting a preferred policy for a company card feed will ensure that the imported transactions are added to a report on the policy you set. This setting is useful when members are on multiple policies and need to ensure their company card expenses are reported to a particular policy.

# How to use Scheduled Submit with company cards
All expenses must be placed on a report if they need to be approved; with Scheduled Submit, you no longer need to worry about the arduous task of employees creating their expenses, adding them to a report, and submitting them manually. All they need to do is SmartScan their receipts and Concierge will take care of the rest, on a variety of schedules that you can set according to your preferences!

Concierge won't automatically submit expenses on reports that have Expense Violations. Instead, these expenses will be moved to a new report, creating an additional report for the current reporting period.

An employee can add comments in the Expense Comment field or at the bottom of the report to clarify any details.

## Enable Scheduled Submit
Scheduled Submit is enabled in the Group Policy by navigating to Settings > Policies > Group > Policy Name > Reports > Scheduled Submit
Use the toggle to enable Scheduled Submit
Choose your desired frequency

If Scheduled Submit is disabled on the group policy level (or set to a manual frequency), and you have noticed expense reports are still automatically submitted to the group policy, it's likely Scheduled Submit is enabled on the user’s Individual Policy settings.

# How to connect company cards to an accounting integration

If you're using a connected accounting system such as NetSuite, Xero, Intacct, Quickbooks Desktop, or QuickBooks Online, you can also connect the card to export to a specific credit card GL account. First, connect the card itself, and once completed, follow the steps below:
Go to Settings > Domains > Domain name > Company Cards
Click Edit Exports on the right-hand side of the card table and select the GL account you want to export expenses to
You're all done. After the account is set, exported expenses will be mapped to the specific account selected when exported by a Domain Admin.

# How to export company card expenses to a connected accounting integration

## Pooled GL account

To export credit card expenses to a pooled GL account:
Go to Settings > Policies > Group > Policy Name > Connections > Accounting Integrations > Configure
Select Credit Card / Charge Card / Bank Transaction as your Non-reimbursable export option.
Please review the Export Settings page for exporting Expense Reports to NetSuite
Select the Vendor/liability account you want to export all non-reimbursable expenses to.

## Individual GL account

Go to Settings > Domain > Domain name > Company Cards
Click the Export Settings cog to the right-hand side of the card and select the GL account you want to export expenses to.
You're all done! After the account is set, exported expenses will be mapped to the specific account selected.

# Deep Dive
## Identifying company card transactions
When you link your credit cards to Expensify, the transactions will appear in each user's account on the Expenses page as soon as they're posted. You can identify transactions from centrally managed cards by seeing the locked card icon next to them. That icon indicates that they’re company card expenses:
[add image here]

## Importing historical transactions

After a card is connected via direct connection or via Approved! banks, Expensify will import 30-90 days' worth of historical transactions to your account (the timeframe is based on your bank's discretion). Any historical expenses beyond that date range can be imported using the CSV spreadsheet import method.

## Using eReceipts
Expensify eReceipts serve as digital substitutes for paper receipts in your purchase transactions, eliminating the necessity to retain physical receipts or utilize SmartScanning receipts. In the case of Expensify Card transactions, eReceipts are automatically generated for all amounts. For other card programs, eReceipts are specifically generated for purchases amounting to $75 or less, provided the transactions are in USD.
To ensure seamless automatic importation, it's essential to maintain your transactions in US Dollars. Additionally, eReceipts can be directly imported from your bank account. Please be aware that CSV/OFX imported files of bank transactions do not support eReceipts.
It's important to note that eReceipts are not generated for lodging expenses. Moreover, due to incomplete or inaccurate category information from certain banks, there may be instances of invalid eReceipts being generated for hotel purchases. If you choose to re-categorize expenses, a similar situation may arise. It's crucial to remember that our Expensify eReceipt Guarantee excludes coverage for hotel and motel expenses.

# FAQ
## What plan/subscription is required in order to manage corporate cards?
Group Policy (Collect or Control plan only)
## When do my company card transactions import to Expensify?
Credit card transactions are imported to Expensify once they’re posted to the bank account. This usually takes 1-3 business days between the point of purchase and when the transactions populate in your account.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A Workspace admin can see Processing, Approved, and Reimbursed expenses as long
If employees submit expense reports on a workspace where you are not an admin, you will not have visibility into those expenses. Additionally, if an expense is left unreported, a workspace admin will not be able to see that expense until it’s been added to a report.

A Workspace admin can edit the tags and categories on an expense, but if they want to edit the amount, date, or merchant name, the expense will need to be in a Processing state or rejected back to the submitter for changes.
We have more about company card expense reconciliation in this support article.
We have more about company card expense reconciliation in this [support article](https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/company-cards/Reconciliation).

## Can I edit multiple expenses at once?
Yes! Select the expenses you want to edit and click **Edit Multiple**.
Expand Down
67 changes: 0 additions & 67 deletions docs/articles/new-expensify/getting-started/Expensify-Lounge.md

This file was deleted.

4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.99</string>
<string>1.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.99.0</string>
<string>1.4.0.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.99</string>
<string>1.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.99.0</string>
<string>1.4.0.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.99-0",
"version": "1.4.0-0",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
2 changes: 1 addition & 1 deletion src/components/DisplayNames/DisplayNamesTooltipItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import styles from '@styles/styles';
type DisplayNamesTooltipItemProps = {
index?: number;

/** The full title of the DisplayNames component (not split up) */
/** The function to get a distance to shift the tooltip horizontally */
getTooltipShiftX?: (index: number) => number | undefined;

/** The Account ID for the tooltip */
Expand Down
42 changes: 24 additions & 18 deletions src/components/withLocalize.js → src/components/withLocalize.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React, {forwardRef} from 'react';
import React, {ComponentType, ForwardedRef, forwardRef, ReactElement, RefAttributes} from 'react';
import getComponentDisplayName from '@libs/getComponentDisplayName';
import {LocaleContext} from './LocaleContextProvider';
import {LocaleContext, LocaleContextProps} from './LocaleContextProvider';

const withLocalizePropTypes = {
/** Returns translated string for given locale and phrase */
Expand Down Expand Up @@ -30,24 +30,30 @@ const withLocalizePropTypes = {
toLocaleDigit: PropTypes.func.isRequired,
};

export default function withLocalize(WrappedComponent) {
const WithLocalize = forwardRef((props, ref) => (
<LocaleContext.Consumer>
{(translateUtils) => (
<WrappedComponent
// eslint-disable-next-line react/jsx-props-no-spreading
{...translateUtils}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={ref}
/>
)}
</LocaleContext.Consumer>
));
type WithLocalizeProps = LocaleContextProps;

export default function withLocalize<TProps extends WithLocalizeProps, TRef>(
WrappedComponent: ComponentType<TProps & RefAttributes<TRef>>,
): (props: Omit<TProps, keyof LocaleContextProps> & React.RefAttributes<TRef>) => ReactElement | null {
function WithLocalize(props: Omit<TProps, keyof WithLocalizeProps>, ref: ForwardedRef<TRef>) {
return (
<LocaleContext.Consumer>
{(translateUtils) => (
<WrappedComponent
// eslint-disable-next-line react/jsx-props-no-spreading
{...translateUtils}
// eslint-disable-next-line react/jsx-props-no-spreading
{...(props as TProps)}
ref={ref}
/>
)}
</LocaleContext.Consumer>
);
}

WithLocalize.displayName = `withLocalize(${getComponentDisplayName(WrappedComponent)})`;

return WithLocalize;
return forwardRef(WithLocalize);
}

export {withLocalizePropTypes};
export type {WithLocalizeProps};
Loading

0 comments on commit 9ce4246

Please sign in to comment.