From 870c1f4a1128f6db6c93a7d969c81a538f21bb0e Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Fri, 15 Nov 2013 17:49:40 +0400 Subject: [PATCH] null dicount --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index c08e0ed8..0f02cd3d 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -854,7 +854,7 @@ class ICrmOrderActions 'initialPrice' => (double) $p['PRICE'] + (double) $p['DISCOUNT_PRICE'], //'purchasePrice' => $pr, 'discount' => $p['DISCOUNT_PRICE'], - //'discountPercent' => $p['DISCOUNT_VALUE'], + 'discountPercent' => 0, 'quantity' => $p['QUANTITY'], 'productId' => $p['PRODUCT_ID'], 'productName' => self::toJSON($p['NAME']) @@ -928,7 +928,7 @@ class ICrmOrderActions return false; foreach($arr as $key => $value) { - if(!$value || (is_array($value) && empty($value))) + if(($value !== 0) || ($value !== 0.0) || (is_array($value) && empty($value))) unset($arr[$key]); if(is_array($value) && !empty($value))