55 abstract public function add(array $params);
62 abstract public function update(array $params);
69 abstract public function delete(array $params =
null);
87 public function import(array $params)
92 $result = $this->
update($params);
96 $result = $this->
add($params);
117 return $entity->getField(static::getFieldExternalId());
134 foreach ($values as $key=>$value)
146 $this->fields->set($name, $value);
155 return $this->fields->get($name);
163 return $this->fields->getValues();
177 return $entity->getFieldValues();
221 public function getCurrentCriterion($entity)
258 public function getCurrentCollision($typeId)
262 return $collision::getCurrent($typeId);
278 return $logger::getCurrent();
283 $this->logging =
true;
322 static private function getSaleExport()
324 static $exportProfiles =
null;
326 if($exportProfiles ===
null)
328 $exportProfiles = \CSaleExport::getSaleExport();
330 return $exportProfiles;
339 static public function getBusinessValue(\
Bitrix\
Sale\IBusinessValueProvider $entity)
341 $order = static::getBusinessValueOrderProvider($entity);
343 $orderFields = $order->getFieldValues();
344 $paymentList = array();
345 $shipmentList = array();
347 if($paymentCollection = $order->getPaymentCollection())
350 foreach ($paymentCollection as $payment)
352 $paymentList[$payment->getId()] = $payment->getPaymentSystemName();
355 if($shipmentCollection = $order->getShipmentCollection())
358 foreach ($shipmentCollection as $shipment)
360 $shipmentList[$shipment->getId()] = $shipment->getDeliveryName();
364 $arProp = \CSaleExport::prepareSaleProperty(
370 $locationStreetPropertyValue,
374 $exportProfiles = static::getSaleExport();
375 $exportProfile = (array_key_exists($order->getPersonTypeId(), $exportProfiles) ? $exportProfiles[$order->getPersonTypeId()]: array());
377 $properties = \CSaleExport::prepareSalePropertyRekv(
381 $locationStreetPropertyValue
383 $properties[
'REKV'] = static::modifyRekv($properties[
'REKV'], $exportProfile);
393 static private function modifyRekv($rekv, array $exportProfile)
396 foreach ($rekv as $k=>$v)
398 if(isset($exportProfile[$k]) && $exportProfile[$k][
'NAME'] <>
'' && $v <>
'')
400 $result[$exportProfile[$k][
'NAME']] = $v;