@php $total_sold_qty = 0; $total_buying_amount = 0; $total_sales_amount = 0; @endphp @foreach($product as $value) @php $total_sold_qty += $value->total_sold_qty; $total_buying_amount += $value->total_buying_amount; $total_sales_amount += $value->total_sales_amount; @endphp @endforeach
P-Code Product Category Sub Category Sub Sub Category Brand Total Sale Qty Total Buying Amount Total Sales Amount Profit
{{ $value->product->id }} {{ $value->product->product_name }} {{ $value->category->category_name }} {{ $value->sub_category->sub_category_name }} {{ $value->sub_sub_category->sub_sub_category_name }} {{ $value->brand->brand_name }} {{ $value->total_sold_qty }} {{ $value->total_buying_amount }} {{ $value->total_sales_amount }} {{ $value->total_sales_amount - $value->total_buying_amount }}
Total = {{ $total_sold_qty }} {{ $total_buying_amount }} {{ getCurrentCurrency()->code }} {{ $total_sales_amount }} {{ getCurrentCurrency()->code }} {{ $total_sales_amount - $total_buying_amount }} {{ getCurrentCurrency()->code }}