當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSaleOrder::CanUserViewOrder方法代碼示例

本文整理匯總了PHP中CSaleOrder::CanUserViewOrder方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSaleOrder::CanUserViewOrder方法的具體用法?PHP CSaleOrder::CanUserViewOrder怎麽用?PHP CSaleOrder::CanUserViewOrder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CSaleOrder的用法示例。


在下文中一共展示了CSaleOrder::CanUserViewOrder方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ShowError

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('sale')) {
    ShowError(GetMessage("SMOT_SALE_NOT_INSTALLED"));
    return;
}
if (!CModule::IncludeModule('mobileapp')) {
    ShowError("SMOT_MOBILEAPP_NOT_INSTALLED");
    return;
}
if (isset($_REQUEST['id'])) {
    $orderId = $_REQUEST['id'];
} else {
    return;
}
$bUserCanViewOrder = CSaleOrder::CanUserViewOrder($orderId, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
if (!$bUserCanViewOrder) {
    echo ShowError(GetMessage("SMOT_NO_PERMS2VIEW"));
    return;
}
$arResult["ORDER"] = CSaleMobileOrderUtils::getOrderInfoDetail($orderId);
$arResult["TYPES"] = array("ORDER_PAY" => GetMessage("SMOT_TR_TYPE_PAYMENT"), "CC_CHARGE_OFF" => GetMessage("SMOT_TR_TYPE_FROM_CARD"), "OUT_CHARGE_OFF" => GetMessage("SMOT_TR_TYPE_INPUT"), "ORDER_UNPAY" => GetMessage("SMOT_TR_TYPE_CANCEL_PAYMENT"), "ORDER_CANCEL_PART" => GetMessage("SMOT_TR_TYPE_CANCEL_SEMIPAYMENT"), "MANUAL" => GetMessage("SMOT_TR_TYPE_HAND"), "DEL_ACCOUNT" => GetMessage("SMOT_TR_TYPE_DELETE"), "AFFILIATE" => GetMessage("SMOT_MOBILEAPP_NOT_INSTALLED"));
$dbTransact = CSaleUserTransact::GetList(array("TRANSACT_DATE" => "DESC"), array("ORDER_ID" => $orderId), false, false, array("ID", "USER_ID", "AMOUNT", "CURRENCY", "DEBIT", "ORDER_ID", "DESCRIPTION", "NOTES", "TIMESTAMP_X", "TRANSACT_DATE"));
while ($arTransact = $dbTransact->Fetch()) {
    $arTransact["AMOUNT_PREPARED"] = ($arTransact["DEBIT"] == "Y" ? "+" : "-") . SaleFormatCurrency($arTransact["AMOUNT"], $arTransact["CURRENCY"]);
    $arResult["TRANSACTS"][] = $arTransact;
}
$this->IncludeComponentTemplate();
開發者ID:rasuldev,項目名稱:torino,代碼行數:31,代碼來源:component.php

示例2: 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

示例3: checkRights

 private static function checkRights($userId, $eventId, $arParams)
 {
     $orderId = $arParams["ORDER_ID"];
     $arUserGroups = CUser::GetUserGroup($userId);
     return CSaleOrder::CanUserViewOrder($orderId, $arUserGroups, $userId);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:6,代碼來源:mobile_order.php


注:本文中的CSaleOrder::CanUserViewOrder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。