1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
pricemaths.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Sale;
4
5
use Bitrix\Main;
6
7
class
PriceMaths
8
{
9
private
static
?
int
$valuePrecision =
null
;
10
16
public
static
function
roundPrecision
($value)
17
{
18
if
(!isset(self::$valuePrecision))
19
{
20
self::$valuePrecision = (int)
Main
\
Config
\Option::get(
'sale'
,
'value_precision'
);
21
if
(self::$valuePrecision < 0)
22
{
23
self::$valuePrecision = 2;
24
}
25
}
26
27
return
round((
float
)$value, self::$valuePrecision);
28
}
29
38
public
static
function
roundByFormatCurrency
($price,
$currency
)
39
{
40
return
(
float
)
SaleFormatCurrency
($price,
$currency
,
false
,
true
);
41
}
42
}
Bitrix\Sale\PriceMaths
Определения
pricemaths.php:8
Bitrix\Sale\PriceMaths\roundByFormatCurrency
static roundByFormatCurrency($price, $currency)
Определения
pricemaths.php:38
Bitrix\Sale\PriceMaths\roundPrecision
static roundPrecision($value)
Определения
pricemaths.php:16
Bitrix\Catalog\Config
Определения
catalogsettings.php:3
Bitrix\Main
$currency
$currency
Определения
template.php:266
SaleFormatCurrency
SaleFormatCurrency($fSum, $strCurrency, $OnlyValue=false, $withoutFormat=false)
Определения
include.php:142
bitrix
modules
sale
lib
pricemaths.php
Создано системой
1.14.0