当前位置: 首页>>代码示例>>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;未经允许,请勿转载。