Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into p…
Browse files Browse the repository at this point in the history
…olish/dupe-detection-confirmation
  • Loading branch information
kubabutkiewicz committed Jul 24, 2024
2 parents bee9265 + 1084706 commit dce9b81
Show file tree
Hide file tree
Showing 100 changed files with 1,429 additions and 1,115 deletions.
11 changes: 10 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ const restrictedImportPaths = [
"For 'ExpensiMark', please use '@libs/Parser' instead.",
].join('\n'),
},
{
name: 'lodash/memoize',
message: "Please use '@src/libs/memoize' instead.",
},
{
name: 'lodash',
importNames: ['memoize'],
message: "Please use '@src/libs/memoize' instead.",
},
];

const restrictedImportPatterns = [
Expand Down Expand Up @@ -97,7 +106,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:you-dont-need-lodash-underscore/all',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler'],
ignorePatterns: ['lib/**'],
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Archive desktop sourcemaps
uses: actions/upload-artifact@v3
with:
name: desktop-sourcemap-${{ github.ref_name }}
path: desktop/dist/www/merged-source-map.js.map

iOS:
name: Build and deploy iOS
needs: validateActor
Expand Down Expand Up @@ -354,12 +348,6 @@ jobs:
env:
S3_URL: s3://${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging-' }}expensify-cash

- name: Archive web sourcemaps
uses: actions/upload-artifact@v3
with:
name: web-sourcemap-${{ github.ref_name }}
path: dist/merged-source-map.js.map

