diff --git a/CHANGELOG.md b/CHANGELOG.md index 515389dd..7edf1ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2025-01-29 v6.6.6 +- Поддержка нулевой закупочной стоимости при генерации каталога + ## 2025-01-28 v6.6.5 - Исправлена ошибка редактирования интеграционных доставок при активации опции передачи статусов интеграционных оплат diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index c3270fdb..db7b8c30 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Исправлена ошибка редактирования интеграционных доставок при активации опции передачи статусов интеграционных оплат +- Поддержка нулевой закупочной стоимости при генерации каталога diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index 94cd4d62..191fd74c 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,6 +1,6 @@ <?php $arModuleVersion = [ - 'VERSION' => '6.6.5', - 'VERSION_DATE' => '2025-01-28 18:00:00' + 'VERSION' => '6.6.6', + 'VERSION_DATE' => '2025-01-29 18:00:00' ]; diff --git a/intaro.retailcrm/lib/component/constants.php b/intaro.retailcrm/lib/component/constants.php index 5908ca5b..a3008f95 100644 --- a/intaro.retailcrm/lib/component/constants.php +++ b/intaro.retailcrm/lib/component/constants.php @@ -18,7 +18,7 @@ namespace Intaro\RetailCrm\Component; */ class Constants { - public const MODULE_VERSION = '6.6.5'; + public const MODULE_VERSION = '6.6.6'; public const CRM_PURCHASE_PRICE_NULL = 'purchasePrice_null'; public const BITRIX_USER_ID_PREFIX = 'bitrixUserId-'; public const CRM_USERS_MAP = 'crm_users_map'; diff --git a/intaro.retailcrm/lib/icml/icmlwriter.php b/intaro.retailcrm/lib/icml/icmlwriter.php index 07e72eac..8e2003cc 100644 --- a/intaro.retailcrm/lib/icml/icmlwriter.php +++ b/intaro.retailcrm/lib/icml/icmlwriter.php @@ -163,7 +163,7 @@ class IcmlWriter $this->writeOptionalSimpleElement('vatRate', $offer->vatRate); $this->writeOptionalSimpleElement('weight', $offer->weight); $this->writeOptionalSimpleElement('dimensions', $offer->dimensions); - $this->writeOptionalSimpleElement('purchasePrice', $offer->purchasePrice); + $this->writeOptionalPurchasePrice($offer->purchasePrice); $this->writer->endElement(); } @@ -180,6 +180,16 @@ class IcmlWriter } } + /** + * Запись закупочной стоимости + * + * @param $value + */ + private function writeOptionalPurchasePrice($value): void + { + $this->writeSimpleElement('purchasePrice', !empty($value) ? $value : 0); + } + /** * @param string $name * @param $value