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 @@ '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..165d9d63 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->writeOptionalSimpleElement('purchasePrice', $offer->purchasePrice, true); $this->writer->endElement(); } @@ -173,10 +173,12 @@ class IcmlWriter * @param string $name * @param $value */ - private function writeOptionalSimpleElement(string $name, $value): void + private function writeOptionalSimpleElement(string $name, $value, bool $isEmptyAllowed = false): void { if (!empty($value)) { $this->writeSimpleElement($name, $value); + } elseif ($isEmptyAllowed) { + $this->writeSimpleElement($name, $value); } }