2namespace Bitrix\Sale\Services\Base;
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Main\NotImplementedException;
8use Bitrix\Sale\TradeBindingEntity;
10Loc::loadMessages(__FILE__);
23 return Loc::getMessage(
'SALE_SRV_RSTR_BY_TRADE_BINDING_NAME');
31 return Loc::getMessage(
'SALE_SRV_RSTR_BY_TRADE_BINDING_DESC');
36 return Loc::getMessage(
'SALE_SRV_RSTR_BY_TRADE_BINDING_ON_APPLY_ERROR_MSG');
51 "TRADE_BINDING" =>
array(
54 "LABEL" => Loc::getMessage(
"SALE_SRV_RSTR_BY_TRADE_BINDING_LIST"),
55 "OPTIONS" => self::getTradePlatformList()
70 protected static function getTradePlatformList()
72 Loader::includeModule(
'crm');
76 $dbRes = Sale\TradingPlatformTable::getList([
77 'select' => [
'CODE',
'CLASS'],
78 'filter' => [
'=ACTIVE' =>
'Y'],
79 'cache' => [
'ttl' => 36000]
83 $platformClassName = (string)
$data[
'CLASS'];
84 if (class_exists($platformClassName))
119 $collection =
$order->getTradeBindingCollection();
122 foreach ($collection as
$entity)
124 $tradeBinding =
$entity->getTradePlatform();
127 && !in_array($tradeBinding->getId(),
$result)
130 $result[] = $tradeBinding->getId();
154 if (is_array($restrictionParams) && isset($restrictionParams[
'TRADE_BINDING']))
156 $diff = array_diff(
$params, $restrictionParams[
'TRADE_BINDING']);
173 return (
bool)static::getTradePlatformList();
static extractParams(Entity $entity)
static check($params, array $restrictionParams, $serviceId=0)
static getOrder(Sale\Internals\Entity $entity)
static getClassDescription()
static getOnApplyErrorMessage()
static getParamsStructure($entityId=0)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']