Return prices separated to different array elements depending on VAT

@return array
977083
public function getPriceInfo()
    {
        $aPrices = [];
        foreach ($this->_aList as $oPrice) {
            $sVat = ( string ) $oPrice->getVat();
            if (!isset($aPrices[$sVat])) {
                $aPrices[$sVat] = 0;
            }
            $aPrices[$sVat] += $oPrice->getBruttoPrice();
        }

        return $aPrices;
    }
720031
protected function getPriceTypeObject()
    {
        $arValuePartList = explode('|', $this->sValue);
        $sPriceTypeCode = array_pop($arValuePartList);

        $obPriceType = PriceTypeHelper::instance()->findByCode($sPriceTypeCode);

        return $obPriceType;
    }
529476
protected function getByPriceASC() : array
    {
        //Get product ID list (sort by offer price)
        //We can not use groupBy() in this place
        $arElementIDList = (array) DB::table('lovata_shopaholic_prices')
            ->select('lovata_shopaholic_offers.product_id')
            ->whereNull('lovata_shopaholic_prices.price_type_id')
            ->where('lovata_shopaholic_offers.active', true)
            ->where('lovata_shopaholic_prices.item_type', Offer::class)
            ->orderBy('lovata_shopaholic_prices.price', 'asc')
            ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id')
            ->lists('product_id');
        $arElementIDList = array_unique($arElementIDList);

        return $arElementIDList;
    }
1021105
public function getFUnitPrice()
    {
        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getUnitPrice()->getPrice());
    }
363282
public function packValue(): array
    {
        $result = [];
        foreach ($this->fields as $field => $value) {
            if ($value instanceof AccessorInterface) {
                $result[$field] = $value->packValue();
            } else {
                $result[$field] = $value;
            }
        }

        return $result;
    }
977913
public function getValuesWithModifiers()
    {
        $values = array_map(function ($value) {
            return [$value];
        }, array_flip($this->getValues()));

        $valuesWithModifiers = $values + $this->getModifiers(); // merge and keep keys (append)

        ksort($valuesWithModifiers);

        return $valuesWithModifiers;
    }
85899
public function getFormattedTotalVouchers()
    {
        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->oxorder__oxvoucherdiscount->value, $this->getOrderCurrency());
    }
244423
public function toArray()
	{
		$price = $this->_price;
		$locale = $this->_locale;

		return array(
			'order.base.id' => $this->getId(),
			'order.base.siteid' => $this->getSiteId(),
			'order.base.sitecode' => $this->getSiteCode(),
			'order.base.languageid' => $locale->getLanguageId(),
			'order.base.comment' => $this->getComment(),
			'order.base.customerid' => $this->getCustomerId(),
			'order.base.price' => $price->getValue(),
			'order.base.costs' => $price->getCosts(),
			'order.base.rebate' => $price->getRebate(),
			'order.base.currencyid' => $price->getCurrencyId(),
			'order.base.status' => $this->getStatus(),
			'order.base.mtime' => $this->getTimeModified(),
			'order.base.ctime' => $this->getTimeCreated(),
			'order.base.editor' => $this->getEditor(),
		);
	}
523391
public function getPriceFormatted()
    {
        return $this->priceFormatter->format($this->entity->getPrice(), null, $this->locale);
    }
716168
public function toArray()
    {
        return [
            'id' => $this->id,
            'modelType' => $this->model_type,
            'modelId' => $this->model_id,
            'name' => $this->name,
            'price' => $this->price,
            'image' => $this->image,
            'quantity' => $this->quantity,
        ];
    }
1093034
public function toArray()
    {
        return [
            'rowId'    => $this->rowId,
            'id'       => $this->id,
            'name'     => $this->name,
            'type'     => $this->type,
            'qty'      => $this->qty,
            'uri'      => $this->uri,

            'value'   => [
                'currency' =>  $this->price->getCurrency(),

                'price'    => $this->formatMoney($this->getPrice()),
                'subtotal' => $this->formatMoney($this->getSubtotal()),

                'taxes'    => [
                    'tax' => $this->formatMoney($this->getTax()),
                    'rate' => (string)$this->taxRate,
                    'total' => $this->formatMoney($this->getTaxTotal()),
                ],

                'total'    => $this->formatMoney($this->getTotal()),
            ],

            'options'  => $this->options,
        ];
    }
