From 61044988d57040b1000b3238df75af0b1020dcdd Mon Sep 17 00:00:00 2001 From: ellynoize <111681973+ellynoize@users.noreply.github.com> Date: Thu, 30 Jan 2025 09:20:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=87?= =?UTF-8?q?=D0=B0=20=D0=BD=D1=83=D0=BB=D0=B5=D0=B2=D0=BE=D0=B9=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BA=D1=83=D0=BF=D0=BE=D1=87=D0=BD=D0=BE=D0=B9=20=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D1=8D=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82=D0=B5=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=B0=20(#382)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ intaro.retailcrm/description.ru | 2 +- intaro.retailcrm/install/version.php | 4 ++-- intaro.retailcrm/lib/component/constants.php | 2 +- intaro.retailcrm/lib/icml/icmlwriter.php | 12 +++++++++++- 5 files changed, 18 insertions(+), 5 deletions(-) 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..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