Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into new-places-api-support
Browse files Browse the repository at this point in the history
  • Loading branch information
rojiphil authored Sep 29, 2024
2 parents 9a75de7 + 3047c1b commit 0e52dc9
Show file tree
Hide file tree
Showing 105 changed files with 1,481 additions and 717 deletions.
34 changes: 34 additions & 0 deletions .github/scripts/verifyDeploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

ENV="$1"
EXPECTED_VERSION="$2"

BASE_URL=""
if [[ "$ENV" == 'staging' ]]; then
BASE_URL='https://staging.new.expensify.com'
else
BASE_URL='https://new.expensify.com'
fi

sleep 5
ATTEMPT=0
MAX_ATTEMPTS=10
while [[ $ATTEMPT -lt $MAX_ATTEMPTS ]]; do
((ATTEMPT++))

echo "Attempt $ATTEMPT: Checking deployed version..."
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout "$BASE_URL"/version.json | jq -r '.version')"

if [[ "$EXPECTED_VERSION" == "$DOWNLOADED_VERSION" ]]; then
echo "Success: Deployed version matches local version: $DOWNLOADED_VERSION"
exit 0
fi

if [[ $ATTEMPT -lt $MAX_ATTEMPTS ]]; then
echo "Version mismatch, found $DOWNLOADED_VERSION. Retrying in 5 seconds..."
sleep 5
fi
done

echo "Error: Deployed version did not match local version after $MAX_ATTEMPTS attempts. Something went wrong..."
exit 1
30 changes: 11 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,23 +386,11 @@ jobs:

- name: Verify staging deploy
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: |
sleep 5
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://staging.new.expensify.com/version.json | jq -r '.version')"
if [[ '${{ needs.prep.outputs.APP_VERSION }}' != "$DOWNLOADED_VERSION" ]]; then
echo "Error: deployed version $DOWNLOADED_VERSION does not match local version ${{ needs.prep.outputs.APP_VERSION }}. Something went wrong..."
exit 1
fi
run: ./.github/scripts/verifyDeploy.sh staging ${{ needs.prep.outputs.APP_VERSION }}

- name: Verify production deploy
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: |
sleep 5
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://new.expensify.com/version.json | jq -r '.version')"
if [[ '${{ needs.prep.outputs.APP_VERSION }}' != "$DOWNLOADED_VERSION" ]]; then
echo "Error: deployed version $DOWNLOADED_VERSION does not match local version ${{ needs.prep.outputs.APP_VERSION }}. Something went wrong..."
exit 1
fi
run: ./.github/scripts/verifyDeploy.sh production ${{ needs.prep.outputs.APP_VERSION }}

- name: Upload web sourcemaps artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -507,11 +495,13 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}

- name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name
continue-on-error: true
run: |
mv ./desktop-staging-sourcemaps-artifact/merged-source-map.js.map ./desktop-staging-sourcemaps-artifact/desktop-staging-merged-source-map.js.map
mv ./web-staging-sourcemaps-artifact/merged-source-map.js.map ./web-staging-sourcemaps-artifact/web-staging-merged-source-map.js.map
- name: Upload artifacts to GitHub Release
continue-on-error: true
run: |
gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --clobber \
./android-sourcemaps-artifact/index.android.bundle.map#android-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \
Expand Down Expand Up @@ -552,11 +542,6 @@ jobs:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4

- name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name
run: |
mv ./desktop-sourcemaps-artifact/merged-source-map.js.map ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map
mv ./web-sourcemaps-artifact/merged-source-map.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map
- name: 🚀 Edit the release to be no longer a prerelease 🚀
run: |
LATEST_RELEASE="$(gh release list --repo ${{ github.repository }} --exclude-pre-releases --json tagName,isLatest --jq '.[] | select(.isLatest) | .tagName')"
Expand All @@ -565,7 +550,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name
continue-on-error: true
run: |
mv ./desktop-sourcemaps-artifact/merged-source-map.js.map ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map
mv ./web-sourcemaps-artifact/merged-source-map.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map
- name: Upload artifacts to GitHub Release
continue-on-error: true
run: |
gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --clobber \
./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/deployNewHelp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Deploy New Help Site

on:
# Run on any push to main that has changes to the help directory
# TEST: Verify Cloudflare picks this up even if not run when merged to main
# push:
# branches:
# - main
# paths:
# - 'help/**'

# Run on any pull request (except PRs against staging or production) that has changes to the help directory
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- 'help/**'

# Run on any manual trigger
workflow_dispatch:

# Allow only one concurrent deployment
concurrency:
group: "newhelp"
cancel-in-progress: false

jobs:
build:
env:
IS_PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# Set up Ruby and run bundle install inside the /help directory
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./help

