PricesConverter
Converter prices.
Tags
Table of Contents
Methods
- __construct() : mixed
- convertToProductRowPrices() : array<string|int, mixed>
- Convert basket item prices to product row prices.
- convertToSaleBasketPrices() : array<string|int, mixed>
- Convert product row prices to basket item prices.
Methods
__construct()
public
__construct() : mixed
convertToProductRowPrices()
Convert basket item prices to product row prices.
public
convertToProductRowPrices(float $price, float $basePrice, float $vatRate, bool $vatIncluded) : array<string|int, mixed>
Parameters
- $price : float
- $basePrice : float
- $vatRate : float
-
between 0 and 1
- $vatIncluded : bool
Return values
array<string|int, mixed> —with keys PRICE_BRUTTO
, PRICE_NETTO
, PRICE_EXCLUSIVE
, PRICE
, DISCOUNT_SUM
, DISCOUNT_RATE
convertToSaleBasketPrices()
Convert product row prices to basket item prices.
public
convertToSaleBasketPrices(float $price, float $priceExclusive, float $priceNetto, float $priceBrutto, bool $taxIncluded) : array<string|int, mixed>
Parameters
- $price : float
- $priceExclusive : float
- $priceNetto : float
- $priceBrutto : float
- $taxIncluded : bool
Return values
array<string|int, mixed> —with keys PRICE
, BASE_PRICE
, DISCOUNT_PRICE