本文整理汇总了PHP中CSaleOrder::CanUserMarkOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrder::CanUserMarkOrder方法的具体用法?PHP CSaleOrder::CanUserMarkOrder怎么用?PHP CSaleOrder::CanUserMarkOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrder
的用法示例。
在下文中一共展示了CSaleOrder::CanUserMarkOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
$siteName = $arSite["NAME"] . " (" . $LID . ")";
}
$APPLICATION->SetTitle(str_replace("#LID#", $siteName, GetMessage("NEWO_TITLE_ADD")));
} else {
$APPLICATION->SetTitle(GetMessage("NEWO_TITLE_DEFAULT"));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$aMenu = array();
$aMenu = array(array("ICON" => "btn_list", "TEXT" => GetMessage("SOE_TO_LIST"), "LINK" => "/bitrix/admin/sale_order.php?lang=" . LANGUAGE_ID));
$link = urlencode(DeleteParam(array("mode")));
$link = urlencode($GLOBALS["APPLICATION"]->GetCurPage()) . "?mode=settings" . ($link != "" ? "&" . $link : "");
$bUserCanViewOrder = CSaleOrder::CanUserViewOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanDeleteOrder = CSaleOrder::CanUserDeleteOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanCancelOrder = CSaleOrder::CanUserCancelOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanDeductOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "PERM_DEDUCTION", $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanMarkOrder = CSaleOrder::CanUserMarkOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanPayOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "P", $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanDeliverOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "D", $GLOBALS["USER"]->GetUserGroupArray());
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_"));
}
if ($ID > 0) {
$aMenu[] = array("TEXT" => GetMessage("NEWO_TO_PRINT"), "TITLE" => GetMessage("NEWO_TO_PRINT_TITLE"), "LINK" => "/bitrix/admin/sale_order_print.php?ID=" . $ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"));
}
if (($saleModulePermissions == "W" || $str_PAYED != "Y") && $bUserCanDeleteOrder && $ID > 0) {
$aMenu[] = array("TEXT" => GetMessage("NEWO_ORDER_DELETE"), "TITLE" => GetMessage("NEWO_ORDER_DELETE_TITLE"), "LINK" => "javascript:if(confirm('" . GetMessage("NEWO_CONFIRM_DEL_MESSAGE") . "')) window.location='sale_order.php?ID=" . $ID . "&action=delete&lang=" . LANG . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_")) . "'", "WARNING" => "Y");
}
//delete context menu for remote query
if (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1) {
$context = new CAdminContextMenu($aMenu);
$context->Show();
示例2: array
{
$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_")
);
}
if ($ID > 0)
{
$aMenu[] = array(
示例3: fillOrderFromRequest
/**
* Filling the order data from request
*
* @internal
*
* @param Sale\Order $order Entity order.
* @param array $fields An array of request data.
*
* @return Sale\Result
*/
public static function fillOrderFromRequest(Sale\Order $order, array $fields)
{
global $USER;
$result = new Sale\Result();
if (isset($fields['CANCELED'])) {
if ($order->getId() > 0 && $order->getField('CANCELED') != $fields['CANCELED']) {
if (!\CSaleOrder::CanUserCancelOrder($order->getId(), $USER->GetUserGroupArray(), $USER->GetID())) {
$result->addError(new Sale\ResultError(Main\Localization\Loc::getMessage('SALE_COMPATIBLE_ORDER_CANCEL_NO_PERMISSION'), 'SALE_COMPATIBLE_ORDER_CANCEL_NO_PERMISSION'));
return $result;
}
/** @var Sale\Result $r */
$r = $order->setField('CANCELED', $fields['CANCELED']);
if (!$r->isSuccess()) {
$result->addErrors($r->getErrors());
}
}
}
if (isset($fields['MARKED'])) {
if ($order->getId() > 0 && $order->getField('MARKED') != $fields['MARKED']) {
if (!\CSaleOrder::CanUserMarkOrder($order->getId(), $USER->GetUserGroupArray(), $USER->GetID())) {
$result->addError(new Sale\ResultError(Main\Localization\Loc::getMessage('SALE_COMPATIBLE_ORDER_MARKED_NO_PERMISSION'), 'SALE_COMPATIBLE_ORDER_MARKED_NO_PERMISSION'));
return $result;
}
/** @var Sale\Result $r */
$r = $order->setField('MARKED', $fields['MARKED']);
if (!$r->isSuccess()) {
$result->addErrors($r->getErrors());
}
}
}
return $result;
}