Skip to content

Commit 07a9499

Browse files
committed
Merge branch 'main' into chore/66574-refactor-policy-to-use-useonyx-3
2 parents 211fae2 + 416d6b9 commit 07a9499

File tree

315 files changed

+4685
-1903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

315 files changed

+4685
-1903
lines changed

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"hooks": [
77
{
88
"type": "command",
9-
"command": "FILE=$(jq -r '.tool_input.file_path') && [ -f \"$FILE\" ] && ./node_modules/.bin/prettier --experimental-cli --write --ignore-unknown \"$FILE\""
9+
"command": "FILE=$(jq -r '.tool_input.file_path') && [ -f \"$FILE\" ] && ./node_modules/.bin/prettier --experimental-cli --no-cache --write --ignore-unknown \"$FILE\""
1010
}
1111
]
1212
}

.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import Onyx from 'react-native-onyx';
44
import {SafeAreaProvider} from 'react-native-safe-area-context';
55
import type {Parameters} from 'storybook/internal/types';
6-
import {EnvironmentProvider} from '@components/EnvironmentContext';
6+
import EnvironmentProvider from '@components/EnvironmentContextProvider';
77
import OnyxListItemProvider from '@components/OnyxListItemProvider';
88
import {SearchContextProvider} from '@components/Search/SearchContext';
99
import ComposeProviders from '@src/components/ComposeProviders';

Mobile-Expensify

Lines changed: 87 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,101 @@
11
---
22
title: Merge Expenses
3-
description: Learn how to merge two expenses to eliminate duplicates and simplify your reports.
4-
keywords: [New Expensify, merge expenses, duplicate expenses, SmartScan, manual merge, combine expenses, combine duplicate expenses, merge receipts, expense matching]
3+
description: Learn how to merge duplicate expenses in Expensify, including cash and card transactions, eligibility rules, and step-by-step instructions for web and mobile.
4+
keywords: [merge expenses, duplicate expenses, combine expenses, merge duplicate expenses, merge receipts, SmartScan duplicate, cash expense, card expense, expense matching, fix duplicate expense]
5+
internalScope: Audience is all members. Covers manually merging duplicate expenses and eligibility rules. Does not cover SmartScan automation logic or expense deletion workflows.
56
---
67

78

89
Use merging to resolve duplicates when SmartScan doesn’t catch them. This guide walks you through manually merging two expenses from the expense view or Reports page.
910

1011
# Merge expenses
1112

12-
You can merge two expenses if at least one is a cash expense. You cannot merge two card expenses. Merging is only available for editable expenses (such as those that are unsubmitted or awaiting first-level approval).
13+
If you have duplicate expenses that SmartScan didn’t automatically match, you can manually merge them. Merging helps clean up duplicates and keeps your reports accurate.
1314

14-
## Merging from an individual expense
15+
You can merge:
16+
- Two cash expenses
17+
- One cash expense and one card expense
18+
19+
You cannot merge two card expenses.
20+
21+
---
22+
23+
## Who can merge expenses
24+
25+
You can merge expenses if you have permission to edit both expenses.
26+
27+
- **Submitters** can merge their own:
28+
- Unreported expenses
29+
- Expenses on Draft reports
30+
- Expenses on Outstanding reports
31+
32+
- **Approvers and Workspace Admins** can merge expenses on the same Draft or Outstanding report.
33+
34+
You cannot merge expenses that are fully approved or paid.
35+
36+
---
37+
38+
## What types of expenses can be merged
39+
40+
To merge two expenses, one of the following must be true:
41+
42+
- Both expenses are cash expenses
43+
- One expense is a cash expense and the other is an imported card expense
44+
45+
You cannot merge two imported card expenses.
46+
47+
Note: Merging does not convert expense types.
48+
49+
---
50+
51+
## How to merge duplicate expenses from an individual expense
1552

