当前位置: 首页>>代码示例>>PHP>>正文


PHP CSaleOrder::CanUserUpdateOrder方法代码示例

本文整理汇总了PHP中CSaleOrder::CanUserUpdateOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrder::CanUserUpdateOrder方法的具体用法?PHP CSaleOrder::CanUserUpdateOrder怎么用?PHP CSaleOrder::CanUserUpdateOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSaleOrder的用法示例。


在下文中一共展示了CSaleOrder::CanUserUpdateOrder方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

	);
}

if ($boolLocked && $saleModulePermissions >= 'W')
{
	$aMenu[] = array(
		"TEXT" => GetMessage("SOE_TO_UNLOCK"),
		"LINK" => "/bitrix/admin/sale_order_new.php?ID=".$ID."&unlock=Y&lang=".LANGUAGE_ID.GetFilterParams("filter_"),
	);
}

$link = urlencode(DeleteParam(array("mode")));
$link = urlencode($APPLICATION->GetCurPage())."?mode=settings".($link <> "" ? "&".$link: "");

$bUserCanViewOrder = CSaleOrder::CanUserViewOrder($ID, $arUserGroups, $intUserID);
$bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($ID, $arUserGroups, $LID);
$bUserCanDeleteOrder = CSaleOrder::CanUserDeleteOrder($ID, $arUserGroups, $intUserID);
$bUserCanCancelOrder = CSaleOrder::CanUserCancelOrder($ID, $arUserGroups, $intUserID);
$bUserCanDeductOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "PERM_DEDUCTION", $arUserGroups);
$bUserCanMarkOrder = CSaleOrder::CanUserMarkOrder($ID, $arUserGroups, $intUserID);
$bUserCanPayOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "P", $arUserGroups);
$bUserCanDeliverOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "D", $arUserGroups);

if ($bUserCanViewOrder && $ID > 0)
{
	$aMenu[] = array(
		"TEXT" => GetMessage("NEWO_DETAIL"),
		"TITLE"=>GetMessage("NEWO_DETAIL_TITLE"),
		"LINK" => "/bitrix/admin/sale_order_detail.php?ID=".$ID."&lang=".LANGUAGE_ID.GetFilterParams("filter_")
	);
}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:order_new.php

示例2: array

$errorMessage = "";
$bVarsFromForm = false;
$PARTIAL_SUBMIT = $PARTIAL_SUBMIT == "Y" ? "Y" : "N";
if ($PARTIAL_SUBMIT == "Y") {
    $bVarsFromForm = true;
    $arInd = array();
    $ids = array();
    $allIDs = array();
    $arIDs = explode(",", trim($_POST["BASKET_IDS"]));
    foreach ($arIDs as $v) {
        $ids[] = $v;
        $allIDs[] = $v;
    }
}
$bUserCanViewOrder = CSaleOrder::CanUserViewOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($ID, $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanCancelOrder = CSaleOrder::CanUserCancelOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanPayOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "P", $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanDeliverOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "D", $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanDeleteOrder = CSaleOrder::CanUserDeleteOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$simpleForm = COption::GetOptionString("sale", "lock_catalog", "Y");
$bSimpleForm = $simpleForm == "Y" ? True : False;
if ($action == "update" && $saleModulePermissions >= "U" && $_SERVER["REQUEST_METHOD"] == "POST" && check_bitrix_sessid() && $bUserCanEditOrder && $PARTIAL_SUBMIT != "Y" && empty($dontsave)) {
    // *****************************************************************
    // *****  Preparing  ***********************************************
    // *****************************************************************
    $bTrabsactionStarted = False;
    // Order params
    $currentDate = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)));
    $dbOrderTmp = CSaleOrder::GetList(array(), array("ID" => $ID));
    //GetByID($ID);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_edit.php

示例3: array

	if (($arOrder['LOCK_STATUS'] == "red" && $saleModulePermissions >= "W") || $arOrder['LOCK_STATUS'] == "yellow")
	{
		$arActions[] = array(
			"ICON" => "unlock",
			"TEXT" => GetMessage("IBEL_A_UNLOCK"),
			"TITLE" => GetMessage("IBLOCK_UNLOCK_ALT"),
			"ACTION" => $lAdmin->ActionDoGroup($arOrder["ID"], "unlock", '')
		);
		$arActions[] = array("SEPARATOR" => true);
	}

	$arActions[] = array("ICON"=>"view", "TEXT"=>GetMessage("SALE_DETAIL_DESCR"), "ACTION"=>$lAdmin->ActionRedirect("sale_order_detail.php?ID=".$f_ID."&lang=".LANGUAGE_ID.GetFilterParams("filter_")), "DEFAULT"=>true);
	$arActions[] = array("ICON"=>"print", "TEXT"=>GetMessage("SALE_PRINT_DESCR"), "ACTION"=>$lAdmin->ActionRedirect("sale_order_print.php?ID=".$f_ID."&lang=".LANGUAGE_ID.GetFilterParams("filter_")));
	if ($arOrder['LOCK_STATUS'] != "red")
	{
		if (CSaleOrder::CanUserUpdateOrder($f_ID, $arUserGroups))
			$arActions[] = array("ICON"=>"edit", "TEXT"=>GetMessage("SALE_OEDIT_DESCR"), "ACTION"=>$lAdmin->ActionRedirect("sale_order_new.php?ID=".$f_ID."&lang=".LANGUAGE_ID.GetFilterParams("filter_")));
		if ($saleModulePermissions == "W"
			|| $f_PAYED != "Y" && CSaleOrder::CanUserDeleteOrder($f_ID, $arUserGroups, $intUserID))
		{
			$arActions[] = array("SEPARATOR" => true);
			$arActions[] = array("ICON"=>"delete", "TEXT"=>GetMessage("SALE_DELETE_DESCR"), "ACTION"=>"if(confirm('".GetMessage('SALE_CONFIRM_DEL_MESSAGE')."')) ".$lAdmin->ActionDoGroup($f_ID, "delete"));
		}
	}

	$row->AddActions($arActions);
}

