mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Update CartItemModel.php
This commit is contained in:
@@ -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));
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user