761729
public function getTaxRates()
    {
        $rates = [];
        /** @var \Magento\Tax\Model\Calculation\Rate $rate */
        foreach ($this->taxRates as $rate) {
            $zipCodeType      = self::ZIP_CODE_TYPE_ALL;
            $zipCodePattern   = '';
            $zipCodeRangeFrom = '';
            $zipCodeRangeTo   = '';

            if ($rate->getZipIsRange()) {
                $zipCodeType      = self::ZIP_CODE_TYPE_RANGE;
                $zipCodeRangeFrom = $rate->getZipFrom();
                $zipCodeRangeTo   = $rate->getZipTo();
            } elseif ($rate->getTaxPostcode() && $rate->getTaxPostcode() != '*') {
                $zipCodeType    = self::ZIP_CODE_TYPE_PATTERN;
                $zipCodePattern = $rate->getTaxPostcode();
            }

            $state    = '';
            $regionId = $rate->getTaxRegionId();

            if ($regionId) {
                /** @var \Magento\Directory\Model\Region $region */
                $region = $this->regionCollection->getItemById($regionId);
                $state  = $this->regionHelper->getIsoStateByMagentoRegion(
                    new DataObject(
                        [
                            'region_code' => $region->getCode(),
                            'country_id'  => $rate->getTaxCountryId()
                        ]
                    )
                );
            }

            $rates[] = [
                'id'                 => $rate->getId(),
                'key'                => $rate->getId(),
                'display_name'       => $rate->getCode(),
                'tax_percent'        => round($rate->getRate(), 4),
                'country'            => $rate->getTaxCountryId(),
                'state'              => $state,
                'zipcode_type'       => $zipCodeType,
                'zipcode_pattern'    => $zipCodePattern,
                'zipcode_range_from' => $zipCodeRangeFrom,
                'zipcode_range_to'   => $zipCodeRangeTo
            ];
        }

        return $rates;
    }
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,
        );
    }
880405
protected function getAvailableTotals()
    {
        $sign = $this->getSign();
        return array(
            Meta::InvoiceAmountInc => $sign * $this->source->getBaseGrandTotal(),
            Meta::InvoiceVatAmount => $sign * $this->source->getBaseTaxAmount(),
        );
    }
384181
public function getSortedPurses()
    {
        $purses = $this->purses;
        if (empty($purses)) {
            return $purses;
        }

        $getOrder = function ($currency) {
            $order = ['usd' => 0, 'eur' => 1];

            return $order[$currency] ?? 100;
        };

        usort($purses, function ($a, $b) use ($getOrder) {
            return $getOrder($a->currency) <=> $getOrder($b->currency);
        });

        return $purses;
    }
151397
public function getTaxList()
    {
        $taxes = ArrayList::create();

        foreach ($this->Items() as $item) {
            $existing = null;
            $rate = $item->Tax();

            if ($rate->exists()) {
                $existing = $taxes->find("ID", $rate->ID);
            }

            if (!$existing) {
                $currency = DBCurrency::create();
                $currency->setValue($item->getTaxTotal());
                $taxes->push(ArrayData::create([
                    "ID" => $rate->ID,
                    "Rate" => $rate,
                    "Total" => $currency
                ]));
            } elseif ($rate && $existing) {
                $existing->Total->setValue(
                    $existing->Total->getValue() + $item->getTaxTotal()
                );
            }
        }

        return $taxes;
    }
1187529
public function toArray()
    {
        $array = array();

        $array['orderNumber'] = $this->orderNumber;
        if (isset($this->referenceNumber)) {
            $array['referenceNumber'] = $this->referenceNumber;
        }
        if (isset($this->description)) {
            $array['description'] = $this->description;
        }
        $array['currency'] = $this->currency;
        if (isset($this->locale)) {
            $array['locale'] = $this->locale;
        }
        $array['orderDetails'] = array(
            'includeVat' => $this->vatMode,
            'products'   => array(),
        );
        if ($this->urlSet !== null) {
            $array['urlSet'] = $this->urlSet->toArray();
        }
        if ($this->contact !== null) {
            $array['orderDetails']['contact'] = $this->contact->toArray();
        }
        foreach ($this->products as $product) {
            $array['orderDetails']['products'][] = $product->toArray();
        }

        return $array;
    }