From 69ae25f1bc97dbe47893134332d94083ea67c944 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Tue, 14 May 2024 06:38:44 +0000 Subject: [PATCH 1/3] Update version to 1.4.73-3 (cherry picked from commit a5bd1f2f7941fd65a5cbf647ac64691cd51b7bc6) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 3335e1b81a76..435d6d60016c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,8 +98,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001047302 - versionName "1.4.73-2" + versionCode 1001047303 + versionName "1.4.73-3" // 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" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index ba1533bf2ec8..e45abc59ece1 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.73.2 + 1.4.73.3 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index d46ad4e59d92..66d09aa9df3c 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.73.2 + 1.4.73.3 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index e9b39bb5851d..cd1703b8ed72 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 1.4.73 CFBundleVersion - 1.4.73.2 + 1.4.73.3 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index d925a74569b7..64d4998ce787 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.73-2", + "version": "1.4.73-3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.73-2", + "version": "1.4.73-3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 672077df553b..8e4960f01783 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.73-2", + "version": "1.4.73-3", "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.", From 718f9b365b57daef221a6aec15492b8951150272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Tue, 14 May 2024 06:36:15 +0200 Subject: [PATCH 2/3] Merge pull request #42064 from ShridharGoel/42407 [CP Staging] Use selected currency when utilising tax rate (cherry picked from commit 2304a1ff258c5f192be0f37cb140cfdc13f4119e) --- src/libs/TransactionUtils.ts | 4 ++-- .../iou/request/step/IOURequestStepTaxAmountPage.tsx | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index ae30d648a6aa..aa9a87404924 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -658,10 +658,10 @@ function getRateID(transaction: OnyxEntry): string | undefined { * Gets the tax code based on selected currency. * Returns policy default tax rate if transaction is in policy default currency, otherwise returns foreign default tax rate */ -function getDefaultTaxCode(policy: OnyxEntry, transaction: OnyxEntry) { +function getDefaultTaxCode(policy: OnyxEntry, transaction: OnyxEntry, currency?: string | undefined) { const defaultExternalID = policy?.taxRates?.defaultExternalID; const foreignTaxDefault = policy?.taxRates?.foreignTaxDefault; - return policy?.outputCurrency === getCurrency(transaction) ? defaultExternalID : foreignTaxDefault; + return policy?.outputCurrency === (currency ?? getCurrency(transaction)) ? defaultExternalID : foreignTaxDefault; } /** diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx index 5a79578cc8ba..808d282fcf86 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx @@ -34,13 +34,13 @@ type IOURequestStepTaxAmountPageProps = IOURequestStepTaxAmountPageOnyxProps & transaction: OnyxEntry; }; -function getTaxAmount(transaction: OnyxEntry, policy: OnyxEntry, isEditing: boolean): number | undefined { +function getTaxAmount(transaction: OnyxEntry, policy: OnyxEntry, currency: string | undefined, isEditing: boolean): number | undefined { if (!transaction?.amount) { return; } const transactionTaxAmount = TransactionUtils.getAmount(transaction); const transactionTaxCode = transaction?.taxCode ?? ''; - const defaultTaxCode = TransactionUtils.getDefaultTaxCode(policy, transaction) ?? ''; + const defaultTaxCode = TransactionUtils.getDefaultTaxCode(policy, transaction, currency) ?? ''; const getTaxValue = (taxCode: string) => TransactionUtils.getTaxValue(policy, transaction, taxCode); const defaultTaxValue = getTaxValue(defaultTaxCode); const moneyRequestTaxPercentage = (transactionTaxCode ? getTaxValue(transactionTaxCode) : defaultTaxValue) ?? ''; @@ -150,12 +150,17 @@ function IOURequestStepTaxAmountPage({ >>>>>> 2304a1f (Merge pull request #42064 from ShridharGoel/42407) ref={(e) => (textInput.current = e)} onCurrencyButtonPress={navigateToCurrencySelectionPage} onSubmitButtonPress={updateTaxAmount} - isCurrencyPressable={!isEditing} + isCurrencyPressable={false} /> ); From 75ea8853db8a077dac5f38016f0cdbb141946f41 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Tue, 14 May 2024 09:50:33 +0300 Subject: [PATCH 3/3] Fix conflict --- src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx index 808d282fcf86..94f8e2be2f6c 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx @@ -150,13 +150,8 @@ function IOURequestStepTaxAmountPage({ >>>>>> 2304a1f (Merge pull request #42064 from ShridharGoel/42407) ref={(e) => (textInput.current = e)} onCurrencyButtonPress={navigateToCurrencySelectionPage} onSubmitButtonPress={updateTaxAmount}