From 312a010406f4bfc45f60ca421678aefbdc6b161a Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 9 Feb 2022 00:20:25 +0100 Subject: [PATCH] Update CartItemModel.php --- src/Models/CartItemModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/CartItemModel.php b/src/Models/CartItemModel.php index ab7e15d..209bce8 100644 --- a/src/Models/CartItemModel.php +++ b/src/Models/CartItemModel.php @@ -90,9 +90,9 @@ class CartItemModel extends Model return new Attribute( get: function ($value, $attributes): Money { if (! $attributes['discount_fixed']) { - return $attribute['price_all']->subtract($attributes['discount_fixed']) + return $attribute['price_all']->subtract($attributes['discount_fixed']); } else { - return $attribute['price_all']->multiply(sprintf('%.14F', $attributes['discount_rate']), Config::get('cart.rounding', Money::ROUND_UP)), + return $attribute['price_all']->multiply(sprintf('%.14F', $attributes['discount_rate']), Config::get('cart.rounding', Money::ROUND_UP)); } }, );