Get price value with tax
@param float $fPrice
@param float $fPricePercent
@return float
545415
public function getPriceWithTax($fPrice, $fPricePercent)
    {
        $fPriceResult = $fPrice;
        if (!$this->bPriceIncludeTax) {
            $fPriceResult = $this->calculatePriceWithTax($fPrice, $fPricePercent);
        }

        return $fPriceResult;
    }
736534
protected function extractPrices(array $data)
    {
        $calculator = new Calculator();

        $calculator->loadTaxRuleWithoutProduct(
            TaxRuleQuery::create()->findPk($data["tax_rule_id"]),
            Country::getShopLocation()
        );

        $price = null === $data["price_with_tax"] ?
            $data["price"] :
            $calculator->getUntaxedPrice($data["price_with_tax"])
        ;

        $salePrice = null === $data["sale_price_with_tax"] ?
            $data["sale_price"] :
            $calculator->getUntaxedPrice($data["sale_price_with_tax"])
        ;

        return [$price, $salePrice];
    }
594989
public function prices() : Float
    {
        $total = 0;

        if( ! empty(Properties::$items) ) foreach( Properties::$items as $values )
        {
            $quantity = (int)   ($values['quantity'] ?? 1);
            $price    = (float) ($values['price']    ?? 0);

            $total += $price * $quantity;
        }

        return $total;
    }
707114
protected function _getValuePrice($oValue, $dParentPrice)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $dPriceMod = 0;
        if ($myConfig->getConfigParam('bl_perfLoadSelectLists') && $myConfig->getConfigParam('bl_perfUseSelectlistPrice')) {
            if ($oValue->priceUnit == 'abs') {
                $dPriceMod = $oValue->price;
            } elseif ($oValue->priceUnit == '%') {
                $dPriceModPerc = abs($oValue->price) * $dParentPrice / 100.0;
                if (($oValue->price) >= 0.0) {
                    $dPriceMod = $dPriceModPerc;
                } else {
                    $dPriceMod = -$dPriceModPerc;
                }
            }
        }

        return $dPriceMod;
    }
1017671
public function determineOrderPrices(OrderInterface $order, PricingContextInterface $pricingContext = null)
    {
        // not implemented
        if ($pricingContext === null) {
            $pricingContext = new PricingContext();
        }

        foreach ($order->getItems() as $item) {
            $this->determineOrderItemPrices($item, $pricingContext);
        }

        // summing it up
        $itemsTotalNet = 0;

        // updating prices for each item
        foreach ($order->getItems() as $item) {
            // this is the total value since we want to capture any calculations that happen on a specific item
            $itemsTotalNet += $item->getPrice('netValue');
        }

        $order->setPrice('totalNet', $itemsTotalNet);
        $order->setPrice('totalValue', $itemsTotalNet);

        // if pricing context has taxation enabled we calculate the taxes with the percentage set
        // example taxRates : 0.10 for 10%, 0.25 for 25%
        if (isset($pricingContext['partner'])) {
            if ($partner = $pricingContext['partner']) {
                /** @var $partner \Vespolina\Entity\Partner\Partner */
                if (count($partner->getPreferredPaymentProfile())) {
                    /** @var $address \Vespolina\Entity\Partner\AddressInterface */
                    $paymentProfile = $partner->getPreferredPaymentProfile();
                    $rate = $this->taxProvider->getTaxByState($paymentProfile->getBillingState());
                    $totalTax = $itemsTotalNet * $rate;
                    $order->setPrice('taxRate', $rate);
                    $order->setPrice('taxes', $totalTax);
                    $order->setPrice('totalValue', $itemsTotalNet + $totalTax);
                }
            }
        }
    }
868954
protected function _getGenericDiscountValue($dPrice)
    {
        $oSeries = $this->getSerie();
        if ($oSeries->oxvoucherseries__oxdiscounttype->value == 'absolute') {
            $oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
            $dDiscount = $oSeries->oxvoucherseries__oxdiscount->value * $oCur->rate;
        } else {
            $dDiscount = $oSeries->oxvoucherseries__oxdiscount->value / 100 * $dPrice;
        }

        if ($dDiscount > $dPrice) {
            $dDiscount = $dPrice;
        }

        return $dDiscount;
    }
