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


PHP CSalePaySystem::GetByID方法代码示例

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


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

示例1: CheckFields

	function CheckFields($ACTION, &$arFields)
	{
		global $DB, $USER;

		if ((is_set($arFields, "NAME") || $ACTION=="ADD") && strlen($arFields["NAME"]) <= 0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGPSA_NO_NAME"), "ERROR_NO_NAME");
			return false;
		}
		if ((is_set($arFields, "PAY_SYSTEM_ID") || $ACTION=="ADD") && IntVal($arFields["PAY_SYSTEM_ID"]) <= 0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGPSA_NO_CODE"), "ERROR_NO_PAY_SYSTEM_ID");
			return false;
		}
		if ((is_set($arFields, "PERSON_TYPE_ID") || $ACTION=="ADD") && IntVal($arFields["PERSON_TYPE_ID"]) <= 0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGPSA_NO_ID_TYPE"), "ERROR_NO_PERSON_TYPE_ID");
			return false;
		}

		if (is_set($arFields, "NEW_WINDOW") && $arFields["NEW_WINDOW"] != "Y")
			$arFields["NEW_WINDOW"] = "N";
		if (is_set($arFields, "HAVE_PAYMENT") && $arFields["HAVE_PAYMENT"] != "Y")
			$arFields["HAVE_PAYMENT"] = "N";
		if (is_set($arFields, "HAVE_ACTION") && $arFields["HAVE_ACTION"] != "Y")
			$arFields["HAVE_ACTION"] = "N";
		if (is_set($arFields, "HAVE_RESULT") && $arFields["HAVE_RESULT"] != "Y")
			$arFields["HAVE_RESULT"] = "N";
		if (is_set($arFields, "HAVE_PREPAY") && $arFields["HAVE_PREPAY"] != "Y")
			$arFields["HAVE_PREPAY"] = "N";
		if (is_set($arFields, "HAVE_RESULT_RECEIVE") && $arFields["HAVE_RESULT_RECEIVE"] != "Y")
			$arFields["HAVE_RESULT_RECEIVE"] = "N";
		if (is_set($arFields, "ENCODING") && strlen($arFields["ENCODING"]) <= 0)
			$arFields["ENCODING"] = false;

		if (is_set($arFields, "PAY_SYSTEM_ID"))
		{
			if (!($arPaySystem = CSalePaySystem::GetByID($arFields["PAY_SYSTEM_ID"])))
			{
				$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["PAY_SYSTEM_ID"], GetMessage("SKGPSA_NO_PS")), "ERROR_NO_PAY_SYSTEM");
				return false;
			}
		}

		if (is_set($arFields, "PERSON_TYPE_ID"))
		{
			if (!($arPersonType = CSalePersonType::GetByID($arFields["PERSON_TYPE_ID"])))
			{
				$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["PERSON_TYPE_ID"], GetMessage("SKGPSA_NO_PERS_TYPE")), "ERROR_NO_PERSON_TYPE");
				return false;
			}
		}

		return True;
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:55,代码来源:pay_system_action.php