$arFooterArray = array(
	array(
		"title" => GetMessage('SOAN_FILTERED1').":",
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:order.php

示例4: execHandlerAction

 public static function execHandlerAction($orderId, $actionId)
 {
     global $DB, $USER;
     $arResult = array();
     $arOrder = CSaleOrder::GetById($orderId);
     $handlerActions = CSaleDeliveryHandler::getActionsList($arOrder["DELIVERY_ID"]);
     if (!array_key_exists($actionId, $handlerActions)) {
         $arResult = array("RESULT" => "ERROR", "TEXT" => GetMessage("SALE_DHLP_HANDLER_HAS_NO_ACTION"));
     }
     $dt = new \Bitrix\Main\Type\DateTime();
     $depList = \Bitrix\Sale\Internals\OrderDeliveryReqTable::getList(array('filter' => array('=ORDER_ID' => $orderId)));
     $dep = $depList->fetch();
     if ($dep && !is_null($dep["DATE_REQUEST"])) {
         $arResult = array("RESULT" => "ERROR", "TEXT" => GetMessage("SALE_DHLP_HANDLER_REQUEST_ALREADY_SENT"));
     }
     if (empty($arResult)) {
         $arUserGroups = $USER->GetUserGroupArray();
         $arOrder["ITEMS"] = array();
         $dbItemsList = CSaleBasket::GetList(array("SET_PARENT_ID" => "DESC", "TYPE" => "DESC", "NAME" => "ASC"), array("ORDER_ID" => $orderId));
         while ($arItem = $dbItemsList->GetNext()) {
             $arItem["DIMENSIONS"] = unserialize($arItem["~DIMENSIONS"]);
             unset($arItem["~DIMENSIONS"]);
             $arOrder["ITEMS"][] = $arItem;
         }
         $arResult = CSaleDeliveryHandler::executeAction($arOrder["DELIVERY_ID"], $actionId, $arOrder);
         if ($actionId == "REQUEST_SELF" && isset($arResult["TRACKING_NUMBER"])) {
             $bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($orderId, $arUserGroups);
             if ($bUserCanEditOrder) {
                 if ($dep) {
                     \Bitrix\Sale\Internals\OrderDeliveryReqTable::update($dep["ID"], array("DATE_REQUEST" => $dt));
                 } else {
                     \Bitrix\Sale\Internals\OrderDeliveryReqTable::add(array("ORDER_ID" => $orderId, "DATE_REQUEST" => $dt));
                 }
                 $fields = array();
                 if (isset($arResult["TRACKING_NUMBER"])) {
                     $fields["TRACKING_NUMBER"] = $arResult["TRACKING_NUMBER"];
                 }
                 if (isset($arResult["DELIVERY_DOC_NUM"])) {
                     $fields["DELIVERY_DOC_NUM"] = $arResult["DELIVERY_DOC_NUM"];
                     $fields["DELIVERY_DOC_DATE"] = Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", $arOrder["LID"])));
                 }
                 CSaleOrder::Update($orderId, $fields);
             }
         }
         CSaleOrderChange::AddRecord($orderId, "ORDER_DELIVERY_REQUEST_SENT", $arResult);
     }
     return $arResult;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:48,代码来源:delivery_helper.php

示例5: foreach

    } else {
        foreach ($arOrderProps as $key => $value) {
            $row->AddField("PROP_" . $key, "");
        }
        foreach ($arOrderPropsCode as $key => $value) {
            $row->AddField("PROP_" . $key, "");
        }
    }
    $arActions = array();
    if ($arOrder['LOCK_STATUS'] == "red" && $saleModulePermissions >= "W" || $arOrder['LOCK_STATUS'] == "yellow") {
        $arActions[] = array("ICON" => "unlock", "TEXT" => GetMessage("IBEL_A_UNLOCK"), "TITLE" => GetMessage("IBLOCK_UNLOCK_ALT"), "ACTION" => $lAdmin->ActionDoGroup($arOrder["ID"], "unlock", ''));
        $arActions[] = array("SEPARATOR" => true);
    }
    $arActions[] = array("ICON" => "view", "TEXT" => GetMessage("SALE_DETAIL_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_order_detail.php?ID=" . $f_ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")), "DEFAULT" => true);
    $arActions[] = array("ICON" => "print", "TEXT" => GetMessage("SALE_PRINT_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_order_print.php?ID=" . $f_ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")));
    if (CSaleOrder::CanUserUpdateOrder($f_ID, $GLOBALS["USER"]->GetUserGroupArray())) {
        $arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("SALE_OEDIT_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_order_new.php?ID=" . $f_ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")));
    }
    if ($saleModulePermissions == "W" || $f_PAYED != "Y" && CSaleOrder::CanUserDeleteOrder($f_ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID())) {
        $arActions[] = array("SEPARATOR" => true);
        $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("SALE_DELETE_DESCR"), "ACTION" => "if(confirm('" . GetMessage('SALE_CONFIRM_DEL_MESSAGE') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete"));
    }
    $row->AddActions($arActions);
}
$arFooterArray = array(array("title" => GetMessage('SOAN_FILTERED1') . ":", "value" => $dbOrderList->SelectedRowsCount()));
if ($saleModulePermissions == "W") {
    $dbOrderList = CSaleOrder::GetList(array("CURRENCY" => "ASC"), $arFilterTmp, array("CURRENCY", "SUM" => "PRICE"), false, array("CURRENCY", "SUM" => "PRICE"));
    while ($arOrderList = $dbOrderList->Fetch()) {
        $arFooterArray[] = array("title" => GetMessage("SOAN_ITOG") . " " . $arOrderList["CURRENCY"] . ":", "value" => htmlspecialcharsex(SaleFormatCurrency($arOrderList["PRICE"], $arOrderList["CURRENCY"])));
    }
} elseif ($saleModulePermissions < "W" && COption::GetOptionString("sale", "show_order_sum", "N") == "Y") {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order.php

示例6: htmlspecialcharsbx

            }
            $row->AddField("DELIVERY_DOC_DATE", $fieldValue);
        }
        $row->AddViewField('BASKET_DISCOUNT_COUPON', ' ');
        $row->AddViewField('BASKET_DISCOUNT_NAME', ' ');
        $row->AddViewField("SOURCE_NAME", '<span style="white-space:nowrap;">' . htmlspecialcharsbx($arOrder["SOURCE_NAME"]) . '</span>');
        $arActions = array();
        if ($arOrder['LOCK_STATUS'] == "red" && $saleModulePermissions >= "W" || $arOrder['LOCK_STATUS'] == "yellow") {
            $arActions[] = array("ICON" => "unlock", "TEXT" => Loc::getMessage("IBEL_A_UNLOCK"), "TITLE" => Loc::getMessage("IBLOCK_UNLOCK_ALT"), "ACTION" => $lAdmin->ActionDoGroup($arOrder["ID"], "unlock", ''));
            $arActions[] = array("SEPARATOR" => true);
        }
        $arActions[] = array("ICON" => "view", "TEXT" => Loc::getMessage("SALE_DETAIL_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_order_view.php?ID=" . $orderId . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")), "DEFAULT" => true);
        $arActions[] = array("ICON" => "copy", "TEXT" => Loc::getMessage("SOA_ORDER_COPY"), "ACTION" => $lAdmin->ActionRedirect("sale_order_create.php?ID=" . $orderId . "&lang=" . LANGUAGE_ID . "&" . 'SITE_ID=' . $arOrder['LID'] . '&' . bitrix_sessid_get() . GetFilterParams("filter_")));
        $arActions[] = array("ICON" => "print", "TEXT" => Loc::getMessage("SALE_PRINT_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_order_print.php?ID=" . $orderId . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")));
        if ($arOrder['LOCK_STATUS'] != "red") {
            if (CSaleOrder::CanUserUpdateOrder($orderId, $arUserGroups)) {
                $arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("SALE_OEDIT_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_order_edit.php?ID=" . $orderId . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")));
            }
            if ($saleModulePermissions == "W" || $arOrder["PAYED"] != "Y" && CSaleOrder::CanUserDeleteOrder($orderId, $arUserGroups, $intUserID)) {
                $arActions[] = array("SEPARATOR" => true);
                $arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SALE_DELETE_DESCR"), "ACTION" => "if(confirm('" . Loc::getMessage('SALE_CONFIRM_DEL_MESSAGE') . "')) " . $lAdmin->ActionDoGroup($orderId, "delete", GetFilterParams("filter_", false)));
            }
        }
        $row->AddActions($arActions);
    }
}
if (!empty($rowsList)) {
    if (in_array('BASKET_DISCOUNT_NAME', $arVisibleColumns)) {
        $discountList = array();
        $discountsIterator = Sale\Internals\OrderRulesTable::getList(array('select' => array('ORDER_ID', 'DISCOUNT_NAME' => 'ORDER_DISCOUNT.NAME', 'DISCOUNT_ID' => 'ORDER_DISCOUNT.ID'), 'filter' => array('@ORDER_ID' => array_keys($rowsList)), 'order' => array('ORDER_ID' => 'ASC', 'ID' => 'ASC')));
        while ($discount = $discountsIterator->fetch()) {
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:order.php


注:本文中的CSaleOrder::CanUserUpdateOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。