Calculate multiplier for price calculation

@return float|int
504340
protected function _getMultiplier()
    {
        $dAmount = 0;

        if ($this->getCalculationRule() == self::CALCULATION_RULE_ONCE_PER_CART) {
            $dAmount = 1;
        } elseif ($this->getCalculationRule() == self::CALCULATION_RULE_FOR_EACH_DIFFERENT_PRODUCT) {
            $dAmount = $this->_iProdCnt;
        } elseif ($this->getCalculationRule() == self::CALCULATION_RULE_FOR_EACH_PRODUCT) {
            $dAmount = $this->_iItemCnt;
        }

        return $dAmount;
    }
643488
public function getOldPrice()
    {
        $price = $this->price;
        if (\Yii::$app->getModule('shop')->enableCurrencyConversion) {
            $price = $price * Currency::currentCurrency();
        }
        if (\Yii::$app->getModule('shop')->enablePriceRounding) {
            $price = floor($price);
        }

        return $price;
    }
1321898
public function calculateTotal()
    {
        $this->total = $this->getItemsTotal() + $this->getAdjustmentTotal();

        if ($this->total < 0) {
            $this->total = 0;
        }

        return $this;
    }
1325637
public function calculateToPrice()
    {
        if (count($this->_aList) == 0) {
            return;
        }

        $dNetoTotal = 0;
        $dVatTotal = 0;

        foreach ($this->_aList as $oPrice) {
            $dNetoTotal += $oPrice->getNettoPrice();
            $dVatTotal += $oPrice->getVatValue();
        }

        $oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);

        if ($dNetoTotal) {
            $dVat = $dVatTotal * 100 / $dNetoTotal;

            $oPrice->setNettoPriceMode();
            $oPrice->setPrice($dNetoTotal);
            $oPrice->setVat($dVat);
        }

        return $oPrice;
    }
814420
protected function _calcPaymentCost()
    {
        // resetting values
        $oPaymentPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);

        // payment
        if (($this->_sPaymentId = $this->getPaymentId())) {
            $oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
            $oPayment->load($this->_sPaymentId);

            $oPayment->calculate($this);
            $oPaymentPrice = $oPayment->getPrice();
        }

        return $oPaymentPrice;
    }
928363
public function getPayPalWrappingCosts()
    {
        $amount = 0.0;

        $wrappingCost = $this->getCosts('oxwrapping');
        if ($wrappingCost) {
            $amount = $this->isCalculationModeNetto() ? $wrappingCost->getNettoPrice() : $wrappingCost->getBruttoPrice();
        }

        return $amount;
    }
101129
def currency_multiplier(src_currency, dest_currency):
    ''
    if src_currency == 'USD':
        return 1.0
    usd_mult = currency_rates()[src_currency]
    if dest_currency == 'USD':
        return usd_mult
    return usd_mult/currency_rates()[dest_currency]
141626
public function getX() : ?float 
    {
        if ( ! $this->hasX()) {
            $this->setX($this->getDefaultX());
        }
        return $this->x;
    }
1000307
public function getVarMinPrice()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadPrice') || !$this->_blLoadPrice) {
            return;
        }

        $oPrice = null;
        $dPrice = $this->_calculateVarMinPrice();

        $oPrice = $this->_getPriceObject();
        $oPrice->setPrice($dPrice);

        $this->_calculatePrice($oPrice);

        return $oPrice;
    }
772404
public function calculateAdjustmentsTotal()
    {
        $this->adjustmentsTotal = 0;

        foreach ($this->adjustments as $adjustment) {
            if (!$adjustment->isNeutral()) {
                $this->adjustmentsTotal += $adjustment->getAmount();
            }
        }

        return $this;
    }
615383
public function balance() : int
    {
        return ($this->right ? $this->right->height() : 0)
            - ($this->left ? $this->left->height() : 0);
    }
1006515
public function getPaymorrowTotalVatAmount()
    {
        /** @var OxpsPaymorrowOxBasket|oxBasket $this */

        // Products VAT
        $dTotalVat = (double) array_sum( (array) $this->getProductVats( false ) );

        // Get cost and add costs VATs
        $aCosts = (array) $this->getCosts();

        foreach ( $aCosts as $oPrice ) {
            $dTotalVat += (double) $this->_getVatForValidPrice( $oPrice );
        }

        // Add surcharge VAT amount in case it is not yet included in basket
        $dTotalVat += (double) $this->_getVatForValidPrice( $this->_getPaymentMethodSurcharge() );

        return $dTotalVat;
    }
1359606
public function totalAmountCharged()
    {
        $qb = $this->getQueryBuilder()
            ->select('SUM(t.totalPrice)')
            ->innerJoin('t.items', 'i')
            ->innerJoin('i.product', 'p')
            ->where('p.priceType = 0')
            ->andWhere('t.status = :status OR t.status = :status2 OR t.status = :status3')
            ->setParameter('status', Transaction::STATUS_PAID)
            ->setParameter('status2', Transaction::STATUS_COMPLETED)
            ->setParameter('status3', Transaction::STATUS_DELIVERED)
                ;
                
        if(is_null($qb->getQuery()->getSingleScalarResult())) return '0';
                
        return $qb->getQuery()
            ->getSingleScalarResult();
    }
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;
    }
225321
public static function FIND_MULTIPLIER($value)
	{
		if( preg_match(static::UNITS_REGEXP, $value,$matches)) { 
			switch ($matches[1]) {
				case 'hundred':
					$multiplier = 100;
					break;
				case 'thousand':
					$multiplier = 1000;
					break;
				case 'million':
					$multiplier = 1000000;
					break;
				case 'billion':
					$multiplier = 1000000000;
					break;
					
				default:
					$multiplier = 1;
					break;
			}
		} else {
			$multiplier = 1;			
		}
		
		return $multiplier;
	}
756007
public function calculatePrices()
    {
        if ($this->getId()) {
            return;
        }

        $taxFactor = $this->getTaxRate() / 100;
        $total = $pretax = $tax = 0;
        $sums = [];

        /* @var ProductInterface $product */
        foreach ($this->getProducts() as $product) {
            $pPreTax = $product->getPrice();
            $pTax    = $pPreTax * $taxFactor;
            $pTotal  = $pPreTax + $pTax;
            $pQuantity = $product->getQuantity();
            $ptPreTax = $pQuantity * $pPreTax;
            $ptTax    = $pQuantity * $pTax;
            $ptTotal  = $pQuantity * $pTotal;

            $sums[$product->getName()] = [
                'single_pretax' => $pPreTax,
                'single_tax'    => $pTax,
                'single_total'  => $pTotal,
                'pretax' => $ptPreTax,
                'tax'    => $ptTax,
                'total'  => $ptTotal,
            ];

            $total += $ptTotal;
            $pretax += $ptPreTax;
            $tax   += $ptTax;
        }

        $this->prices = [
            'products' => $sums,
            'total'  => $total,
            'tax'    => $tax,
            'pretax' => $pretax,
        ];
    }
481665
public function product(){
		
		Number::setScale(static::NUMERIC_FUNCTIONS_SCALE);
		
		$total = \strval($this->front());
		
		for($i = 1, $l = $this->count(); $i < $l; ++$i){
			$total = Number::multiply($total, \strval($this->_Arr[$i]));
		}
		
		return $total;
		
	}