From 7b49b263458da973b045b488817f572a6a296f31 Mon Sep 17 00:00:00 2001 From: Jisse Reitsma Date: Mon, 6 Jan 2025 15:04:24 +0100 Subject: [PATCH] Make sure number is positive --- Util/OrderTotals.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/OrderTotals.php b/Util/OrderTotals.php index effe1aa..9c60da0 100644 --- a/Util/OrderTotals.php +++ b/Util/OrderTotals.php @@ -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