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


PHP FormatCurrency函数代码示例

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


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

示例1: loadFromDatabase

 protected function loadFromDatabase()
 {
     if (!isset($this->fields)) {
         $pricesList = \CPrice::getListEx(array(), array("=PRODUCT_ID" => $this->id, "+<=QUANTITY_FROM" => 1, "+>=QUANTITY_TO" => 1), false, false, array("PRICE", "CURRENCY", "CATALOG_GROUP_ID", "CATALOG_GROUP_CODE"));
         $this->fields = array();
         while ($priceInfo = $pricesList->fetch()) {
             $price_id = $priceInfo["CATALOG_GROUP_ID"];
             $price = \FormatCurrency($priceInfo["PRICE"], $priceInfo["CURRENCY"]);
             $this->addField($price_id, $price_id, $price);
             $this->addField($priceInfo["CATALOG_GROUP_CODE"], $price_id, $price);
         }
     }
     return is_array($this->fields);
 }
开发者ID:ASDAFF,项目名称:open_bx,代码行数:14,代码来源:elementprice.php

示例2: array

        $arFilter = array("name" => "sharpen", "precision" => $arParams["SHARPEN"]);
    }
    $arFileTmp = CFile::ResizeImageGet($arResult['DETAIL_PICTURE'], array("width" => $arParams["DISPLAY_DETAIL_IMG_WIDTH"], "height" => $arParams["DISPLAY_DETAIL_IMG_HEIGHT"]), BX_RESIZE_IMAGE_PROPORTIONAL, true, $arFilter);
    $arResult['DETAIL_PICTURE_280'] = array('SRC' => $arFileTmp["src"], 'WIDTH' => $arFileTmp["width"], 'HEIGHT' => $arFileTmp["height"]);
}
if (is_array($arResult['MORE_PHOTO']) && count($arResult['MORE_PHOTO']) > 0) {
    unset($arResult['DISPLAY_PROPERTIES']['MORE_PHOTO']);
    foreach ($arResult['MORE_PHOTO'] as $key => $arFile) {
        $arFilter = '';
        if ($arParams["SHARPEN"] != 0) {
            $arFilter = array("name" => "sharpen", "precision" => $arParams["SHARPEN"]);
        }
        $arFileTmp = CFile::ResizeImageGet($arFile, array("width" => $arParams["DISPLAY_MORE_PHOTO_WIDTH"], "height" => $arParams["DISPLAY_MORE_PHOTO_HEIGHT"]), BX_RESIZE_IMAGE_PROPORTIONAL, true, $arFilter);
        $arFile['PREVIEW_WIDTH'] = $arFileTmp["width"];
        $arFile['PREVIEW_HEIGHT'] = $arFileTmp["height"];
        $arFile['SRC'] = $arFileTmp['src'];
        $arResult['MORE_PHOTO'][$key] = $arFile;
    }
}
if (CModule::IncludeModule('currency')) {
    if (isset($arResult['DISPLAY_PROPERTIES']['MINIMUM_PRICE'])) {
        $arResult['DISPLAY_PROPERTIES']['MINIMUM_PRICE']['DISPLAY_VALUE'] = FormatCurrency($arResult['DISPLAY_PROPERTIES']['MINIMUM_PRICE']['VALUE'], CCurrency::GetBaseCurrency());
    }
    if (isset($arResult['DISPLAY_PROPERTIES']['MAXIMUM_PRICE'])) {
        $arResult['DISPLAY_PROPERTIES']['MAXIMUM_PRICE']['DISPLAY_VALUE'] = FormatCurrency($arResult['DISPLAY_PROPERTIES']['MAXIMUM_PRICE']['VALUE'], CCurrency::GetBaseCurrency());
    }
}
$this->__component->SetResultCacheKeys(array("DISPLAY_PROPERTIES"));
$this->__component->SetResultCacheKeys(array("DETAIL_TEXT"));
$this->__component->SetResultCacheKeys(array("CAN_BUY"));
//$this->__component->SetResultCacheKeys(array("OFFERS_IDS"));
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:result_modifier.php

