Skip to content

Commit

Permalink
Make sure number is positive
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Jan 6, 2025
1 parent ad5b85a commit 7b49b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Util/OrderTotals.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class OrderTotals
{
public function getValueTotal(OrderInterface $order): float
{
return (float)$order->getSubtotal() - (float)$order->getDiscountAmount();
return (float)$order->getSubtotal() - abs((float)$order->getDiscountAmount());
}

public function getShippingTotal(OrderInterface $order): float
Expand Down

0 comments on commit 7b49b26

Please sign in to comment.