• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CSalePaySystem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了CSalePaySystem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: deletePaysys

 protected function deletePaysys()
 {
     $ps_id = (int) \Bitrix\Main\Config\Option::get($this->MODULE_ID, "payment_system_id");
     $order = CSaleOrder::GetList(array(), array("PAY_SYSTEM_ID" => $ps_id))->Fetch();
     if ($order["ID"] > 0) {
         throw new Exception(Loc::getMessage("DEVTM_ERIP_DELETE_PAMENT_ERROR"));
     }
     if (!CSalePaySystem::Delete($ps_id)) {
         throw new Exception(Loc::getMessage("DEVTM_ERIP_DELETE_PAMENT2_ERROR"));
     }
     return true;
 }
开发者ID:dimabresky,项目名称:bitrix-Erip-module,代码行数:12,代码来源:index.php


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


示例4: Update

 function Update($ID, $arFields)
 {
     global $DB;
     $ID = IntVal($ID);
     if (!CSalePaySystem::CheckFields("UPDATE", $arFields, $ID)) {
         return false;
     }
     $strUpdate = $DB->PrepareUpdate("b_sale_pay_system", $arFields);
     $strSql = "UPDATE b_sale_pay_system SET " . $strUpdate . " WHERE ID = " . $ID . "";
     $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     return $ID;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:12,代码来源:pay_system.php


示例5: Add

 function Add($arFields)
 {
     global $DB;
     if (!CSalePaySystem::CheckFields("ADD", $arFields)) {
         return false;
     }
     $arInsert = $DB->PrepareInsert("b_sale_pay_system", $arFields);
     $strSql = "INSERT INTO b_sale_pay_system(" . $arInsert[0] . ") " . "VALUES(" . $arInsert[1] . ")";
     $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     $ID = IntVal($DB->LastID());
     return $ID;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:12,代码来源:pay_system.php


示例6: getPaySystemsList

 protected static function getPaySystemsList()
 {
     static $result = null;
     if ($result !== null) {
         return $result;
     }
     $result = array();
     $dbResultList = \CSalePaySystem::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array("ID", "NAME", "ACTIVE", "SORT", "LID"));
     while ($arPayType = $dbResultList->Fetch()) {
         $name = strlen($arPayType["LID"]) > 0 ? htmlspecialcharsbx($arPayType["NAME"]) . " (" . $arPayType["LID"] . ")" : htmlspecialcharsbx($arPayType["NAME"]);
         $result[$arPayType["ID"]] = $name;
     }
     return $result;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:14,代码来源:bypaysystem.php


示例7: ensureQuotePaySystemsCreated

 public static function ensureQuotePaySystemsCreated()
 {
     if (!Loader::includeModule('sale')) {
         return;
     }
     $siteID = '';
     $languageID = '';
     $dbSites = \CSite::GetList($by = 'sort', $order = 'desc', array('DEFAULT' => 'Y', 'ACTIVE' => 'Y'));
     $defaultSite = is_object($dbSites) ? $dbSites->Fetch() : null;
     if (is_array($defaultSite)) {
         $siteID = $defaultSite['LID'];
         $languageID = $defaultSite['LANGUAGE_ID'];
     }
     if ($siteID === '') {
         $siteID = 's1';
     }
     if ($languageID === '') {
         $languageID = 'ru';
     }
     $paySysName = "quote_{$languageID}";
     $paySystems = array();
     $customPaySystemPath = \COption::GetOptionString('sale', 'path2user_ps_files', '');
     if ($customPaySystemPath === '') {
         $customPaySystemPath = BX_ROOT . '/php_interface/include/sale_payment/';
     }
     $personTypeIDs = \CCrmPaySystem::getPersonTypeIDs();
     if (isset($personTypeIDs['COMPANY'])) {
         $paySystems[] = array('NAME' => Loc::getMessage('CRM_PS_QUOTE_COMPANY', null, $languageID), 'SORT' => 200, 'DESCRIPTION' => '', 'CODE_TEMP' => $paySysName, 'ACTION' => array(array('PERSON_TYPE_ID' => $personTypeIDs['COMPANY'], 'NAME' => Loc::getMessage('CRM_PS_QUOTE_COMPANY', null, $languageID), 'ACTION_FILE' => "{$customPaySystemPath}{$paySysName}", 'RESULT_FILE' => '', 'NEW_WINDOW' => 'Y', 'PARAMS' => serialize(array('DATE_INSERT' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_BILL_DATE'), 'DATE_PAY_BEFORE' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_PAY_BEFORE'), 'BUYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'COMPANY'), 'BUYER_INN' => array('TYPE' => 'PROPERTY', 'VALUE' => 'INN'), 'BUYER_ADDRESS' => array('TYPE' => 'PROPERTY', 'VALUE' => 'COMPANY_ADR'), 'BUYER_PHONE' => array('TYPE' => 'PROPERTY', 'VALUE' => 'PHONE'), 'BUYER_FAX' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FAX'), 'BUYER_PAYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'CONTACT_PERSON'), 'COMMENT1' => array('TYPE' => 'ORDER', 'VALUE' => 'USER_DESCRIPTION'))), 'HAVE_PAYMENT' => 'Y', 'HAVE_ACTION' => 'N', 'HAVE_RESULT' => 'N', 'HAVE_PREPAY' => 'N', 'HAVE_RESULT_RECEIVE' => 'N')));
     }
     if (isset($personTypeIDs['CONTACT'])) {
         $paySystems[] = array('NAME' => Loc::getMessage('CRM_PS_QUOTE_CONTACT', null, $languageID), 'SORT' => 300, 'DESCRIPTION' => '', 'CODE_TEMP' => $paySysName, 'ACTION' => array(array('PERSON_TYPE_ID' => $personTypeIDs['CONTACT'], 'NAME' => Loc::getMessage('CRM_PS_QUOTE_CONTACT', null, $languageID), 'ACTION_FILE' => "{$customPaySystemPath}{$paySysName}", 'RESULT_FILE' => '', 'NEW_WINDOW' => 'Y', 'PARAMS' => serialize(array('DATE_INSERT' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_BILL_DATE'), 'DATE_PAY_BEFORE' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_PAY_BEFORE'), 'BUYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FIO'), 'BUYER_INN' => array('TYPE' => 'PROPERTY', 'VALUE' => 'INN'), 'BUYER_ADDRESS' => array('TYPE' => 'PROPERTY', 'VALUE' => 'ADDRESS'), 'BUYER_PHONE' => array('TYPE' => 'PROPERTY', 'VALUE' => 'PHONE'), 'BUYER_FAX' => array('TYPE' => '', 'VALUE' => ''), 'BUYER_PAYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FIO'), 'COMMENT1' => array('TYPE' => 'ORDER', 'VALUE' => 'USER_DESCRIPTION'))), 'HAVE_PAYMENT' => 'Y', 'HAVE_ACTION' => 'N', 'HAVE_RESULT' => 'N', 'HAVE_PREPAY' => 'N', 'HAVE_RESULT_RECEIVE' => 'N')));
     }
     $currencyID = \CCrmCurrency::GetBaseCurrencyID();
     foreach ($paySystems as $paySystem) {
         $dbSalePaySystem = \CSalePaySystem::GetList(array(), array('LID' => $siteID, 'NAME' => $paySystem['NAME']), false, false, array('ID'));
         if (!$dbSalePaySystem->Fetch()) {
             $paySystemID = \CSalePaySystem::Add(array('NAME' => $paySystem['NAME'], 'DESCRIPTION' => $paySystem['DESCRIPTION'], 'SORT' => $paySystem['SORT'], 'LID' => $siteID, 'CURRENCY' => $currencyID, 'ACTIVE' => 'Y'));
             if ($paySystemID > 0) {
                 foreach ($paySystem['ACTION'] as &$action) {
                     $action['PAY_SYSTEM_ID'] = $paySystemID;
                     \CSalePaySystemAction::Add($action);
                 }
                 unset($action);
             }
         }
     }
     unset($paySystem);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:48,代码来源:salemanager.php


示例8: getPayment

    public static function getPayment($id = false)
    {
        static $result = null;
        static $resultById = null;

        if($result === null)
        {
            $rs = \CSalePaySystem::GetList(array(), array(), false, false, array('ID', 'NAME'));
            while($ar = $rs->GetNext(true, false))
            {
                $obj = new Payment($ar);
                $resultById[ $ar['ID'] ] = &$obj;
                $result[] = &$obj;
                unset($obj);
            }
        }

        return $id ? (isset($resultById[$id]) ? $resultById[$id] : false) : $result;
    }
开发者ID:AlexSmerw,项目名称:domino,代码行数:19,代码来源:Payment.class.php


示例9: array

         }
     }
 }
 $arResult["DELIVERY"] = $arDeliveryResult;
 $arResult["DELIVERY_CHECHED_DESC"] = $deliveryCheckDesc;
 /*
  * paysystem
  */
 $userAccount = "";
 $dbUserAccount = CSaleUserAccount::GetList(array(), array("USER_ID" => $currentUserId, "CURRENCY" => $arResult["CURRENCY"], "LOCKED" => "N"));
 if ($arUserAccount = $dbUserAccount->GetNext()) {
     if (DoubleVal($arUserAccount["CURRENT_BUDGET"]) > 0) {
         $userAccount = SaleFormatCurrency($arUserAccount["CURRENT_BUDGET"], $arResult["CURRENCY"]);
     }
 }
 $arPaySystem = CSalePaySystem::DoLoadPaySystems($PERSON_TYPE);
 $arNewPaySystem = array();
 $paysystemDesc = "";
 $arNewPaySystem[0] = array("ID" => "", "NAME" => GetMessage("SBB_SELECT_PAYSYSTEM"), "CHECKED" => "Y");
 foreach ($arPaySystem as $key => $val) {
     $arNewPaySystem[$key]["ID"] = $val["ID"];
     $arNewPaySystem[$key]["NAME"] = $val["NAME"];
     $arNewPaySystem[$key]["DESCRIPTION"] = $val["DESCRIPTION"];
     $arNewPaySystem[$key]["ACTIVE"] = $val["ACTIVE"];
     if ($_POST["PAYSYSTEM_ID"] == $key) {
         $arNewPaySystem[$key]["CHECKED"] = "Y";
         $arNewPaySystem[0]["CHECKED"] = "N";
         $paysystemDesc = $val["DESCRIPTION"];
     }
 }
 //add pay from account
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php