示例3: Add2BasketByProductID

                    $ratio = 1;
                    if ($_POST["itemsRatio"][$itemID]) {
                        $ratio = $_POST["itemsRatio"][$itemID];
                    }
                    if (intval($itemID)) {
                        Add2BasketByProductID(intval($itemID), $ratio, array("LID" => $_POST["lid"]), $product_properties);
                    }
                }
            }
            break;
        case "ajax_recount_prices":
            if (strlen($_POST["currency"]) > 0) {
                $arPices = array("formatSum" => "", "formatOldSum" => "", "formatDiscDiffSum" => "");
                if ($_POST["sumPrice"]) {
                    $arPices["formatSum"] = FormatCurrency($_POST["sumPrice"], $_POST["currency"]);
                }
                if ($_POST["sumOldPrice"] && $_POST["sumOldPrice"] != $_POST["sumPrice"]) {
                    $arPices["formatOldSum"] = FormatCurrency($_POST["sumOldPrice"], $_POST["currency"]);
                }
                if ($_POST["sumDiffDiscountPrice"]) {
                    $arPices["formatDiscDiffSum"] = FormatCurrency($_POST["sumDiffDiscountPrice"], $_POST["currency"]);
                }
                if (SITE_CHARSET != "utf-8") {
                    $arPices = $APPLICATION->ConvertCharsetArray($arPices, SITE_CHARSET, "utf-8");
                }
                echo json_encode($arPices);
            }
            break;
    }
    die;
}
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:ajax.php

