File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed
Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1+ ## 2025-12-15 v6.7.6
2+ - Исправлена логика обработки скидок при использовании программы лояльности
3+
14## 2025-09-26 v6.7.5
25- Добавлена опция обновления участий программы лояльности
36
Original file line number Diff line number Diff line change @@ -338,7 +338,18 @@ public static function orderSend(
338338 ) {
339339 /** @var LoyaltyService $service */
340340 $ service = ServiceLocator::get (LoyaltyService::class);
341- $ item ['discountManualAmount ' ] = $ service ->getInitialDiscount ((int ) $ product ['ID ' ]) ?? $ discount ;
341+ $ initialDiscount = $ service ->getInitialDiscount ((int ) $ product ['ID ' ]);
342+
343+ if ($ initialDiscount !== null && $ initialDiscount > 0 ) {
344+ $ item ['discountManualAmount ' ] = $ initialDiscount ;
345+ } elseif (isset ($ orderItems [$ externalId ]['discountManualAmount ' ]) && $ orderItems [$ externalId ]['discountManualAmount ' ] > 0 ) {
346+ $ item ['discountManualAmount ' ] = (double ) $ orderItems [$ externalId ]['discountManualAmount ' ];
347+ } elseif (($ product ['CUSTOM_PRICE ' ] ?? 'N ' ) === 'Y ' ) {
348+ // Не перезаписываем discount_manual_amount чтобы сохранить исходное значение
349+ unset($ item ['discountManualAmount ' ]);
350+ } else {
351+ $ item ['discountManualAmount ' ] = $ discount ;
352+ }
342353 } elseif ($ product ['BASE_PRICE ' ] >= $ product ['PRICE ' ]) {
343354 $ item ['discountManualAmount ' ] = self ::getDiscountManualAmount ($ product );
344355 $ item ['initialPrice ' ] = (double ) $ product ['BASE_PRICE ' ];
Original file line number Diff line number Diff line change 1- - Добавлена опция обновления участий программы лояльности
1+ - Исправлена логика обработки скидок при использовании программы лояльности
Original file line number Diff line number Diff line change 11<?php
22
33$ arModuleVersion = [
4- 'VERSION ' => '6.7.5 ' ,
5- 'VERSION_DATE ' => '2025-09-26 9:30:00 '
4+ 'VERSION ' => '6.7.6 ' ,
5+ 'VERSION_DATE ' => '2025-12-15 9:30:00 '
66];
Original file line number Diff line number Diff line change 1818 */
1919class Constants
2020{
21- public const MODULE_VERSION = '6.7.5 ' ;
21+ public const MODULE_VERSION = '6.7.6 ' ;
2222 public const CRM_PURCHASE_PRICE_NULL = 'purchasePrice_null ' ;
2323 public const BITRIX_USER_ID_PREFIX = 'bitrixUserId- ' ;
2424 public const CRM_USERS_MAP = 'crm_users_map ' ;
You can’t perform that action at this time.
0 commit comments