EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix default currency
Yuri Kuznetsovd00af77206ba
diff --git a/application/Espo/Core/Record/Defaults/DefaultPopulator.php b/application/Espo/Core/Record/Defaults/DefaultPopulator.phpindex 1a6b9384cc..0f2536a25b 100644--- a/application/Espo/Core/Record/Defaults/DefaultPopulator.php+++ b/application/Espo/Core/Record/Defaults/DefaultPopulator.php@@ -148,8 +148,10 @@ class DefaultPopulator implements Populatorcontinue;}- if ($entity->get($field) && !$entity->get($field . 'Currency')) {- $entity->set($field . 'Currency', $this->currencyConfig->getDefaultCurrency());+ $currencyAttribute = $field . 'Currency';++ if ($entity->get($field) !== null && !$entity->get($currencyAttribute)) {+ $entity->set($currencyAttribute, $this->currencyConfig->getDefaultCurrency());}}}