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


PHP FloatVal函数代码示例

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


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

示例1: GetCity

 function GetCity($arFields)
 {
     $iPPID = IntVal($arFields["PP_ID"]) ? IntVal($arFields["PP_ID"]) : 0;
     $iID = 0;
     $iBXCityID = 0;
     $sCode = strlen($arFields["CODE"]) ? $arFields["CODE"] : "";
     $iPrice = 0;
     $sActive = "N";
     if ($iPPID) {
         $obPPCity = CPickpoint::SelectCityByPPID($iPPID);
         if ($arPPCity = $obPPCity->Fetch()) {
             $iBXID = $arPPCity["BX_ID"];
             if ($arPPCity["ACTIVE"] == "Y") {
                 $sActive = "Y";
             }
             $arBXCity = CPickpoint::SelectCityByID($iBXID);
             $iPrice = FloatVal($arPPCity["PRICE"]);
             $sCode = $arBXCity["CITY_NAME"];
         } else {
             $arCity = CPickpoint::SelectCityByCode($sCode);
             $iBXID = $arCity["ID"];
         }
     } else {
         $arCity = CPickpoint::SelectCityByCode($sCode);
         $iBXID = $arCity["ID"];
         $iPPID = 0;
     }
     #ID#
     #CODE (BX or PP ? exists)#
     #PP_ID#
     #BX_ID#
     #PRICE#
     return array("ID" => $iID, "CODE" => $sCode, "PP_ID" => $iPPID, "BX_ID" => $iBXID, "PRICE" => $iPrice, "ACTIVE" => $sActive);
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:34,代码来源:pickpoint.php

示例2: __GetLocationPrice

 function __GetLocationPrice($LOCATION_ID, $arConfig)
 {
     if (!CheckPickpointLicense(COption::GetOptionString("epages.pickpoint", "pp_ikn_number", ""))) {
         return false;
     }
     $obCity = CPickpoint::SelectCityByBXID($LOCATION_ID);
     if ($arCity = $obCity->Fetch()) {
         if ($arCity["ACTIVE"] == "Y") {
             return FloatVal($arCity["PRICE"]);
         }
     }
     return false;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:13,代码来源:delivery_pickpoint.php

示例3: run

 public function run($args)
 {
     if (!isset($args[0])) {
         echo "./yiic importstatistik [dateiname]\n";
         die;
     }
     $sql = Yii::app()->db->createCommand();
     $sql->delete('statistik_datensaetze', ["quelle = " . StatistikDatensatz::QUELLE_BEVOELKERUNG]);
     $arr = $this->csv_to_array($args[0]);
     $floatize = function ($in) {
         if (trim($in) == "") {
             return null;
         }
         return FloatVal(str_replace(",", ".", $in));
     };
     foreach ($arr as $i => $row) {
         if ($i % 100 == 0) {
             echo $i . "\n";
         }
         $dat = new StatistikDatensatz();
         $dat->quelle = StatistikDatensatz::QUELLE_BEVOELKERUNG;
         $dat->indikator_gruppe = $row["INDIKATOR_GRUPPE"];
         $dat->indikator_bezeichnung = $row["INDIKATOR_BEZEICHNUNG"];
         $dat->indikator_auspraegung = $row["INDIKATOR_AUSPRAEGUNG"];
         $dat->indikator_wert = $floatize($row["INDIKATOR_WERT"]);
         $dat->basiswert_1 = $floatize($row["BASISWERT_1"]);
         $dat->basiswert_1_name = $row["NAME_BASISWERT1"];
         $dat->basiswert_2 = $floatize($row["BASISWERT_2"]);
         $dat->basiswert_2_name = $row["NAME_BASISWERT2"];
         $dat->basiswert_3 = $floatize($row["BASISWERT_3"]);
         $dat->basiswert_3_name = $row["NAME_BASISWERT3"];
         $dat->basiswert_4 = $floatize($row["BASISWERT_4"]);
         $dat->basiswert_4_name = $row["NAME_BASISWERT4"];
         $dat->basiswert_5 = $floatize($row["BASISWERT_5"]);
         $dat->basiswert_5_name = $row["NAME_BASISWERT5"];
         $dat->jahr = $row["JAHR"];
         $dat->gliederung = $row["GLIEDERUNG"];
         $dat->gliederung_nummer = $row["NUMMER"];
         $dat->gliederung_name = $row["NAME"];
         if (!$dat->save()) {
             var_dump($dat->getErrors());
         }
     }
 }
开发者ID:CatoTH,项目名称:Muenchen-Transparent,代码行数:44,代码来源:ImportStatistikCommand.php

示例4: __construct

 /**
  * @param $dbarray_or_id
  * @throws Exception
  */
 function __construct($dbarray_or_id)
 {
     if (is_numeric($dbarray_or_id) && count($this->PRIMARY_KEY) == 1) {
         $dbarray_or_id = q("SELECT * FROM %s%s%s WHERE %s=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $this->SRC_TABLE, $this->PRIMARY_KEY[0], IntVal($dbarray_or_id));
         if (count($dbarray_or_id) == 0) {
             throw new Exception("Not found");
         }
         $dbarray_or_id = $dbarray_or_id[0];
     }
     if (is_array($dbarray_or_id)) {
         foreach ($this->_string_fields as $field) {
             $this->{$field} = $dbarray_or_id[$field];
         }
         foreach ($this->_int_fields as $field) {
             $this->{$field} = IntVal($dbarray_or_id[$field]);
         }
         foreach ($this->_float_fields as $field) {
             $this->{$field} = FloatVal($dbarray_or_id[$field]);
         }
     } else {
         throw new Exception("Not found");
     }
 }
开发者ID:robhell,项目名称:friendica-addons,代码行数:27,代码来源:dbclass_animexx.class.php

示例5: GetProductSku


//.........这里部分代码省略.........
             if (count($arPrice) <= 0) {
                 break;
             } elseif (strlen($CURRENCY) > 0) {
                 $arPrice["PRICE"]["PRICE"] = CCurrencyRates::ConvertCurrency($arPrice["PRICE"]["PRICE"], $arPrice["PRICE"]["CURRENCY"], $CURRENCY);
                 if ($arPrice["DISCOUNT_PRICE"] > 0) {
                     $arPrice["DISCOUNT_PRICE"] = CCurrencyRates::ConvertCurrency($arPrice["DISCOUNT_PRICE"], $arPrice["PRICE"]["CURRENCY"], $CURRENCY);
                 }
                 $arPrice["PRICE"]["CURRENCY"] = $CURRENCY;
             }
             $arSkuTmp = array();
             $arOffer["CAN_BUY"] = "N";
             if ($arCatalogProduct = CCatalogProduct::GetByID($arOffer['ID'])) {
                 if ($arCatalogProduct["CAN_BUY_ZERO"] != "Y" && ($arCatalogProduct["QUANTITY_TRACE"] == "Y" && doubleval($arCatalogProduct["QUANTITY"]) <= 0)) {
                     $arOffer["CAN_BUY"] = "N";
                 } else {
                     $arOffer["CAN_BUY"] = "Y";
                 }
             }
             $arSkuTmp["ImageUrl"] = '';
             if ($arOffer["CAN_BUY"] == "Y") {
                 $productImg = "";
                 if (isset($arImgSku[$arOffer['ID']]) && count($arImgSku[$arOffer['ID']]) > 0) {
                     if (strlen($PRODUCT_NAME) <= 0) {
                         $PRODUCT_NAME = $arImgSku[$arOffer['ID']]["NAME"];
                     }
                     if ($arImgSku[$arOffer['ID']]["PREVIEW_PICTURE"] != "") {
                         $productImg = $arImgSku[$arOffer['ID']]["PREVIEW_PICTURE"];
                     } elseif ($arImgSku[$arOffer['ID']]["DETAIL_PICTURE"] != "") {
                         $productImg = $arImgSku[$arOffer['ID']]["DETAIL_PICTURE"];
                     }
                     if ($productImg == "") {
                         if ($arProduct["PREVIEW_PICTURE"] != "") {
                             $productImg = $arProduct["PREVIEW_PICTURE"];
                         } elseif ($arProduct["DETAIL_PICTURE"] != "") {
                             $productImg = $arProduct["DETAIL_PICTURE"];
                         }
                     }
                     if ($productImg != "") {
                         $arFile = CFile::GetFileArray($productImg);
                         $productImg = CFile::ResizeImageGet($arFile, array('width' => 80, 'height' => 80), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
                         $arSkuTmp["ImageUrl"] = $productImg["src"];
                     }
                 }
             }
             if ($minItemPrice === 0 || $arPrice["DISCOUNT_PRICE"] < $minItemPrice) {
                 $minItemPrice = $arPrice["DISCOUNT_PRICE"];
                 $minItemPriceFormat = SaleFormatCurrency($arPrice["DISCOUNT_PRICE"], $arPrice["PRICE"]["CURRENCY"]);
             }
             foreach ($arIblockOfferProps as $arCode) {
                 if (array_key_exists($arCode["CODE"], $arOffer["PROPERTIES"])) {
                     if (is_array($arOffer["PROPERTIES"][$arCode["CODE"]]["VALUE"])) {
                         $arSkuTmp[] = implode("/", $arOffer["PROPERTIES"][$arCode["CODE"]]["VALUE"]);
                     } else {
                         $arSkuTmp[] = $arOffer["PROPERTIES"][$arCode["CODE"]]["VALUE"];
                     }
                 }
             }
             $arCatalogProduct = CCatalogProduct::GetByID($arOffer['ID']);
             $arSkuTmp["BALANCE"] = FloatVal($arCatalogProduct["QUANTITY"]);
             $discountPercent = 0;
             $arSkuTmp["USER_ID"] = $USER_ID;
             $arSkuTmp["ID"] = $arOffer["ID"];
             $arSkuTmp["NAME"] = CUtil::JSEscape($arOffer["NAME"]);
             $arSkuTmp["PRODUCT_NAME"] = CUtil::JSEscape($PRODUCT_NAME);
             $arSkuTmp["PRODUCT_ID"] = $PRODUCT_ID;
             $arSkuTmp["LID"] = CUtil::JSEscape($LID);
             $arSkuTmp["MIN_PRICE"] = $minItemPriceFormat;
             $arSkuTmp["URL_EDIT"] = CUtil::JSEscape("/bitrix/admin/iblock_element_edit.php?ID=" . $PRODUCT_ID . "&type=" . $arImgSku[$arOffer['ID']]["IBLOCK_TYPE_ID"] . "&lang=" . LANG . "&IBLOCK_ID=" . $arProduct["IBLOCK_ID"] . "&find_section_section=" . $arProduct["IBLOCK_SECTION_ID"]);
             $arSkuTmp["DISCOUNT_PRICE"] = '';
             $arSkuTmp["DISCOUNT_PRICE_FORMATED"] = '';
             $arSkuTmp["PRICE"] = $arPrice["PRICE"]["PRICE"];
             $arSkuTmp["PRICE_FORMATED"] = CurrencyFormatNumber($arPrice["PRICE"]["PRICE"], $arPrice["PRICE"]["CURRENCY"]);
             $arPriceType = GetCatalogGroup($arPrice["PRICE"]["CATALOG_GROUP_ID"]);
             $arSkuTmp["PRICE_TYPE"] = $arPriceType["NAME_LANG"];
             $arSkuTmp["VAT_RATE"] = $arPrice["PRICE"]["VAT_RATE"];
             if (count($arPrice["DISCOUNT"]) > 0) {
                 $discountPercent = IntVal($arPrice["DISCOUNT"]["VALUE"]);
                 $arSkuTmp["DISCOUNT_PRICE"] = $arPrice["DISCOUNT_PRICE"];
                 $arSkuTmp["DISCOUNT_PRICE_FORMATED"] = CurrencyFormatNumber($arPrice["DISCOUNT_PRICE"], $arPrice["PRICE"]["CURRENCY"]);
             }
             $arCurFormat = CCurrencyLang::GetCurrencyFormat($arPrice["PRICE"]["CURRENCY"]);
             $arSkuTmp["VALUTA_FORMAT"] = str_replace("#", '', $arCurFormat["FORMAT_STRING"]);
             $arSkuTmp["DISCOUNT_PERCENT"] = $discountPercent;
             $arSkuTmp["CURRENCY"] = $arPrice["PRICE"]["CURRENCY"];
             $arSkuTmp["CAN_BUY"] = $arOffer["CAN_BUY"];
             $arSku[] = $arSkuTmp;
         }
         if ((!is_array($arIblockOfferProps) || empty($arIblockOfferProps)) && is_array($arSku) && !empty($arSku)) {
             $arIblockOfferProps[0] = array("CODE" => "TITLE", "NAME" => GetMessage("SKU_TITLE"));
             foreach ($arSku as $key => $val) {
                 $arSku[$key][0] = $val["NAME"];
             }
         }
         $arResult["SKU_ELEMENTS"] = $arSku;
         $arResult["SKU_PROPERTIES"] = $arIblockOfferProps;
         $arResult["OFFERS_IBLOCK_ID"] = $arOffersIblock[$arProduct["IBLOCK_ID"]];
     }
     //if OFFERS_IBLOCK_ID > 0
     return $arResult;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:product.php

示例6: FloatVal

                    $Message = $IsSelect['Summ'] >= FloatVal($ServerSettings['Params']['ExceptionsPaidInvoices']) ? SPrintF('Сумма ваших оплаченных счетов больше %s, SMS для вас бесплатны', $Comp) : $Message;
                    #-------------------------------------------------------------------------------
                    break;
                    #-------------------------------------------------------------------------------
                #-------------------------------------------------------------------------------
                default:
                    return ERROR | @Trigger_Error(100);
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
        $Row2 = array(new Tag('TD', array('colspan' => SizeOf($Methods) + 1, 'class' => 'Standard', 'style' => 'background-color:#FDF6D3;'), $Message));
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    if (FloatVal($ServerSettings['Params']['ExceptionsPaidInvoices']) == 0 && $__USER['Params']['NotificationMethods']['SMS']['Confirmed'] > 0) {
        unset($Row2);
    }
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Row = array(new Tag('TD', array('class' => 'Head'), 'Тип сообщения'));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$uNotifies = array();
#-------------------------------------------------------------------------------
foreach (Array_Keys($Methods) as $MethodID) {
    #-------------------------------------------------------------------------------
    $Method = $Methods[$MethodID];
    #-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:UserNotifiesSet.comp.php

示例7: antraege2geodata

 /**
  * @param Antrag[] $antraege
  * @param int $typ
  * @return array
  */
 protected function antraege2geodata(&$antraege, $typ = 0)
 {
     $geodata = $geodata_overflow = [];
     $geodata_nach_dok = [];
     foreach ($antraege as $ant) {
         foreach ($ant->dokumente as $dokument) {
             foreach ($dokument->orte as $ort) {
                 if ($ort->ort->to_hide == 0) {
                     $name = $ant->getName();
                     if (strlen($name) > 150) {
                         $name = mb_substr($name, 0, 148) . "...";
                     }
                     $str = "<div class='antraglink'>" . CHtml::link($name, $ant->getLink()) . "</div>";
                     $str .= "<div class='ort_dokument'>";
                     $str .= "<div class='ort'>" . CHtml::encode($ort->ort->ort) . "</div>";
                     $str .= "<div class='dokument'>" . CHtml::link($dokument->getName(), $dokument->getLinkZumDokument()) . "</div>";
                     $str .= "</div>";
                     $str = mb_convert_encoding($str, 'UTF-8', 'UTF-8');
                     if (!isset($geodata_nach_dok[$dokument->id])) {
                         $geodata_nach_dok[$dokument->id] = [];
                     }
                     $geodata_nach_dok[$dokument->id][] = [FloatVal($ort->ort->lat), FloatVal($ort->ort->lon), $str, $typ];
                 }
             }
         }
     }
     foreach ($geodata_nach_dok as $dok_geo) {
         if (count($dok_geo) >= 10) {
             $geodata_overflow[] = $dok_geo;
         } else {
             foreach ($dok_geo as $d) {
                 $geodata[] = $d;
             }
         }
     }
     return [$geodata, $geodata_overflow];
 }
开发者ID:CatoTH,项目名称:Muenchen-Transparent,代码行数:42,代码来源:IndexController.php

示例8: array

         $arPrice = CCatalogProduct::GetOptimalPrice($arItems["ID"], 1, $arBuyerGroups, "N", array(), $LID);
         $arCurFormat = CCurrencyLang::GetCurrencyFormat($arPrice["PRICE"]["CURRENCY"]);
         $priceValutaFormat = str_replace("#", '', $arCurFormat["FORMAT_STRING"]);
         if (!is_array($arPrice["DISCOUNT"]) || count($arPrice["DISCOUNT"]) <= 0) {
             $arPrice["DISCOUNT_PRICE"] = 0;
             $price = $arPrice["PRICE"]["PRICE"];
         } else {
             $price = $arPrice["DISCOUNT_PRICE"];
         }
         $summaFormated = CurrencyFormatNumber($price, $arPrice["PRICE"]["CURRENCY"]);
         $currentTotalPriceFormat = CurrencyFormatNumber($price, $arPrice["PRICE"]["CURRENCY"]);
         $balance = 0;
         $weight = 0;
         if ($ar_res = CCatalogProduct::GetByID($arItems["ID"])) {
             $balance = FloatVal($ar_res["QUANTITY"]);
             $weight = FloatVal($ar_res["WEIGHT"]);
         }
         $discountPercent = 0;
         if ($arPrice["DISCOUNT_PRICE"] > 0) {
             $discountPercent = ($arPrice["PRICE"]["PRICE"] - $arPrice["DISCOUNT_PRICE"]) * 100 / $arPrice["PRICE"]["PRICE"];
             $discountPercent = roundEx($discountPercent, SALE_VALUE_PRECISION);
             $priceDiscount = $arPrice["PRICE"]["PRICE"] - $arPrice["DISCOUNT_PRICE"];
         }
         $urlEdit = "/bitrix/admin/iblock_element_edit.php?ID=" . $arItems["ID"] . "&type=" . $arItems["IBLOCK_TYPE_ID"] . "&lang=" . LANG . "&IBLOCK_ID=" . $arItems["IBLOCK_ID"] . "&find_section_section=" . IntVal($arItems["IBLOCK_SECTION_ID"]);
         $arParams = array('id' => $arItems["ID"], 'name' => CUtil::JSEscape($arItems["NAME"]), 'url' => CUtil::JSEscape($arItems["DETAIL_PAGE_URL"]), 'urlImg' => CUtil::JSEscape($ImgUrl), 'urlEdit' => CUtil::JSEscape($urlEdit), 'price' => CUtil::JSEscape($price), 'priceFormated' => CUtil::JSEscape($price), 'priceBase' => CUtil::JSEscape($arPrice["PRICE"]["PRICE"]), 'priceBaseFormat' => CUtil::JSEscape($arPrice["PRICE"]["PRICE"]), 'valutaFormat' => CUtil::JSEscape($priceValutaFormat), 'priceDiscount' => CUtil::JSEscape($priceDiscount), 'summaFormated' => CUtil::JSEscape($summaFormated), 'priceTotalFormated' => CUtil::JSEscape($currentTotalPriceFormat), 'discountPercent' => CUtil::JSEscape($discountPercent), 'balance' => CUtil::JSEscape($balance), 'quantity' => floatval($arGetProduct[$arItems["ID"]]), 'module' => 'catalog', 'currency' => CUtil::JSEscape($arPrice["PRICE"]["CURRENCY"]), 'weight' => $weight, 'vatRate' => DoubleVal('0'), 'priceType' => '', 'catalogXmlID' => '', 'productXmlID' => '', 'skuProps' => CUtil::PhpToJSObject($arSkuProps), 'productProviderClass' => 'CCatalogProductProvider');
         $arParams = CUtil::PhpToJSObject($arParams);
         echo "FillProductFields(0, " . $arParams . ", 0);\n";
     }
     //end while
 }
 //end if
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_new.php

示例9: foreach

<?php

/**
 * @var Termin $termin
 */
$this->pageTitle = $termin->getName(true);
$assets_base = $this->getAssetsBase();
foreach ($termin->tagesordnungspunkte as $ergebnis) {
    $geo = $ergebnis->get_geo();
    foreach ($geo as $g) {
        $geodata[] = [FloatVal($g->lat), FloatVal($g->lon), str_replace(".", ".<br>", trim($ergebnis->top_nr, "."))];
    }
}
?>
<html>
<head>
	<link rel="stylesheet" href="/js/Leaflet/leaflet.css"/>
	<link rel="stylesheet" href="/css/jquery-ui-1.11.0.custom.min.css"/>
	<style>

		.leaflet-popup-content-wrapper {
			border-radius: 10px;
		}

		.leaflet-popup .ort {
			float: right;
		}

		.leaflet-popup .ort_dokument {
			border-top: solid 1px #999;
			margin-top: 6px;
开发者ID:CatoTH,项目名称:Muenchen-Transparent,代码行数:31,代码来源:top_geo_export.php

示例10: array

                                    } else {
                                        $val = $res ? "Y" : "N";
                                    }
                                    $arBasket["STORES"][$storeId]["BARCODE"][] = $arRes["BARCODE"];
                                    $arBasket["STORES"][$storeId]["BARCODE_FOUND"][] = $val;
                                } else {
                                    $arBasket["STORES"][$storeId]["QUANTITY"] = $arRes["QUANTITY"];
                                    $arBasket["STORES"][$storeId]["QUANTITY_DEDUCTED"] = $arRes["DEDUCTED"] == "Y" ? "Y" : "N";
                                }
                            }
                        }
                    }
                    $arBasket["HAS_SAVED_QUANTITY"] = "Y";
                    $arBasket["HAS_SAVED_BARCODES"] = true;
                    $ind++;
                }
            }
        }
    }
    $arResult["BASKET"][$arBasket["ID"]] = $arBasket;
}
if (CModule::IncludeModule('catalog')) {
    $rsCatProd = CCatalogProduct::GetList(array(), array("ID" => $arProdIds), false, false, array("ID", "QUANTITY"));
    while ($arCatProd = $rsCatProd->Fetch()) {
        if ($arResult["BASKET"][$arProdIdsPrIds[$arCatProd["ID"]]]["MODULE"] == "catalog") {
            $arResult["BASKET"][$arProdIdsPrIds[$arCatProd["ID"]]]["BALANCE"] = FloatVal($arCatProd["QUANTITY"]);
        }
    }
}
$arResult["USE_STORES"] = $useStores;
$this->IncludeComponentTemplate($templatePage);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:component.php

