returns the max vat from the group list.

@return TdbShopVat
503572
public function &GetMaxVat()
    {
        $iPointer = $this->getItemPointer();
        $oMaxVatItem = null;
        $this->GoToStart();
        while ($oItem = &$this->Next()) {
            $oCurrentVat = $oItem->GetVat();
            if (!is_null($oCurrentVat)) {
                if (is_null($oMaxVatItem)) {
                    $oMaxVatItem = $oCurrentVat;
                } elseif ($oMaxVatItem->fieldVatPercent < $oCurrentVat->fieldVatPercent) {
                    $oMaxVatItem = $oCurrentVat;
                }
            }
        }
        $this->setItemPointer($iPointer);

        return $oMaxVatItem;
    }
733223
protected function _getCostSum()
    {
        if ($this->getAddSumType() == 'abs') {
            $oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
            $dPrice = $this->getAddSum() * $oCur->rate * $this->_getMultiplier();
        } else {
            $dPrice = $this->_dPrice / 100 * $this->getAddSum();
        }

        return $dPrice;
    }
810939
protected function _fetchMaxChunks() {
        $count = 'COUNT(*)';
        $model = $this->getModel();
        $select = clone $this->getSelect();
        $select->reset(Zend_Db_Select::COLUMNS)
               ->reset(Zend_Db_Select::FROM)
               ->reset(Zend_Db_Select::ORDER)
               ->reset(Zend_Db_Select::GROUP)
        ;
        $select->from($model->getName(), array('c' => $count));

        if ($max = $this->_fetchMaxChunksFromFilters($select)) {
            return $max;
        } else {
            $result = $model->fetchRow($select);
            return $result->c;
        }
    }
1029068
public function getOrderNetSum()
    {
        $dTotalNetSum = 0;

        $dTotalNetSum += $this->oxorder__oxtotalnetsum->value;
        $dTotalNetSum += $this->getOrderDeliveryPrice()->getNettoPrice();
        $dTotalNetSum += $this->getOrderWrappingPrice()->getNettoPrice();
        $dTotalNetSum += $this->getOrderPaymentPrice()->getNettoPrice();

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

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

        return $amount;
    }
451397
protected function _getMax()
	{
		$max = 0;
		if (!empty($this->_tagsArray)) {
			$p_size = 0;
			foreach ($this->_tagsArray as $cKey => $cVal) {
				$c_size = $cVal['size'];
				if ($c_size > $p_size) {
					$max = $c_size;
					$p_size = $c_size;
				}
			}
		}
		return $max;
	}
470236
protected function GetBasketTotalForVatGroup(TdbShopVat &$oVat, $bIncludePaymentAndShipping = true)
    {
        $dGrossVal = 0;
        $oMatchingArticles = $this->GetBasketArticles()->GetListMatchingVat($oVat);
        $dGrossVal += ($oMatchingArticles->dProductPrice - $oMatchingArticles->GetTotalDiscountValue());

        if ($bIncludePaymentAndShipping) {
            // add price for shipping
            if (!is_null($this->GetActiveShippingGroup())) {
                $oShippingVat = $this->GetActiveShippingGroup()->GetVat();
                if (!is_null($oShippingVat) && $oShippingVat->id == $oVat->id) {
                    $dGrossVal += $this->GetActiveShippingGroup()->GetShippingCostsForBasket();
                }
            }

            // add price for payment
            if (!is_null($this->GetActivePaymentMethod())) {
                $oPaymentVat = $this->GetActivePaymentMethod()->GetVat();
                if (!is_null($oPaymentVat) && $oPaymentVat->id == $oVat->id) {
                    $dGrossVal += $this->GetActivePaymentMethod()->GetPrice();
                }
            }
        }

        return $dGrossVal;
    }
66240
public function GetVat()
    {
        $oVat = $this->GetFromInternalCache('ovat');
        if (is_null($oVat)) {
            $oVat = $this->getOwnVat();
            if (is_null($oVat)) {
                // try to fetch from article group
                $oArticleGroups = $this->GetArticleGroups();
                $oVat = $oArticleGroups->GetMaxVat();
            }

            if (is_null($oVat)) {
                // try to fetch from category
                $oCategories = $this->GetFieldShopCategoryList();
                $oVat = $oCategories->GetMaxVat();
            }

            if (is_null($oVat)) {
                // try to fetch from shop
                $oShopConfig = TdbShop::GetInstance();
                $oVat = $oShopConfig->GetVat();
            }
            $this->SetInternalCache('ovat', $oVat);
        }

        return $oVat;
    }
