From dee8b280735ea8f9e1c41169b3b112eabb075fce Mon Sep 17 00:00:00 2001 From: merdan Date: Sat, 23 Apr 2022 16:58:22 +0500 Subject: [PATCH] discounted configurables --- packages/Sarga/API/Http/Resources/Customer/OrderResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Sarga/API/Http/Resources/Customer/OrderResource.php b/packages/Sarga/API/Http/Resources/Customer/OrderResource.php index 4ff8136a4..8467c1b1b 100644 --- a/packages/Sarga/API/Http/Resources/Customer/OrderResource.php +++ b/packages/Sarga/API/Http/Resources/Customer/OrderResource.php @@ -59,7 +59,7 @@ class OrderResource extends JsonResource // 'formatted_sub_total_refunded' => core()->formatPrice($this->sub_total_refunded, $this->order_currency_code), 'discount_percent' => (double) $this->discount_percent, 'discount_amount' => (double) $this->discount_amount, - 'formatted_discount_amount' => core()->formatPrice($this->discount_amount, $this->order_currency_code), + 'formatted_discount_amount' => core()->formatPrice(abs((double)$this->discount_amount), $this->order_currency_code), 'discount_invoiced' => (double)$this->discount_invoiced, 'formatted_discount_invoiced' => core()->formatPrice($this->discount_invoiced, $this->order_currency_code),