- name: Purge Cloudflare cache
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging.' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,19 @@ Within Xcode head to the build phase - `Bundle React Native code and images`.
```jsx
npm i && npm run pod-install
```
4. Depending on the platform you are targeting, run your Android/iOS app in production mode.
5. Upon completion, the generated source map can be found at:
7. Depending on the platform you are targeting, run your Android/iOS app in production mode.
8. Upon completion, the generated source map can be found at:
Android: `android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map`
IOS: `main.jsbundle.map`
web: `dist/merged-source-map.js.map`
### Recording a Trace:
1. Ensure you have generated the source map as outlined above.
2. Launch the app in production mode.
3. Navigate to the feature you wish to profile.
4. Initiate the profiling session by tapping with four fingers (on mobile) or `cmd+d` (on web) to open the menu and selecting **`Use Profiling`**.
5. Close the menu and interact with the app.
6. After completing your interactions, tap with four fingers or `cmd+d` again and select to stop profiling.
7. You will be presented with a **`Share`** option to export the trace, which includes a trace file (`Profile<app version>.cpuprofile`) and build info (`AppInfo<app version>.json`).
2. Navigate to the feature you wish to profile.
3. Initiate the profiling session by tapping with four fingers to open the menu and selecting **`Use Profiling`**.
4. Close the menu and interact with the app.
5. After completing your interactions, tap with four fingers again and select to stop profiling.
6. You will be presented with a **`Share`** option to export the trace, which includes a trace file (`Profile<app version>.cpuprofile`) and build info (`AppInfo<app version>.json`).
Build info:
```jsx
Expand All @@ -266,7 +265,6 @@ Build info:
4. Use the following commands to symbolicate the trace for Android and iOS, respectively:
Android: `npm run symbolicate-release:android`
IOS: `npm run symbolicate-release:ios`
web: `npm run symbolicate-release:web`
5. A new file named `Profile_trace_for_<app version>-converted.json` will appear in your project's root folder.
6. Open this file in your tool of choice:
- SpeedScope ([https://www.speedscope.app](https://www.speedscope.app/))
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009001100
versionName "9.0.11-0"
versionCode 1009001102
versionName "9.0.11-2"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
4 changes: 0 additions & 4 deletions config/webpack/webpack.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ const getConfiguration = (environment: Environment): Promise<Configuration> =>
cert: path.join(__dirname, 'certificate.pem'),
},
},
headers: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'Document-Policy': 'js-profiling',
},
},
plugins: [
new DefinePlugin({
Expand Down
106 changes: 0 additions & 106 deletions desktop/electron-serve.ts

This file was deleted.

2 changes: 1 addition & 1 deletion desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {BrowserView, MenuItem, MenuItemConstructorOptions, WebContents, Web
import contextMenu from 'electron-context-menu';
import log from 'electron-log';
import type {ElectronLog} from 'electron-log';
import serve from 'electron-serve';
import {autoUpdater} from 'electron-updater';
import {machineId} from 'node-machine-id';
import checkForUpdates from '@libs/checkForUpdates';
Expand All @@ -13,7 +14,6 @@ import type {TranslationPaths} from '@src/languages/types';
import type PlatformSpecificUpdater from '@src/setup/platformSetup/types';
import type {Locale} from '@src/types/onyx';
import type {CreateDownloadQueueModule, DownloadItem} from './createDownloadQueue';
import serve from './electron-serve';
import ELECTRON_EVENTS from './ELECTRON_EVENTS';

const createDownloadQueue = require<CreateDownloadQueueModule>('./createDownloadQueue').default;
Expand Down
17 changes: 17 additions & 0 deletions desktop/package-lock.json

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

1 change: 1 addition & 0 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependencies": {
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.8",
"electron-serve": "^1.3.0",
"electron-updater": "^6.2.1",
"node-machine-id": "^1.1.12"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,91 @@
---
title: Configure Certinia
description: Configure Certinia
description: Configure Certinia's export, coding, and advanced settings.
order: 2
---
After Certinia and Expensify are connected, head to **Settings > Workspaces > [Workspace Name] > Connections > Certinia > Configure** to configure the export, coding, and advanced settings for the connection.

# Coming soon
# Step 1: Configure Export Settings
## Preferred Exporter
The preferred exporter is the user who will be the main exporter of reports. This person will receive the notifications for errors.

## Payable Invoice Status and Date
Reports can be exported as Complete or In Progress, using the date of last expense, submitted date, or exported date.

## Reimbursable and non-reimbursable exports
Both reimbursable and non-reimbursable reports are exported as payable invoices (FFA) or expense reports (PSA/SRP). If you have both Reimbursable and Non-Reimbursable expenses on a single report, Expensify will create a separate payable invoice/expense report for each type.

## Default Vendor (FFA)
Choose from the full list of vendors from your Certinia FFA account. The amount will be applied to the non-reimbursable payable invoices.

# Step 2: Configure Coding Settings
## Company
Select which FinancialForce company to import from/export to.

## Chart of Accounts (FFA)
Prepaid Expense Type and Profit & Loss accounts are imported to be used as categories on each expense.

## Expense Type GLA Mappings (PSA/SRP)
Your Expense Type GLA Mappings are enabled in Expensify to use as categories on each expense when using both PSA and SRP; however, PSA will not import or export categories, while SRP will.

## Dimensions (FFA)
We import four dimension levels and each has three options to select from:

* Do not map: FinancialForce defaults will apply to the payable invoice, without importing it into Expensify
* Tags: These are shown in the Tag section of your workspace, and employees can select them on each expense created
* Report fields: These will show in the Reports section of your workspace. Employees can select one to be applied at the header level, i.e., the entire report.

## Projects, Assignments, or Projects & Assignments (PSA/SRP)
These can be imported as tags with **Milestones** being optional. When selecting to import only projects, we will derive the account from the project. If an assignment is selected, we will derive both the account and project from the assignment.

**Note:** If you are using a project without an assignment, the box **Allow Expenses Without Assignment** must be checked on the project in FinancialForce.

## Tax
Import tax rates from Certinia to apply to expenses.

# Step 3: Configure Advanced Settings
## Auto Sync
Auto Sync in Certinia performs daily updates to your coding. Additionally, it automatically exports reports after they receive final approval. For Non-Reimbursable expenses, syncing happens immediately upon final approval of the report. In the case of Reimbursable expenses, syncing occurs as soon as the report is reimbursed or marked as reimbursed.

## Export tax as non-billable
When exporting Billable expenses, this dictates whether you will also bill the tax component to your clients/customers.

## Multi-Currency in Certinia PSA/SRP
When exporting to Certinia PSA/SRP, if employees are submitting expenses in more than one original currency, you may see up to three different currencies on the expense report in Certinia.
* Summary Total Reimbursement Amount: this currency is derived from the currency of the project selected on the expense.
* Amount field on the Expense line: this currency is derived from the Expensify workspace default report currency.
* Reimbursable Amount on the Expense line: this currency is derived from the currency of the resource with an email matching the report submitter.

{% include faq-begin.md %}

## What happens if the report can’t be exported to Certinia?

The following happens if a report isn't exported:
- The preferred exporter will receive an email outlining the issue and any specific error messages
- Any error messages preventing the export from taking place will be recorded in the report’s history
- The report will be listed in the exporter’s Expensify Inbox as awaiting export.

## If I enable Auto Sync, what happens to existing approved and reimbursed reports?

Enabling Auto-Sync afterward won't affect existing approved or reimbursed reports. For any approved reports that haven't been exported to Certinia, you'll need to either manually export them or mark them as manually entered.

## How do I export tax?

Tax rates are created in Expensify through the tax tracking feature under **Settings** > **Workspaces** > **Groups** > _[Workspace Name]_ > **Tax**. We export the tax amount calculated on the expenses.

## How do reports map to Payable Invoices in Certinia FFA?

Reports map to FFA as follows:
- Account Name - Account associated with Expensify submitter’s email address
- Reference 1 - Report URL
- Invoice Description - Report title

## How do reports map to Expense Reports in Certinia PSA/SRP?

Reports map to PSA/SRP as follows:
- Expense report name - Report title
- Resource - User associated with Expensify submitter’s email address
- Description - Report URL
- Approver - Expensify report approver

{% include faq-end.md %}
Loading

0 comments on commit dce9b81

Please sign in to comment.