Merge pull request #6502 from der-On/patch-1

Uses rounding precision of 4 to store cart item prices
This commit is contained in:
Glenn Hermans 2022-07-01 23:32:41 +02:00 committed by GitHub
commit 41726ce34c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -513,7 +513,7 @@ abstract class AbstractType
*/
public function getFinalPrice($qty = null)
{
return round($this->getMinimalPrice($qty), 2);
return round($this->getMinimalPrice($qty), 4);
}
/**
@ -887,7 +887,7 @@ abstract class AbstractType
return $result;
}
$price = round($item->product->getTypeInstance()->getFinalPrice($item->quantity), 2);
$price = round($item->product->getTypeInstance()->getFinalPrice($item->quantity), 4);
if ($price == $item->base_price) {
return $result;