From 6fec60fdd275f05c91c9818344453e1e5ff43303 Mon Sep 17 00:00:00 2001 From: cyradin Date: Fri, 8 Apr 2016 12:22:38 +0300 Subject: [PATCH] fix orderHistory exception --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index b40f915f..7a424875 100644 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -898,6 +898,10 @@ else{ 'COMMENTS' => self::fromJSON($order['managerComment']) )); + if (! date_create_from_format('Y-m-d H:i:s', $arFields['DATE_MARKED'])) { + unset($arFields['DATE_MARKED']); + } + if (isset($order['discount'])) { $arFields['DISCOUNT_VALUE'] = $order['discount']; $arFields['PRICE'] -= $order['discount'];