示例4: roundEx

                 }
                 $maxDiscount = roundEx($maxDiscount, CATALOG_VALUE_PRECISION);
                 if ($currentDiscount > $maxDiscount) {
                     $currentDiscount = $maxDiscount;
                 }
             }
         }
         $currentDiscount = roundEx($currentDiscount, CATALOG_VALUE_PRECISION);
         if ($arPrice["DISCOUNT"]["VALUE_TYPE"] == "S") {
             $currentPrice = $currentDiscount;
         } else {
             $currentPrice = $currentPrice - $currentDiscount;
         }
     }
     $vatRate = $arPrice["PRICE"]["VAT_RATE"];
     $fieldValue = FormatCurrency($currentPrice, $arPrice["PRICE"]["CURRENCY"]);
     if (DoubleVal($nearestQuantity) != DoubleVal($QUANTITY)) {
         $fieldValue .= str_replace("#CNT#", $nearestQuantity, GetMessage("SOPS_PRICE1"));
     }
 }
 if (strlen($BASE_LANG_CURR) <= 0) {
     $arCurFormat = CCurrencyLang::GetCurrencyFormat($arPrice["PRICE"]["CURRENCY"]);
     $priceValutaFormat = str_replace("#", '', $arCurFormat["FORMAT_STRING"]);
 }
 $row->AddField("PRICE", $fieldValue);
 $arCatalogProduct = CCatalogProduct::GetByID($arItems["ID"]);
 $balance = FloatVal($arCatalogProduct["QUANTITY"]);
 $row->AddField("BALANCE", $balance);
 $URL = CIBlock::ReplaceDetailUrl($arItems["DETAIL_PAGE_URL"], $arItems, true);
 $arPriceType = GetCatalogGroup($arPrice["PRICE"]["CATALOG_GROUP_ID"]);
 $PriceType = $arPriceType["NAME_LANG"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:product_search.php

示例5: DisplayTotals

function DisplayTotals($sql, $table_name)
{
    $result = mysqli_query($_SESSION['con'], $sql) or die(mysqli_error() . "Error in " . $sql);
    $row = mysqli_fetch_assoc($result);
    //Create variables from keys of row
    foreach ($row as $key => $value) {
        ${$key} = $value;
    }
    //Calculate profits
    $est_profit = FormatCurrency($TotalPrice - $TotalChargeEst);
    if ($table_name == 'parcel_jobs') {
        $act_profit = FormatCurrency($TotalPrice - $TotalCost);
    }
    //Format totals
    foreach ($row as $key => $value) {
        ${$key} = FormatCurrency($value);
    }
    if ($table_name == 'jobs') {
        return "<td>Price = {$TotalPrice}</td><td>Max.P = {$TotalChargeEst}</td><td>Profit = {$est_profit}</td>";
    } elseif ($table_name == 'parcel_jobs') {
        return "<td>Price = {$TotalPrice}</td><td>Cost = {$TotalCost}</td></tr><tr><td>Max.P = {$TotalChargeEst}</td><td>Est. Profit = {$est_profit}</td><td>Act. Profit = {$act_profit}</td>";
    }
}
开发者ID:silverwedding,项目名称:Bespoke,代码行数:23,代码来源:functions.php

示例6: roundEx

			$strDiscountValue = roundEx($arDiscount["VALUE"], CATALOG_VALUE_PRECISION)."%";
		}
		elseif ($arDiscount["VALUE_TYPE"] == CCatalogDiscount::TYPE_SALE)
		{
			$strDiscountValue = '= '.FormatCurrency($arDiscount["VALUE"], $arDiscount["CURRENCY"]);
		}
		else
		{
			$strDiscountValue = FormatCurrency($arDiscount["VALUE"], $arDiscount["CURRENCY"]);
		}
		$row->AddViewField("VALUE", $strDiscountValue);
	}

	if ($arSelectFieldsMap['MAX_DISCOUNT'])
	{
		$row->AddViewField("MAX_DISCOUNT", (0 < $arDiscount['MAX_DISCOUNT'] ? FormatCurrency($arDiscount['MAX_DISCOUNT'], $arDiscount["CURRENCY"]) : GetMessage('DSC_MAX_DISCOUNT_UNLIM')));
	}

	if ($arSelectFieldsMap['RENEWAL'])
		$row->AddCheckField("RENEWAL", false);

	$arActions = array();
	$arActions[] = array(
		"ICON" => "edit",
		"TEXT" => GetMessage("DSC_UPDATE_ALT"),
		"ACTION" => $lAdmin->ActionRedirect("/bitrix/admin/cat_discount_edit.php?ID=".$arDiscount['ID']."&lang=".LANGUAGE_ID.GetFilterParams("filter_", false).""),
		"DEFAULT" => true
	);

	if (!$bReadOnly)
	{
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:cat_discount_admin.php

示例7: getBasePrice

 public function getBasePrice($currencyId = 'RUB')
 {
     \CModule::IncludeModule('catalog');
     return \FormatCurrency($this->getBasePriceRawValue(), $currencyId);
 }
开发者ID:AlexSmerw,项目名称:domino,代码行数:5,代码来源:Object.class.php

示例8: PrepereData

 public static function PrepereData($params)
 {
     if ($params["INCOMING"] == "N") {
         $params["INCOMING"] = CVoxImplantMain::CALL_OUTGOING;
     } else {
         if ($params["INCOMING"] == "N") {
             $params["INCOMING"] = CVoxImplantMain::CALL_INCOMING;
         }
     }
     if ($params["PHONE_NUMBER"] == "hidden") {
         $params["PHONE_NUMBER"] = GetMessage("IM_PHONE_NUMBER_HIDDEN");
     }
     $params["CALL_FAILED_REASON"] = in_array($params["CALL_FAILED_CODE"], array("200", "304", "603-S", "603", "404", "486", "484", "503", "480", "402", "423")) ? GetMessage("VI_STATUS_" . $params["CALL_FAILED_CODE"]) : GetMessage("VI_STATUS_OTHER");
     if ($params["INCOMING"] == CVoxImplantMain::CALL_OUTGOING) {
         $params["INCOMING_TEXT"] = GetMessage("VI_OUTGOING");
         if ($params["CALL_FAILED_CODE"] == 200) {
             $params["CALL_ICON"] = 'outgoing';
         }
     } else {
         if ($params["INCOMING"] == CVoxImplantMain::CALL_INCOMING) {
             $params["INCOMING_TEXT"] = GetMessage("VI_INCOMING");
             if ($params["CALL_FAILED_CODE"] == 200) {
                 $params["CALL_ICON"] = 'incoming';
             }
         } else {
             if ($params["INCOMING"] == CVoxImplantMain::CALL_INCOMING_REDIRECT) {
                 $params["INCOMING_TEXT"] = GetMessage("VI_INCOMING_REDIRECT");
                 if ($params["CALL_FAILED_CODE"] == 200) {
                     $params["CALL_ICON"] = 'incoming-redirect';
                 }
             }
         }
     }
     if ($params["CALL_FAILED_CODE"] == 304) {
         $params["CALL_ICON"] = 'skipped';
     } else {
         if ($params["CALL_FAILED_CODE"] != 200) {
             $params["CALL_ICON"] = 'decline';
         }
     }
     if ($params["CALL_DURATION"] > 60) {
         $formatTimeMin = floor($params["CALL_DURATION"] / 60);
         $formatTimeSec = $params["CALL_DURATION"] - $formatTimeMin * 60;
         $params["CALL_DURATION_TEXT"] = $formatTimeMin . " " . GetMessage("VI_MIN");
         if ($formatTimeSec > 0) {
             $params["CALL_DURATION_TEXT"] = $params["CALL_DURATION_TEXT"] . " " . $formatTimeSec . " " . GetMessage("VI_SEC");
         }
     } else {
         $params["CALL_DURATION_TEXT"] = $params["CALL_DURATION"] . " " . GetMessage("VI_SEC");
     }
     if (CModule::IncludeModule("catalog")) {
         $params["COST_TEXT"] = FormatCurrency($params["COST"], $params["COST_CURRENCY"] == "RUR" ? "RUB" : $params["COST_CURRENCY"]);
     } else {
         $params["COST_TEXT"] = $params["COST"] . " " . GetMessage("VI_CURRENCY_" . $params["COST_CURRENCY"]);
     }
     if (!$params["COST_TEXT"]) {
         $params["COST_TEXT"] = '-';
     }
     if (intval($params["CALL_RECORD_ID"]) > 0) {
         $recordFile = CFile::GetFileArray($params["CALL_RECORD_ID"]);
         if ($recordFile !== false) {
             $params["CALL_RECORD_HREF"] = $recordFile['SRC'];
         }
     }
     return $params;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:66,代码来源:vi_history.php

示例9: GetMessage

									<?php 
                            }
                            ?>
								<?php 
                        }
                    }
                } else {
                    $price_from = '';
                    if ($arItem['PROPERTIES']['MAXIMUM_PRICE']['VALUE'] > $arItem['PROPERTIES']['MINIMUM_PRICE']['VALUE']) {
                        $price_from = GetMessage("CR_PRICE_OT") . "&nbsp;";
                    }
                    CModule::IncludeModule("sale");
                    ?>
						<?php 
                    echo $price_from;
                    echo FormatCurrency($arItem['PROPERTIES']['MINIMUM_PRICE']['VALUE'], CSaleLang::GetLangCurrency(SITE_ID));
                    ?>
						<?php 
                }
            }
            ?>
				</div>
				<a href="<?php 
            echo $arItem["DETAIL_PAGE_URL"];
            ?>
