$exchange_rate $exchange_rate : float Type float — Exchange rate between $id_currency and SupplyOrder::$id_ref_currency, at the time
$price_te $price_te : float Type float — This defines the price of the product, considering the number of units to buy. ($unit_price_te * $quantity), without discount, without tax
$discount_value_te $discount_value_te : float Type float — Supplier discount value (($discount_rate / 100) * $price_te), without tax
$price_with_discount_te $price_with_discount_te : float Type float — ($price_te - $discount_value_te), with discount, without tax
$tax_value_with_order_discount $tax_value_with_order_discount : float Type float — Tax value of the given product after applying the global order discount (i.e. if SupplyOrder::discount_rate is set)
$price_with_order_discount_te $price_with_order_discount_te : float Type float — This is like $price_with_discount_te, considering the global order discount. (i.e. if SupplyOrder::discount_rate is set)
applyGlobalDiscount() applyGlobalDiscount( $discount_rate) Applies a global order discount rate, for the current product (i.e detail) Calls ObjectModel::update() Parameters $discount_rate The discount rate in percent (Ex. 5 for 5 percents)
validateController() validateController( $htmlentities = true) : \$errors Parameters $htmlentities Optional Returns \$errors — If any..
calculatePrices() calculatePrices() Calculates all prices for this product based on its quantity and unit price Applies discount if necessary Calculates tax value, function of tax rate