Avg. Cost Price
${{ number_format($products->avg('cost_price') ?? 0, 2) }}
Avg. Sale Price
${{ number_format($products->avg('sale_price') ?? 0, 2) }}
Avg. Profit Margin
{{ number_format($products->avg(function($product) { return $product->sale_price > 0 ? (($product->sale_price - $product->cost_price) / $product->sale_price) * 100 : 0; }) ?? 0, 1) }}%
On Discount
{{ $products->where(function($product) { return $product->discount_price > 0 || $product->discount_percent > 0; })->count() }}
Bulk Price Update
Product Pricing
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
|
|
Product | Stock | Cost Price | Sale Price | Discount Price | Profit Margin | Wholesale Price | Actions |
|---|---|---|---|---|---|---|---|---|
|
|
@if($product->image)
{{ $product->name }}
{{ $product->sku }}
@if($product->category)
{{ $product->category->name }}
@endif
@if($product->brand)
{{ $product->brand->name }}
@endif
|
{{ $product->stock }}
@if($product->stock <= 0)
Out of Stock
@elseif($product->stock <= $product->minimum_stock)
Low Stock
@else
In Stock
@endif
|
$
|
$
|
@if($product->discount_price || $product->discount_percent)
@if($product->discount_price)
${{ number_format($product->discount_price, 2) }}
{{ number_format((($product->sale_price - $product->discount_price) / $product->sale_price) * 100, 1) }}% off
@else
{{ $product->discount_percent }}% off
${{ number_format($product->sale_price * (1 - ($product->discount_percent / 100)), 2) }}
@endif
@else
No discount
@endif
|
@php
$profitMargin = $product->sale_price > 0 ?
(($product->sale_price - $product->cost_price) / $product->sale_price) * 100 : 0;
@endphp
{{ number_format($profitMargin, 1) }}%
@if($profitMargin > 40)
High
@elseif($profitMargin >= 20)
Medium
@elseif($profitMargin > 0)
Low
@else
Negative
@endif
${{ number_format($product->sale_price - $product->cost_price, 2) }}
|
@if($product->wholesale_price)
$
|
|
No products found@if(request()->hasAny(['search', 'category_id', 'brand_id', 'margin_range'])) Try changing your filters @else No products available for pricing management @endif View Products |
||||||||
Showing {{ $products->firstItem() }} to {{ $products->lastItem() }} of {{ $products->total() }} entries