276834
public function getMaxDepth()
    {
        $aSubvariants = $this->getMdSubvariants();

        if (!count($aSubvariants)) {
            return 0;
        }

        $iMaxDepth = 0;
        foreach ($aSubvariants as $oSubvariant) {
            if ($oSubvariant->getMaxDepth() > $iMaxDepth) {
                $iMaxDepth = $oSubvariant->getMaxDepth();
            }
        }

        return $iMaxDepth + 1;
    }
563519
public function GetBasketSumForVoucher(TdbShopVoucher &$oVoucher)
    {
        // get the sum of all products (if the voucher is not sponsored, we exclude products with "ExcludeFromVouchers")
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $oVoucherDef = &$oVoucher->GetFieldShopVoucherSeries();
        $dProductValue = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem);
            if ($bIncludeProduct) {
                $dProductValue = $dProductValue + $oItem->dPriceTotalAfterDiscountWithoutVouchers;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $dProductValue;
    }
653208
public function max()
    {
        $max = null;
        $first = false;
        foreach ($this as $v) {
            if (!$first || $v > $max) {
                $max = $v;
                $first = true;
            }
        }
        return $max;
    }
346375
protected function getAvailableTotals()
    {
        $sign = $this->getSign();
        if ($this->getType() === Source::Order) {
            $amount = $this->source->getTotalProductsWithoutTaxes()
                      + $this->source->total_shipping_tax_excl
                      + $this->source->total_wrapping_tax_excl
                      - $this->source->total_discounts_tax_excl;
            $amountInc = $this->source->getTotalProductsWithTaxes()
                         + $this->source->total_shipping_tax_incl
                         + $this->source->total_wrapping_tax_incl
                         - $this->source->total_discounts_tax_incl;
        } else {
            // On credit notes, the amount ex VAT will not have been corrected
            // for discounts that are subtracted from the refund. This will be
            // corrected later in getDiscountLinesCreditNote().
            $amount = $this->source->total_products_tax_excl
                      + $this->source->total_shipping_tax_excl;
            $amountInc = $this->source->total_products_tax_incl
                         + $this->source->total_shipping_tax_incl;
        }

        return array(
            Meta::InvoiceAmountInc => $sign * $amountInc,
            Meta::InvoiceAmount => $sign * $amount,
        );
    }
62876
public function getMaxAge()
    {
        if (isset($this->headers['cache-control']) &&
            ($value = $this->getInlineValue($this->headers['cache-control'], 'max-age', ',')) !== false
        ) {
            return intval($value);
        }
        return 0;
    }
597345
public function getSumPrice()
	{
		$price = clone $this->_price;

		$price->setValue( $price->getValue() * $this->_values['quantity'] );
		$price->setCosts( $price->getCosts() * $this->_values['quantity'] );
		$price->setRebate( $price->getRebate() * $this->_values['quantity'] );

		return $price;
	}
343584
public function getOrderWrappingPrice()
    {
        if ($this->_oWrappingPrice != null) {
            return $this->_oWrappingPrice;
        }

        $this->_oWrappingPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);
        $this->_oWrappingPrice->setBruttoPriceMode();
        $this->_oWrappingPrice->setPrice($this->oxorder__oxwrapcost->value, $this->oxorder__oxwrapvat->value);

        return $this->_oWrappingPrice;
    }
910859
public function getMaxAllowedPacket()
    {
        if ($this->maxAllowedPacket === null) {
            $statement = $this->prepare('SELECT @@global.max_allowed_packet');
            $statement->execute();

            $this->maxAllowedPacket = (int) $statement->fetchColumn();
        }

        return $this->maxAllowedPacket;
    }
617273
public function getVatValue()
    {
        if ($this->isNettoMode()) {
            $dVatValue = $this->getNettoPrice() * $this->getVat() / 100;
        } else {
            $dVatValue = $this->getBruttoPrice() * $this->getVat() / (100 + $this->getVat());
        }

        return \OxidEsales\Eshop\Core\Registry::getUtils()->fRound($dVatValue);
    }