Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс CostPriceCalculator

Открытые члены

 __construct (BatchManager $batchManager)
 
 calculate (float $quantity, int $storeId, string $currency=null)
 

Открытые статические члены

static getMethod ()
 
static setMethod (string $method)
 

Открытые атрибуты

const METHOD_FIFO = 'fifo'
 
const METHOD_AVERAGE = 'average'
 

Защищенные данные

array $productFields = null
 
bool $isCurrencyModuleIncluded
 

Подробное описание

См. определение в файле costpricecalculator.php строка 18

Конструктор(ы)

◆ __construct()

__construct ( BatchManager $batchManager)
Аргументы
BatchManager$batchManager

См. определение в файле costpricecalculator.php строка 35

Методы

◆ calculate()

calculate ( float $quantity,
int $storeId,
string $currency = null )

Calculate purchasing price by quantity. Is able to calculate in certain store and get result in required currency.

Аргументы
float$quantity
int$storeId
string | null$currency
Возвращает
float
Исключения

Bitrix\Main\LoaderException

См. определение в файле costpricecalculator.php строка 109

◆ getMethod()

static getMethod ( )
static

Return current purchasing price calculation method.

Возвращает
string

См. определение в файле costpricecalculator.php строка 47

◆ setMethod()

static setMethod ( string $method)
static

Set current purchasing price calculation method value.

Аргументы
string$method
Возвращает
void
Исключения

Bitrix\Main\ArgumentOutOfRangeException

См. определение в файле costpricecalculator.php строка 61

Данные класса

◆ $isCurrencyModuleIncluded

bool $isCurrencyModuleIncluded
protected

См. определение в файле costpricecalculator.php строка 28

◆ $productFields

array $productFields = null
protected

См. определение в файле costpricecalculator.php строка 27

◆ METHOD_AVERAGE

const METHOD_AVERAGE = 'average'

См. определение в файле costpricecalculator.php строка 21

◆ METHOD_FIFO

const METHOD_FIFO = 'fifo'

См. определение в файле costpricecalculator.php строка 20