463202
protected function computePrice($price, $price_type, Product $product, $convert = false)
    {
        $calc = new Calculator();

        $calc->load(
            $product,
            Country::getShopLocation()
        );

        if ($price_type == 'without_tax') {
            $return_price = $calc->getTaxedPrice($price);
        } elseif ($price_type == 'with_tax') {
            $return_price = $calc->getUntaxedPrice($price);
        } else {
            $return_price = $price;
        }

        if ($convert != 0) {
            $return_price = $price * Currency::getDefaultCurrency()->getRate();
        }

        return \floatval($return_price);
    }
1104062
public function subtractPercent($dValue)
    {
        $dPrice = $this->getPrice();
        $this->setPrice($dPrice - self::percent($dPrice, $dValue));
    }
1370024
public function setPrice($price)
    {
        if (is_string($price)) {
            $this->checkPriceFormat($price);
        }

        $this->price = (float)$price;

        return $this;
    }
1122941
public static function priceWithDiscount($price, $discount, bool $discountIsPercent = false)
    {
        if ($discountIsPercent) {
            $discount = $discount / 100;
        }
        return $price - ($price * $discount);
    }
1224321
private function calculateProductsPriceByPercent(float $spread_value, $stock_price, $currency)
    {
        $calculatedPriceByCurrencyRate =  $this->getCalculatedPriceByCurrencyRate($stock_price, $currency);

        return $calculatedPriceByCurrencyRate +  ( $calculatedPriceByCurrencyRate * $spread_value / 100);
    }
633699
public function getDiscountValue($dPrice)
    {
        if ($this->_isProductVoucher()) {
            return $this->_getProductDiscountValue((double) $dPrice);
        } elseif ($this->_isCategoryVoucher()) {
            return $this->_getCategoryDiscountValue((double) $dPrice);
        } else {
            return $this->_getGenericDiscountValue((double) $dPrice);
        }
    }
687300
private function calculateProductsPriceByFlat(float $spread_value, $stock_price, $currency)
    {
        $calculatedPriceByCurrencyRate =  $this->getCalculatedPriceByCurrencyRate($stock_price, $currency);

        return $calculatedPriceByCurrencyRate + $spread_value;
    }
153714
public function getAdminGridDisplayFormattedPrice(bool $returnOriginalPrice = FALSE) {
    $skuTypePlugin = $this->getPluginInstance();
    if ($skuTypePlugin === NULL) {
      /** @var \Drupal\acm_sku\AcquiaCommerce\SKUPluginManager $plugin_manager */
      $plugin_manager = \Drupal::service('plugin.manager.sku');
      $skuTypePlugin = $plugin_manager->pluginInstanceFromType('simple');
    }
    // Use the type plugin's price formatter.
    $formattedPrice = $skuTypePlugin->getAdminGridDisplayFormattedPrice($this, $returnOriginalPrice);

    return $formattedPrice;
  }
1199963
public function GetTotalPrice()
    {
        if (is_null($this->dPrice)) {
            $this->dPrice = 0;
            $iPointer = $this->getItemPointer();
            $this->GoToStart();
            while ($oItem = &$this->Next()) {
                $this->dPrice += $oItem->GetPrice();
            }
            $this->setItemPointer($iPointer);
        }

        return $this->dPrice;
    }
1327395
public function calculateItemTotalNetPrice($item, $currency = null, $useProductsPrice = true, $isGrossPrice = false)
    {
        $priceValue = $this->calculateItemNetPrice($item, $currency, $useProductsPrice, $isGrossPrice);

        if ($priceValue === null) {
            $priceValue = 0;
        }

        if ($item->getPrice() && $item->getPrice() !== $priceValue) {
            $item->setPriceChange($item->getPrice(), $priceValue);
        }

        $itemPrice = $priceValue * $item->getCalcQuantity();

        // Calculate items discount.
        $discount = ($itemPrice / 100) * $item->getCalcDiscount();

        // Calculate total item price.
        $totalPrice = $itemPrice - $discount;

        return $totalPrice;
    }
279787
public function getPercentage($dPrice)
    {
        if ($this->getAddSumType() == 'abs' && $dPrice > 0) {
            return $this->getAddSum() / $dPrice * 100;
        } else {
            return $this->getAddSum();
        }
    }