Skip to content

Commit 7b49b26

Browse files
committed
Make sure number is positive
1 parent ad5b85a commit 7b49b26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Util/OrderTotals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class OrderTotals
99
{
1010
public function getValueTotal(OrderInterface $order): float
1111
{
12-
return (float)$order->getSubtotal() - (float)$order->getDiscountAmount();
12+
return (float)$order->getSubtotal() - abs((float)$order->getDiscountAmount());
1313
}
1414

1515
public function getShippingTotal(OrderInterface $order): float

0 commit comments

Comments
 (0)