Skip to content

Commit 38d880b

Browse files
committed
add invoicing pricing to 0 according to Expensify#65834 (comment)
1 parent 4a89714 commit 38d880b

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

src/CONST/index.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,67 +3343,75 @@ const CONST = {
33433343
TYPE: {
33443344
ANNUAL: 'yearly2018',
33453345
PAY_PER_USE: 'monthly2018',
3346+
INVOICING: 'invoicing2018',
33463347
},
33473348
},
33483349

3349-
// There is no pricing for invoicing subscription type, so we need to define a seperate constant for it
3350-
INVOICING_SUBSCRIPTION_TYPE: 'invoicing2018',
3351-
33523350
get SUBSCRIPTION_PRICES() {
33533351
return {
33543352
[this.PAYMENT_CARD_CURRENCY.USD]: {
33553353
[this.POLICY.TYPE.CORPORATE]: {
33563354
[this.SUBSCRIPTION.TYPE.ANNUAL]: 900,
33573355
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1800,
3356+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33583357
},
33593358
[this.POLICY.TYPE.TEAM]: {
33603359
[this.SUBSCRIPTION.TYPE.ANNUAL]: 500,
33613360
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1000,
33623361
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 500,
3362+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33633363
},
33643364
},
33653365
[this.PAYMENT_CARD_CURRENCY.AUD]: {
33663366
[this.POLICY.TYPE.CORPORATE]: {
33673367
[this.SUBSCRIPTION.TYPE.ANNUAL]: 1500,
33683368
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 3000,
3369+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33693370
},
33703371
[this.POLICY.TYPE.TEAM]: {
33713372
[this.SUBSCRIPTION.TYPE.ANNUAL]: 700,
33723373
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1400,
33733374
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 800,
3375+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33743376
},
33753377
},
33763378
[this.PAYMENT_CARD_CURRENCY.GBP]: {
33773379
[this.POLICY.TYPE.CORPORATE]: {
33783380
[this.SUBSCRIPTION.TYPE.ANNUAL]: 700,
33793381
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1400,
3382+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33803383
},
33813384
[this.POLICY.TYPE.TEAM]: {
33823385
[this.SUBSCRIPTION.TYPE.ANNUAL]: 400,
33833386
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 800,
33843387
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 500,
3388+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33853389
},
33863390
},
33873391
[this.PAYMENT_CARD_CURRENCY.NZD]: {
33883392
[this.POLICY.TYPE.CORPORATE]: {
33893393
[this.SUBSCRIPTION.TYPE.ANNUAL]: 1600,
33903394
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 3200,
3395+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33913396
},
33923397
[this.POLICY.TYPE.TEAM]: {
33933398
[this.SUBSCRIPTION.TYPE.ANNUAL]: 800,
33943399
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1600,
33953400
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 900,
3401+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
33963402
},
33973403
},
33983404
[this.PAYMENT_CARD_CURRENCY.EUR]: {
33993405
[this.POLICY.TYPE.CORPORATE]: {
34003406
[this.SUBSCRIPTION.TYPE.ANNUAL]: 800,
34013407
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1600,
3408+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
34023409
},
34033410
[this.POLICY.TYPE.TEAM]: {
34043411
[this.SUBSCRIPTION.TYPE.ANNUAL]: 500,
34053412
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1000,
34063413
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 500,
3414+
[this.SUBSCRIPTION.TYPE.INVOICING]: 0,
34073415
},
34083416
},
34093417
};

src/pages/settings/Security/SecuritySettingsPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ function SecuritySettingsPage() {
150150
showLockedAccountModal();
151151
return;
152152
}
153-
// @ts-expect-error - There is no pricing for invoicing subscription type, so we need to define a separate constant for it which is not defined in the subscription type enum
154-
if (privateSubscription?.type === CONST.INVOICING_SUBSCRIPTION_TYPE) {
153+
if (privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.INVOICING) {
155154
Navigation.navigate(
156155
ROUTES.SETTINGS_MERGE_ACCOUNTS_RESULT.getRoute(currentUserPersonalDetails.login ?? '', CONST.MERGE_ACCOUNT_RESULTS.ERR_INVOICING, ROUTES.SETTINGS_SECURITY),
157156
);

0 commit comments

Comments
 (0)