示例11: array

     $dbStoreProduct = CCatalogStoreProduct::GetList(array(), array("PRODUCT_ID" => $arItems["ID"], "STORE_ID" => $storeFromId));
     if ($arStoreProduct = $dbStoreProduct->Fetch()) {
         $amountToStore = $arStoreProduct["AMOUNT"];
     }
 }
 $arCatalogProduct["BARCODE"] = '';
 if ($arCatalogProduct["BARCODE_MULTI"] == 'N') {
     $dbBarCodes = CCatalogStoreBarCode::getList(array(), array("PRODUCT_ID" => $arItems["ID"]));
     while ($arBarCode = $dbBarCodes->Fetch()) {
         $arCatalogProduct["BARCODE"][] = $arBarCode["BARCODE"];
     }
 }
 if (is_array($arCatalogProduct["BARCODE"])) {
     $arCatalogProduct["BARCODE"] = implode(', ', $arCatalogProduct["BARCODE"]);
 }
 $balance = $storeFromId > 0 ? FloatVal($arCatalogProduct["QUANTITY"]) . " / " . FloatVal($amountToStore) : FloatVal($arCatalogProduct["QUANTITY"]);
 $row->AddField("BALANCE", $balance);
 $row->AddViewField("PREVIEW_PICTURE", CFileInput::Show('NO_FIELDS[' . $arItems['ID'] . '][PREVIEW_PICTURE]', $arItems['PREVIEW_PICTURE'], array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxImageSize, "MIN_SIZE" => $minImageSize), array('upload' => false, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => false, 'description' => false)));
 $row->AddViewField("DETAIL_PICTURE", CFileInput::Show('NO_FIELDS[' . $arItems['ID'] . '][DETAIL_PICTURE]', $arItems['DETAIL_PICTURE'], array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxImageSize, "MIN_SIZE" => $minImageSize), array('upload' => false, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => false, 'description' => false)));
 $bCanBuy = true;
 if ($arCatalogProduct["CAN_BUY_ZERO"] != "Y" && ($arCatalogProduct["QUANTITY_TRACE"] == "Y" && doubleval($arCatalogProduct["QUANTITY"]) <= 0)) {
     $bCanBuy = false;
 }
 if ($addDefault == "Y" || $bCanBuy && $addDefault == "N") {
     $arParams = array('id' => $arItems["ID"], 'quantity' => $QUANTITY, 'type' => $arCatalogProduct["TYPE"], 'barcode' => $arCatalogProduct["BARCODE"], 'name' => $arItems['NAME']);
     if ($boolSubscribe) {
         $arParams['url'] = $arItems['DETAIL_PAGE_URL'];
     }
     $arParams = CUtil::PhpToJSObject($arParams);
     foreach (GetModuleEvents("sale", "OnProductSearchForm", true) as $arEvent) {
         $arParams = ExecuteModuleEventEx($arEvent, array($arItems["ID"], $arParams));
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:cat_store_product_search.php

示例12: trim

    $arFilter["GROUPS_ID"] = $filter_group;
}
if (isset($filter_universal) && strlen($filter_universal) > 0) {
    $arFilter["%NAME_SEARCH"] = trim($filter_universal);
}
if (FloatVal($filter_price_all_from) > 0) {
    $arFilter[">=ORDER_SUM"] = FloatVal($filter_price_all_from);
}
if (FloatVal($filter_price_all_to) > 0) {
    $arFilter["<=ORDER_SUM"] = FloatVal($filter_price_all_to);
}
if (FloatVal($filter_quantity_all_from) > 0) {
    $arFilter[">=ORDER_COUNT"] = FloatVal($filter_quantity_all_from);
}
if (FloatVal($filter_quantity_all_to) > 0) {
    $arFilter["<ORDER_COUNT"] = FloatVal($filter_quantity_all_to);
}
if (isset($_GET["del_filter"]) && $_GET["del_filter"] == "Y") {
    $arfiltertmp = $arFilter;
    $arFilter = array();
    $arFilter["LID"] = $arfiltertmp["LID"];
    $arFilter["CURRENCY"] = $arfiltertmp["CURRENCY"];
}
$arSitesShop = array();
foreach ($arSites as $key => $val) {
    $site = COption::GetOptionString("sale", "SHOP_SITE_" . $key, "");
    if ($key == $site) {
        $arSitesShop[] = array("ID" => $key, "NAME" => $val["NAME"]);
    }
}
if (empty($arSitesShop)) {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:buyers.php

示例13: FormatCurrency

             $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"];
 $productImg = "";
 if ($arItems["PREVIEW_PICTURE"] != "") {
     $productImg = $arItems["PREVIEW_PICTURE"];
 } elseif ($arItems["DETAIL_PICTURE"] != "") {
     $productImg = $arItems["DETAIL_PICTURE"];
 }
 $ImgUrl = "";
 if ($productImg != "") {
     $arFile = CFile::GetFileArray($productImg);
     $productImg = CFile::ResizeImageGet($arFile, array('width' => 80, 'height' => 80), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
     $ImgUrl = $productImg["src"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:product_search.php

示例14: Debug

     case 'exception':
         return ERROR | @Trigger_Error(400);
     case 'array':
         Debug("[comp/www/Administrator/PaymentsSystemsStatistics]: общая сумма за {$Year} = " . $Total['Summ']);
         break;
     default:
         return ERROR | @Trigger_Error(101);
 }
 $Tr->AddChild(new Tag('TD', array('align' => 'right', 'class' => 'Standard', 'style' => 'background-color:#FDF6D3;'), new Tag('NOBR', Number_Format($Total['Summ'], 2, '.', ' '))));
 #-------------------------------------------------------------------------------
 # ячейка со средним за год
 # если это текущий год - то расчёт будет иным
 if (Date('Y', Time()) == $Year) {
     $AvgVal = Round(FloatVal($Total['Summ']) / (Date('z', Time()) + 1), 2);
 } else {
     $AvgVal = Round(FloatVal($Total['Summ']) / (Date('z', $TimeEnd) + 1), 2);
 }
 $Tr->AddChild(new Tag('TD', array('align' => 'right', 'class' => 'Standard', 'style' => 'background-color:#B9CCDF;'), new Tag('NOBR', Number_Format($AvgVal, 2, '.', ' '))));
 #-------------------------------------------------------------------------------
 # перебираем все платёжные системы, считаем для них суммы
 foreach ($PaymentSystems as $PaymentSystem) {
     $Columns = array('SUM(`Summ`) AS `Summ`');
     $Where = "`StatusID` = 'Payed' AND `PaymentSystemID` = '" . $PaymentSystem['PaymentSystemID'] . "' AND `StatusDate` BETWEEN {$TimeBegin} AND {$TimeEnd}";
     $Summ = DB_Select('Invoices', $Columns, array('UNIQ', 'Where' => $Where));
     switch (ValueOf($Total)) {
         case 'error':
             return ERROR | @Trigger_Error(500);
         case 'exception':
             return ERROR | @Trigger_Error(400);
         case 'array':
             Debug("[comp/www/Administrator/PaymentsSystemsStatistics]: сумма для " . $PaymentSystem['PaymentSystemID'] . " за {$Year} = " . $Summ['Summ']);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:PaymentsSystemsStatistics.comp.php

示例15: array

 $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"];
     }
 }
 $arCatalogProduct["BARCODE"] = '';
 if ($arCatalogProduct["BARCODE_MULTI"] == 'N') {
     $dbBarCodes = CCatalogStoreBarCode::getList(array(), array("PRODUCT_ID" => $arItems["ID"]));
     if ($arBarCode = $dbBarCodes->Fetch()) {
         $arCatalogProduct["BARCODE"] = $arBarCode["BARCODE"];
     }
 }
 $balance = $STORE_FROM_ID > 0 ? FloatVal($arCatalogProduct["QUANTITY"]) . " / " . FloatVal($amountToStore) : 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"];
 $productImg = "";
 if ($arItems["PREVIEW_PICTURE"] != "") {
     $productImg = $arItems["PREVIEW_PICTURE"];
 } elseif ($arItems["DETAIL_PICTURE"] != "") {
     $productImg = $arItems["DETAIL_PICTURE"];
 }
 $ImgUrl = "";
 if ($productImg != "") {
     $arFile = CFile::GetFileArray($productImg);
     $productImg = CFile::ResizeImageGet($arFile, array('width' => 80, 'height' => 80), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
     $ImgUrl = $productImg["src"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:cat_store_product_search.php


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