• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/discountbase.php
  • Класс: BitrixSaleDiscountBase
  • Вызов: DiscountBase::tryToRevertApplyStatusInBlocks
protected function tryToRevertApplyStatusInBlocks(array $stepResult)
{
	if (empty($stepResult['BASKET']))
	{
		return;
	}

	foreach ($stepResult['BASKET'] as $basketItemId => $item)
	{
		if ($item['APPLY'] !== 'Y')
		{
			continue;
		}

		if (empty($item['DESCR_DATA']))
		{
			continue;
		}

		foreach ($item['DESCR_DATA'] as $rowDescription)
		{
			//TODO: remove this hack
			if (
				!empty($rowDescription['REVERT_APPLY']) &&
				$rowDescription['VALUE_ACTION'] === DiscountFormatter::VALUE_ACTION_CUMULATIVE
			)
			{
				$this->revertApplyBlockForBasketItem($basketItemId);
			}
		}
	}
}