diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index 2cc1f64d..f9ed36ac 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -689,7 +689,12 @@ class RetailCrmHistory } if (array_key_exists('discountTotal', $product)) { - $itemCost = $item->getField('BASE_PRICE'); + $itemCost = $item->getField('PRICE'); + + if (empty($itemCost)) { + $itemCost = $item->getField('BASE_PRICE'); + } + $discount = (double) $item->getField('DISCOUNT_PRICE'); if (isset($itemCost) && $itemCost >= 0) {