" class="bt3"><?php 
            echo GetMessage("CATALOG_MORE");
            ?>
</a>
			</div>
			<div class="tlistitem_shadow"></div>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:template.php

示例10: str_replace

                                    echo str_replace("#TO#", $arQuantity["QUANTITY_TO"], GetMessage("CATALOG_QUANTITY_TO"));
                                }
                                ?>
							</th>
						<?php 
                            }
                            ?>
						<?php 
                            foreach ($arElement["PRICE_MATRIX"]["COLS"] as $typeID => $arType) {
                                ?>
							<td>
								<?php 
                                if ($arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["DISCOUNT_PRICE"] < $arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"]) {
                                    echo '<s>' . FormatCurrency($arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"], $arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"]) . '</s> <span class="catalog-price">' . FormatCurrency($arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["DISCOUNT_PRICE"], $arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"]) . "</span>";
                                } else {
                                    echo '<span class="catalog-price">' . FormatCurrency($arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"], $arElement["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"]) . "</span>";
                                }
                                ?>
&nbsp;
							</td>
						<?php 
                            }
                            ?>
					</tr>
					<?php 
                        }
                        ?>
					</table>
					<?php 
                    }
                    ?>
开发者ID:Andreyjktl,项目名称:kidster,代码行数:31,代码来源:template.php

示例11: GetMessage

<h4><?php 
        echo $arDiscountSave['NAME'];
        ?>
</h4><?php 
        ?>
