Exemple #1
0
    private static function getShortViewTemplate($data, $index, $logo, $formType)
    {
        $allowDeliveryString = $data['ALLOW_DELIVERY'] == 'Y' ? 'YES' : 'NO';
        $deductedString = $data['ALLOW_DELIVERY'] == 'Y' ? 'YES' : 'NO';
        $isActive = $formType != 'edit';
        $triangle = $isActive ? '<span class="triangle"> &#9662;</span>' : '';
        if ($data['ALLOW_DELIVERY'] == 'Y') {
            $class = !$isActive ? 'class="not_active"' : '';
        } else {
            $class = !$isActive ? 'class="notdelivery not_active"' : 'class="notdelivery"';
        }
        $allowDelivery = '<span><span id="BUTTON_ALLOW_DELIVERY_SHORT_' . $index . '" ' . $class . '>' . Loc::getMessage('SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_' . $allowDeliveryString) . '</span>' . $triangle . '</span>';
        if ($data['DEDUCTED'] == 'Y') {
            $class = !$isActive ? 'class="not_active"' : '';
        } else {
            $class = !$isActive ? 'class="notdeducted not_active"' : 'class="notdeducted"';
        }
        $deducted = '<span><span id="BUTTON_DEDUCTED_SHORT_' . $index . '" ' . $class . '>' . Loc::getMessage('SALE_ORDER_SHIPMENT_DEDUCTED_' . $deductedString) . '</span>' . $triangle . '</span>';
        $shipmentStatusList = OrderShipmentStatus::getShipmentStatusList();
        $class = !$isActive ? 'class="not_active"' : '';
        $shipmentStatus = '<span><span id="BUTTON_SHIPMENT_SHORT_' . $index . '" ' . $class . '>' . htmlspecialcharsbx($shipmentStatusList[$data['STATUS_ID']]) . '</span>' . $triangle . '</span>';
        $result = '<div class="adm-bus-pay-section-content" id="SHIPMENT_SECTION_SHORT_' . $index . '" style="display:none;">
						<table class="adm-detail-content-table edit-table" border="0" width="100%" cellpadding="0" cellspacing="0">
							<tbody>
								<tr class="adm-shipment-block-short-info">
									<td class="adm-detail-content-cell-l vat">
										<div style="background: url(\'' . $logo . '\')" id="delivery_service_short_logo_' . $index . '" class="adm-shipment-block-short-logo"></div>
									</td>
									<td class="adm-detail-content-cell-l vat">' . Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_SERVICE') . ': ' . htmlspecialcharsbx($data['DELIVERY_NAME']) . '</td>
									<td class="adm-detail-content-cell-l vat"><div class="delivery-status">' . Loc::getMessage('SALE_ORDER_SHIPMENT_ALLOW_DELIVERY') . ': ' . $allowDelivery . '</div></td>
									<td class="adm-detail-content-cell-l vat"><div class="deducted-status">' . Loc::getMessage('SALE_ORDER_SHIPMENT_DEDUCTED') . ': ' . $deducted . '</div></td>
									<td class="adm-detail-content-cell-l vat"><div class="shipment-status">' . Loc::getMessage('SALE_ORDER_SHIPMENT_DELIVERY_STATUS') . ': ' . $shipmentStatus . '</div></td>
								</tr>
							</tbody>
						</table>
						<div class="clb"></div>
					</div>';
        return $result;
    }
<tr>
	<td>
		<div style="position: relative; vertical-align: top">
			<?php 
$tabControl->DraggableBlocksStart();
?>
			<?php 
foreach ($blocksOrder as $blockCode) {
    $tabControl->DraggableBlockBegin(GetMessage("SALE_BLOCK_TITLE_" . toUpper($blockCode)), $blockCode);
    switch ($blockCode) {
        case "goodsList":
            echo $shipmentOrderBasket->getEdit();
            echo '<div style="display: none;">' . $shipmentOrderBasket->settingsDialog->getHtml() . '</div>';
            break;
        case "shipmentStatus":
            echo \Bitrix\Sale\Helpers\Admin\Blocks\OrderShipmentStatus::getEdit($shipment);
            break;
        case "shipment":
            echo \Bitrix\Sale\Helpers\Admin\Blocks\OrderShipment::getEdit($shipment, 0, 'edit', $dataForRecovery[1]);
            break;
        case "buyer":
            echo \Bitrix\Sale\Helpers\Admin\Blocks\OrderBuyer::getView($saleOrder);
            break;
        case "additional":
            echo \Bitrix\Sale\Helpers\Admin\Blocks\OrderAdditional::getEdit($shipment, $formId . '_form', 'SHIPMENT[1]');
            break;
    }
    $tabControl->DraggableBlockEnd();
}
?>
		</div>
Exemple #3
0
 public static function FormatShipmentStatusChanged($arData)
 {
     $info = GetMessage("SOC_SHIPMENT_STATUS_CHANGE_INFO");
     foreach ($arData as $param => $value) {
         $status = \Bitrix\Sale\Helpers\Admin\Blocks\OrderShipmentStatus::getShipmentStatusList();
         $info = str_replace("#" . $param . "#", $status[$value], $info);
     }
     return array("NAME" => GetMessage("SOC_SHIPMENT_STATUS_CHANGE"), "INFO" => $info);
 }