示例2: FormatInvoicePaymentSystemChanged

 public static function FormatInvoicePaymentSystemChanged($arData)
 {
     $info = GetMessage("CRM_INVOICE_EVENT_INFO_PAYMENT_SYSTEM_CHANGED");
     foreach ($arData as $param => $value) {
         if ($param == "PAY_SYSTEM_ID") {
             $res = CSalePaySystem::GetByID($value);
             $value = "\"" . $res["NAME"] . "\"";
         }
         $info = str_replace("#" . $param . "#", $value, $info);
     }
     return array("INFO" => $info);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:12,代码来源:crm_invoice_event.php

示例3: getOrderInfoDetail

 function getOrderInfoDetail($orderId)
 {
     if (!$orderId) {
         return false;
     }
     if (!$GLOBALS["USER"]->IsAuthorized()) {
         return false;
     }
     $arFilter["ID"] = $orderId;
     $saleModulePermissions = $GLOBALS["APPLICATION"]->GetGroupRight("sale");
     if ($saleModulePermissions == "D") {
         $arFilter["USER_ID"] = IntVal($GLOBALS["USER"]->GetID());
     } elseif ($saleModulePermissions != "W") {
         $arFilter["STATUS_PERMS_GROUP_ID"] = $GLOBALS["USER"]->GetUserGroupArray();
         $arFilter[">=STATUS_PERMS_PERM_VIEW"] = "Y";
     }
     $arOrder = array();
     $dbOrder = CSaleOrder::GetList(array(), $arFilter);
     $arOrder = $dbOrder->GetNext();
     if (!$arOrder) {
         return false;
     }
     $arOrder["STATUS"] = CSaleStatus::GetLangByID($arOrder["STATUS_ID"]);
     $arOrder["STATUS_NAME"] = $arOrder["STATUS"]["NAME"];
     $arOrder["PRICE_IN_ALL_NUM"] = floatval($arOrder["~PRICE"] + floatval($arOrder["~PRICE_DELIVERY"]));
     $arOrder["PRICE_IN_ALL"] = SaleFormatCurrency($arOrder["PRICE_IN_ALL_NUM"], $arOrder["CURRENCY"]);
     $arOrder["PRICE_STR"] = SaleFormatCurrency($arOrder["PRICE"], $arOrder["CURRENCY"]);
     $arOrder["PERSON_TYPE"] = CSalePersonType::GetByID($arOrder["PERSON_TYPE_ID"]);
     $arOrder["PERSON_TYPE_NAME"] = htmlspecialcharsbx($arOrder["PERSON_TYPE"]["NAME"]);
     $arOrder = self::getOrderProps($arOrder);
     $arOrder["DELIVERY_NAME"] = self::getDeliveriesInfo(array($arOrder["DELIVERY_ID"]));
     $arOrder["DELIVERY_NAME"] = $arOrder["DELIVERY_NAME"][$arOrder["DELIVERY_ID"]];
     $arPaySys = CSalePaySystem::GetByID($arOrder["PAY_SYSTEM_ID"], $arOrder["PERSON_TYPE_ID"]);
     $arOrder["PAY_SYSTEM_NAME"] = $arPaySys["NAME"];
     $dbUserAccount = CSaleUserAccount::GetList(array(), array("USER_ID" => $arOrder["USER_ID"], "CURRENCY" => $arOrder["CURRENCY"], "LOCKED" => "N"));
     $arUserAccount = $dbUserAccount->GetNext();
     $arOrder["CURRENT_BUDGET"] = $arUserAccount["CURRENT_BUDGET"] ? $arUserAccount["CURRENT_BUDGET"] : 0;
     $arOrder["CURRENT_BUDGET_STRING"] = SaleFormatCurrency($arOrder["CURRENT_BUDGET"], $arOrder["CURRENCY"]);
     return $arOrder;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:40,代码来源:mobile_order.php

示例4: CheckFields

 function CheckFields($ACTION, &$arFields, $ID = 0)
 {
     global $USER_FIELD_MANAGER, $DB, $APPLICATION;
     if (is_set($arFields, "SITE_ID") && strlen($arFields["SITE_ID"]) > 0) {
         $arFields["LID"] = $arFields["SITE_ID"];
     }
     if ((is_set($arFields, "LID") || $ACTION == "ADD") && strlen($arFields["LID"]) <= 0) {
         $APPLICATION->ThrowException(Loc::getMessage("SKGO_EMPTY_SITE"), "EMPTY_SITE_ID");
         return false;
     }
     if ((is_set($arFields, "PERSON_TYPE_ID") || $ACTION == "ADD") && IntVal($arFields["PERSON_TYPE_ID"]) <= 0) {
         $APPLICATION->ThrowException(Loc::getMessage("SKGO_EMPTY_PERS_TYPE"), "EMPTY_PERSON_TYPE_ID");
         return false;
     }
     if ((is_set($arFields, "USER_ID") || $ACTION == "ADD") && IntVal($arFields["USER_ID"]) <= 0) {
         $APPLICATION->ThrowException(Loc::getMessage("SKGO_EMPTY_USER_ID"), "EMPTY_USER_ID");
         return false;
     }
     if (is_set($arFields, "PAYED") && $arFields["PAYED"] != "Y") {
         $arFields["PAYED"] = "N";
     }
     if (is_set($arFields, "CANCELED") && $arFields["CANCELED"] != "Y") {
         $arFields["CANCELED"] = "N";
     }
     if (is_set($arFields, "STATUS_ID") && strlen($arFields["STATUS_ID"]) <= 0) {
         $arFields["STATUS_ID"] = "N";
     }
     if (is_set($arFields, "ALLOW_DELIVERY") && $arFields["ALLOW_DELIVERY"] != "Y") {
         $arFields["ALLOW_DELIVERY"] = "N";
     }
     if (is_set($arFields, "EXTERNAL_ORDER") && $arFields["EXTERNAL_ORDER"] != "Y") {
         $arFields["EXTERNAL_ORDER"] = "N";
     }
     if (is_set($arFields, "PRICE") || $ACTION == "ADD") {
         $arFields["PRICE"] = str_replace(",", ".", $arFields["PRICE"]);
         $arFields["PRICE"] = DoubleVal($arFields["PRICE"]);
     }
     if (is_set($arFields, "PRICE_DELIVERY") || $ACTION == "ADD") {
         $arFields["PRICE_DELIVERY"] = str_replace(",", ".", $arFields["PRICE_DELIVERY"]);
         $arFields["PRICE_DELIVERY"] = DoubleVal($arFields["PRICE_DELIVERY"]);
     }
     if (is_set($arFields, "SUM_PAID") || $ACTION == "ADD") {
         $arFields["SUM_PAID"] = str_replace(",", ".", $arFields["SUM_PAID"]);
         $arFields["SUM_PAID"] = DoubleVal($arFields["SUM_PAID"]);
     }
     if (is_set($arFields, "DISCOUNT_VALUE") || $ACTION == "ADD") {
         $arFields["DISCOUNT_VALUE"] = str_replace(",", ".", $arFields["DISCOUNT_VALUE"]);
         $arFields["DISCOUNT_VALUE"] = DoubleVal($arFields["DISCOUNT_VALUE"]);
     }
     if (is_set($arFields, "TAX_VALUE") || $ACTION == "ADD") {
         $arFields["TAX_VALUE"] = str_replace(",", ".", $arFields["TAX_VALUE"]);
         $arFields["TAX_VALUE"] = DoubleVal($arFields["TAX_VALUE"]);
     }
     if (!is_set($arFields, "LOCKED_BY") && (!is_set($arFields, "UPDATED_1C") || is_set($arFields, "UPDATED_1C") && $arFields["UPDATED_1C"] != "Y")) {
         $arFields["UPDATED_1C"] = "N";
         $arFields["~VERSION"] = "VERSION+0+1";
     }
     if ((is_set($arFields, "CURRENCY") || $ACTION == "ADD") && strlen($arFields["CURRENCY"]) <= 0) {
         $APPLICATION->ThrowException(Loc::getMessage("SKGO_EMPTY_CURRENCY"), "EMPTY_CURRENCY");
         return false;
     }
     if (is_set($arFields, "CURRENCY")) {
         if (!($arCurrency = CCurrency::GetByID($arFields["CURRENCY"]))) {
             $APPLICATION->ThrowException(str_replace("#ID#", $arFields["CURRENCY"], Loc::getMessage("SKGO_WRONG_CURRENCY")), "ERROR_NO_CURRENCY");
             return false;
         }
     }
     if (is_set($arFields, "LID")) {
         $dbSite = CSite::GetByID($arFields["LID"]);
         if (!$dbSite->Fetch()) {
             $APPLICATION->ThrowException(str_replace("#ID#", $arFields["LID"], Loc::getMessage("SKGO_WRONG_SITE")), "ERROR_NO_SITE");
             return false;
         }
     }
     if (is_set($arFields, "USER_ID")) {
         $dbUser = CUser::GetByID($arFields["USER_ID"]);
         if (!$dbUser->Fetch()) {
             $APPLICATION->ThrowException(str_replace("#ID#", $arFields["USER_ID"], Loc::getMessage("SKGO_WRONG_USER")), "ERROR_NO_USER_ID");
             return false;
         }
     }
     if (is_set($arFields, "PERSON_TYPE_ID")) {
         if (!($arPersonType = CSalePersonType::GetByID($arFields["PERSON_TYPE_ID"]))) {
             $APPLICATION->ThrowException(str_replace("#ID#", $arFields["PERSON_TYPE_ID"], Loc::getMessage("SKGO_WRONG_PERSON_TYPE")), "ERROR_NO_PERSON_TYPE");
             return false;
         }
     }
     if (is_set($arFields, "PAY_SYSTEM_ID") && IntVal($arFields["PAY_SYSTEM_ID"]) > 0) {
         if (!($arPaySystem = CSalePaySystem::GetByID(IntVal($arFields["PAY_SYSTEM_ID"])))) {
             $APPLICATION->ThrowException(str_replace("#ID#", $arFields["PAY_SYSTEM_ID"], Loc::getMessage("SKGO_WRONG_PS")), "ERROR_NO_PAY_SYSTEM");
             return false;
         }
     }
     if (is_set($arFields, "DELIVERY_ID") && IntVal($arFields["DELIVERY_ID"]) > 0) {
         if (!($delivery = \Bitrix\Sale\Delivery\Services\Table::getById($arFields["DELIVERY_ID"]))) {
             $APPLICATION->ThrowException(str_replace("#ID#", $arFields["DELIVERY_ID"], Loc::getMessage("SKGO_WRONG_DELIVERY")), "ERROR_NO_DELIVERY");
             return false;
         }
     }
     if (is_set($arFields, "STATUS_ID")) {
//.........这里部分代码省略.........
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:101,代码来源:order.php

示例5: array

 if ($bNeedReCount) {
     $arTaxExempt = array();
     $arUserGroups = CUser::GetUserGroup($USER_ID);
     $dbTaxExemptList = CSaleTax::GetExemptList(array("GROUP_ID" => $arUserGroups));
     while ($arTaxExemptList = $dbTaxExemptList->Fetch()) {
         if (!in_array(IntVal($arTaxExemptList["TAX_ID"]), $arTaxExempt)) {
             $arTaxExempt[] = IntVal($arTaxExemptList["TAX_ID"]);
         }
     }
 }
 // PAY SYSTEM ---------------------------------------------->
 $PAY_SYSTEM_ID = IntVal($PAY_SYSTEM_ID);
 if ($PAY_SYSTEM_ID <= 0) {
     $errorMessage .= GetMessage("SOE_PAYSYS_EMPTY") . "<br>";
 }
 if ($PAY_SYSTEM_ID > 0 && !($arPaySys = CSalePaySystem::GetByID($PAY_SYSTEM_ID, $PERSON_TYPE_ID))) {
     $errorMessage .= GetMessage("SOE_PAYSYS_NOT_FOUND") . "<br>";
 }
 // DISCOUNT ---------------------------------------------->
 for ($i = 0; $i < count($arBasketList); $i++) {
     for ($j = 0; $j < count($arBasketList[$i]); $j++) {
         $arBasketList[$i][$j]["REAL_PRICE"] = $arBasketList[$i][$j]["PRICE"];
     }
 }
 $arDiscountPrice = array();
 for ($i = 0; $i < count($arBasketList); $i++) {
     $arDiscountPrice[$i] = 0;
 }
 if ($bNeedReCount) {
     if ($bFullOrderDivision) {
         for ($i = 0; $i < count($arBasketList); $i++) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_edit.php

示例6: htmlspecialcharsex

	$row->AddField("SUM_PAID", htmlspecialcharsex(SaleFormatCurrency($arOrder["SUM_PAID"], $arOrder["CURRENCY"])));

	$fieldValue = "";
	if (in_array("USER", $arVisibleColumns))
		$fieldValue = GetFormatedUserName($arOrder["USER_ID"], true);
	$row->AddField("USER", $fieldValue);

	$fieldValue = "";
	if (in_array("PAY_SYSTEM", $arVisibleColumns))
	{
		if (IntVal($arOrder["PAY_SYSTEM_ID"]) > 0)
		{
			if (!isset($LOCAL_PAY_SYSTEM_CACHE[$arOrder["PAY_SYSTEM_ID"]])
				|| empty($LOCAL_PAY_SYSTEM_CACHE[$arOrder["PAY_SYSTEM_ID"]]))
			{
				if ($arPaySys = CSalePaySystem::GetByID($arOrder["PAY_SYSTEM_ID"]))
					$LOCAL_PAY_SYSTEM_CACHE[$arOrder["PAY_SYSTEM_ID"]] = htmlspecialcharsEx($arPaySys["NAME"]);
			}

			$fieldValue .= "[";
			if ($saleModulePermissions >= "W")
				$fieldValue .= '<a href="/bitrix/admin/sale_pay_system_edit.php?ID='.$arOrder["PAY_SYSTEM_ID"].'&lang='.LANGUAGE_ID.'">';
			$fieldValue .= $arOrder["PAY_SYSTEM_ID"];
			if ($saleModulePermissions >= "W")
				$fieldValue .= "</a>";

			$fieldValue .= "] ".$LOCAL_PAY_SYSTEM_CACHE[$arOrder["PAY_SYSTEM_ID"]];
		}
	}
	$row->AddField("PAY_SYSTEM", $fieldValue);
开发者ID:akniyev,项目名称:arteva.ru,代码行数:30,代码来源:order.php

示例7: array

<br>
Телефон: <?php 
echo CSalePaySystemAction::GetParamValue("BUYER_PHONE");
?>
<br>
Факс: <?php 
echo CSalePaySystemAction::GetParamValue("BUYER_FAX");
?>
<br>
Контактное лицо: <?php 
echo CSalePaySystemAction::GetParamValue("BUYER_PAYER_NAME");
?>
<br>

<?php 
$arPaySys_tmp = CSalePaySystem::GetByID($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAY_SYSTEM_ID"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PERSON_TYPE_ID"]);
echo "<br>Платежная система: [" . $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAY_SYSTEM_ID"] . "] " . $arPaySys_tmp["PSA_NAME"];
?>
</p>

<p><b>СЧЕТ N:</b> <?php 
echo $ORDER_ID;
?>
 от  <?php 
echo CSalePaySystemAction::GetParamValue("DATE_INSERT");
?>
</p>

<?php 
$dbBasket = CSaleBasket::GetList(array("NAME" => "ASC"), array("ORDER_ID" => $ORDER_ID));
if ($arBasket = $dbBasket->Fetch()) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:payment.php

示例8: getPaySystemName

/**
 * [getPaySystemName description]
 * @param  int $PAY_SYSTEM_ID
 * @return str
 */
function getPaySystemName($PAY_SYSTEM_ID)
{
    if (CModule::IncludeModule('sale')) {
        $arPaySys = CSalePaySystem::GetByID($PAY_SYSTEM_ID);
        return $arPaySys["NAME"];
    }
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:12,代码来源:functions.php

示例9: CheckFields

 function CheckFields($ACTION, &$arFields, $ID = 0)
 {
     if (is_set($arFields, "SITE_ID") && strlen($arFields["SITE_ID"]) > 0) {
         $arFields["LID"] = $arFields["SITE_ID"];
     }
     if ((is_set($arFields, "LID") || $ACTION == "ADD") && strlen($arFields["LID"]) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_SITE"), "EMPTY_SITE_ID");
         return false;
     }
     if ((is_set($arFields, "PERSON_TYPE_ID") || $ACTION == "ADD") && IntVal($arFields["PERSON_TYPE_ID"]) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_PERS_TYPE"), "EMPTY_PERSON_TYPE_ID");
         return false;
     }
     if ((is_set($arFields, "USER_ID") || $ACTION == "ADD") && IntVal($arFields["USER_ID"]) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_USER_ID"), "EMPTY_USER_ID");
         return false;
     }
     if (is_set($arFields, "PAYED") && $arFields["PAYED"] != "Y") {
         $arFields["PAYED"] = "N";
     }
     if (is_set($arFields, "CANCELED") && $arFields["CANCELED"] != "Y") {
         $arFields["CANCELED"] = "N";
     }
     if (is_set($arFields, "STATUS_ID") && strlen($arFields["STATUS_ID"]) <= 0) {
         $arFields["STATUS_ID"] = "N";
     }
     if (is_set($arFields, "ALLOW_DELIVERY") && $arFields["ALLOW_DELIVERY"] != "Y") {
         $arFields["ALLOW_DELIVERY"] = "N";
     }
     if (is_set($arFields, "PRICE") || $ACTION == "ADD") {
         $arFields["PRICE"] = str_replace(",", ".", $arFields["PRICE"]);
         $arFields["PRICE"] = DoubleVal($arFields["PRICE"]);
     }
     if (is_set($arFields, "PRICE_DELIVERY") || $ACTION == "ADD") {
         $arFields["PRICE_DELIVERY"] = str_replace(",", ".", $arFields["PRICE_DELIVERY"]);
         $arFields["PRICE_DELIVERY"] = DoubleVal($arFields["PRICE_DELIVERY"]);
     }
     if (is_set($arFields, "SUM_PAID") || $ACTION == "ADD") {
         $arFields["SUM_PAID"] = str_replace(",", ".", $arFields["SUM_PAID"]);
         $arFields["SUM_PAID"] = DoubleVal($arFields["SUM_PAID"]);
     }
     if (is_set($arFields, "DISCOUNT_VALUE") || $ACTION == "ADD") {
         $arFields["DISCOUNT_VALUE"] = str_replace(",", ".", $arFields["DISCOUNT_VALUE"]);
         $arFields["DISCOUNT_VALUE"] = DoubleVal($arFields["DISCOUNT_VALUE"]);
     }
     if (is_set($arFields, "TAX_VALUE") || $ACTION == "ADD") {
         $arFields["TAX_VALUE"] = str_replace(",", ".", $arFields["TAX_VALUE"]);
         $arFields["TAX_VALUE"] = DoubleVal($arFields["TAX_VALUE"]);
     }
     if (!is_set($arFields, "LOCKED_BY") && (!is_set($arFields, "UPDATED_1C") || is_set($arFields, "UPDATED_1C") && $arFields["UPDATED_1C"] != "Y")) {
         $arFields["UPDATED_1C"] = "N";
     }
     if ((is_set($arFields, "CURRENCY") || $ACTION == "ADD") && strlen($arFields["CURRENCY"]) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_CURRENCY"), "EMPTY_CURRENCY");
         return false;
     }
     if (is_set($arFields, "CURRENCY")) {
         if (!($arCurrency = CCurrency::GetByID($arFields["CURRENCY"]))) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["CURRENCY"], GetMessage("SKGO_WRONG_CURRENCY")), "ERROR_NO_CURRENCY");
             return false;
         }
     }
     if (is_set($arFields, "LID")) {
         $dbSite = CSite::GetByID($arFields["LID"]);
         if (!$dbSite->Fetch()) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["LID"], GetMessage("SKGO_WRONG_SITE")), "ERROR_NO_SITE");
             return false;
         }
     }
     if (is_set($arFields, "USER_ID")) {
         $dbUser = CUser::GetByID($arFields["USER_ID"]);
         if (!$dbUser->Fetch()) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["USER_ID"], GetMessage("SKGO_WRONG_USER")), "ERROR_NO_USER_ID");
             return false;
         }
     }
     if (is_set($arFields, "PERSON_TYPE_ID")) {
         if (!($arPersonType = CSalePersonType::GetByID($arFields["PERSON_TYPE_ID"]))) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["PERSON_TYPE_ID"], GetMessage("SKGO_WRONG_PERSON_TYPE")), "ERROR_NO_PERSON_TYPE");
             return false;
         }
     }
     if (is_set($arFields, "PAY_SYSTEM_ID") && IntVal($arFields["PAY_SYSTEM_ID"]) > 0) {
         if (!($arPaySystem = CSalePaySystem::GetByID(IntVal($arFields["PAY_SYSTEM_ID"])))) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["PAY_SYSTEM_ID"], GetMessage("SKGO_WRONG_PS")), "ERROR_NO_PAY_SYSTEM");
             return false;
         }
     }
     if (is_set($arFields, "DELIVERY_ID") && (strpos($arFields["DELIVERY_ID"], ":") !== false || IntVal($arFields["DELIVERY_ID"]) > 0)) {
         if (strpos($arFields["DELIVERY_ID"], ":") !== false) {
             $arId = explode(":", $arFields["DELIVERY_ID"]);
             $obDelivery = new CSaleDeliveryHandler();
             if ($arDelivery = $obDelivery->GetBySID($arId[0])) {
                 if ($arDelivery = $arDelivery->Fetch()) {
                     if (!is_set($arDelivery["PROFILES"], $arId[1])) {
                         $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["DELIVERY_ID"], GetMessage("SKGO_WRONG_DELIVERY")), "ERROR_NO_DELIVERY");
                         return false;
                     }
                 }
             } else {
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:order.php

示例10: CrmCheckPath

 * PS_ID_PAR_NAME
 */
$arParams['PATH_TO_PS_LIST'] = CrmCheckPath('PATH_TO_PS_LIST', $arParams['PATH_TO_PS_LIST'], '');
$arParams['PATH_TO_PS_EDIT'] = CrmCheckPath('PATH_TO_PS_EDIT', $arParams['PATH_TO_PS_EDIT'], '?ps_id=#ps_id#&edit');
$psID = isset($arParams['PS_ID']) ? intval($arParams['PS_ID']) : 0;
if ($psID <= 0) {
    $psIDParName = isset($arParams['PS_ID_PAR_NAME']) ? strval($arParams['PS_ID_PAR_NAME']) : '';
    if (strlen($psIDParName) == 0) {
        $psIDParName = 'ps_id';
    }
    $psID = isset($_REQUEST[$psIDParName]) ? intval($_REQUEST[$psIDParName]) : 0;
}
$arPaySys = array();
$actionID = 0;
if ($psID > 0) {
    if (!($arPaySys = CSalePaySystem::GetByID($psID))) {
        ShowError(GetMessage('CRM_PS_NOT_FOUND'));
        @define('ERROR_404', 'Y');
        if ($arParams['SET_STATUS_404'] === 'Y') {
            CHTTP::SetStatus("404 Not Found");
        }
        return;
    }
    $dbPSAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $psID));
    if ($arPSAction = $dbPSAction->Fetch()) {
        $actionID = IntVal($arPSAction["ID"]);
        $arPaySys['ACTION'] = $arPSAction;
    }
}
$arResult['PS_ID'] = $psID;
$arResult['PAY_SYSTEM'] = $arPaySys;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例11: CheckFields

	public static function CheckFields($ACTION, &$arFields, $ID = 0)
	{
		global $USER_FIELD_MANAGER, $DB;

		if (is_set($arFields, "SITE_ID") && strlen($arFields["SITE_ID"]) > 0)
			$arFields["LID"] = $arFields["SITE_ID"];

		if ((is_set($arFields, "LID") || $ACTION=="ADD") && strlen($arFields["LID"])<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_SITE"), "EMPTY_SITE_ID");
			return false;
		}
		if ((is_set($arFields, "PERSON_TYPE_ID") || $ACTION=="ADD") && IntVal($arFields["PERSON_TYPE_ID"])<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_PERS_TYPE"), "EMPTY_PERSON_TYPE_ID");
			return false;
		}
		if ((is_set($arFields, "USER_ID") || $ACTION=="ADD") && IntVal($arFields["USER_ID"])<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_USER_ID"), "EMPTY_USER_ID");
			return false;
		}

		if (is_set($arFields, "PAYED") && $arFields["PAYED"]!="Y")
			$arFields["PAYED"]="N";
		if (is_set($arFields, "CANCELED") && $arFields["CANCELED"]!="Y")
			$arFields["CANCELED"]="N";
		if (is_set($arFields, "STATUS_ID") && strlen($arFields["STATUS_ID"])<=0)
			$arFields["STATUS_ID"]="N";
		if (is_set($arFields, "ALLOW_DELIVERY") && $arFields["ALLOW_DELIVERY"]!="Y")
			$arFields["ALLOW_DELIVERY"]="N";

		if (is_set($arFields, "PRICE") || $ACTION=="ADD")
		{
			$arFields["PRICE"] = str_replace(",", ".", $arFields["PRICE"]);
			$arFields["PRICE"] = DoubleVal($arFields["PRICE"]);
		}
		if (is_set($arFields, "PRICE_DELIVERY") || $ACTION=="ADD")
		{
			$arFields["PRICE_DELIVERY"] = str_replace(",", ".", $arFields["PRICE_DELIVERY"]);
			$arFields["PRICE_DELIVERY"] = DoubleVal($arFields["PRICE_DELIVERY"]);
		}
		if (is_set($arFields, "SUM_PAID") || $ACTION=="ADD")
		{
			$arFields["SUM_PAID"] = str_replace(",", ".", $arFields["SUM_PAID"]);
			$arFields["SUM_PAID"] = DoubleVal($arFields["SUM_PAID"]);
		}
		if (is_set($arFields, "DISCOUNT_VALUE") || $ACTION=="ADD")
		{
			$arFields["DISCOUNT_VALUE"] = str_replace(",", ".", $arFields["DISCOUNT_VALUE"]);
			$arFields["DISCOUNT_VALUE"] = DoubleVal($arFields["DISCOUNT_VALUE"]);
		}
		if (is_set($arFields, "TAX_VALUE") || $ACTION=="ADD")
		{
			$arFields["TAX_VALUE"] = str_replace(",", ".", $arFields["TAX_VALUE"]);
			$arFields["TAX_VALUE"] = DoubleVal($arFields["TAX_VALUE"]);
		}

		if(!is_set($arFields, "LOCKED_BY") && (!is_set($arFields, "UPDATED_1C") || (is_set($arFields, "UPDATED_1C") && $arFields["UPDATED_1C"] != "Y")))
		{
			$arFields["UPDATED_1C"] = "N";
		}

		if ((is_set($arFields, "CURRENCY") || $ACTION=="ADD") && strlen($arFields["CURRENCY"])<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGO_EMPTY_CURRENCY"), "EMPTY_CURRENCY");
			return false;
		}

		if (is_set($arFields, "CURRENCY"))
		{
			if (!($arCurrency = CCurrency::GetByID($arFields["CURRENCY"])))
			{
				$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["CURRENCY"], GetMessage("SKGO_WRONG_CURRENCY")), "ERROR_NO_CURRENCY");
				return false;
			}
		}

		if (is_set($arFields, "LID"))
		{
			$dbSite = CSite::GetByID($arFields["LID"]);
			if (!$dbSite->Fetch())
			{
				$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["LID"], GetMessage("SKGO_WRONG_SITE")), "ERROR_NO_SITE");
				return false;
			}
		}

		if (is_set($arFields, "USER_ID"))
		{
			$dbUser = CUser::GetByID($arFields["USER_ID"]);
			if (!$dbUser->Fetch())
			{
				$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["USER_ID"], GetMessage("SKGO_WRONG_USER")), "ERROR_NO_USER_ID");
				return false;
			}
		}

		if (is_set($arFields, "PERSON_TYPE_ID"))
		{
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:order.php

示例12: CheckPPPaySystem

 function CheckPPPaySystem($iPSID, $iPTID)
 {
     $arPS = CSalePaySystem::GetByID($iPSID, $iPTID);
     if (substr_count($arPS["PSA_ACTION_FILE"], "epages.pickpoint")) {
         return 1;
     }
     return 0;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:8,代码来源:pickpoint.php

示例13: OnOrderNewSendEmailHandler


//.........这里部分代码省略.........
                    {
                        $value .= ', '.SaleFormatCurrency($arDelivery['PRICE'], $arDelivery['CURRENCY']);

                        $value_price = SaleFormatCurrency($arDelivery['PRICE'], $arDelivery['CURRENCY']);

                        $strOrderList .= '<tr><td colspan="3" style="text-align:right;">Стоимость доставки:&nbsp;</td><td style="text-align: center;">'.$value_price.'</td></tr>';
                    }
                    $arFields['DELIVERY'] = '<p><b>Способ доставки:</b> '.$value_name.'</p>';
                    $price_total += $arDelivery['PRICE'];

                    $strOrderList .= '<tr><td colspan="3" style="text-align:right;">Итого:&nbsp;</td><td style="text-align: center;">'.SaleFormatCurrency($price_total, $price_currency).'</td></tr>';

                    $arFields['ALL_PRICE'] = '<p><b>Итого: </b>'.SaleFormatCurrency($price_total, $price_currency).'</p>';
                }
            }
        }


        $strOrderList .= '</tbody>';
        $strOrderList .= '</table>';
        $arFields["ORDER_LIST_NEW"] = $strOrderList;



        // Указываем свойства заказа - Начало
        /* $arProps = array();
         $dbProps = CSaleOrderPropsValue::GetOrderProps($orderID);
         while ($arProp = $dbProps->Fetch())
         {
             $arProps[$arProp['CODE']] = $arProp;

             $val = $arProp['VALUE'];
             if ($arProp['TYPE']=="LOCATION") {
                 $v = CSaleLocation::GetByID($val);
                 $val = $v['CITY_NAME_LANG'];
             } elseif (in_array($arProp['TYPE'], array("SELECT", "MULTISELECT", "RADIO"))) {
                 $v = CSaleOrderPropsVariant::GetByValue($arProp['ORDER_PROPS_ID'], $val);
                 $val = $v['NAME'];
             }

             $arProp['VALUE_FORMATTED'] = $val;

         }*/

        // Получаем список исключенных свойств в зависимости от выбранной службы доставки
        /*$delivery_id = $arOrder['DELIVERY_ID'];
        $EXCLUDE_PROPS = $pre_defined_variables['ORDER_MAKE']["EXCLUDE_PROP_ON_DELIVERY_ID"];
        if (array_key_exists($delivery_id, $EXCLUDE_PROPS))
            $EXCLUDE_PROP = $EXCLUDE_PROPS[$delivery_id];
        else
            $EXCLUDE_PROP = array();
        $EXCLUDE_PROP = array_merge(array('AGREE'), $EXCLUDE_PROP);

        // Выводим свойства
        $strPropsList = '';
        foreach($arProps as $prop_code=>&$arProp)
        {
            if (in_array($prop_code, $EXCLUDE_PROP)) continue;

            $strPropsList .= '<p>';
            $value = strlen(trim($arProp['VALUE']))? $arProp['VALUE']: '<i>не указано</i>';
            $strPropsList .= '<b>'.$arProp['NAME'].':</b> '.$value;
            $strPropsList .= '</p>';
        }
        $arFields['PROPS_LIST'] = $strPropsList;*/
        // Указываем свойства заказа - Конец
