-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding MultiCurrency Support to Coupons (#1010)
* added coupon currency and test * added failure test case * wipe currency on non amount off coupons * fixed coupon match * added overrides * added comment * addressed PR feedback
- Loading branch information
1 parent
d4a42a9
commit 0490b8f
Showing
9 changed files
with
255 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,6 +213,12 @@ sfdx/bin/sfdx-wipe-account [email protected] | |
- Then use `sfdx force:org:create -s -f config/project-scratch-def.json -a cool-alias -d 30` to create a stratch org. Lasts for a max of 30d. | ||
`alias sf=sfdx` is going to make your CLI-life easier. | ||
|
||
- FOR MULTICURRENCY SCRATCH ORGS: | ||
- Prior to running `generate-scratch-org`, do the following: | ||
- Go to `config/project-scratch-def.json` and set `enableMultiCurrency` to true | ||
- Go to `sfdx/force-app/main/scratchSetup/layouts/PricebookEntry-Custom Price Book Entry Layout.layout-meta.xml` and make sure the `CurrencyIsoCode` layout item is uncommented. | ||
- After running `generate-scratch-org` and following it's manual set up, go to `/lightning/setup/CompanyCurrency/home` and set up `GBP` as a new currency (exchange rate doesn't matter). | ||
|
||
Apex triggers run synchronously, TODO add to notes | ||
|
||
## Finding an existing package | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
|
||
{ | ||
"orgName": "[email protected]", | ||
"adminEmail": "[email protected]", | ||
"edition": "Developer", | ||
"settings": { | ||
"currencySettings":{ | ||
"enableMultiCurrency": true | ||
"currencySettings":{ | ||
"enableMultiCurrency": false | ||
}, | ||
"mobileSettings": { | ||
"enableS1EncryptedStoragePref2": false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,10 +83,21 @@ def make_user(sandbox: false, save: false, random_user_id: false, livemode: fals | |
user.connector_settings[CONNECTOR_SETTING_SALESFORCE_NAMESPACE] = SalesforceNamespaceOptions::NONE.serialize | ||
end | ||
|
||
# MULTI_CURRENCY ORG OVERRIDES ------------------------------------------------------------------------- | ||
# If you are adding an account here, make sure you have added 'GBP' in Setup -> Manage Currencies | ||
|
||
# Default to False | ||
user.connector_settings[CONNECTOR_SETTING_MULTICURRENCY_ENABLED] = false | ||
|
||
# [email protected] | ||
if user.salesforce_account_id == "00D5f000006O9HAEA0" | ||
user.connector_settings[CONNECTOR_SETTING_MULTICURRENCY_ENABLED] = true | ||
end | ||
# brennen-multi-curr-scratch | ||
if user.salesforce_account_id == "00DDM000003rZgW2AU" | ||
if user.salesforce_account_id == "00D52000000YKbHEAW" | ||
user.connector_settings[CONNECTOR_SETTING_MULTICURRENCY_ENABLED] = true | ||
end | ||
# ------------------------------------------------------------------------------------------------------ | ||
|
||
# clocks won't be enabled in prod, so we want to mimic this | ||
user.disable_feature(FeatureFlags::TEST_CLOCKS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters