mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
@@ -412,7 +412,7 @@ class CartItem implements Arrayable, Jsonable
|
||||
case 'priceTotal':
|
||||
return round($this->priceNet * $this->qty, $decimals);
|
||||
case 'subtotal':
|
||||
return round($this->priceTotal - $this->discountTotal, $decimals);
|
||||
return max(round($this->priceTotal - $this->discountTotal, $decimals), 0);
|
||||
case 'priceTarget':
|
||||
return round(($this->priceTotal - $this->discountTotal) / $this->qty, $decimals);
|
||||
case 'taxTotal':
|
||||
@@ -435,7 +435,7 @@ class CartItem implements Arrayable, Jsonable
|
||||
case 'priceTotal':
|
||||
return round($this->price * $this->qty, $decimals);
|
||||
case 'subtotal':
|
||||
return round($this->priceTotal - $this->discountTotal, $decimals);
|
||||
return max(round($this->priceTotal - $this->discountTotal, $decimals), 0);
|
||||
case 'priceTarget':
|
||||
return round(($this->priceTotal - $this->discountTotal) / $this->qty, $decimals);
|
||||
case 'taxTotal':
|
||||
|
||||
Reference in New Issue
Block a user