示例10: obtainDataReferences

 /**
  * Function returns reference data as shared cache between this component and sale.personal.order.list.
  *
  * @throws Exception
  * @return void
  */
 protected function obtainDataReferences()
 {
     if ($this->startCache(array('spo-shared'))) {
         try {
             $cachedData = array();
             /////////////////////
             /////////////////////
             // Person type
             $dbPType = CSalePersonType::GetList(array("SORT" => "ASC"));
             while ($arPType = $dbPType->Fetch()) {
                 $cachedData['PERSON_TYPE'][$arPType["ID"]] = $arPType;
             }
             // Save statuses for Filter form
             $dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => LANGUAGE_ID));
             while ($arStatus = $dbStatus->Fetch()) {
                 $cachedData['STATUS'][$arStatus["ID"]] = $arStatus;
             }
             $dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"));
             while ($arPaySystem = $dbPaySystem->Fetch()) {
                 $arPaySystem['NAME'] = htmlspecialcharsbx($arPaySystem['NAME']);
                 $cachedData['PAYSYS'][$arPaySystem["ID"]] = $arPaySystem;
             }
             $cachedData['DELIVERY'] = array();
             $shipmentIds = array();
             foreach ($this->dbResult['SHIPMENT'] as $shipment) {
                 $shipmentIds[] = $shipment['DELIVERY_ID'];
             }
             $dbDelivery = \Bitrix\Sale\Delivery\Services\Table::getList(array('select' => array('ID', 'NAME', 'PARENT_NAME' => 'PARENT.NAME', 'PARENT_CLASS_NAME' => 'PARENT.CLASS_NAME'), 'filter' => array('ID' => $shipmentIds)));
             $deliveryService = array();
             while ($delivery = $dbDelivery->fetch()) {
                 $deliveryService[$delivery['ID']] = $delivery;
             }
             foreach ($deliveryService as $delivery) {
                 $cachedData['DELIVERY'][$delivery["ID"]] = array();
                 if ($delivery['PARENT_NAME']) {
                     $cachedData['DELIVERY'][$delivery["ID"]]['NAME'] = htmlspecialcharsbx($delivery['PARENT_NAME'] . ':' . $delivery['NAME']);
                 } else {
                     $cachedData['DELIVERY'][$delivery["ID"]]['NAME'] = htmlspecialcharsbx($delivery['NAME']);
                 }
             }
             /////////////////////
             /////////////////////
         } catch (Exception $e) {
             $this->abortCache();
             throw $e;
         }
         $this->endCache($cachedData);
     } else {
         $cachedData = $this->getCacheData();
     }
     $this->dbResult = array_merge($this->dbResult, $this->adaptCachedReferences($cachedData));
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:58,代码来源:class.php


