42 global $USER, $APPLICATION;
44 $saleModulePermissions = $APPLICATION->GetGroupRight(
"sale");
52 $data[
'DELIVERY_ID'] ??= 0;
54 if (!isset($items[$data[
'DELIVERY_ID']]))
56 $delivery = self::getDeliveryServiceInfoById($data[
'DELIVERY_ID']);
58 $items[$delivery[
'ID']] = $delivery;
61 static $deliveries =
null;
62 if (is_null($deliveries))
68 if (isset($post[
'DELIVERY_ID']))
70 if (isset($post[
'PROFILE']))
71 $data[
'DELIVERY_ID'] = $post[
'PROFILE'];
73 $data[
'DELIVERY_ID'] = $post[
'DELIVERY_ID'];
78 $data[
'TRACKING_NUMBER'] ??=
null;
79 $data[
'BASE_PRICE_DELIVERY'] ??=
null;
80 $data[
'CALCULATED_PRICE'] ??=
null;
81 $data[
'CALCULATED_WEIGHT'] ??=
null;
82 $data[
'DEDUCTED'] ??=
'N';
83 $data[
'ALLOW_DELIVERY'] ??=
'N';
84 $data[
'DELIVERY_DOC_NUM'] ??=
null;
85 $data[
'DELIVERY_DOC_DATE'] ??=
null;
88 if ($data[
'DELIVERY_ID'])
90 $deliveryId = $data[
'DELIVERY_ID'];
91 $service = Services\Manager::getObjectById($deliveryId);
92 if ($service && $service::isProfile())
94 $profileId = $deliveryId;
95 $deliveryId = $service->getParentService()->getId();
99 unset($deliveries[$deliveryId]);
101 else if ($service && $service->canHasProfiles())
103 unset($deliveries[$deliveryId]);
107 if (isset($post[
'ALLOW_DELIVERY']))
108 $data[
'ALLOW_DELIVERY'] = $post[
'ALLOW_DELIVERY'];
111 $isAllowDelivery = isset($data[
"STATUS_ID"]) && in_array($data[
"STATUS_ID"], $allowedStatusesDelivery);
113 $class = ($data[
'ALLOW_DELIVERY'] ==
'Y') ?
'' :
'notdelivery';
114 $class .= ($isAllowDelivery) ?
'' :
' not_active';
115 $status = ($data[
'ALLOW_DELIVERY'] ==
'Y') ?
'YES' :
'NO';
116 $triangle = ($class ===
'') ?
'<span class="triangle"> ▾</span>' :
'';
118 $allowDelivery =
'<span><span id="BUTTON_ALLOW_DELIVERY_'.$index.
'" class="'.$class.
'">'.
Loc::getMessage(
'SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_'.$status).
'</span>'.$triangle.
'</span>';
121 $isAllowDeduction = isset($data[
"STATUS_ID"]) && in_array($data[
"STATUS_ID"], $allowedStatusesDeduction);
123 if (isset($post[
'DEDUCTED']) && $isAllowDeduction)
124 $data[
'DEDUCTED'] = $post[
'DEDUCTED'];
126 $class = ($data[
'DEDUCTED'] ==
'Y') ?
'' :
'notdeducted';
127 $class .= ($isAllowDeduction) ?
'' :
' not_active';
128 $status = ($data[
'DEDUCTED'] ==
'Y') ?
'YES' :
'NO';
129 $triangle = ($class ===
'') ?
'<span class="triangle"> ▾</span>' :
'';
131 $deducted =
'<span><span id="BUTTON_DEDUCTED_'.$index.
'" class="'.$class.
'">'.
Loc::getMessage(
'SALE_ORDER_SHIPMENT_DEDUCTED_'.$status).
'</span>'.$triangle.
'</span>';
133 $lang = Main\Application::getInstance()->getContext()->getLanguage();
135 $extraServiceHTML =
'';
136 $extraServiceManager = new \Bitrix\Sale\Delivery\ExtraServices\Manager($data[
'DELIVERY_ID']);
137 $extraServiceManager->setOperationCurrency($data[
'CURRENCY']);
138 if (isset($post[
'EXTRA_SERVICES']))
140 $data[
'EXTRA_SERVICES'] = $post[
'EXTRA_SERVICES'];
143 if (isset($post[
'EXTRA_SERVICES']))
145 $data[
'DELIVERY_STORE_ID'] = $post[
'DELIVERY_STORE_ID'];
148 if (!empty($data[
'EXTRA_SERVICES']))
150 $extraServiceManager->setValues($data[
'EXTRA_SERVICES']);
153 $extraService = $extraServiceManager->getItems();
155 $extraServiceHTML = self::getExtraServiceEditControl($extraService, $index,
false, self::$shipment);
157 if ($data[
'DELIVERY_ID'] > 0)
158 $map =
self::getMap($data[
'DELIVERY_ID'], $index, $data[
'DELIVERY_STORE_ID']);
160 $dataId = (int)($data[
'ID'] ?? 0);
163 $dateInsert =
new Date($data[
'DATE_INSERT']);
164 $title =
Loc::getMessage(
'SALE_ORDER_SHIPMENT_BLOCK_EDIT_SHIPMENT_TITLE', array(
"#ID#" => $dataId,
'#DATE_INSERT#' => $dateInsert));
168 $title =
Loc::getMessage(
'SALE_ORDER_SHIPMENT_BLOCK_NEW_SHIPMENT_TITLE');
171 $customPriceDelivery = isset($post[
'CUSTOM_PRICE_DELIVERY']) ? htmlspecialcharsbx($post[
'CUSTOM_PRICE_DELIVERY']) : $data[
'CUSTOM_PRICE_DELIVERY'];
172 $customWeightDelivery = isset($post[
'CUSTOM_WEIGHT_DELIVERY']) ? htmlspecialcharsbx($post[
'CUSTOM_WEIGHT_DELIVERY']) : $data[
'CUSTOM_WEIGHT_DELIVERY'];
174 $basePriceDelivery = round(
175 (
float)($post[
'BASE_PRICE_DELIVERY'] ?? $data[
'BASE_PRICE_DELIVERY'] ?? 0.0),
178 $priceDelivery = round(
179 (
float)($post[
'PRICE_DELIVERY'] ?? $data[
'PRICE_DELIVERY'] ?? 0.0),
183 $weight = $post[
'WEIGHT'] ?? $data[
'WEIGHT'] ?? 0;
186 $weight/self::getWeightKoef($data[
'SITE_ID'])
188 SALE_WEIGHT_PRECISION
194 if ($profileId > 0 && $profiles)
200 <tr id="BLOCK_PROFILES_'.$index.
'">
201 <td class="adm-detail-content-cell-l" width="40%">'.
Loc::getMessage(
'SALE_ORDER_SHIPMENT_DELIVERY_SERVICE_PROFILE').
':</td>
202 <td class="adm-detail-content-cell-r" id="PROFILE_SELECT_'.$index.
'">'.$profilesTemplate.
'</td>
205 $id = (isset($post[
'ID'])) ? $post[
'SHIPMENT_ID'] : $data[
'ID'];
209 if (!empty($data[
'COMPANIES']))
211 if ($saleModulePermissions ==
"P")
213 $userCompanyId =
null;
215 $userCompanyList = Company\Manager::getUserCompanyList($USER->GetID());
216 if (is_array($userCompanyList) && count($userCompanyList) == 1)
218 $userCompanyId = reset($userCompanyList);
219 $companyName = $data[
'COMPANIES'][$userCompanyId][
"NAME"].
" [".$data[
'COMPANIES'][$userCompanyId][
"ID"].
"]";
220 $companies = htmlspecialcharsbx($companyName);
224 foreach ($data[
'COMPANIES'] as $companyId => $companyData)
226 $foundCompany =
false;
228 if (!empty($userCompanyList) && is_array($userCompanyList))
230 foreach ($userCompanyList as $userCompanyId)
232 if ($userCompanyId == $companyId)
234 $foundCompany =
true;
242 unset($data[
'COMPANIES'][$companyId]);
246 if (count($data[
'COMPANIES']) == 1)
248 $company = reset($data[
'COMPANIES']);
249 $companies = htmlspecialcharsbx($company[
"NAME"].
" [".$company[
"ID"].
"]");
254 if (empty($companies))
257 'SHIPMENT['.$index.
'][COMPANY_ID]',
259 isset($post[
"COMPANY_ID"]) ? $post[
"COMPANY_ID"] : $data[
"COMPANY_ID"],
262 "class" =>
"adm-bus-select",
263 "id" =>
"SHIPMENT_COMPANY_ID_".$index
270 if ($saleModulePermissions >=
"W")
272 $companies = str_replace(
"#URL#",
"/bitrix/admin/sale_company_edit.php?lang=".$lang,
Loc::getMessage(
'SALE_ORDER_SHIPMENT_ADD_COMPANY'));
276 if ($data[
'FFD_105_ENABLED'] ===
'Y')
278 $checkLink =
'<tr><td class="tac" id="SHIPMENT_CHECK_LIST_ID_'.$data[
'ID'].
'">';
280 if (!empty($data[
'CHECK']))
284 $checkLink .=
'</td></tr>';
285 if ($data[
'HAS_ENABLED_CASHBOX'] ===
'Y' && $data[
'CAN_PRINT_CHECK'] ===
'Y')
287 $checkLink .=
'<tr><td class="adm-detail-content-cell-r tac"><a href="javascript:void(0);" onclick="BX.Sale.Admin.OrderShipment.prototype.showCreateCheckWindow('.$data[
'ID'].
');">'.
Loc::getMessage(
'SALE_ORDER_SHIPMENT_CHECK_ADD').
'</a></td></tr>';
291 if (isset($items[$data[
'DELIVERY_ID']][
'LOGOTIP'][
'MAIN']))
292 $logo = $items[$data[
'DELIVERY_ID']][
'LOGOTIP'][
'MAIN'];
294 $logo =
'/bitrix/images/sale/logo-default-d.gif';
296 $trackingNumber = htmlspecialcharsbx(isset($post[
'TRACKING_NUMBER']) ? $post[
'TRACKING_NUMBER'] : $data[
'TRACKING_NUMBER']);
299 <div class="adm-bus-pay" id="shipment_container_'.$index.
'">
300 <input type="hidden" name="SHIPMENT['.$index.
'][SHIPMENT_ID]" id="SHIPMENT_ID_'.$index.
'" value="'.$id.
'">
301 <input type="hidden" name="SHIPMENT['.$index.
'][CUSTOM_PRICE_DELIVERY]" id="CUSTOM_PRICE_DELIVERY_'.$index.
'" value="'.$customPriceDelivery.
'">
302 <input type="hidden" name="SHIPMENT['.$index.
'][CUSTOM_WEIGHT_DELIVERY]" id="CUSTOM_WEIGHT_DELIVERY_'.$index.
'" value="'.$customWeightDelivery.
'">
303 <input type="hidden" name="SHIPMENT['.$index.
'][BASE_PRICE_DELIVERY]" id="BASE_PRICE_DELIVERY_'.$index.
'" value="'.$data[
'BASE_PRICE_DELIVERY'].
'">
304 <input type="hidden" name="SHIPMENT['.$index.
'][CALCULATED_PRICE]" id="CALCULATED_PRICE_'.$index.
'" value="'.(isset($post[
'CALCULATED_PRICE']) ? htmlspecialcharsbx($post[
'CALCULATED_PRICE']) : $data[
'CALCULATED_PRICE']).
'">
305 <input type="hidden" name="SHIPMENT['.$index.
'][CALCULATED_WEIGHT]" id="CALCULATED_WEIGHT_'.$index.
'" value="'.(isset($post[
'CALCULATED_WEIGHT']) ? htmlspecialcharsbx($post[
'CALCULATED_WEIGHT']) : $data[
'CALCULATED_WEIGHT']).
'">
306 <input type="hidden" name="SHIPMENT['.$index.
'][DEDUCTED]" id="STATUS_DEDUCTED_'.$index.
'" value="'.($data[
'DEDUCTED'] ==
"" ?
"N" : $data[
'DEDUCTED']).
'">
307 <input type="hidden" name="SHIPMENT['.$index.
'][ALLOW_DELIVERY]" id="STATUS_ALLOW_DELIVERY_'.$index.
'" value="'.($data[
'ALLOW_DELIVERY'] ==
"" ?
"N" : htmlspecialcharsbx($data[
'ALLOW_DELIVERY'])).
'">
308 <div class="adm-bus-component-content-container">
309 <div class="adm-bus-pay-section">
310 <div class="adm-bus-pay-section-title-container">
311 <div class="adm-bus-pay-section-title">'.$title.
'</div>
313 <div class="adm-bus-pay-section-content">
314 <div class="adm-bus-pay-section-sidebar">
315 <div style="background: url(\''.$logo.
'\')
" id="delivery_service_logo_
'.$index.'" class="adm-shipment-block-logo
"></div>
316 <div id="section_map_
'.$index.'">'.$map.'</div>
318 <div class="adm-bus-pay-section-right
">
319 <div class="adm-bus-table-container caption border
">
320 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SERVICE').'</div>
321 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
323 <tr id="BLOCK_DELIVERY_SERVICE_
'.$index.'">
324 <td class="adm-detail-content-cell-l fwb
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SERVICE').':</td>
325 <td class="adm-detail-content-cell-r
">
326 '.self::getDeliverySelectHtml($deliveries, $deliveryId, $index).'
333 <div class="adm-bus-table-container caption border
">
334 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_BLOCK_PRICE').'</div>
335 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
337 <tr style="display: none;
">
338 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SUM_PRICE').':</td>
339 <td class="adm-detail-content-cell-r tal
">'
340 .\CCurrencyLang::getPriceControl(
341 '<span id="BASE_PRICE_DELIVERY_T_
'.$index.'">'.$basePriceDelivery.'</span>',
346 <tr id="sale-order-shipment-discounts-row-
'.$index.'" style="display: none;
">
347 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DISCOUNT').':</td>
348 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-discounts-container-
'.$index.'"></td>
351 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SUM_DISCOUNT_PRICE').':</td>
352 <td class="adm-detail-content-cell-r tal
">'
353 .\CCurrencyLang::getPriceControl(
354 '<input type="text
" class="adm-bus-input-price
" name="SHIPMENT[
'.$index.'][PRICE_DELIVERY]
" id="PRICE_DELIVERY_
'.$index.'" value="'.$priceDelivery.'">',
362 <div class="adm-bus-table-container caption border
">
363 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_BLOCK_WEIGHT').'</div>
364 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
367 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_WEIGHT').':</td>
368 <td class="adm-detail-content-cell-r tal
">
369 <input type="text
" class="adm-bus-input-price
" name="SHIPMENT[
'.$index.'][WEIGHT]
" id="WEIGHT_DELIVERY_
'.$index.'" value="'.$weight.'"> '.$weightMeasureUnits.'
370 <span id="UPDATE_DELIVERY_INFO_
'.$index.'" class="new_delivery_price_button
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_RECALCULATE_DELIVERY_PRICE').'</span>
380 $result .= '<div class="adm-bus-table-container caption border
">
381 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT').'</div>
382 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
385 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_OFFICE').':</td>
386 <td class="adm-detail-content-cell-r
">'.$companies.'</td>
392 if ($data['FFD_105_ENABLED'] === 'Y' && $data['ID'] > 0)
394 $result .= '<div class="adm-bus-table-container caption border
" style="padding-top:10px;
">
395 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_CHECK_LINK_TITLE').'</div>
396 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
404 $result .= '<div class="adm-bus-table-container caption border
">
405 <div class="adm-bus-moreInfo_part1
">
406 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_STATUS').'</div>
407 <table class="adm-detail-content-table edit-table
" border="0
" width="100%
" cellpadding="0
" cellspacing="0
">
410 <td class="adm-detail-content-cell-l vat
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_ALLOW_DELIVERY').':</td>
411 <td class="adm-detail-content-cell-r delivery-status
">'.$allowDelivery.'</td>
413 '.((!empty($data['EMP_ALLOW_DELIVERY_ID'])) ? '
415 <td class="adm-detail-content-cell-l vat
" width="40%
"></td>
416 <td class="adm-detail-content-cell-r
">
417 <div>'.Loc::getMessage('SALE_ORDER_SHIPMENT_MODIFY_BY').': <span style="color: #66878F
" id="order_additional_info_date_responsible
">'.htmlspecialcharsbx($data['DATE_ALLOW_DELIVERY']).'</span> <a href="/
bitrix/admin/user_edit.php?lang=
'.$lang.'&ID=
'.$data['EMP_ALLOW_DELIVERY_ID
'].'" id="order_additional_info_emp_responsible
">'.htmlspecialcharsbx($data['EMP_ALLOW_DELIVERY_ID_LAST_NAME']).' '.htmlspecialcharsbx($data['EMP_ALLOW_DELIVERY_ID_NAME']).'</a></div>
422 <td class="adm-detail-content-cell-l vat
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DEDUCTED').':</td>
423 <td class="adm-detail-content-cell-r deducted-status
">'.$deducted.'</td>
425 '.((!empty($data['EMP_DEDUCTED_ID'])) ? '
427 <td class="adm-detail-content-cell-l fwb vat
" width="40%
"></td>
428 <td class="adm-detail-content-cell-r
">
429 <div>'.Loc::getMessage('SALE_ORDER_SHIPMENT_MODIFY_BY').': <span style="color: #66878F
" id="order_additional_info_date_responsible
">'.htmlspecialcharsbx($data['DATE_DEDUCTED']).'</span> <a href="/
bitrix/admin/user_edit.php?lang=
'.$lang.'&ID=
'.$data['EMP_DEDUCTED_ID
'].'" id="order_additional_info_emp_responsible
">'.htmlspecialcharsbx($data['EMP_DEDUCTED_ID_LAST_NAME']).' '.htmlspecialcharsbx($data['EMP_DEDUCTED_ID_NAME']).'</a></div>
437 <div class="adm-bus-table-container caption border
">
438 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_DELIVERY_INFO').'</div>
439 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
442 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_NUMBER').':</td>
443 <td class="adm-detail-content-cell-r tal
"><input type="text
" class="adm-bus-input
" name="SHIPMENT[
'.$index.'][TRACKING_NUMBER]
" value="'.$trackingNumber.'"><br></td>
445 $data['HAS_TRACKING'] && $trackingNumber <> '' && intval($data['ID'] > 0)
448 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_STATUS').':</td>
449 <td class="adm-detail-content-cell-r tal
">'.
450 '<span id="sale-order-shipment-tracking-status-
'.$index.'">'.(intval($data['TRACKING_STATUS']) >= 0 ? \Bitrix\Sale\Delivery\Tracking\Manager::getStatusName($data['TRACKING_STATUS']) : '-').'</span>'.
451 ' [<span onclick="BX.Sale.Admin.GeneralShipment.refreshTrackingStatus(\
''.$index.
'\', \
''.$data[
'ID'].
'\',
true);
" style="border-bottom: 1px dashed #2675d7; cursor: pointer; color: #2675d7;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_STATUS_REFRESH').'</span>]<br></td>
454 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_DESCRIPTION').':</td>
455 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-tracking-description-
'.$index.'">'.($data['TRACKING_DESCRIPTION'] <> '' ? $data['TRACKING_DESCRIPTION'] : '-').'<br></td>
458 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_LAST_CHANGE').':</td>
459 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-tracking-last-change-
'.$index.'">'.($data['TRACKING_LAST_CHANGE'] <> '' ? $data['TRACKING_LAST_CHANGE'] : '-').'<br></td>
460 </tr>'.(!empty($data['TRACKING_URL']) ?
462 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_URL').':</td>
463 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-tracking-url-
'.$index.'"><a href="'.$data['TRACKING_URL
'].'">'.$data['TRACKING_URL'].'</a><br></td>
468 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_DOC_NUM').':</td>
469 <td class="adm-detail-content-cell-r tal
"><input type="text
" class="adm-bus-input
" name="SHIPMENT[
'.$index.'][DELIVERY_DOC_NUM]
" value="'.htmlspecialcharsbx(isset($post['DELIVERY_DOC_NUM
']) ? $post['DELIVERY_DOC_NUM
'] : $data['DELIVERY_DOC_NUM
']).'"><br></td>
472 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_DOC_DATE').':</td>
473 <td class="adm-detail-content-cell-r tal
">
474 <div class="adm-input-wrap adm-calendar-second
" style="display:
inline-block;
">
475 <input type="text
" class="adm-input adm-calendar-to
" id="DELIVERY_DOC_DATE
" name="SHIPMENT[
'.$index.'][DELIVERY_DOC_DATE]
" size="15
" value="'.htmlspecialcharsbx(isset($post['DELIVERY_DOC_DATE
']) ? $post['DELIVERY_DOC_DATE
'] : $data['DELIVERY_DOC_DATE
']).'">
476 <span class="adm-calendar-icon
" title="'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_CHOOSE_DATE
').'" onclick="BX.calendar({node:
this, field:\
'DELIVERY_DOC_DATE\', form: \'\', bTime: false, bHideTime: false});"></span>
482 <div id="DELIVERY_INFO_'.$index.
'">'.$extraServiceHTML.
'
486 if(!empty($data[
'DELIVERY_REQUEST_NAME']) || !empty($data[
'DELIVERY_REQUEST_ERROR_DESCRIPTION']))
488 $result .=
'<div class="adm-bus-table-container caption border">
489 <div class="adm-bus-table-caption-title" style="background: #eef5f5;">'.Loc::getMessage(
'SALE_ORDER_SHIPMENT_DEL_REQ_INFO').
'</div>
490 <table border="0" cellspacing="0" cellpadding="0" width="100%" class="adm-detail-content-table edit-table ">
493 if(!empty($data[
'DELIVERY_REQUEST_NAME']))
496 <td class="adm-detail-content-cell-l" width="40%">'.Loc::getMessage(
'SALE_ORDER_SHIPMENT_DEL_REQ').
':</td>
497 <td class="adm-detail-content-cell-r"><a href="'.$data[
'DELIVERY_REQUEST_LINK'].
'"">'.$data[
'DELIVERY_REQUEST_NAME'].
'</a></td>
501 if(!empty($data[
'DELIVERY_REQUEST_ERROR_DESCRIPTION']))
504 <td valign="top" class="adm-detail-content-cell-l" width="40%">'.Loc::getMessage(
'SALE_ORDER_SHIPMENT_DEL_REQ_ERROR').
':</td>
505 <td class="adm-detail-content-cell-r">'.$data[
'DELIVERY_REQUEST_ERROR_DESCRIPTION'].
'</td>
515 if(is_array($data[
'DELIVERY_ADDITIONAL_INFO_EDIT']) && !empty($data[
'DELIVERY_ADDITIONAL_INFO_EDIT']))
517 $result .=
'<div class="adm-bus-table-container caption border">
518 <div class="adm-bus-table-caption-title" style="background: #eef5f5;">'.Loc::getMessage(
'SALE_ORDER_SHIPMENT_BLOCK_DELIVERY_ADDITIONAL').
'</div>
519 <table border="0" cellspacing="0" cellpadding="0" width="100%" class="adm-detail-content-table edit-table ">
522 foreach($data[
'DELIVERY_ADDITIONAL_INFO_EDIT'] as $name => $params)
525 <td class="adm-detail-content-cell-l" width="40%">'.$params[
'LABEL'].
':</td>
526 <td class="adm-detail-content-cell-r" width="60%">
527 '.\Bitrix\Sale\Internals\Input\Manager::getEditHtml(
'SHIPMENT['.$index.
'][ADDITIONAL]['.$name.
']', $params).
'
531 $result .=
' </tr></tbody>
537 <div class="clb"></div>
547 'id' => (
int)$data[
'ID'],
549 'canAllow' => $isAllowDelivery,
550 'canDeduct' => $isAllowDeduction,
551 'canChangeStatus' =>
false,
552 'src_list' => $srcList,
554 'discounts' => $data[
"DISCOUNTS"] ?? [],
555 'discountsMode' => ($formType ==
"edit" ?
"view" :
"edit"),
556 'templateType' =>
'edit',
557 'weightKoef' => self::getWeightKoef($data[
'SITE_ID']),
561 if ($customPriceDelivery ==
'Y')
562 $params[
'calculated_price'] = $data[
'CALCULATED_PRICE'];
564 if ($customWeightDelivery ==
'Y')
565 $params[
'calculated_weight'] = $data[
'CALCULATED_WEIGHT'];
1148 $isUserResponsible =
null;
1149 $isAllowCompany =
null;
1151 if (array_key_exists(
'IS_USER_RESPONSIBLE', $data))
1153 $isUserResponsible = $data[
'IS_USER_RESPONSIBLE'];
1156 if (array_key_exists(
'IS_ALLOW_COMPANY', $data))
1158 $isAllowCompany = $data[
'IS_ALLOW_COMPANY'];
1161 if (self::$backUrl !==
'')
1164 $backUrl = $_SERVER[
'REQUEST_URI'];
1166 $allowDeliveryString = ($data[
'ALLOW_DELIVERY'] ==
'Y') ?
'YES' :
'NO';
1167 $deductedString = ($data[
'DEDUCTED'] ==
'Y') ?
'YES' :
'NO';
1170 $isAllowDelivery = in_array($data[
"STATUS_ID"], $allowedStatusesDelivery) && $formType !=
'archive' && $formType !=
'edit';
1172 $isActive = ($formType !=
'edit' && $formType !=
'archive') && !$data[
'ORDER_LOCKED'];
1174 $triangle = ($isActive && $isAllowDelivery) ?
'<span class="triangle"> ▾</span>' :
'';
1176 if ($data[
'ALLOW_DELIVERY'] ==
'Y')
1177 $class = ($isActive && $isAllowDelivery) ?
'' :
'class="not_active"';
1179 $class = ($isActive && $isAllowDelivery) ?
'class="notdelivery"' :
'class="notdelivery not_active"';
1181 $allowDelivery =
'<span><span id="BUTTON_ALLOW_DELIVERY_'.$index.
'" '.$class.
'>'.
Loc::getMessage(
'SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_'.$allowDeliveryString).
'</span>'.$triangle.
'</span>';
1184 $isAllowDeduction = in_array($data[
"STATUS_ID"], $allowedStatusesDeduction) && $formType !=
'archive' && $formType !=
'edit';
1186 $triangle = ($isActive && $isAllowDeduction) ?
'<span class="triangle"> ▾</span>' :
'';
1188 if ($data[
'DEDUCTED'] ==
'Y')
1189 $class = ($isActive && $isAllowDeduction) ?
'' :
'class="not_active"';
1191 $class = ($isActive && $isAllowDeduction) ?
'class="notdeducted"' :
'class="notdeducted not_active"';
1192 $deducted =
'<span><span id="BUTTON_DEDUCTED_'.$index.
'" '.$class.
'>'.
Loc::getMessage(
'SALE_ORDER_SHIPMENT_DEDUCTED_'.$deductedString).
'</span>'.$triangle.
'</span>';
1194 $map = ($data[
'DELIVERY_ID'] > 0) ? self::getMap($data[
'DELIVERY_ID'], $index, $data[
'DELIVERY_STORE_ID'],
'view') :
'';
1196 $lang = Main\Application::getInstance()->getContext()->getLanguage();
1198 $extraServiceHTML =
'';
1199 $mainLogoPath =
'/bitrix/images/sale/logo-default-d.gif';
1200 $shortLogoPath =
'/bitrix/images/sale/logo-default-d.gif';
1202 if (($isAllowCompany !==
false || $isUserResponsible !==
false) && $data[
'DELIVERY_ID'] > 0)
1204 $service = Services\Manager::getObjectById($data[
'DELIVERY_ID']);
1205 $extraServiceManager = new \Bitrix\Sale\Delivery\ExtraServices\Manager($data[
'DELIVERY_ID']);
1206 $extraServiceManager->setOperationCurrency($data[
'CURRENCY']);
1207 if ($data[
'EXTRA_SERVICES'])
1208 $extraServiceManager->setValues($data[
'EXTRA_SERVICES']);
1210 if ($service && $service->getLogotip() > 0)
1212 $mainLogo = self::getMainImgPath($service->getLogotip());
1213 $shortLogo = self::getShortImgPath($service->getLogotip());
1214 $mainLogoPath = $mainLogo[
'src'];
1215 $shortLogoPath = $shortLogo[
'src'];
1218 $extraService = $extraServiceManager->getItems();
1220 $extraServiceHTML = self::getExtraServiceEditControl($extraService, $index,
true, self::$shipment);
1225 $jsShipmentStatus = array();
1226 foreach ($shipmentStatusList as $id => $name)
1228 $jsShipmentStatus[] = array(
1230 'NAME' => htmlspecialcharsbx($name)
1235 $canChangeStatus = in_array($data[
"STATUS_ID"], $allowedStatusesFrom) && $formType !=
'archive' && $formType !=
'edit';
1236 $triangle = ($isActive && $canChangeStatus) ?
'<span class="triangle"> ▾</span>' :
'';
1238 $class = ($isActive && $canChangeStatus) ?
'' :
'class="not_active"';
1239 $shipmentStatus =
'<span><span id="BUTTON_SHIPMENT_' . $index .
'" '.$class.
'>' . htmlspecialcharsbx($shipmentStatusList[$data[
'STATUS_ID']]) .
'</span>'.$triangle.
'</span>';
1241 $shippingBlockId =
'';
1242 if(($isAllowCompany !==
false || $isUserResponsible !==
false) && ($isActive || $data[
'TRACKING_NUMBER'] <>
''))
1244 $shippingBlockId =
'<tr>
1245 <td class="adm-detail-content-cell-l" width="40%">'.Loc::getMessage(
'SALE_ORDER_SHIPMENT_TRACKING_NUMBER').
':</td>
1246 <td class="adm-detail-content-cell-r tal">
1247 <input type="text" id="TRACKING_NUMBER_'.$index.
'_EDIT" name="SHIPMENT['.$index.
'][TRACKING_NUMBER]" style="display: none;" value="'.htmlspecialcharsbx($data[
'TRACKING_NUMBER']).
'">
1248 <span id="TRACKING_NUMBER_'.$index.
'_VIEW">'.htmlspecialcharsbx($data[
'TRACKING_NUMBER']).
'</span>';
1250 $shippingBlockId .=
'<div class="bx-adm-edit-pencil" id="TRACKING_NUMBER_PENCIL_'.$index.
'"></div>';
1252 if($data[
'HAS_TRACKING'] && $data[
'TRACKING_NUMBER'] <>
'')
1254 $shippingBlockId .=
'</td></tr>
1256 <td class="adm-detail-content-cell-l" width="40%">'.Loc::getMessage(
'SALE_ORDER_SHIPMENT_TRACKING_STATUS').
':</td>
1257 <td class="adm-detail-content-cell-r tal">'.
1258 '<span id="sale-order-shipment-tracking-status-'.$index.
'">'.(intval($data[
'TRACKING_STATUS']) >= 0 ? \Bitrix\Sale\Delivery\Tracking\Manager::getStatusName($data[
'TRACKING_STATUS']) :
'-').
'</span>'.
1259 ' [<span onclick="BX.Sale.Admin.GeneralShipment.refreshTrackingStatus(\''.$index.
'\', \
''.$data[
'ID'].
'\');
" style="border-bottom: 1px dashed #2675d7; cursor: pointer; color: #2675d7;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_STATUS_REFRESH').'</span>]<br></td>
1262 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_DESCRIPTION').':</td>
1263 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-tracking-description-
'.$index.'">'.($data['TRACKING_DESCRIPTION'] <> '' ? $data['TRACKING_DESCRIPTION'] : '-').'<br></td>
1266 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_LAST_CHANGE').':</td>
1267 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-tracking-last-change-
'.$index.'">'.($data['TRACKING_LAST_CHANGE'] <> '' ? $data['TRACKING_LAST_CHANGE'] : '-').'<br></td>
1270 if(!empty($data['TRACKING_URL']))
1272 $shippingBlockId .= '<tr>
1273 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_TRACKING_URL').':</td>
1274 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-tracking-url-
'.$index.'"><a href="'.$data['TRACKING_URL
'].'">'.$data['TRACKING_URL'].'</a><br></td>
1280 $shippingBlockDocNum = '';
1281 if (($isAllowCompany !== false || $isUserResponsible !== false) && $data['DELIVERY_DOC_NUM'] <> '')
1283 $shippingBlockDocNum = '<tr>
1284 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_DOC_NUM').':</td>
1285 <td class="adm-detail-content-cell-r tal
">
1286 ' . htmlspecialcharsbx($data['DELIVERY_DOC_NUM']) . '
1291 $shippingBlockDocDate = '';
1292 if (($isAllowCompany !== false || $isUserResponsible !== false) && $data['DELIVERY_DOC_DATE'] <> '')
1294 $shippingBlockDocDate = '<tr>
1295 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_DOC_DATE').':</td>
1296 <td class="adm-detail-content-cell-r tal
">
1297 ' . htmlspecialcharsbx($data['DELIVERY_DOC_DATE']) . '
1302 $dateInsert = new Date($data['DATE_INSERT']);
1305 if ($data['FFD_105_ENABLED'] === 'Y')
1307 $checkLink .= '<tr><td class="tac
" id="SHIPMENT_CHECK_LIST_ID_
'.$data['ID
'].'">';
1308 if (!empty($data['CHECK']))
1310 $checkLink .= OrderShipment::buildCheckHtml($data['CHECK']);
1312 $checkLink .= "</td></tr>
";
1313 if($formType != 'archive' && $data['HAS_ENABLED_CASHBOX'] === 'Y' && $data['CAN_PRINT_CHECK'] === 'Y')
1315 $checkLink .= '<tr><td class="adm-detail-content-cell-r tac
"><a href="javascript:void(0);
" onclick="BX.Sale.Admin.OrderShipment.prototype.showCreateCheckWindow(
'.$data['ID
'].');
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_CHECK_ADD').'</a></td></tr>';
1319 $sectionDelete = '';
1320 $allowedDeliveryStatusesDelete = DeliveryStatus::getStatusesUserCanDoOperations($USER->GetID(), array('delete'));
1321 if (in_array($data["STATUS_ID
"], $allowedDeliveryStatusesDelete) && !$data['ORDER_LOCKED'] && $formType != 'archive')
1322 $sectionDelete = '<div class="adm-bus-pay-section-action
" id="SHIPMENT_SECTION_
'.$index.'_DELETE
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_DELETE').'</div>';
1325 $allowedOrderStatusesUpdate = DeliveryStatus::getStatusesUserCanDoOperations($USER->GetID(), array('update'));
1326 if (in_array($data["STATUS_ID
"], $allowedOrderStatusesUpdate) && !$data['ORDER_LOCKED'] && $formType != 'archive')
1328 $sectionEdit = '<div class="adm-bus-pay-section-action
" id="SHIPMENT_SECTION_
'.$index.'_EDIT
">'.
1329 static::renderShipmentEditLink($data+['backurl'=>$backUrl]).
1330 Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_EDIT').'</a></div>';
1333 $weightView = roundEx(
1335 $data['WEIGHT']/self::getWeightKoef($data['SITE_ID'])
1337 SALE_WEIGHT_PRECISION
1338 )." ".self::getWeightUnit($data['SITE_ID']);
1341 <input type="hidden
" name="SHIPMENT[
'.$index.'][DEDUCTED]
" id="STATUS_DEDUCTED_
'.$index.'" value="'.($data['DEDUCTED
'] == "" ? "N" : $data['DEDUCTED
']).'">
1342 <input type="hidden
" name="SHIPMENT[
'.$index.'][ALLOW_DELIVERY]
" id="STATUS_ALLOW_DELIVERY_
'.$index.'" value="'.($data['ALLOW_DELIVERY
'] == "" ? "N" : $data['ALLOW_DELIVERY
']).'">
1343 <input type="hidden
" name="SHIPMENT[
'.$index.'][STATUS_ID]
" id="STATUS_SHIPMENT_
'.$index.'" value="'.$data['STATUS_ID
'].'">
1344 <div class="adm-bus-pay
" id="shipment_container_
'.$index.'">
1345 <input type="hidden
" name="SHIPMENT[
'.$index.'][SHIPMENT_ID]
" id="SHIPMENT_ID_
'.$index.'" value="'.$data['ID
'].'">
1346 <div class="adm-bus-component-content-container
">
1347 <div class="adm-bus-pay-section
">
1348 <div class="adm-bus-pay-section-title-container
">
1349 <div class="adm-bus-pay-section-title
" id="shipment_
'.$data['ID
'].'">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_EDIT_SHIPMENT_TITLE', array("#ID#
" => $data['ID'], '#DATE_INSERT#' => $dateInsert)).'</div>
1350 <div class="adm-bus-pay-section-action-block
">'.$sectionDelete.$sectionEdit.'
1351 <div class="adm-bus-pay-section-action
" id="SHIPMENT_SECTION_
'.$index.'_TOGGLE
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_TOGGLE_UP').'</div>
1354 <div class="adm-bus-pay-section-content
" id="SHIPMENT_SECTION_
'.$index.'" style="display:none;
">
1355 <div class="adm-bus-pay-section-sidebar
">
1356 <div style="background: url(\
''.$mainLogoPath.
'\')
" id="delivery_service_logo_
'.$index.'" class="adm-shipment-block-logo
"></div>
1359 <div class="adm-bus-pay-section-right
">
1360 <div class="adm-bus-table-container caption border
">
1361 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SERVICE').'</div>
1362 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1365 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SERVICE').':</td>
1366 <td class="adm-detail-content-cell-r
">
1367 '.(($isAllowCompany === false && $isUserResponsible === false) ? Loc::getMessage('SALE_ORDER_SHIPMENT_HIDDEN') : htmlspecialcharsbx($data['DELIVERY_NAME']).' ['.$data['DELIVERY_ID'].']'). '
1373 <div class="adm-bus-table-container caption border
">
1374 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_BLOCK_PRICE').'</div>
1375 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1377 <tr style="display: none;
">
1378 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SUM_PRICE').':</td>
1379 <td class="adm-detail-content-cell-r tal
">
1380 '.SaleFormatCurrency(floatval($data['BASE_PRICE_DELIVERY']), $data['CURRENCY']).'
1383 <tr id="sale-order-shipment-discounts-row-
'.$index.'" style="display: none;
">
1384 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DISCOUNT').':</td>
1385 <td class="adm-detail-content-cell-r tal
" id="sale-order-shipment-discounts-container-
'.$index.'"></td>
1388 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SUM_DISCOUNT_PRICE').':</td>
1389 <td class="adm-detail-content-cell-r tal
" id="PRICE_DELIVERY_
'.$index.'">'.SaleFormatCurrency(floatval($data['PRICE_DELIVERY']), $data['CURRENCY']).'<br></td>
1394 <div class="adm-bus-table-container caption border
">
1395 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_BLOCK_WEIGHT').'</div>
1396 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1399 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_WEIGHT').':</td>
1400 <td class="adm-detail-content-cell-r tal
" id="WEIGHT_DELIVERY_
'.$index.'">'.$weightView.'<br></td>
1405 <div class="adm-bus-table-container caption border
">
1406 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT').'</div>
1407 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1410 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_OFFICE').':</td>
1411 <td class="adm-detail-content-cell-r
">
1412 '.(($isAllowCompany === false && $isUserResponsible === false) ? Loc::getMessage('SALE_ORDER_SHIPMENT_HIDDEN') : (isset($companyList[$data['COMPANY_ID']]) ? htmlspecialcharsbx($companyList[$data['COMPANY_ID']]) : Loc::getMessage('SALE_ORDER_SHIPMENT_NO_COMPANY'))).'
1420 $result .= '<div class="adm-bus-table-container caption border
" style="padding-top:10px;
">
1421 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_CHECK_LINK_TITLE').'</div>
1422 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1429 $result .= '<div class="adm-bus-table-container caption border
">
1430 <div class="adm-bus-moreInfo_part1
">
1431 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_STATUS').'</div>
1432 <table class="adm-detail-content-table edit-table
" border="0
" width="100%
" cellpadding="0
" cellspacing="0
">
1435 <td class="adm-detail-content-cell-l vat
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_ALLOW_DELIVERY').':</td>
1436 <td class="adm-detail-content-cell-r delivery-status
">'.$allowDelivery.'</td>
1438 '.((!empty($data['EMP_ALLOW_DELIVERY_ID'])) ? '
1440 <td class="adm-detail-content-cell-l vat
" width="40%
"></td>
1441 <td class="adm-detail-content-cell-r
">
1442 <div>'.Loc::getMessage('SALE_ORDER_SHIPMENT_MODIFY_BY').': <span style="color: #66878F
" id="order_additional_info_date_responsible
">'.htmlspecialcharsbx($data['DATE_ALLOW_DELIVERY']).'</span> <a href="/
bitrix/admin/user_edit.php?lang=
'.$lang.'&ID=
'.$data['EMP_ALLOW_DELIVERY_ID
'].'" id="order_additional_info_emp_responsible
">'.htmlspecialcharsbx($data['EMP_ALLOW_DELIVERY_ID_LAST_NAME']).' '.htmlspecialcharsbx($data['EMP_ALLOW_DELIVERY_ID_NAME']).'</a></div>
1447 <td class="adm-detail-content-cell-l vat
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DEDUCTED').':</td>
1448 <td class="adm-detail-content-cell-r
"><div class="delivery-status
">'.$deducted.'</div></td>
1450 '.((!empty($data['EMP_DEDUCTED_ID'])) ? '
1452 <td class="adm-detail-content-cell-l vat
" width="40%
"></td>
1453 <td class="adm-detail-content-cell-r
">
1454 <div>'.Loc::getMessage('SALE_ORDER_SHIPMENT_MODIFY_BY').': <span style="color: #66878F
" id="order_additional_info_date_responsible
">'.htmlspecialcharsbx($data['DATE_DEDUCTED']).'</span> <a href="/
bitrix/admin/user_edit.php?lang=
'.$lang.'&ID=
'.$data['EMP_DEDUCTED_ID
'].'" id="order_additional_info_emp_responsible
">'.htmlspecialcharsbx($data['EMP_DEDUCTED_ID_LAST_NAME']).' '.htmlspecialcharsbx($data['EMP_DEDUCTED_ID_NAME']).'</a></div>
1459 <td class="adm-detail-content-cell-l vat
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_DOC_STATUS').':</td>
1460 <td class="adm-detail-content-cell-r
">
1461 <div class="shipment-status
">
1471 if (!empty($shippingBlockId) || !empty($shippingBlockDocNum) || !empty($shippingBlockDocDate) || !empty($extraServiceHTML))
1473 $result .= '<div class="adm-bus-table-container caption border
">
1474 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_DELIVERY_INFO').'</div>
1475 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1477 ' . $shippingBlockId . $shippingBlockDocNum . $shippingBlockDocDate . '
1480 <div id="DELIVERY_INFO_
' . $index . '">
1481 ' . $extraServiceHTML . '
1486 if(!empty($data['DELIVERY_REQUEST_NAME']) || !empty($data['DELIVERY_REQUEST_ERROR_DESCRIPTION']))
1488 $result .= '<div class="adm-bus-table-container caption border
">
1489 <div class="adm-bus-table-caption-title
" style="background: #eef5f5;
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DEL_REQ_INFO').'</div>
1490 <table border="0
" cellspacing="0
" cellpadding="0
" width="100%
" class="adm-detail-content-table edit-table
">
1493 if(!empty($data['DELIVERY_REQUEST_NAME']))
1496 <td class="adm-detail-content-cell-l
" width="40%
">'.Loc::getMessage('SALE_ORDER_SHIPMENT_DEL_REQ').':</td>
1497 <td class="adm-detail-content-cell-r
"><a href="'.$data['DELIVERY_REQUEST_LINK
'].'"">
'.$data['DELIVERY_REQUEST_NAME
'].'</a></td>
1501 if(!empty($data['DELIVERY_REQUEST_ERROR_DESCRIPTION
']))
1504 <td valign=
"top" class=
"adm-detail-content-cell-l" width=
"40%">
'.Loc::getMessage('SALE_ORDER_SHIPMENT_DEL_REQ_ERROR
').':</td>
1505 <td
class=
"adm-detail-content-cell-r">
'.$data['DELIVERY_REQUEST_ERROR_DESCRIPTION
'].'</td>
1515 if(is_array($data['DELIVERY_ADDITIONAL_INFO_VIEW
']) && !empty($data['DELIVERY_ADDITIONAL_INFO_VIEW
']))
1517 $result .= '<div
class=
"adm-bus-table-container caption border">
1518 <div
class=
"adm-bus-table-caption-title" style=
"background: #eef5f5;">
'.Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_DELIVERY_ADDITIONAL
').'</div>
1519 <table border=
"0" cellspacing=
"0" cellpadding=
"0" width=
"100%" class=
"adm-detail-content-table edit-table ">
1522 foreach($data['DELIVERY_ADDITIONAL_INFO_VIEW
'] as $name => $params)
1525 <td
class=
"adm-detail-content-cell-l" width=
"40%">
'.$params['LABEL
'].':</td>
1526 <td
class=
"adm-detail-content-cell-r" width=
"60%">
1527 '.\Bitrix\Sale\Internals\Input\Manager::getViewHtml($params).'
1531 $result .= ' </tr></tbody>
1537 <div
class=
"clb"></div>
1538 <div
class=
"adm-s-order-shipment-basket-structure">
'.Loc::getMessage('SALE_ORDER_SHIPMENT_BASKET
').'</div>
';
1540 $shipmentBasket = new OrderBasketShipment(self::$shipment, "BX.Sale.Admin.ShipmentBasketObj_".$index, "shipment_basket_".$index);
1541 $result .= $shipmentBasket->getView($index);
1545 $result .= self::getShortViewTemplate($data, $index, $shortLogoPath, $formType);
1552 'canAllow
' => $isAllowDelivery,
1553 'canDeduct
' => $isAllowDeduction,
1554 'canChangeStatus
' => $canChangeStatus,
1555 'id' => (int)$data['ID
'],
1556 'extra_service
' => array(),
1557 'shipment_statuses
' => $jsShipmentStatus,
1559 'active
' => $isActive,
1560 'discounts
' => $data["DISCOUNTS"],
1561 'discountsMode
' => ($formType == "edit" ? "edit" : "view"),
1562 'templateType
' => 'view
',
1563 'weightKoef
' => self::getWeightKoef($data['SITE_ID
']),
1564 'weightUnit
' => self::getWeightUnit($data['SITE_ID
'])
1567 $result .= self::initJsShipment($params);