1
0
mirror of synced 2024-11-21 21:06:09 +03:00

Fixed sending empty order when deleting order from CMS

This commit is contained in:
gorokh 2019-07-01 14:38:11 +03:00
parent 1c5a15d30b
commit fa706de2e1
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,6 @@
## 2019-07-01 v.2.4.8
* Исправлена отправка пустого заказа при удалении заказа из СMS
## 2019-03-28 v.2.4.7
* Добавлено удаление в системе типа цены у товара для неактивного типа цены на сайте

View File

@ -65,6 +65,13 @@ class RetailCrmEvent
$GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] = true;
if (($arFields['CANCELED'] == 'Y')
&& (sizeof($arFields['BASKET_ITEMS']) == 0 )
&& (sizeof($arFields['ORDER_PROP']) == 0 )
) {
$GLOBALS['ORDER_DELETE_USER_ADMIN'] = true;
}
return;
}
@ -88,6 +95,10 @@ class RetailCrmEvent
*/
function orderSave($event)
{
if (true == $GLOBALS['ORDER_DELETE_USER_ADMIN']) {
return false;
}
if ($GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] === false
&& $GLOBALS['RETAIL_CRM_HISTORY'] === true
&& $GLOBALS['RETAILCRM_ORDER_DELETE'] === true