示例11: fGetPaySystemsHTML

function fGetPaySystemsHTML($PERSON_TYPE_ID, $PAY_SYSTEM_ID)
{
	$resultHtml = "<table width=\"100%\">";
	$resultHtml .= "<tr class=\"adm-detail-required-field\">\n<td class=\"adm-detail-content-cell-l\" width=\"40%\">".GetMessage("SOE_PAY_SYSTEM").":</td><td class=\"adm-detail-content-cell-r\" width=\"60%\">";

	$arPaySystem = CSalePaySystem::DoLoadPaySystems($PERSON_TYPE_ID);

	$resultHtml .= "<select name=\"PAY_SYSTEM_ID\" id=\"PAY_SYSTEM_ID\" onChange=\"fChangePaymentSystem();\">\n";
	$resultHtml .= "<option value=\"\">(".GetMessage("SOE_SELECT").")</option>";
	foreach ($arPaySystem as $key => $val)
	{
		$resultHtml .= "<option value=\"".$key."\"";
		if ($key == intval($PAY_SYSTEM_ID))
			$resultHtml .= " selected";
		$resultHtml .= ">".$val["NAME"]." [".$key."]</option>";
	}
	$resultHtml .= "</select>";
	$resultHtml .= "</td>\n</tr>";
	$resultHtml .= "</table>";

	return $resultHtml;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:22,代码来源:admin_tool.php


示例12: ShowError

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$this->setFramemode(false);
if (!CModule::IncludeModule("sale")) {
    ShowError(GetMessage("SALE_MODULE_NOT_INSTALL"));
    return;
}
if (!array_key_exists('PAY_SYSTEM_ID_NEW', $arParams)) {
    $newPsId = CSalePaySystem::getNewIdsFromOld($arParams["PAY_SYSTEM_ID"], $arParams["PERSON_TYPE_ID"]);
    $newPsId = current($newPsId);
} else {
    $newPsId = $arParams["PAY_SYSTEM_ID_NEW"];
}
$dbPaySysAction = CSalePaySystemAction::GetList(array(), array('ID' => $newPsId), false, false, array("ACTION_FILE", "PARAMS", "ENCODING"));
if ($arPaySysAction = $dbPaySysAction->Fetch()) {
    if (strlen($arPaySysAction["ACTION_FILE"]) > 0) {
        $GLOBALS["SALE_CORRESPONDENCE"] = CSalePaySystemAction::UnSerializeParams($arPaySysAction["PARAMS"]);
        $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
        if (!isset($GLOBALS["SALE_INPUT_PARAMS"])) {
            $GLOBALS["SALE_INPUT_PARAMS"] = array();
        }
        $pathToAction = str_replace("\\", "/", $pathToAction);
        while (substr($pathToAction, strlen($pathToAction) - 1, 1) == "/") {
            $pathToAction = substr($pathToAction, 0, strlen($pathToAction) - 1);
        }
        if (file_exists($pathToAction)) {
            if (is_dir($pathToAction)) {
                if (file_exists($pathToAction . "/result_rec.php")) {
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:component.php


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


示例14: str_replace

                    $errorMessage1 .= $ex->GetString() . ".<br>";
                } else {
                    $errorMessage1 .= str_replace("#PLAT#", $arPersonType["NAME"], GetMessage("SPS_ERROR_DELETE")) . ".<br>";
                }
            }
        }
    }
    if (strlen($errorMessage) > 0) {
        $bInitVars = True;
    }
    if (strlen($save) > 0 && strlen($errorMessage) <= 0) {
        LocalRedirect("sale_pay_system.php?lang=" . LANG . GetFilterParams("filter_", false));
    }
}
if ($ID > 0) {
    $dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"), array("ID" => $ID));
    $dbPaySystem->ExtractFields("str_");
}
if ($bInitVars) {
    $DB->InitTableVarsForEdit("b_sale_pay_system", "", "str_");
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php";
$APPLICATION->SetTitle($ID > 0 ? GetMessage("SALE_EDIT_RECORD", array("#ID#" => $ID)) : GetMessage("SALE_NEW_RECORD"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
/*********************************************************************/
/********************  BODY  *****************************************/
/*********************************************************************/
?>

<?php 
$aMenu = array(array("TEXT" => GetMessage("SPSN_2FLIST"), "LINK" => "/bitrix/admin/sale_pay_system.php?lang=" . LANG . GetFilterParams("filter_"), "ICON" => "btn_list"));
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php


示例15: ExportOrders2Xml

	function ExportOrders2Xml($arFilter = Array(), $nTopCount = 0, $currency = "", $crmMode = false, $time_limit = 0, $version = false, $arOptions = Array())
	{
		global $DB;
		$count = false;
		if(IntVal($nTopCount) > 0)
			$count = Array("nTopCount" => $nTopCount);
		$bNewVersion = (strlen($version) > 0);
		$bExportFromCrm = (isset($arOptions["EXPORT_FROM_CRM"]) && $arOptions["EXPORT_FROM_CRM"] === "Y");

		if(IntVal($time_limit) > 0)
		{
			//This is an optimization. We assume than no step can take more than one year.
			if($time_limit > 0)
				$end_time = time() + $time_limit;
			else
				$end_time = time() + 365*24*3600; // One year

			//$version
			$lastOrderPrefix = "LAST_ORDER_ID";
			if($crmMode)
			{
				$lastOrderPrefix = md5(serialize($arFilter));
				if(!empty($_SESSION["BX_CML2_EXPORT"][$lastOrderPrefix]) && IntVal($nTopCount) > 0)
					$count["nTopCount"] = $count["nTopCount"]+count($_SESSION["BX_CML2_EXPORT"][$lastOrderPrefix]);
			}
			else
			{
				if(IntVal($_SESSION["BX_CML2_EXPORT"][$lastOrderPrefix]) > 0)
				{
					$arFilter["<ID"] = $_SESSION["BX_CML2_EXPORT"][$lastOrderPrefix];
				}
			}
		}

		$arResultStat = array(
			"ORDERS" => 0,
			"CONTACTS" => 0,
			"COMPANIES" => 0,
		);

		$accountNumberPrefix = COption::GetOptionString("sale", "1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX", "");

		$dbPaySystem = CSalePaySystem::GetList(Array("ID" => "ASC"), Array("ACTIVE" => "Y"), false, false, Array("ID", "NAME", "ACTIVE"));
		while($arPaySystem = $dbPaySystem -> Fetch())
			$paySystems[$arPaySystem["ID"]] = $arPaySystem["NAME"];

		$dbDelivery = CSaleDelivery::GetList(Array("ID" => "ASC"), Array("ACTIVE" => "Y"), false, false, Array("ID", "NAME", "ACTIVE"));
		while($arDelivery = $dbDelivery -> Fetch())
			$delivery[$arDelivery["ID"]] = $arDelivery["NAME"];

		$rsDeliveryHandlers = CSaleDeliveryHandler::GetAdminList(array("SID" => "ASC"));
		while ($arHandler = $rsDeliveryHandlers->Fetch())
		{
			if(is_array($arHandler["PROFILES"]))
			{
				foreach($arHandler["PROFILES"] as $k => $v)
				{
					$delivery[$arHandler["SID"].":".$k] = $v["TITLE"]." (".$arHandler["NAME"].")";
				}
			}
		}

		$arStore = array();
		$arMeasures = array();
		if(CModule::IncludeModule("catalog"))
		{
			$dbList = CCatalogStore::GetList(
				array("SORT" => "DESC", "ID" => "ASC"),
				array("ACTIVE" => "Y", "ISSUING_CENTER" => "Y"),
				false,
				false,
				array("ID", "SORT", "TITLE", "ADDRESS", "DESCRIPTION", "PHONE", "EMAIL", "XML_ID")
			);
			while ($arStoreTmp = $dbList->Fetch())
			{
				if(strlen($arStoreTmp["XML_ID"]) <= 0)
					$arStoreTmp["XML_ID"] = $arStoreTmp["ID"];
				$arStore[$arStoreTmp["ID"]] = $arStoreTmp;
			}

			$dbList = CCatalogMeasure::getList(array(), array(), false, false, array("CODE", "MEASURE_TITLE"));
			while($arList = $dbList->Fetch())
			{
				$arMeasures[$arList["CODE"]] = $arList["MEASURE_TITLE"];
			}
		}
		if(empty($arMeasures))
			$arMeasures[796] = GetMessage("SALE_EXPORT_SHTUKA");

		$dbExport = CSaleExport::GetList();
		while($arExport = $dbExport->Fetch())
		{
			$arAgent[$arExport["PERSON_TYPE_ID"]] = unserialize($arExport["VARS"]);
		}

		$dateFormat = CSite::GetDateFormat("FULL");

		if ($crmMode)
		{
			echo "<"."?xml version=\"1.0\" encoding=\"UTF-8\"?".">\n";
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:101,代码来源:export.php


示例16: GetControls

	/**
	 * @param bool|string $strControlID
	 * @return array|bool
	 */
	public static function GetControls($strControlID = false)
	{
		$arSalePersonTypes = array();
		$arFilter = array();
		if (static::$boolInit)
		{
			if (isset(static::$arInitParams['SITE_ID']))
				$arFilter['LID'] = static::$arInitParams['SITE_ID'];
		}
		$rsPersonTypes = CSalePersonType::GetList(array(), $arFilter, false, false, array('ID', 'NAME', 'LIDS'));
		while ($arPersonType = $rsPersonTypes->Fetch())
		{
			$arPersonType['ID'] = intval($arPersonType['ID']);
			$arSalePersonTypes[$arPersonType['ID']] = $arPersonType['NAME'].'('.implode(' ', $arPersonType['LIDS']).')';
		}

		$arSalePaySystemList = array();
		$arFilter = array();
		$rsPaySystems = CSalePaySystem::GetList(array(), $arFilter, false, false, array('ID', 'NAME'));
		while ($arPaySystem = $rsPaySystems->Fetch())
		{
			$arSalePaySystemList[$arPaySystem['ID']] = $arPaySystem['NAME'];
		}

		$arSaleDeliveryList = array();
		$arFilter = array();
		if (static::$boolInit)
		{
			if (isset(static::$arInitParams['SITE_ID']))
				$arFilter['LID'] = static::$arInitParams['SITE_ID'];
		}

		$rsDeliverySystems = CSaleDelivery::GetList(array(), $arFilter, false, false, array('ID', 'LID', 'NAME'));
		while ($arDelivery = $rsDeliverySystems->Fetch())
		{
			$arSaleDeliveryList[$arDelivery['ID']] = $arDelivery['NAME'].' ('.$arDelivery['LID'].')';
		}

		$arFilter = array();
		if (static::$boolInit)
		{
			if (isset(static::$arInitParams['SITE_ID']))
				$arFilter['SITE'] = static::$arInitParams['SITE_ID'];
		}

		$rsDeliveryHandlers = CSaleDeliveryHandler::GetList(array(),$arFilter);
		while ($arDeliveryHandler = $rsDeliveryHandlers->Fetch())
		{
			$boolSep = true;
			if (!empty($arDeliveryHandler['PROFILES']) && is_array($arDeliveryHandler['PROFILES']))
			{
				foreach ($arDeliveryHandler['PROFILES'] as $key => $arProfile)
				{
					$arSaleDeliveryList[$arDeliveryHandler['SID'].':'.$key] = $arDeliveryHandler['NAME'];
				}
			}
		}

		$arLabels = array(
			BT_COND_LOGIC_EQ => Loc::getMessage('BT_SALE_AMOUNT_LOGIC_EQ_LABEL'),
			BT_COND_LOGIC_NOT_EQ => Loc::getMessage('BT_SALE_AMOUNT_LOGIC_NOT_EQ_LABEL'),
			BT_COND_LOGIC_GR => Loc::getMessage('BT_SALE_AMOUNT_LOGIC_GR_LABEL'),
			BT_COND_LOGIC_LS => Loc::getMessage('BT_SALE_AMOUNT_LOGIC_LS_LABEL'),
			BT_COND_LOGIC_EGR => Loc::getMessage('BT_SALE_AMOUNT_LOGIC_EGR_LABEL'),
			BT_COND_LOGIC_ELS => Loc::getMessage('BT_SALE_AMOUNT_LOGIC_ELS_LABEL')
		);
		$arLabelsWeight = array(
			BT_COND_LOGIC_EQ => Loc::getMessage('BT_SALE_WEIGHT_LOGIC_EQ_LABEL'),
			BT_COND_LOGIC_NOT_EQ => Loc::getMessage('BT_SALE_WEIGHT_LOGIC_NOT_EQ_LABEL'),
			BT_COND_LOGIC_GR => Loc::getMessage('BT_SALE_WEIGHT_LOGIC_GR_LABEL'),
			BT_COND_LOGIC_LS => Loc::getMessage('BT_SALE_WEIGHT_LOGIC_LS_LABEL'),
			BT_COND_LOGIC_EGR => Loc::getMessage('BT_SALE_WEIGHT_LOGIC_EGR_LABEL'),
			BT_COND_LOGIC_ELS => Loc::getMessage('BT_SALE_WEIGHT_LOGIC_ELS_LABEL')
		);

		$arControlList = array(
			'CondSaleOrderSumm' => array(
				'ID' => 'CondSaleOrderSumm',
				'FIELD' => 'ORDER_PRICE',
				'FIELD_TYPE' => 'double',
				'LABEL' => Loc::getMessage('BT_MOD_SALE_COND_CMP_SALE_ORDER_SUMM_LABEL_EXT'),
				'PREFIX' => Loc::getMessage('BT_MOD_SALE_COND_CMP_SALE_ORDER_SUMM_PREFIX_EXT'),
				'LOGIC' => static::GetLogicEx(array_keys($arLabels), $arLabels),
				'JS_VALUE' => array(
					'type' => 'input'
				)
			),
			'CondSalePersonType' => array(
				'ID' => 'CondSalePersonType',
				'FIELD' => 'PERSON_TYPE_ID',
				'FIELD_TYPE' => 'int',
				'LABEL' => Loc::getMessage('BT_MOD_SALE_COND_CMP_SALE_PERSON_TYPE_LABEL'),
				'PREFIX' => Loc::getMessage('BT_MOD_SALE_COND_CMP_SALE_PERSON_TYPE_PREFIX'),
				'LOGIC' => static::GetLogic(array(BT_COND_LOGIC_EQ, BT_COND_LOGIC_NOT_EQ)),
				'JS_VALUE' => array(
					'type' => 'select',
//.........这里部分代码省略.........
开发者ID:akniyev,项目名称:arteva.ru,代码行数:101,代码来源:sale_cond.php


示例17: getPaysystems

 public function getPaysystems($deliveryId = null)
 {
     if (empty($deliveryId)) {
         $deliveryId = $this->deliveryId;
     }
     if (empty($deliveryId)) {
         throw new \Exception('Для получения способов оплаты нужно указать службу доставки');
     }
     $paySystems = array();
     $paySystemFilter = array('ACTIVE' => 'Y', 'PERSON_TYPE_ID' => 1, 'PSA_HAVE_PAYMENT' => 'Y');
     $res = \CSalePaySystem::GetList(array("SORT" => "ASC", "PSA_NAME" => "ASC"), $paySystemFilter);
     while ($paySystem = $res->Fetch()) {
         if (!\CSaleDelivery2PaySystem::isPaySystemApplicable($paySystem['ID'], $deliveryId)) {
             continue;
         }
         $check = \CSalePaySystemsHelper::checkPSCompability($paySystem['PSA_ACTION_FILE'], $this->getItemsRaw(), $this->getTotal(), $this->deliveryPrice, $this->location);
         if (!$check) {
             continue;
         }
         $paySystem['PRICE'] = \CSalePaySystemsHelper::getPSPrice($paySystem, $this->getTotal(), $this->deliveryPrice, $this->location);
         $paySystems[] = $paySystem;
     }
     return $paySystems;
 }
开发者ID:ASDAFF,项目名称:bitrix_lib,代码行数:24,代码来源:Cart.class.php


示例18: Array

			if($arPerson = $dbPerson->Fetch())
			{
				$personType = $arPerson["ID"];
			}
		}
		if(IntVal($arGeneralInfo["paySystem"]["cash"][$personType]) > 0 )
			$paySystem = $arGeneralInfo["paySystem"]["cash"][$personType];
		elseif(IntVal($arGeneralInfo["paySystem"]["bill"][$personType]) > 0 )
			$paySystem = $arGeneralInfo["paySystem"]["bill"][$personType];
		elseif(IntVal($arGeneralInfo["paySystem"]["bill"][$personType]) > 0 )
			$paySystem = $arGeneralInfo["paySystem"]["sber"][$personType];
		elseif(IntVal($arGeneralInfo["paySystem"]["paypal"][$personType]) > 0 )
			$paySystem = $arGeneralInfo["paySystem"]["paypal"][$personType];
		else
		{
			$dbPS = CSalePaySystem::GetList(Array(), Array("LID" => WIZARD_SITE_ID));
			if($arPS = $dbPS->Fetch())
				$paySystem = $arPS["ID"];
		}
		if(IntVal($location) <= 0)
		{
			$dbLocation = CSaleLocation::GetList(Array("ID" => "ASC"), Array("LID" => $lang));
			if($arLocation = $dbLocation->Fetch())
			{
				$location = $arLocation["ID"];
			}
		}
		if(empty($arGeneralInfo["properies"][$personType]))
		{
			$dbProp = CSaleOrderProps::GetList(array(), Array("PERSON_TYPE_ID" => $personType));
			while($arProp = $dbProp->Fetch())
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:step1.php


示例19: ShowStep

 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $arResult = $wizard->GetVars(true);
     $dbSite = CSite::GetByID($arResult["siteID"]);
     $arSite = $dbSite->GetNext();
     CModule::IncludeModule("currency");
     $dbCurrency = CCurrency::GetList($b = "SORT", $o = "ASC", $arResult["siteID"]);
     while ($arCur = $dbCurrency->GetNext()) {
         $arCurrency[$arCur["CURRENCY"]] = $arCur["FULL_NAME"];
     }
     $dbUGroup = CGroup::GetList($b = "c_sort", $o = "ASC", array("ACTIVE" => "Y"));
     while ($arUGroup = $dbUGroup->GetNext()) {
         $arGroups[$arUGroup["ID"]] = $arUGroup["NAME"];
     }
     CModule::IncludeModule("sale");
     $dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y", "LID" => $arResult["siteID"]));
     while ($arPersonType = $dbPersonType->GetNext()) {
         $arPersons[$arPersonType["ID"]] = $arPersonType["NAME"];
     }
     $dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y", "LID" => $arResult["siteID"]));
     while ($arPaySystem = $dbPaySystem->GetNext()) {
         $arPaySystems[$arPaySystem["ID"]] = $arPaySystem["NAME"];
     }
     $dbDelivery = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), array("SITE_ID" => $arResult["siteID"], "ACTIVE" => "Y"));
     while ($arDelivery = $dbDelivery->GetNext()) {
         $arDeliveries[$arDelivery["SID"] . "_new"] = $arDelivery["NAME"] . " " . GetMessage("WW_STEP8_1");
     }
     $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC"), array("LID" => $arResult["siteID"], "ACTIVE" => "Y"));
     while ($arDelivery = $dbDelivery->GetNext()) {
         $arDeliveries[$arDelivery["ID"]] = $arDelivery["NAME"];
     }
     $this->content = GetMessage("WW_2") . "<br />";
     $this->content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"/bitrix/wizards/bitrix/sale.install/styles.css\">";
     $this->content .= "<table class=\"data-table\">";
     $this->content .= "<tr><th>" . GetMessage("WW_STEP1_2") . "</th><td>[" . $arSite["ID"] . "] " . $arSite["NAME"] . "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_STEP1_3") . "</th><td>" . $arResult["orderEmail"] . "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_STEP1_5") . "</th><td>" . $arResult["currencyID"] . " (" . $arCurrency[$arResult["currencyID"]] . ")" . "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_3") . "</th><td>";
     foreach ($arResult["groupID"] as $v) {
         $this->content .= $arGroups[$v] . "<br />";
     }
     $this->content .= "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_4") . "</th><td>";
     foreach ($arResult["personType"] as $v) {
         $this->content .= $arPersons[$v] . "<br />";
     }
     $this->content .= "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_5") . "</th><td>";
     $arPS = array();
     foreach ($arResult["paySystem"] as $v) {
         if (!empty($v)) {
             foreach ($v as $v1) {
                 if (!in_array($v1, $arPS)) {
                     $arPS[] = $v1;
                 }
             }
         }
     }
     foreach ($arPS as $v) {
         $this->content .= $arPaySystems[$v] . "<br />";
     }
     $this->content .= "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_6") . "</th><td>";
     if (!empty($arResult["delivery"])) {
         foreach ($arResult["delivery"] as $v) {
             $this->content .= $arDeliveries[$v] . "<br />";
         }
     }
     $this->content .= "</td></tr>";
     $this->content .= "</table>";
 }
开发者ID:Satariall,项目名称:izurit,代码行数:72,代码来源:wizard.php


示例20: GetMessage


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CSalePaySystemAction类代码示例发布时间:2022-05-20
下一篇:
PHP CSaleOrderUserProps类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap