source/Core/PriceList.php
public function getVatInfo($isNettoMode = true)
    {
        $aVatValues = [];
        $aPrices = [];
        foreach ($this->_aList as $oPrice) {
            $sKey = ( string ) $oPrice->getVat();
            if (!isset($aPrices[$sKey])) {
                $aPrices[$sKey]['sum'] = 0;
                $aPrices[$sKey]['vat'] = $oPrice->getVat();
            }
            $aPrices[$sKey]['sum'] += $oPrice->getPrice();
        }

        foreach ($aPrices as $sKey => $aPrice) {
            if ($isNettoMode) {
                $dPrice = $aPrice['sum'] * $aPrice['vat'] / 100;
            } else {
                $dPrice = $aPrice['sum'] * $aPrice['vat'] / (100 + $aPrice['vat']);
            }
            $aVatValues[$sKey] = $dPrice;
        }

        return $aVatValues;
    }
public function getVatInfo($isNettoMode = true)
    {
        $aVatValues = [];
        $aPrices = [];
        foreach ($this->_aList as $oPrice) {
            $sKey = ( string ) $oPrice->getVat();
            if (!isset($aPrices[$sKey])) {
                $aPrices[$sKey]['sum'] = 0;
                $aPrices[$sKey]['vat'] = $oPrice->getVat();
            }
            $aPrices[$sKey]['sum'] += $oPrice->getPrice();
        }

        foreach ($aPrices as $sKey => $aPrice) {
            if ($isNettoMode) {
                $dPrice = $aPrice['sum'] * $aPrice['vat'] / 100;
            } else {
                $dPrice = $aPrice['sum'] * $aPrice['vat'] / (100 + $aPrice['vat']);
            }
            $aVatValues[$sKey] = $dPrice;
        }

        return $aVatValues;
    }
public function getVatInfo ( $ isNettoMode = true ) { $ aVatValues = [ ] ; $ aPrices = [ ] ; foreach ( $ this -> _aList as $ oPrice ) { $ sKey = ( string ) $ oPrice -> getVat ( ) ; if ( ! isset ( $ aPrices [ $ sKey ] ) ) { $ aPrices [ $ sKey ] [ 'sum' ] = 0 ; $ aPrices [ $ sKey ] [ 'vat' ] = $ oPrice -> getVat ( ) ; } $ aPrices [ $ sKey ] [ 'sum' ] += $ oPrice -> getPrice ( ) ; } foreach ( $ aPrices as $ sKey => $ aPrice ) { if ( $ isNettoMode ) { $ dPrice = $ aPrice [ 'sum' ] * $ aPrice [ 'vat' ] / 100 ; } else { $ dPrice = $ aPrice [ 'sum' ] * $ aPrice [ 'vat' ] / ( 100 + $ aPrice [ 'vat' ] ) ; } $ aVatValues [ $ sKey ] = $ dPrice ; } return $ aVatValues ; }
Returns VAT values sum separated to different array elements depending on VAT

@param bool $isNettoMode mode in which calculate sum, default netto

@return array
Returns VAT values sum separated to different array elements depending on VAT