<p><?php 
        echo GetMessage('BX_CMP_CDI_TPL_MESS_SIZE');
        ?>
 <?php 
        if ('P' == $arDiscountSave['VALUE_TYPE']) {
            echo $arDiscountSave['VALUE'];
            ?>
&nbsp;%<?php 
        } else {
            echo FormatCurrency($arDiscountSave['VALUE'], $arDiscountSave['CURRENCY']);
        }
        if (isset($arDiscountSave['NEXT_LEVEL']) && is_array($arDiscountSave['NEXT_LEVEL'])) {
            $strNextLevel = '';
            if ('P' == $arDiscountSave['NEXT_LEVEL']['VALUE_TYPE']) {
                $strNextLevel = $arDiscountSave['NEXT_LEVEL']['VALUE'] . '&nbsp;%';
            } else {
                $strNextLevel = FormatCurrency($arDiscountSave['NEXT_LEVEL']['VALUE'], $arDiscountSave['CURRENCY']);
            }
            ?>
<br /><?php 
            echo str_replace(array('#SIZE#', '#SUMM#'), array($strNextLevel, FormatCurrency($arDiscountSave['NEXT_LEVEL']['RANGE_FROM'] - $arDiscountSave['RANGE_SUMM'], $arDiscountSave['CURRENCY'])), GetMessage('BX_CMP_CDI_TPL_MESS_NEXT_LEVEL'));
        }
        ?>
</p><br /><?php 
    }
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:template.php

