本文整理汇总了PHP中CSalePaySystem类的典型用法代码示例。如果您正苦于以下问题:PHP CSalePaySystem类的具体用法?PHP CSalePaySystem怎么用?PHP CSalePaySystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CSalePaySystem类的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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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
示例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));
}
示例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;
}
示例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")) {
示例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)
{
?>
示例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"));
示例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";
//.........这里部分代码省略.........