1653
1. In the navigation tabs (on the left on web, and at the bottom on mobile), select **Reports > Expenses**
17-
2. Tap the expense you'd like to merge from.
18-
3. Tap the **More** button, then select **Merge**.
19-
4. Choose another eligible expense to merge with.
20-
- You can only select one.
21-
- Expenses are sorted by date (newest first).
22-
- If there are no eligible matches, you'll see:
23-
*"You don’t have any expenses that can be merged with this one. [Learn more](#eligible-expenses)."*
24-
5. If only one expense has a receipt, it’s selected automatically. If both do, you’ll be asked to choose.
25-
6. Select the details you want to keep from each expense—like merchant name, amount, or category.
26-
7. Tap **Continue**, then **Confirm** to complete the merge.
54+
2. Click on the expense you want to merge to open it.
55+
3. Choose **More**, then select **Merge**.
56+
4. Choose one eligible expense to merge with.
57+
5. If both expenses have receipts, select which receipt to keep.
58+
6. Choose the details to keep from each expense such as merchant name, date or report.
59+
7. Select **Continue**, then **Merge expenses**.
60+
61+
---
2762

28-
## Eligible expenses for merging
63+
## How to merge duplicate expenses from the Expenses page
2964

30-
To merge two expenses, they must meet all of the following:
65+
Use this method when you already see both duplicate expenses in a list.
3166

32-
- **By type**:
33-
- You can merge a cash expense with another cash expense, or a cash expense with a card expense.
34-
- You cannot merge two card expenses.
67+
1. In the navigation tabs (on the left on web, and at the bottom on mobile), select **Reports > Expenses**
68+
2. Select two expenses to merge.
69+
3. Choose **Selected**, then select **Merge**.
70+
4. If both expenses have receipts, select the one you want to keep.
71+
5. Choose the details to keep from each expense such as merchant name, date or report.
72+
6. Select **Continue**, then **Merge expenses**.
3573

36-
- **By permission**:
37-
- **Submitters** can merge their own expenses (including unreported and in-progress ones).
38-
- **Approvers and Admins** can merge expenses on the same report
74+
---
3975

40-
- **By status**:
41-
- Both expenses must be editable. That includes unreported expenses, or ones on a Draft or Outstanding report that hasn’t yet been approved.
76+
## What happens when expenses are merged
4277

43-
## What happens when you merge?
78+
When you merge expenses:
4479

45-
- One expense is kept, and the details you choose will be used for the final version.
46-
- The other expense is **merged into the final one** and no longer shown separately.
47-
- If one expense is a card transaction, it will always be the one that’s kept.
48-
- If both are cash expenses, the one you started the merge from will be kept.
80+
- One expense becomes the final expense.
81+
- The other expense is merged into it and no longer appears separately.
82+
- The details you selected are applied to the final expense.
4983

50-
## Can I change an expense from cash to credit card?
51-
You can’t change an expense from cash to credit card, or the other way around.
84+
**Additional rules:**
5285

53-
- Expenses imported directly from a connected credit card are always **credit card expenses**.
54-
- Expenses you create manually, or those created from uploaded receipts, are always **cash expenses**.
86+
- If one expense is a card transaction, the card expense is always kept.
87+
- If both expenses are cash expenses, the one you started the merge from is kept.
88+
89+
---
90+
91+
## Can expenses be converted from cash to card?
92+
93+
You can’t change an expense from cash to card, or card to cash.
94+
95+
- Expenses imported directly from a connected credit card are always **card expenses**.
96+
- Expenses you create manually or from uploaded receipts are always **cash expenses**.
97+
98+
---
5599

56100
# FAQ
57101

@@ -61,18 +105,20 @@ No. Only one card expense can be part of a merge. You can merge:
61105
- Two cash expenses
62106
- One cash and one card expense
63107

64-
## What happens to the other expense?
108+
## What happens to the other expense after merging?
65109

66-
It’s merged into the final expense and no longer appears separately. Its details are combined based on what you selected.
110+
The second expense is merged into the final expense and no longer appears separately. The final expense reflects the details you selected during the merge process.
67111

68112
## What if the expenses have the same details?
69113

70-
If there are no differences to resolve, the system automatically keeps the shared values without prompting you.
114+
If there are no differences between the two expenses, Expensify automatically keeps the shared values without prompting you to choose.
115+
116+
## Why is the Merge option not showing?
71117

72-
## Why don’t I see the Merge option?
118+
You won’t see **Merge** if:
73119

74-
Check these conditions:
75-
- You must have permission to edit both expenses.
76-
- At least one expense must be a cash transaction.
77-
- The expenses must be editable (not submitted or fully approved).
120+
- You don’t have permission to edit both expenses.
121+
- Both expenses are card transactions.
122+
- One or both expenses are fully approved or paid.
123+
- The expenses are no longer editable.
78124

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Fringe Benefits
3+
description: How to track your Fringe Benefits
4+
internalScope: Audience is Workspace Admins and Workspace Members. Covers setting up Fringe Benefits Tax tracking, submitting FBT expenses, and exporting FBT data. Does not cover general tag setup, non-FBT payroll codes, or non-FBT CSV reporting.
5+
keywords: [New Expensify, fringe benefits tax, FBT, track fringe benefits, attendee count, workspace tags, CSV export fringe benefits, fringe benefits reporting, payroll code]
6+
---
7+
8+
# How to track Fringe Benefits Tax
9+
10+
If you need to track and report expense data for **Fringe Benefits Tax (FBT)**, Expensify offers a workflow to capture the required information and export it to a spreadsheet.
11+
12+
---
13+
14+
## How to set up Fringe Benefits Tax tracking
15+
16+
This section covers the **one-time Workspace Admin setup** required to enable Fringe Benefits Tax tracking.
17+
18+
## Add attendee count tags for Fringe Benefits Tax
19+
20+
To start tracking FBT, add the following tags to your **Workspace**:
21+
- **Number of Internal Attendees**
22+
- **Number of External Attendees**
23+
24+
These tags **must be named exactly** as written above, without extra spaces.
25+
26+
## How to create attendee count tags for Fringe Benefits Tax
27+
28+
1. Navigate to **Workspaces > [Workspace Name] > Tags**.
29+
2. Create tags with numeric values (for example, **01, 02, 03**) up to your expected maximum number of attendees.
30+
3. These tags can be used alongside existing accounting tags.
31+
32+
For more detailed guidance, see [Configure Tags on a Workspace](https://help.expensify.com/articles/new-expensify/workspaces/Create-expense-tags).
33+
34+
## How to add the Fringe Benefits Tax payroll code
35+
36+
1. Navigate to **Workspaces > [Workspace Name] > Categories**.
37+
2. Select the category you want to track for Fringe Benefits Tax.
38+
3. Add the payroll code **TAG**.
39+
40+
For more detailed guidance, see [Create expense tags](https://help.expensify.com/articles/new-expensify/workspaces/Create-expense-tags).
41+
42+
---
43+
44+
## How to enable the Fringe Benefits Tax workflow
45+
46+
After adding the attendee count tags and payroll code, email **concierge@expensify.com** with the following request:
47+
48+
> **Subject:** Enable Fringe Benefits Tax Workflow
49+
> **Message:** Can you please add the custom workflow/DEW named **FRINGE_BENEFIT_TAX** to my company workspace named **[Workspace Name]**?
50+
51+
Once enabled, expenses coded with **TAG** will require attendee count tags before they can be submitted.
52+
53+
---
54+
55+
## How Workspace Members submit Fringe Benefits Tax expenses
56+
57+
This section applies to **Workspace Members submitting expenses** under Fringe Benefits Tax categories.
58+
59+
- When submitting expenses under **FBT-tracked categories**, both internal and external attendee counts are **required**.
60+
- If attendee counts are missing, the expense **cannot be submitted**.
61+
62+
---
63+
64+
## How Workspace Admins export Fringe Benefits Tax data
65+
66+
This section applies to **Workspace Admins reporting and exporting** Fringe Benefits Tax data.
67+
68+
## How to export Fringe Benefits Tax data using CSV
69+
70+
Before exporting, you must create a custom CSV template and add the formulas needed to capture attendee counts.
71+
72+
**Note:** Creating custom CSV templates is currently only available in Expensify Classic. This limitation applies only to template setup, not to exporting reports.
73+
74+
Add the following formulas to your CSV template:
75+
- `{expense:tag:ntag-3}`**Internal Attendees**
76+
- `{expense:tag:ntag-4}`**External Attendees**
77+
78+
For instructions on creating a custom CSV template, see [Create a custom export template](https://help.expensify.com/articles/expensify-classic/spending-insights/Export-Expenses-And-Reports#create-a-custom-export-template).
79+
80+
Once your template is set up, export expenses using the custom CSV template to capture Fringe Benefit Tax data.
81+
82+
For more detailed guidance on exporting expenses, see [Download via CSV](https://help.expensify.com/articles/new-expensify/reports-and-expenses/Search-and-Download-Expenses#export-as-csv).
83+
84+
## Example of Fringe Benefits Tax expense coding levels
85+
86+
If your Workspace uses multiple coding levels, a Fringe Benefits Tax report may include:
87+
88+
- **GL Code** (Category)
89+
- **Department** (Tag 1)
90+
- **Location** (Tag 2)
91+
- **Number of Internal Attendees** (Tag 3)
92+
- **Number of External Attendees** (Tag 4)
93+
94+
For more details on exporting data, see [Search and download expenses](https://help.expensify.com/articles/new-expensify/reports-and-expenses/Search-and-Download-Expenses#export-as-csv).
95+

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
"shellcheck": "./scripts/shellCheck.sh",
5252
"spell": "cspell --color **/*",
5353
"spell-changed": "cspell --color --no-must-find-files",
54-
"prettier": "./scripts/runPrettier.sh",
55-
"prettier-changed": "prettier --experimental-cli --write --ignore-unknown $(git diff --diff-filter=AMR --name-only origin/main HEAD)",
56-
"prettier-watch": "onchange \"**/*.{js,mjs,ts,tsx}\" -- prettier --experimental-cli --write --ignore-unknown {{changed}}",
54+
"prettier": "prettier --experimental-cli --no-cache --write .",
55+
"prettier-changed": "prettier --experimental-cli --no-cache --write --ignore-unknown $(git diff --diff-filter=AMR --name-only origin/main HEAD)",
56+
"prettier-watch": "onchange \"**/*.{js,mjs,ts,tsx}\" -- prettier --experimental-cli --no-cache --write --ignore-unknown {{changed}}",
5757
"print-version": "echo $npm_package_version",
5858
"storybook": "storybook dev -p 6006",
5959
"storybook-build": "ENV=production storybook build -o dist/docs",

scripts/checkLazyLoading.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ async function main() {
9393
'**/*.config.js',
9494
'**/*.config.mjs',
9595
'**/eslint.config.mjs', // ESLint config itself might reference these for the rule
96+
// Non-component .ts files that can't use hooks — icons are passed in as parameters from callers
97+
'src/libs/ReportUtils.ts',
98+
'src/libs/HeaderUtils.ts',
99+
'src/libs/actions/Task.ts',
100+
'src/libs/OptionsListUtils/index.ts',
101+
'src/hooks/useAvatarMenu.ts',
102+
'src/libs/PersonalDetailOptionsListUtils/index.ts',
96103
];
97104

98105
// Find all TypeScript files in src directory

scripts/runPrettier.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import ComposeProviders from './components/ComposeProviders';
1313
import {CurrentUserPersonalDetailsProvider} from './components/CurrentUserPersonalDetailsProvider';
1414
import CustomStatusBarAndBackground from './components/CustomStatusBarAndBackground';
1515
import CustomStatusBarAndBackgroundContextProvider from './components/CustomStatusBarAndBackground/CustomStatusBarAndBackgroundContextProvider';
16-
import {EnvironmentProvider} from './components/EnvironmentContext';
16+
import EnvironmentProvider from './components/EnvironmentContextProvider';
1717
import ErrorBoundary from './components/ErrorBoundary';
1818
import FullScreenBlockingViewContextProvider from './components/FullScreenBlockingViewContextProvider';
1919
import FullScreenLoaderContextProvider from './components/FullScreenLoaderContext';
@@ -36,8 +36,8 @@ import SidePanelContextProvider from './components/SidePanel/SidePanelContextPro
3636
import SVGDefinitionsProvider from './components/SVGDefinitionsProvider';
3737
import ThemeIllustrationsProvider from './components/ThemeIllustrationsProvider';
3838
import ThemeProvider from './components/ThemeProvider';
39-
import ThemeStylesProvider from './components/ThemeStylesProvider';
40-
import {FullScreenContextProvider} from './components/VideoPlayerContexts/FullScreenContext';
39+
import ThemeStylesProvider from './components/ThemeStylesContextProvider';
40+
import FullScreenContextProvider from './components/VideoPlayerContexts/FullScreenContextProvider';
4141
import {PlaybackContextProvider} from './components/VideoPlayerContexts/PlaybackContext';
4242
import {VideoPopoverMenuContextProvider} from './components/VideoPlayerContexts/VideoPopoverMenuContext';
4343
import {VolumeContextProvider} from './components/VideoPlayerContexts/VolumeContext';

0 commit comments

Comments
 (0)