@extends('backEnd.layouts.master') @section('title', 'Product Wise Report') @push('styles') @include('backEnd.reports.partials.report-styles') @endpush @section('content') @php $exportParams = request()->only(['from_date','to_date','search','sales_basis','category_id','approved_by','payment_method','courier_type','district','order_source','sort']); $todayStr = now()->format('Y-m-d'); $yesterdayStr = now()->copy()->subDay()->format('Y-m-d'); $last7From = now()->copy()->subDays(6)->format('Y-m-d'); $thisMonthFrom = now()->startOfMonth()->format('Y-m-d'); $lastMonthFrom = now()->copy()->subMonth()->startOfMonth()->format('Y-m-d'); $lastMonthTo = now()->copy()->subMonth()->endOfMonth()->format('Y-m-d'); $last90From = now()->copy()->subDays(89)->format('Y-m-d'); $activePreset = ''; if ($from === $to && $from === $todayStr) $activePreset = 'today'; elseif ($from === $to && $from === $yesterdayStr) $activePreset = 'yesterday'; elseif ($from === $last7From && $to === $todayStr) $activePreset = 'last7'; elseif ($from === $thisMonthFrom && $to === $todayStr) $activePreset = 'this_month'; elseif ($from === $lastMonthFrom && $to === $lastMonthTo) $activePreset = 'last_month'; elseif ($from === $last90From && $to === $todayStr) $activePreset = 'last90'; @endphp

Product Wise Report

Product অনুযায়ী sold qty, revenue, cost ও profit · Cost = Product Edit → Price & Stock → Purchase Cost
Quick Date:
to
Products
{{ number_format($summary['product_count']) }}
Sold Qty
{{ number_format($summary['sold_qty']) }}
Orders
{{ number_format($summary['order_count']) }}
Revenue
৳{{ number_format($summary['revenue']) }}
Cost
৳{{ number_format($summary['cost_price']) }}
Profit
৳{{ number_format($summary['profit']) }}
@forelse($rows as $i => $row) @empty @endforelse
# Product Category Sold Qty Orders Revenue Cost Profit Margin Avg Price Stock
{{ $i + 1 }}
@if($row['thumbnail']) @endif
{{ Str::limit($row['product_name'], 50) }}
@if($row['sku']) {{ $row['sku'] }} @endif
{{ $row['category_name'] ?? '—' }} {{ number_format($row['sold_qty']) }} {{ number_format($row['order_count']) }} ৳{{ number_format($row['revenue']) }} ৳{{ number_format($row['cost_price']) }} ৳{{ number_format($row['profit']) }} {{ number_format($row['margin_pct'], 1) }}% ৳{{ number_format($row['avg_unit_price']) }} {{ $row['current_stock'] }}
Selected date range-এ কোনো product sale পাওয়া যায়নি।
@endsection @push('scripts') @endpush