$cart->
setPrice($price);
} private function applyCartPriceTaxes(CartPrice
$price, CalculatedTaxCollection
$taxes, SalesChannelContext
$context): CartPrice
{ $netPrice =
$price->
getNetPrice();
$grossPrice =
$price->
getTotalPrice();
$taxSum =
$taxes->
getAmount();
if ($context->
getTaxState() === CartPrice::TAX_STATE_NET
) { $grossPrice =
$this->rounding->
cashRound( $netPrice +
$taxSum,
$context->
getTotalRounding() );
} if ($context->
getTaxState() === CartPrice::TAX_STATE_GROSS
) { $netPrice =
$this->rounding->
cashRound( $grossPrice -
$taxSum,
$context->
getTotalRounding() );
}