开发者ID:CheBurashka334,项目名称:zakrepi,代码行数:67,代码来源:function_bitrix.php

示例14: FormatOrderPaymentSystemChanged

 public static function FormatOrderPaymentSystemChanged($data)
 {
     $info = GetMessage("SOC_ORDER_PAYMENT_SYSTEM_CHANGED_INFO");
     if (is_array($data)) {
         foreach ($data as $param => $value) {
             if ($param == "PAY_SYSTEM_ID") {
                 $res = CSalePaySystem::GetByID($value);
                 $value = "\"" . $res["NAME"] . "\"";
             }
             $info = str_replace("#" . $param . "#", $value, $info);
         }
     } else {
         $info = $data;
     }
     return array("NAME" => GetMessage("SOC_ORDER_PAYMENT_SYSTEM_CHANGED"), "INFO" => $info);
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:16,代码来源:order_change.php

示例15: GetMessage

													formAllowPay.close();
												}
											}
										})
									]);

									formAllowPay.show();
									BX('FORM_PAY_VOUCHER_NUM').focus();
								}
							</script>
						</td>
					</tr>
				<?
				$tabControl->EndCustomField("ORDER_PAYED", '');

				$arPaySys = CSalePaySystem::GetByID($arOrder["PAY_SYSTEM_ID"], $arOrder["PERSON_TYPE_ID"]);
				if (strlen($arOrder["PS_STATUS"]) > 0)
				{
					$tabControl->AddSection("ps_stat", GetMessage("P_ORDER_PS_STATUS"));
					$tabControl->BeginCustomField("ORDER_PS_STATUS", GetMessage("P_ORDER_PS_STATUS"));
					?>
					<tr>
						<td><?echo $tabControl->GetCustomLabelHTML()?>:</td>
						<td>
							<?
							echo (($arOrder["PS_STATUS"]=="Y") ? "OK" : "N");
							if (!$boolLocked)
							{
								if (!$crmMode && $arPaySys["PSA_HAVE_RESULT"] == "Y" || strlen($arPaySys["PSA_RESULT_FILE"]) > 0)
								{
									?>
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:order_detail.php


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