本文整理汇总了PHP中CCurrency类的典型用法代码示例。如果您正苦于以下问题:PHP CCurrency类的具体用法?PHP CCurrency怎么用?PHP CCurrency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CCurrency类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: PrepareCurrency4Where
public static function PrepareCurrency4Where($val, $key, $operation, $negative, $field, &$arField, &$arFilter)
{
$val = DoubleVal($val);
$baseSiteCurrency = "";
if (isset($arFilter["LID"]) && strlen($arFilter["LID"]) > 0)
$baseSiteCurrency = CSaleLang::GetLangCurrency($arFilter["LID"]);
elseif (isset($arFilter["CURRENCY"]) && strlen($arFilter["CURRENCY"]) > 0)
$baseSiteCurrency = $arFilter["CURRENCY"];
if (strlen($baseSiteCurrency) <= 0)
return False;
$strSqlSearch = "";
$dbCurrency = CCurrency::GetList(($by = "sort"), ($order = "asc"));
while ($arCurrency = $dbCurrency->Fetch())
{
$val1 = roundEx(CCurrencyRates::ConvertCurrency($val, $baseSiteCurrency, $arCurrency["CURRENCY"]), SALE_VALUE_PRECISION);
if (strlen($strSqlSearch) > 0)
$strSqlSearch .= " OR ";
$strSqlSearch .= "(D.ORDER_CURRENCY = '".$arCurrency["CURRENCY"]."' AND ";
if ($negative == "Y")
$strSqlSearch .= "NOT";
$strSqlSearch .= "(".$field." ".$operation." ".$val1." OR ".$field." IS NULL OR ".$field." = 0)";
$strSqlSearch .= ")";
}
return "(".$strSqlSearch.")";
}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:31,代码来源:delivery.php
示例2: CheckFields
function CheckFields($ACTION, &$arFields, $ID = 0)
{
global $APPLICATION;
if ((is_set($arFields, "PRODUCT_ID") || $ACTION == "ADD") && intval($arFields["PRODUCT_ID"]) <= 0) {
$APPLICATION->ThrowException(Loc::getMessage("KGP_EMPTY_PRODUCT"), "EMPTY_PRODUCT_ID");
return false;
}
if ((is_set($arFields, "CATALOG_GROUP_ID") || $ACTION == "ADD") && intval($arFields["CATALOG_GROUP_ID"]) <= 0) {
$APPLICATION->ThrowException(Loc::getMessage("KGP_EMPTY_CATALOG_GROUP"), "EMPTY_CATALOG_GROUP_ID");
return false;
}
if ((is_set($arFields, "CURRENCY") || $ACTION == "ADD") && strlen($arFields["CURRENCY"]) <= 0) {
$APPLICATION->ThrowException(Loc::getMessage("KGP_EMPTY_CURRENCY"), "EMPTY_CURRENCY");
return false;
}
if (isset($arFields['CURRENCY'])) {
if (!($arCurrency = CCurrency::GetByID($arFields["CURRENCY"]))) {
$APPLICATION->ThrowException(Loc::getMessage("KGP_NO_CURRENCY", array('#ID#' => $arFields["CURRENCY"])), "CURRENCY");
return false;
}
}
if (is_set($arFields, "PRICE") || $ACTION == "ADD") {
$arFields["PRICE"] = str_replace(",", ".", $arFields["PRICE"]);
$arFields["PRICE"] = DoubleVal($arFields["PRICE"]);
}
if ((is_set($arFields, "QUANTITY_FROM") || $ACTION == "ADD") && intval($arFields["QUANTITY_FROM"]) <= 0) {
$arFields["QUANTITY_FROM"] = false;
}
if ((is_set($arFields, "QUANTITY_TO") || $ACTION == "ADD") && intval($arFields["QUANTITY_TO"]) <= 0) {
$arFields["QUANTITY_TO"] = false;
}
return true;
}
开发者ID:Satariall,项目名称:izurit,代码行数:33,代码来源:price.php
示例3: Init
function Init()
{
if (\Bitrix\Main\Loader::includeModule('currency') && ($arCurrency = CCurrency::GetByID('RUR'))) {
$base_currency = 'RUR';
} else {
$base_currency = 'RUB';
}
return array("SID" => "ems", "NAME" => GetMessage('SALE_DH_EMS_NAME'), "DESCRIPTION" => GetMessage('SALE_DH_EMS_DESCRIPTION'), "DESCRIPTION_INNER" => GetMessage('SALE_DH_EMS_DESCRIPTION_INNER'), "BASE_CURRENCY" => $base_currency, "HANDLER" => __FILE__, "DBGETSETTINGS" => array("CDeliveryEMS", "GetSettings"), "DBSETSETTINGS" => array("CDeliveryEMS", "SetSettings"), "GETCONFIG" => array("CDeliveryEMS", "GetConfig"), "COMPABILITY" => array("CDeliveryEMS", "Compability"), "CALCULATOR" => array("CDeliveryEMS", "Calculate"), "PROFILES" => array("delivery" => array("TITLE" => GetMessage("SALE_DH_EMS_DELIVERY_TITLE"), "DESCRIPTION" => '', "RESTRICTIONS_WEIGHT" => array(0, 31500), "RESTRICTIONS_SUM" => array(0))));
}
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:9,代码来源:delivery_ems.php
示例4: Init
function Init()
{
if ($arCurrency = CCurrency::GetByID('RUR')) {
$base_currency = 'RUR';
} else {
$base_currency = 'RUB';
}
return array("SID" => "russianpost", "NAME" => GetMessage('SALE_DH_RUSSIANPOST_NAME'), "DESCRIPTION" => GetMessage('SALE_DH_RUSSIANPOST_DESCRIPTION'), "DESCRIPTION_INNER" => GetMessage('SALE_DH_RUSSIANPOST_DESCRIPTION_INNER') . GetMessage('SALE_DH_RUSSIANPOST_DESCRIPTION_INNER2'), "BASE_CURRENCY" => $base_currency, "HANDLER" => __FILE__, "DBGETSETTINGS" => array("CDeliveryRUSSIANPOST", "GetSettings"), "DBSETSETTINGS" => array("CDeliveryRUSSIANPOST", "SetSettings"), "GETCONFIG" => array("CDeliveryRUSSIANPOST", "GetConfig"), "COMPABILITY" => array("CDeliveryRUSSIANPOST", "Compability"), "CALCULATOR" => array("CDeliveryRUSSIANPOST", "Calculate"), "PROFILES" => array("ground" => array("TITLE" => GetMessage("SALE_DH_RUSSIANPOST_GROUND_TITLE"), "DESCRIPTION" => '', "RESTRICTIONS_WEIGHT" => array(0), "RESTRICTIONS_SUM" => array(0)), "avia" => array("TITLE" => GetMessage("SALE_DH_RUSSIANPOST_AVIA_TITLE"), "DESCRIPTION" => '', "RESTRICTIONS_WEIGHT" => array(0), "RESTRICTIONS_SUM" => array(0))));
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:9,代码来源:delivery_russianpost.php
示例5: Init
public static function Init()
{
if ($arCurrency = CCurrency::GetByID('RUR')) {
$base_currency = 'RUR';
} else {
$base_currency = 'RUB';
}
return array("SID" => "ups", "NAME" => GetMessage('SALE_DH_UPS_NAME'), "DESCRIPTION" => GetMessage('SALE_DH_UPS_DESCRIPTION'), "DESCRIPTION_INNER" => GetMessage('SALE_DH_UPS_DESCRIPTION_INNER'), "BASE_CURRENCY" => $base_currency, "HANDLER" => __FILE__, "DBGETSETTINGS" => array("CDeliveryUPS", "GetSettings"), "DBSETSETTINGS" => array("CDeliveryUPS", "SetSettings"), "GETCONFIG" => array("CDeliveryUPS", "GetConfig"), "COMPABILITY" => array("CDeliveryUPS", "Compability"), "CALCULATOR" => array("CDeliveryUPS", "Calculate"), "PROFILES" => array("express" => array("TITLE" => GetMessage("SALE_DH_UPS_EXPRESS_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_UPS_EXPRESS_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, CSaleMeasure::Convert(150, "LBS", "G")), "RESTRICTIONS_SUM" => array(0)), "express_saver" => array("TITLE" => GetMessage("SALE_DH_UPS_EXPRESS_SAVER_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_UPS_EXPRESS_SAVER_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, CSaleMeasure::Convert(150, "LBS", "G")), "RESTRICTIONS_SUM" => array(0))));
}
开发者ID:rasuldev,项目名称:torino,代码行数:9,代码来源:delivery_ups.php
示例6: Init
function Init()
{
// fix a possible currency bug
if ($arCurrency = CCurrency::GetByID('RUR')) {
$base_currency = 'RUR';
} else {
$base_currency = 'RUB';
}
return array("SID" => "cpcr", "NAME" => GetMessage('SALE_DH_CPCR_NAME'), "DESCRIPTION" => GetMessage('SALE_DH_CPCR_DESCRIPTION'), "DESCRIPTION_INNER" => GetMessage('SALE_DH_CPCR_DESCRIPTION_INNER'), "BASE_CURRENCY" => $base_currency, "HANDLER" => __FILE__, "COMPABILITY" => array("CDeliveryCPCR", "Compability"), "CALCULATOR" => array("CDeliveryCPCR", "Calculate"), "PROFILES" => array("simple" => array("TITLE" => GetMessage("SALE_DH_CPCR_SIMPLE_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_SIMPLE_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 31500), "RESTRICTIONS_SUM" => array(0, 500000)), "simple13" => array("TITLE" => GetMessage("SALE_DH_CPCR_SIMPLE13_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_SIMPLE_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 31500), "RESTRICTIONS_SUM" => array(0, 500000)), "simple18" => array("TITLE" => GetMessage("SALE_DH_CPCR_SIMPLE18_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_SIMPLE_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 31500), "RESTRICTIONS_SUM" => array(0, 500000)), "econom" => array("TITLE" => GetMessage("SALE_DH_CPCR_ECONOM_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_ECONOM_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 68000), "RESTRICTIONS_SUM" => array(0, 500000)), "bizon" => array("TITLE" => GetMessage("SALE_DH_CPCR_BIZON_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_BIZON_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 68000), "RESTRICTIONS_SUM" => array(0, 500000)), "colibri" => array("TITLE" => GetMessage("SALE_DH_CPCR_COLIBRI_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_COLIBRI_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 68000), "RESTRICTIONS_SUM" => array(0, 500000)), "pelican" => array("TITLE" => GetMessage("SALE_DH_CPCR_PELICAN_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_PELICAN_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 68000), "RESTRICTIONS_SUM" => array(0, 500000)), "fraxt" => array("TITLE" => GetMessage("SALE_DH_CPCR_FRAXT_TITLE"), "DESCRIPTION" => GetMessage("SALE_DH_CPCR_FRAXT_DESCRIPTION"), "RESTRICTIONS_WEIGHT" => array(0, 68000), "RESTRICTIONS_SUM" => array(0, 500000))));
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:10,代码来源:delivery_cpcr.php
示例7: __AddCellCurrency
/**
* @param $intRangeID
* @param $strPrefix
* @return string
*/
function __AddCellCurrency($intRangeID, $strPrefix)
{
$currencySelectbox = CCurrency::SelectBox("{$strPrefix}CURRENCY[{$intRangeID}]", '', "", true, "", "class=\"adm-select\" style=\"width: 169px;\"");
return <<<CURRENCYCELL
\t<td width="30%">
\t\t<span class="adm-select-wrap">
\t\t\t{$currencySelectbox}
\t\t</span>
\t</td>
CURRENCYCELL;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:16,代码来源:iblock_subelement_generator.php
示例8: GetWMCurrency
static function GetWMCurrency($currency) {
$arCurrency = array();
if(CModule::IncludeModule("currency")) {
$lcur = CCurrency::GetList(($b="name"), ($order1="asc"), LANGUAGE_ID);
while($lcur_res = $lcur->Fetch()) {
$arCurrency[$lcur_res['CURRENCY']] = COption::GetOptionString(COnpayPayment::$module_id, "currency_".$lcur_res['CURRENCY']);
}
}
if(isset($arCurrency, $currency)) $currency = $arCurrency[$currency];
return $currency;
}
开发者ID:ASDAFF,项目名称:onpay.sale,代码行数:11,代码来源:onpay_payment.php
示例9: PrepareListItems
public static function PrepareListItems()
{
if (!CModule::IncludeModule('currency')) {
return array();
}
$ary = array();
$dbCurrencies = CCurrency::GetList($by = 'sort', $order = 'asc');
while ($arCurrency = $dbCurrencies->Fetch()) {
$ary[$arCurrency['CURRENCY']] = $arCurrency['FULL_NAME'];
}
return $ary;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:12,代码来源:crm_currency_helper.php
示例10: Init
public static function Init()
{
if ($arCurrency = CCurrency::GetByID('RUR'))
{
$base_currency = 'RUR';
}
else
{
$base_currency = 'RUB';
}
return array(
/* Basic description */
"SID" => "ems",
"NAME" => GetMessage('SALE_DH_EMS_NAME'),
"DESCRIPTION" => GetMessage('SALE_DH_EMS_DESCRIPTION'),
"DESCRIPTION_INNER" => GetMessage('SALE_DH_EMS_DESCRIPTION_INNER'),
"BASE_CURRENCY" => $base_currency,
"HANDLER" => __FILE__,
/* Handler methods */
"DBGETSETTINGS" => array("CDeliveryEMS", "GetSettings"),
"DBSETSETTINGS" => array("CDeliveryEMS", "SetSettings"),
"GETCONFIG" => array("CDeliveryEMS", "GetConfig"),
"COMPABILITY" => array("CDeliveryEMS", "Compability"),
"CALCULATOR" => array("CDeliveryEMS", "Calculate"),
/* List of delivery profiles */
"PROFILES" => array(
"delivery" => array(
"TITLE" => GetMessage("SALE_DH_EMS_DELIVERY_TITLE"),
"DESCRIPTION" => '', //GetMessage("SALE_DH_EMS_DELIVERY_DESCRIPTION"),
"RESTRICTIONS_WEIGHT" => array(0, 31500),
"RESTRICTIONS_SUM" => array(0),
),
)
);
}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:41,代码来源:delivery_ems.php
示例11: 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
示例12: switch
switch ($_REQUEST['action']) {
case "delete":
if ($CURRENCY_RIGHT == "W") {
if (!CCurrency::Delete($ID)) {
if ($ex = $APPLICATION->GetException()) {
$lAdmin->AddGroupError($ex->GetString(), $ID);
} else {
$lAdmin->AddGroupError(GetMessage("currency_err1"), $ID);
}
}
}
break;
}
}
}
$rsData = CCurrency::GetList($by, $order);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("CURRENCY_TITLE")));
$arHeaders = array();
$arHeaders[] = array("id" => "CURRENCY", "content" => GetMessage('currency_curr'), "sort" => "CURRENCY", "default" => true);
$arHeaders[] = array("id" => "FULL_NAME", "content" => GetMessage('CURRENCY_FULL_NAME'), "sort" => "name", "default" => true);
$arHeaders[] = array("id" => "SORT", "content" => GetMessage('currency_sort'), "sort" => "sort", "default" => true);
$arHeaders[] = array("id" => "AMOUNT_CNT", "content" => GetMessage('currency_rate_cnt'), "default" => true);
$arHeaders[] = array("id" => "AMOUNT", "content" => GetMessage('currency_rate'), "default" => true);
$lAdmin->AddHeaders($arHeaders);
while ($arRes = $rsData->NavNext(true, "f_")) {
$row =& $lAdmin->AddRow($f_CURRENCY, $arRes, "/bitrix/admin/currency_edit.php?ID=" . $f_CURRENCY . "&lang=" . LANGUAGE_ID, GetMessage('CURRENCY_A_EDIT'));
$row->AddViewField("CURRENCY", '<a href="/bitrix/admin/currency_edit.php?ID=' . $f_CURRENCY . '&lang=' . LANGUAGE_ID . '" title="' . GetMessage('CURRENCY_A_EDIT_TITLE') . '">' . $f_CURRENCY . '</a>');
$row->AddInputField("SORT", array("size" => "3"));
$row->AddViewField("FULL_NAME", $f_FULL_NAME);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:currencies.php
示例13: __ConvertOldFormat
protected function __ConvertOldFormat($strAction, &$arFields)
{
global $APPLICATION;
$arMsg = array();
$boolResult = true;
$arNeedFields = array('LID', 'CURRENCY', 'DISCOUNT_TYPE', 'DISCOUNT_VALUE', 'PRICE_FROM', 'PRICE_TO');
$arUpdateFields = array('DISCOUNT_VALUE', 'PRICE_FROM', 'PRICE_TO');
$strAction = ToUpper($strAction);
if (!array_key_exists('CONDITIONS', $arFields) && !array_key_exists('ACTIONS', $arFields)) {
$strSiteCurrency = '';
$boolUpdate = false;
if ('UPDATE' == $strAction) {
$boolNeedQuery = false;
foreach ($arUpdateFields as &$strFieldID) {
if (array_key_exists($strFieldID, $arFields)) {
$boolUpdate = true;
break;
}
}
if (isset($strFieldID)) {
unset($strFieldID);
}
if ($boolUpdate) {
foreach ($arNeedFields as &$strFieldID) {
if (!array_key_exists($strFieldID, $arFields)) {
$boolNeedQuery = true;
break;
}
}
if (isset($strFieldID)) {
unset($strFieldID);
}
if ($boolNeedQuery) {
$rsDiscounts = CSaleDiscount::GetList(array(), array('ID' => $arFields['ID']), false, false, $arNeedFields);
if ($arDiscount = $rsDiscounts->Fetch()) {
foreach ($arNeedFields as &$strFieldID) {
if (!array_key_exists($strFieldID, $arFields)) {
$arFields[$strFieldID] = $arDiscount[$strFieldID];
}
}
if (isset($strFieldID)) {
unset($strFieldID);
}
} else {
$boolUpdate = false;
$boolResult = false;
$arMsg[] = array('id' => 'ID', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_ABSENT'));
}
}
}
}
if ('ADD' == $strAction || $boolUpdate) {
if (!array_key_exists('LID', $arFields)) {
$boolResult = false;
$arMsg[] = array('id' => 'LID', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_SITE_ID_ABSENT'));
} else {
$arFields['LID'] = strval($arFields['LID']);
if ('' == $arFields['LID']) {
$boolResult = false;
$arMsg[] = array('id' => 'LID', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_SITE_ID_ABSENT'));
} else {
$rsSites = CSite::GetByID($arFields["LID"]);
if (!($arSite = $rsSites->Fetch())) {
$boolResult = false;
$arMsg[] = array('id' => 'LID', 'text' => Loc::getMessage('SKGD_NO_SITE', array('#ID#' => $arFields['LID'])));
} else {
$strSiteCurrency = CSaleLang::GetLangCurrency($arFields['LID']);
}
}
}
if (!array_key_exists('CURRENCY', $arFields)) {
$boolResult = false;
$arMsg[] = array('id' => 'CURRENCY', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_CURRENCY_ABSENT'));
} else {
$arFields['CURRENCY'] = strval($arFields['CURRENCY']);
if ('' == $arFields['CURRENCY']) {
$boolResult = false;
$arMsg[] = array('id' => 'CURRENCY', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_CURRENCY_ABSENT'));
} else {
if (!($arCurrency = CCurrency::GetByID($arFields["CURRENCY"]))) {
$boolResult = false;
$arMsg[] = array('id' => 'CURRENCY', 'text' => Loc::getMessage('SKGD_NO_CURRENCY', array('#ID#' => $arFields['CURRENCY'])));
}
}
}
if (!array_key_exists("DISCOUNT_TYPE", $arFields)) {
$boolResult = false;
$arMsg[] = array('id' => 'DISCOUNT_TYPE', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_TYPE_ABSENT'));
} else {
$arFields["DISCOUNT_TYPE"] = strval($arFields["DISCOUNT_TYPE"]);
if (CSaleDiscount::OLD_DSC_TYPE_PERCENT != $arFields["DISCOUNT_TYPE"] && CSaleDiscount::OLD_DSC_TYPE_FIX != $arFields["DISCOUNT_TYPE"]) {
$boolResult = false;
$arMsg[] = array('id' => 'DISCOUNT_TYPE', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_TYPE_BAD'));
}
}
if (!array_key_exists('DISCOUNT_VALUE', $arFields)) {
$boolResult = false;
$arMsg[] = array('id' => 'DISCOUNT_VALUE', 'text' => Loc::getMessage('BT_MOD_SALE_ERR_DSC_VALUE_ABSENT'));
} else {
$arFields['DISCOUNT_VALUE'] = (double) str_replace(',', '.', $arFields['DISCOUNT_VALUE']);
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:discount.php
示例14: array
$bVarsFromForm = true;
}
}
$dbUserCards = CSaleUserCards::GetList(array("DATE_UPDATE" => "DESC"), array("ID" => $ID, "USER_ID" => IntVal($GLOBALS["USER"]->GetID())), false, false, array("ID", "USER_ID", "ACTIVE", "SORT", "PAY_SYSTEM_ACTION_ID", "CURRENCY", "CARD_TYPE", "CARD_NUM", "CARD_CODE", "CARD_EXP_MONTH", "CARD_EXP_YEAR", "DESCRIPTION", "SUM_MIN", "SUM_MAX", "SUM_CURRENCY", "TIMESTAMP_X", "LAST_STATUS", "LAST_STATUS_CODE", "LAST_STATUS_DESCRIPTION", "LAST_STATUS_MESSAGE", "LAST_SUM", "LAST_CURRENCY", "LAST_DATE"));
if ($arUserCards = $dbUserCards->GetNext()) {
$arResult = $arUserCards;
$arResult["CARD_NUM"] = CSaleUserCards::CryptData($arResult["CARD_NUM"], "D");
} else {
$arResult["ID"] = 0;
$arResult["ACTIVE"] = "Y";
$arResult["SORT"] = 100;
}
if ($bVarsFromForm) {
foreach ($_POST as $k => $v) {
$arResult[$k] = htmlspecialcharsex($v);
$arResult['~' . $k] = $v;
}
}
$arResult["ERROR_MESSAGE"] = $errorMessage;
$dbPaySysActions = CSalePaySystemAction::GetList(array("PERSON_TYPE_ID" => "ASC", "NAME" => "ASC", "PT_NAME" => "ASC", "PS_NAME" => "ASC"), array("PS_LID" => SITE_ID, "HAVE_ACTION" => "Y"), false, false, array("*"));
$arResult["PAY_SYSTEM"] = array();
while ($arPaySysActions = $dbPaySysActions->GetNext()) {
$arResult["PAY_SYSTEM"][] = $arPaySysActions;
}
$dbCurrency = CCurrency::GetList($by = "sort", $order = "asc");
$arResult["CURRENCY_INFO"] = array();
while ($arCurrency = $dbCurrency->GetNext()) {
$arResult["CURRENCY_INFO"][] = $arCurrency;
}
$arResult["CARD_TYPE_INFO"] = array("VISA" => "Visa", "MASTERCARD" => "MasterCard", "AMEX" => "Amex", "DINERS" => "Diners", "DISCOVER" => "Discover", "JCB" => "JCB", "ENROUTE" => "Enroute");
$this->IncludeComponentTemplate();
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php
示例15: unset
unset($strEmptyPreview);
$arSKUPropList = array();
$arSKUPropIDs = array();
$arSKUPropKeys = array();
$boolSKU = false;
$strBaseCurrency = '';
$boolConvert = isset($arResult['CONVERT_CURRENCY']['CURRENCY_ID']);
//
$skuPropList = array();
// array("id_catalog" => array(...))
$skuPropIds = array();
// array("id_catalog" => array(...))
$skuPropKeys = array();
// array("id_catalog" => array(...))
if (!$boolConvert) {
$strBaseCurrency = CCurrency::GetBaseCurrency();
}
$catalogs = array();
foreach ($arResult['CATALOGS'] as $catalog) {
$offersCatalogId = (int) $catalog['OFFERS_IBLOCK_ID'];
$offersPropId = (int) $catalog['OFFERS_PROPERTY_ID'];
$catalogId = (int) $catalog['IBLOCK_ID'];
$sku = false;
if ($offersCatalogId > 0 && $offersPropId > 0) {
$sku = array("IBLOCK_ID" => $offersCatalogId, "SKU_PROPERTY_ID" => $offersPropId, "PRODUCT_IBLOCK_ID" => $catalogId);
}
if (!empty($sku) && is_array($sku)) {
$skuPropList[$catalogId] = CIBlockPriceTools::getTreeProperties($sku, $arParams['OFFER_TREE_PROPS'][$offersCatalogId], array('PICT' => $arEmptyPreview, 'NAME' => '-'));
$needValues = array();
CIBlockPriceTools::getTreePropertyValues($skuPropList[$catalogId], $needValues);
$skuPropIds[$catalogId] = array_keys($skuPropList[$catalogId]);
开发者ID:Andreyjktl,项目名称:rezina74,代码行数:31,代码来源:result_modifier.php
示例16: GetMessage
?>
</select><br /><br /></td>
</tr>
<tr class="heading">
<td colspan="2"><?php
echo GetMessage('YANDEX_CURRENCIES');
?>
</td>
</tr>
<tr>
<td colspan="2"><br />
<?php
$arCurrencyList = array();
$arCurrencyAllowed = array('RUR', 'RUB', 'USD', 'EUR', 'UAH', 'BYR', 'KZT');
$dbRes = CCurrency::GetList($by = 'sort', $order = 'asc');
while ($arRes = $dbRes->GetNext()) {
if (in_array($arRes['CURRENCY'], $arCurrencyAllowed)) {
$arCurrencyList[$arRes['CURRENCY']] = $arRes['FULL_NAME'];
}
}
$arValues = array('SITE' => GetMessage('YANDEX_CURRENCY_RATE_SITE'), 'CBRF' => GetMessage('YANDEX_CURRENCY_RATE_CBRF'), 'NBU' => GetMessage('YANDEX_CURRENCY_RATE_NBU'), 'NBK' => GetMessage('YANDEX_CURRENCY_RATE_NBK'), 'CB' => GetMessage('YANDEX_CURRENCY_RATE_CB'));
?>
<table cellpadding="2" cellspacing="0" border="0" class="internal" align="center">
<thead>
<tr class="heading">
<td colspan="2"><?php
echo GetMessage('YANDEX_CURRENCY');
?>
</td>
<td><?php
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:yandex_detail.php
示例17: elseif
if (${$key} == "Y") {
echo "checked";
}
?>
></td>
</tr>
<?php
} elseif ($key == "BASE_CURRENCY" && CModule::IncludeModule("currency")) {
?>
<tr>
<td class="adm-detail-valign-top"><?php
echo GetMessage("STAT_OPT_BASE_CURRENCY");
?>
</td>
<td><?php
echo CCurrency::SelectBox("BASE_CURRENCY", $BASE_CURRENCY, " ", True, "");
?>
<br>
<input type="checkbox" name="recount_base_currency" id="recount_base_currency" value="Y"><label for="recount_base_currency"><?php
echo GetMessage("STAT_OPT_DO_RECOUNT");
?>
</label></td>
</tr>
<?php
}
} else {
$val = COption::GetOptionString($module_id, $Option[0]);
$type = $Option[2];
?>
<tr>
<td <?php
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:options.php
示例18: GetOptimalPrice
//.........这里部分代码省略.........
if (0 >= $quantity)
{
$APPLICATION->ThrowException(GetMessage("BT_MOD_CATALOG_PROD_ERR_QUANTITY_ABSENT"), "NO_QUANTITY");
return false;
}
if (!is_array($arUserGroups) && intval($arUserGroups)."|" == $arUserGroups."|")
$arUserGroups = array(intval($arUserGroups));
if (!is_array($arUserGroups))
$arUserGroups = array();
if (!in_array(2, $arUserGroups))
$arUserGroups[] = 2;
$rsVAT = CCatalogProduct::GetVATInfo($intProductID);
if ($arVAT = $rsVAT->Fetch())
{
$arVAT['RATE'] = doubleval($arVAT['RATE'] * 0.01);
}
else
{
$arVAT = array('RATE' => 0.0, 'VAT_INCLUDED' => 'N');
}
$renewal = (($renewal == "N") ? "N" : "Y");
if (false === $siteID)
$siteID = SITE_ID;
if (false === $arDiscountCoupons)
$arDiscountCoupons = CCatalogDiscountCoupon::GetCoupons();
$strBaseCurrency = CCurrency::GetBaseCurrency();
if (empty($strBaseCurrency))
{
$APPLICATION->ThrowException(GetMessage("BT_MOD_CATALOG_PROD_ERR_NO_BASE_CURRENCY"), "NO_BASE_CURRENCY");
return false;
}
$intIBlockID = intval(CIBlockElement::GetIBlockByID($intProductID));
if (0 >= $intIBlockID)
{
$APPLICATION->ThrowException(str_replace("#ID#", $intProductID, GetMessage('BT_MOD_CATALOG_PROD_ERR_ELEMENT_ID_NOT_FOUND')), "NO_ELEMENT");
return false;
}
if (!isset($arPrices) || !is_array($arPrices))
$arPrices = array();
if (empty($arPrices))
{
$arPrices = array();
$dbPriceList = CPrice::GetListEx(
array(),
array(
"PRODUCT_ID" => $intProductID,
"GROUP_GROUP_ID" => $arUserGroups,
"GROUP_BUY" => "Y",
"+<=QUANTITY_FROM" => $quantity,
"+>=QUANTITY_TO" => $quantity
),
false,
false,
array("ID", "CATALOG_GROUP_ID", "PRICE", "CURRENCY")
);
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:67,代码来源:product.php
示例19: htmlspecialcharsbx
//-->
</script>
<input name="filter_product_id" id="filter_product_id" value="<?php
echo htmlspecialcharsbx($filter_product_id);
?>
" size="5" type="text"> <input type="button" value="..." id="cat_prod_button" onClick="showProductSearchDialog()"><span id="product_name_alt" class="adm-filter-text-search"></span>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("SB_CURRENCY");
?>
:</td>
<td align="left"&g
|
请发表评论