public function getTaxes()
    {
        $taxesList = [];
        /** @var Item $item */
        foreach ($this->getItems() as $item) {
            /** @var Tax $tax */
            foreach ($item->getTaxes() as $tax) {
                $taxKey = md5($tax->getName() . $tax->getType() . $tax->getRate());
                if (!isset($taxesList[$taxKey])) {
                    $newTax = new Tax([
                        'type' => $tax->getType(),
                        'name' => $tax->getName(),
                        'rate' => $tax->getRate(),
                        'rate_type' => $tax->getRateType(),
                    ]);
                    $newTax->setBaseAmount(0);
                    $newTax->setFixedAmount(0);
                    $taxesList[$taxKey] = $newTax;
                }
                $baseAmount = $item->getAmount() - $item->getDiscount();
                $taxesList[$taxKey]->addBaseAmount($baseAmount);
                $taxesList[$taxKey]->addFixedAmount(round($baseAmount * $taxesList[$taxKey]->getRate() / 100, 2));
            }
        }

        $taxes = new Bag();
        foreach ($taxesList as $tax) {
            $taxes->add($tax);
        }

        return $taxes;
    }