fix discount rounding

This commit is contained in:
Pavel 2020-04-14 11:49:30 +03:00
parent 6f55973ac7
commit fac7d3706b

View File

@ -887,7 +887,7 @@ class RetailcrmHistory
) { ) {
$orderTotalProducts = $infoOrder['summ']; $orderTotalProducts = $infoOrder['summ'];
$deliveryCost = $infoOrder['delivery']['cost']; $deliveryCost = $infoOrder['delivery']['cost'];
$totalDiscount = $deliveryCost + $orderTotalProducts - $totalPaid; $totalDiscount = round($deliveryCost + $orderTotalProducts - $totalPaid, 2);
$orderCartRules = $orderToUpdate->getCartRules(); $orderCartRules = $orderToUpdate->getCartRules();
foreach ($orderCartRules as $valCartRules) { foreach ($orderCartRules as $valCartRules) {