示例12: GetItemPrices

	public static function GetItemPrices($IBLOCK_ID, $arCatalogPrices, $arItem, $bVATInclude = true, $arCurrencyParams = array(), $USER_ID = 0, $LID = SITE_ID)
	{
		static $arCurUserGroups = array();

		global $USER;
		$arPrices = array();
		if(CModule::IncludeModule("catalog"))
		{
			$USER_ID = intval($USER_ID);
			$intUserID = $USER_ID;
			if (0 >= $intUserID)
				$intUserID = $USER->GetID();
			if (!array_key_exists($intUserID, $arCurUserGroups))
			{
				$arCurUserGroups[$intUserID] = (0 < $USER_ID ? CUser::GetUserGroup($USER_ID) : $USER->GetUserGroupArray());
			}
			$arUserGroups = $arCurUserGroups[$intUserID];

			$boolConvert = false;
			$strCurrencyID = '';
			if (is_array($arCurrencyParams) && !empty($arCurrencyParams) && !empty($arCurrencyParams['CURRENCY_ID']))
			{
				$boolConvert = true;
				$strCurrencyID = $arCurrencyParams['CURRENCY_ID'];
			}
			foreach($arCatalogPrices as $key => $value)
			{
				if($value["CAN_VIEW"] && strlen($arItem["CATALOG_PRICE_".$value["ID"]]) > 0)
				{
					// get final price with VAT included.
					if ($arItem['CATALOG_VAT_INCLUDED'] != 'Y')
					{
						$arItem['CATALOG_PRICE_'.$value['ID']] *= (1 + $arItem['CATALOG_VAT'] * 0.01);
					}
					CCatalogDiscountSave::Disable();
					// so discounts will include VAT
					$arDiscounts = CCatalogDiscount::GetDiscount(
						$arItem["ID"],
						$arItem["IBLOCK_ID"],
						array($value["ID"]),
						$arUserGroups,
						"N",
						$LID,
						array()
					);
					CCatalogDiscountSave::Enable();
					$discountPrice = CCatalogProduct::CountPriceWithDiscount(
						$arItem["CATALOG_PRICE_".$value["ID"]],
						$arItem["CATALOG_CURRENCY_".$value["ID"]],
						$arDiscounts
					);
					// get clear prices WO VAT
					$arItem['CATALOG_PRICE_'.$value['ID']] /= (1 + $arItem['CATALOG_VAT'] * 0.01);
					$discountPrice /= (1 + $arItem['CATALOG_VAT'] * 0.01);

					$vat_value_discount = $discountPrice * $arItem['CATALOG_VAT'] * 0.01;
					$vat_discountPrice = $discountPrice + $vat_value_discount;

					$vat_value = $arItem['CATALOG_PRICE_'.$value['ID']] * $arItem['CATALOG_VAT'] * 0.01;
					$vat_price = $arItem["CATALOG_PRICE_".$value["ID"]] + $vat_value;

					if ($boolConvert && $strCurrencyID != $arItem["CATALOG_CURRENCY_".$value["ID"]])
					{
						$strOrigCurrencyID = $arItem["CATALOG_CURRENCY_".$value["ID"]];
						$dblOrigNoVat = $arItem["CATALOG_PRICE_".$value["ID"]];
						$dblNoVat = CCurrencyRates::ConvertCurrency($dblOrigNoVat, $strOrigCurrencyID, $strCurrencyID);
						$dblVatPrice = CCurrencyRates::ConvertCurrency($vat_price, $strOrigCurrencyID, $strCurrencyID);
						$dblVatValue = CCurrencyRates::ConvertCurrency($vat_value, $strOrigCurrencyID, $strCurrencyID);
						$dblDiscountValueNoVat = CCurrencyRates::ConvertCurrency($discountPrice, $strOrigCurrencyID, $strCurrencyID);
						$dblVatDiscountPrice = CCurrencyRates::ConvertCurrency($vat_discountPrice, $strOrigCurrencyID, $strCurrencyID);
						$dblDiscountValueVat = CCurrencyRates::ConvertCurrency($vat_value_discount, $strOrigCurrencyID, $strCurrencyID);

						$arPrices[$key] = array(
							'ORIG_VALUE_NOVAT' => $dblOrigNoVat,
							"VALUE_NOVAT" => $dblNoVat,
							"PRINT_VALUE_NOVAT" => FormatCurrency($dblNoVat, $strCurrencyID),

							'ORIG_VALUE_VAT' => $vat_price,
							"VALUE_VAT" => $dblVatPrice,
							"PRINT_VALUE_VAT" => FormatCurrency($dblVatPrice, $strCurrencyID),

							'ORIG_VATRATE_VALUE' => $vat_value,
							"VATRATE_VALUE" => $dblVatValue,
							"PRINT_VATRATE_VALUE" => FormatCurrency($dblVatValue, $strCurrencyID),

							'ORIG_DISCOUNT_VALUE_NOVAT' => $discountPrice,
							"DISCOUNT_VALUE_NOVAT" => $dblDiscountValueNoVat,
							"PRINT_DISCOUNT_VALUE_NOVAT" => FormatCurrency($dblDiscountValueNoVat, $strCurrencyID),

							"ORIG_DISCOUNT_VALUE_VAT" => $vat_discountPrice,
							"DISCOUNT_VALUE_VAT" => $dblVatDiscountPrice,
							"PRINT_DISCOUNT_VALUE_VAT" => FormatCurrency($dblVatDiscountPrice, $strCurrencyID),

							'ORIG_DISCOUNT_VATRATE_VALUE' => $vat_value_discount,
							'DISCOUNT_VATRATE_VALUE' => $dblDiscountValueVat,
							'PRINT_DISCOUNT_VATRATE_VALUE' => FormatCurrency($dblDiscountValueVat, $strCurrencyID),

							'ORIG_CURRENCY' => $strOrigCurrencyID,
							"CURRENCY" => $strCurrencyID,
						);
//.........这里部分代码省略.........
开发者ID:nProfessor,项目名称:Mytb,代码行数:101,代码来源:comp_pricetools.php

示例13: FormatCurrency

			$arResult["SET_ITEMS"]["DEFAULT"][$key]["PRICE_CONVERT_DISCOUNT_DIFFERENCE_VALUE"] = CCurrencyRates::ConvertCurrency($arItem["PRICE_DISCOUNT_DIFFERENCE_VALUE"], $arItem["PRICE_CURRENCY"] , $arResult["ELEMENT"]["PRICE_CURRENCY"]);
			$arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"] += $arResult["SET_ITEMS"]["DEFAULT"][$key]["PRICE_CONVERT_DISCOUNT_DIFFERENCE_VALUE"];
		}
		foreach($arResult["SET_ITEMS"]["OTHER"] as $key=>$arItem)
		{
			$arResult["SET_ITEMS"]["OTHER"][$key]["PRICE_CONVERT_DISCOUNT_VALUE"] = CCurrencyRates::ConvertCurrency($arItem['PRICE_DISCOUNT_VALUE'], $arItem["PRICE_CURRENCY"] , $arResult["ELEMENT"]["PRICE_CURRENCY"]);
			$arResult["SET_ITEMS"]["OTHER"][$key]["PRICE_CONVERT_VALUE"] = CCurrencyRates::ConvertCurrency($arItem["PRICE_VALUE"], $arItem["PRICE_CURRENCY"] , $arResult["ELEMENT"]["PRICE_CURRENCY"]);
			$arResult["SET_ITEMS"]["OTHER"][$key]["PRICE_CONVERT_DISCOUNT_DIFFERENCE_VALUE"] = CCurrencyRates::ConvertCurrency($arItem["PRICE_DISCOUNT_DIFFERENCE_VALUE"], $arItem["PRICE_CURRENCY"] , $arResult["ELEMENT"]["PRICE_CURRENCY"]);
		}
	}

	if ($arResult["SET_ITEMS"]["OLD_PRICE"] && $arResult["SET_ITEMS"]["OLD_PRICE"] != $arResult["SET_ITEMS"]["PRICE"])
		$arResult["SET_ITEMS"]["OLD_PRICE"] = FormatCurrency($arResult["SET_ITEMS"]["OLD_PRICE"], $arResult["ELEMENT"]["PRICE_CURRENCY"]);
	else
		$arResult["SET_ITEMS"]["OLD_PRICE"] = 0;

	if ($arResult["SET_ITEMS"]["PRICE"])
		$arResult["SET_ITEMS"]["PRICE"] = FormatCurrency($arResult["SET_ITEMS"]["PRICE"], $arResult["ELEMENT"]["PRICE_CURRENCY"]);

	if ($arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"])
		$arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"] = FormatCurrency($arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"], $arResult["ELEMENT"]["PRICE_CURRENCY"]);


	$this->SetResultCacheKeys(array(
		"ELEMENT",
		"SET_ITEMS",
	));

	$this->IncludeComponentTemplate();
}
?>
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:component.php

示例14: roundEx

                     $currentDiscount = $maxDiscount;
                 }
             }
         }
         $currentDiscount = roundEx($currentDiscount, CATALOG_VALUE_PRECISION);
         if ($arPrice["DISCOUNT"]["VALUE_TYPE"] == "S") {
             $currentPrice = $currentDiscount;
         } else {
             $currentPrice = $currentPrice - $currentDiscount;
         }
     }
     $vatRate = $arPrice["PRICE"]["VAT_RATE"];
     $arCatalogProduct = CCatalogProduct::GetByID($arItems["ID"]);
     $currentPrice = $arCatalogProduct["PURCHASING_PRICE"] != null ? $arCatalogProduct["PURCHASING_PRICE"] : 0;
     $currentPriceCurrency = $arCatalogProduct["PURCHASING_CURRENCY"] != null ? $arCatalogProduct["PURCHASING_CURRENCY"] : "";
     $fieldValue = htmlspecialcharsbx(FormatCurrency($currentPrice, $currentPriceCurrency));
     if (DoubleVal($nearestQuantity) != DoubleVal($QUANTITY)) {
         $fieldValue .= str_replace("#CNT#", $nearestQuantity, GetMessage("SOPS_PRICE1"));
     }
 }
 if (strlen($BASE_LANG_CURR) <= 0) {
     $arCurFormat = CCurrencyLang::GetCurrencyFormat($arPrice["PRICE"]["CURRENCY"]);
     $priceValutaFormat = htmlspecialcharsbx(str_replace("#", '', $arCurFormat["FORMAT_STRING"]));
 }
 $row->AddField("PRICE", $fieldValue);
 $amountToStore = 0;
 $arCatalogProduct = CCatalogProduct::GetByID($arItems["ID"]);
 if ($STORE_FROM_ID > 0) {
     $dbStoreProduct = CCatalogStoreProduct::GetList(array(), array("PRODUCT_ID" => $arItems["ID"], "STORE_ID" => $STORE_FROM_ID));
     if ($arStoreProduct = $dbStoreProduct->Fetch()) {
         $amountToStore = $arStoreProduct["AMOUNT"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:cat_store_product_search.php


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