- name: Build Jekyll site
run: bundle exec jekyll build --source ./ --destination ./_site
working-directory: ./help # Ensure Jekyll is building the site in /help

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: deploy
if: env.IS_PR_FROM_FORK != 'true'
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: newhelp
directory: ./help/_site # Deploy the built site

- name: Setup Cloudflare CLI
if: env.IS_PR_FROM_FORK != 'true'
run: pip3 install cloudflare==2.19.0

- name: Purge Cloudflare cache
if: env.IS_PR_FROM_FORK != 'true'
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["newhelp.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

- name: Leave a comment on the PR
uses: actions-cool/[email protected]
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }}
with:
token: ${{ github.token }}
body: ${{ format('A preview of your New Help changes have been deployed to {0} :zap:️', steps.deploy.outputs.alias) }}

2 changes: 1 addition & 1 deletion .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Process new code merged to main
on:
push:
branches: [main]
paths-ignore: [docs/**, contributingGuides/**, jest/**, tests/**]
paths-ignore: [docs/**, help/**, contributingGuides/**, jest/**, tests/**]

jobs:
typecheck:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh']
paths-ignore: [docs/**, help/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh']

jobs:
perf-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sendReassurePerfData.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Send Reassure Performance Tests to Graphite
on:
push:
branches: [main]
paths-ignore: [docs/**, contributingGuides/**, jest/**]
paths-ignore: [docs/**, help/**, contributingGuides/**, jest/**]

jobs:
perf-tests:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package-lock.json
*.css
*.scss
*.md
*.markdown
# We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports
src/libs/E2E/reactNativeLaunchingTest.ts
# Temporary while we keep react-compiler in our repo
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009004004
versionName "9.0.40-4"
versionCode 1009004102
versionName "9.0.41-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
Original file line number Diff line number Diff line change
@@ -1,9 +1,76 @@
---
title: Configure Quickbooks Online
description: Coming Soon
description: Configure your QuickBooks Online connection with Expensify
---

# FAQ
Once you've set up your QuickBooks Online connection, you'll be able to configure your import and export settings.

# Step 1: Configure import settings

The following steps help you determine how data will be imported from QuickBooks Online to Expensify.

<ol type="a">
<li>Under the Accounting settings for your workspace, click Import under the QuickBooks Online connection.</li>
<li>Review each of the following import settings:</li>
<ul>
<li><b>Chart of accounts</b>: The chart of accounts are automatically imported from QuickBooks Online as categories. This cannot be amended.</li>
<li><b>Classes</b>: Choose whether to import classes, which will be shown in Expensify as tags for expense-level coding.</li>
<li><b>Customers/projects</b>: Choose whether to import customers/projects, which will be shown in Expensify as tags for expense-level coding.</li>
<li><b>Locations</b>: Choose whether to import locations, which will be shown in Expensify as tags for expense-level coding.</li>
{% include info.html %}
As Locations are only configurable as tags, you cannot export expense reports as vendor bills or checks to QuickBooks Online. To unlock these export options, either disable locations import or upgrade to the Control Plan to export locations encoded as a report field.
{% include end-info.html %}
<li><b>Taxes</b>: Choose whether to import tax rates and defaults.</li>
</ul>
</ol>

# Step 2: Configure export settings

The following steps help you determine how data will be exported from Expensify to QuickBooks Online.

<ol type="a">
<li>Under the Accounting settings for your workspace, click Export under the QuickBooks Online connection.</li>
<li>Review each of the following export settings:</li>
<ul>
<li><b>Preferred Exporter</b>: Choose whether to assign a Workspace Admin as the Preferred Exporter. Once selected, the Preferred Exporter automatically receives reports for export in their account to help automate the exporting process.</li>

{% include info.html %}
* Other Workspace Admins will still be able to export to QuickBooks Online.
* If you set different export accounts for individual company cards under your domain settings, then your Preferred Exporter must be a Domain Admin.
{% include end-info.html %}

<li><b>Date</b>: Choose whether to use the date of last expense, export date, or submitted date.</li>
<li><b>Export Out-of-Pocket Expenses as</b>: Select whether out-of-pocket expenses will be exported as a check, journal entry, or vendor bill.</li>

{% include info.html %}
These settings may vary based on whether tax is enabled for your workspace.
* If tax is not enabled on the workspace, you’ll also select the Accounts Payable/AP.
* If tax is enabled on the workspace, journal entry will not be available as an option. If you select the journal entries option first and later enable tax on the workspace, you will see a red dot and an error message under the “Export Out-of-Pocket Expenses as” options. To resolve this error, you must change your export option to vendor bill or check to successfully code and export expense reports.
{% include end-info.html %}

<li><b>Invoices</b>: Select the QuickBooks Online invoice account that invoices will be exported to.</li>
<li><b>Export as</b>: Select whether company cards export to QuickBooks Online as a credit card (the default), debit card, or vendor bill. Then select the account they will export to.</li>
<li>If you select vendor bill, you’ll also select the accounts payable account that vendor bills will be created from, as well as whether to set a default vendor for credit card transactions upon export. If this option is enabled, you will select the vendor that all credit card transactions will be applied to.</li>
</ul>
</ol>

# Step 3: Configure advanced settings

The following steps help you determine the advanced settings for your connection, like auto-sync and employee invitation settings.

<ol type="a">
<li>Under the Accounting settings for your workspace, click Advanced under the QuickBooks Online connection.</li>
<li>Select an option for each of the following settings:</li>
<ul>
<li><b>Auto-sync</b>: Choose whether to enable QuickBooks Online to automatically communicate changes with Expensify to ensure that the data shared between the two systems is up-to-date. New report approvals/reimbursements will be synced during the next auto-sync period.</li>
<li><b>Invite Employees</b>: Choose whether to enable Expensify to import employee records from QuickBooks Online and invite them to this workspace.</li>
<li><b>Automatically Create Entities</b>: Choose whether to enable Expensify to automatically create vendors and customers in QuickBooks Online if a matching vendor or customer does not exist.</li>
<li><b>Sync Reimbursed Reports</b>: Choose whether to enable report syncing for reimbursed expenses. If enabled, all reports that are marked as Paid in QuickBooks Online will also show in Expensify as Paid. If enabled, you must also select the QuickBooks Online account that reimbursements are coming out of, and Expensify will automatically create the payment in QuickBooks Online.</li>
<li><b>Invoice Collection Account</b>: Select the invoice collection account that you want invoices to appear under once the invoice is marked as paid.</li>
</ul>
</ol>

{% include faq-begin.md %}

## How do I know if a report is successfully exported to QuickBooks Online?

Expand All @@ -22,3 +89,5 @@ When an admin manually exports a report, Expensify will notify them if the repor
- If a report has been exported and marked as paid in QuickBooks Online, it will be automatically marked as reimbursed in Expensify during the next sync.

Reports that have yet to be exported to QuickBooks Online won’t be automatically exported.

{% include faq-end.md %}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ To pay an invoice,

You can also view all unpaid invoices by searching for the sender’s email or phone number on the left-hand side of the app. The invoices waiting for your payment will have a green dot.

![Click Pay Button on the Invoice]({{site.url}}/assets/images/ExpensifyHelp-Invoice-1.png){:width="100%"}

{% include faq-begin.md %}

**Can someone else pay an invoice besides the person who received it?**
Expand Down
12 changes: 12 additions & 0 deletions docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ Only workspace admins can send invoices. Invoices can be sent directly from Expe

{% include end-selector.html %}

![Go to Account Settings click Workspace]({{site.url}}/assets/images/invoices_01.png){:width="100%"}

![Click More Features for the workspace and enable Invoices]({{site.url}}/assets/images/invoices_02.png){:width="100%"}

![Click the green button Send Invoice]({{site.url}}/assets/images/invoices_03.png){:width="100%"}

![Enter Invoice amount]({{site.url}}/assets/images/invoices_04.png){:width="100%"}

![Choose a recipient]({{site.url}}/assets/images/invoices_05.png){:width="100%"}

![Add Invoice details and Send Invoice]({{site.url}}/assets/images/invoices_06.png){:width="100%"}

# Receive invoice payment

If you have not [connected a business bank account](https://help.expensify.com/articles/new-expensify/expenses-&-payments/Connect-a-Business-Bank-Account) to receive invoice payments, you will see an **Invoice balance** in your [Wallet](https://help.expensify.com/articles/new-expensify/expenses-&-payments/Set-up-your-wallet). Expensify will automatically transfer these invoice payments once a business bank account is connected.
Expand Down
5 changes: 5 additions & 0 deletions help/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
1 change: 1 addition & 0 deletions help/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.4
25 changes: 25 additions & 0 deletions help/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
19 changes: 19 additions & 0 deletions help/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
source "https://rubygems.org"

gem "jekyll", "~> 4.3.4"
gem "minima", "~> 2.5"
gem "nokogiri"

group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
end

# If using tzinfo-data for timezone support, ensure it's bundled for relevant platforms
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

gem "wdm", "~> 0.1", platforms: [:mingw, :x64_mingw, :mswin]
gem "http_parser.rb", "~> 0.6.0", platforms: [:jruby]

Loading

0 comments on commit 0e52dc9

Please sign in to comment.