From bdc764e492fb4512f2ccf0cb536818de3d194c37 Mon Sep 17 00:00:00 2001 From: gorokh Date: Fri, 1 Nov 2019 12:15:54 +0300 Subject: [PATCH] =?UTF-8?q?issues=20#81=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=B0=20id=20=D0=BE=D0=BF=D0=BB=D0=B0?= =?UTF-8?q?=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classes/general/history/RetailCrmHistory_v5.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index ee303722..9bd387fd 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -814,7 +814,9 @@ class RetailCrmHistory if ($paymentExternalId) { $newHistoryPayments[$orderPayment->getField('XML_ID')]['externalId'] = $paymentExternalId; RCrmActions::apiMethod($api, 'paymentEditById', __METHOD__, $newHistoryPayments[$orderPayment->getField('XML_ID')]); - \Bitrix\Sale\Internals\PaymentTable::update($paymentId, array('XML_ID' => '')); + if ($paymentId) { + \Bitrix\Sale\Internals\PaymentTable::update($paymentId, array('XML_ID' => '')); + } } } }