Skip to content

Commit c6bd88c

Browse files
committed
MAGE-1205: fix analytics revenue calculation for placed order event
1 parent aef8860 commit c6bd88c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Service/Insights/EventProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ protected function getQuoteItemDiscount(Item $item): float
268268
*/
269269
protected function getOrderItemSalePrice(OrderItem $item): float
270270
{
271-
return floatval($item->getPrice()) - $this->getOrderItemCartDiscount($item);
271+
return floatval($item->getPriceInclTax()) - $this->getOrderItemCartDiscount($item);
272272
}
273273

274274
/**
@@ -286,7 +286,7 @@ protected function getOrderItemCartDiscount(OrderItem $item): float
286286
*/
287287
protected function getOrderItemDiscount(OrderItem $item): float
288288
{
289-
$itemDiscount = floatval($item->getOriginalPrice()) - floatval($item->getPrice());
289+
$itemDiscount = floatval($item->getOriginalPrice()) - floatval($item->getPriceInclTax());
290290
return $itemDiscount + $this->getOrderItemCartDiscount($item);
291291
}
292292

0 commit comments

Comments
 (0)