1
0
mirror of synced 2024-11-22 05:16:09 +03:00

Убрана некорректная запись внешнего идентификатора платежа для новых платежей по истории

fixed #168
This commit is contained in:
Alex Lushpai 2021-01-14 13:46:13 +03:00 committed by GitHub
commit 185434f531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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