7use Bitrix\Main\Entity\DataManager;
22 'ORDER_DELIVERY_ID'=>[
47 'RESERVED_QUANTITY'=>[
62 $fieldsInfo = empty($fieldsInfo)? $this->
getFields():$fieldsInfo;
66 foreach ($fields[
'SHIPMENT'][
'SHIPMENT_ITEMS'] as $k=>$item)
69 $this->
isNewItem($item)? $listFieldsInfoAdd:$listFieldsInfoUpdate
82 if(!isset($fields[
'SHIPMENT'][
'ID']))
84 $emptyFields[] =
'[shipment][id]';
86 if(!isset($fields[
'SHIPMENT'][
'SHIPMENT_ITEMS']) || !is_array($fields[
'SHIPMENT'][
'SHIPMENT_ITEMS']))
88 $emptyFields[] =
'[shipment][shipmentItems][]';
91 if(count($emptyFields)>0)
93 $r->addError(
new Error(implode(
', ', $emptyFields)));
97 $r = parent::checkFieldsModify($fields);
110 foreach ($fields[
'SHIPMENT'][
'SHIPMENT_ITEMS'] as $k=>$item)
113 $this->
isNewItem($item)? $listFieldsInfoAdd:$listFieldsInfoUpdate
115 if(!$required->isSuccess())
117 $r->addError(
new Error(
'[shipmentItems]['.$k.
'] - '.implode(
', ', $required->getErrorMessages()).
'.'));
getListFieldInfo(array $fieldsInfo, $params=[])
internalizeFields($fields, array $fieldsInfo)
checkRequiredFields($fields, array $fieldsInfo, $params=[])
checkFieldsModify($fields)
internalizeFieldsModify($fields, $fieldsInfo=[])
checkRequiredFieldsModify($fields)