protected function updateAmountsTotal(SaleInterface $sale)
    {
        $changed = false;

        $currency = $sale->getCurrency()->getCode();

        $sale->clearResults();

        $result = $this->amountCalculator->calculateSale($sale);

        if (0 != Money::compare($result->getBase(), $sale->getNetTotal(), $currency)) {
            $sale->setNetTotal($result->getBase());
            $changed = true;
        }

        if (0 != Money::compare($result->getTotal(), $sale->getGrandTotal(), $currency)) {
            $sale->setGrandTotal($result->getTotal());
            $changed = true;
        }

        return $changed;
    }