1
0
mirror of synced 2024-11-24 22:36:07 +03:00
This commit is contained in:
gorokh 2021-01-13 17:51:36 +03:00
parent 797a4d41de
commit 12ae53cfea

View File

@ -1178,20 +1178,16 @@ class RetailCrmHistory
continue;
}
$paymentExternalId = $orderPayment->getId();
$newHistoryPayments[$orderPayment->getField('XML_ID')]['externalId'] = $paymentExternalId;
RCrmActions::apiMethod(
$api,
'paymentEditById',
__METHOD__,
$newHistoryPayments[$orderPayment->getField('XML_ID')]
);
if ($paymentExternalId) {
$newHistoryPayments[$orderPayment->getField('XML_ID')]['externalId'] = $paymentExternalId;
RCrmActions::apiMethod(
$api,
'paymentEditById',
__METHOD__,
$newHistoryPayments[$orderPayment->getField('XML_ID')]
);
if ($paymentId) {
\Bitrix\Sale\Internals\PaymentTable::update($paymentId, array('XML_ID' => ''));
}
if ($paymentId) {
\Bitrix\Sale\Internals\PaymentTable::update($paymentId, array('XML_ID' => ''));
}
}
}