@if(count($reportData) > 0)

Stock Report on {{ date('Y-m-d') }}

@foreach($reportData as $key => $details) @php $totalQuantity=0; $totalProductCost=0; $totalProductQtyCost=0; $totalRetailPrice=0; $totalSaleValue=0; $serial = 0; @endphp @foreach($details as $value) @if($value->quantity == 0) @continue @endif @php $serial++; $totalQuantity=$totalQuantity+$value->quantity; $totalProductCost=$totalProductCost+$value->product_cost; $totalProductQtyCost=$totalProductQtyCost+($value->product_cost*$value->quantity); $totalRetailPrice=$totalRetailPrice+$value->retail_price; $totalSaleValue=$totalSaleValue+($value->retail_price*$value->quantity); @endphp @endforeach @if($totalQuantity > 0) @endif @endforeach
S/L Product Name Variant Product Code Quantity Per Quantity Cost Total Cost Per Quantity Retail Price Total Sale Value
Warehouse: {{ $key }}
{{ $serial }} {{ $value->product_name }} @if(!empty($value->variant_name)) {{ $value->variant_name }} @else - @endif {{ $value->code }} {{ $value->quantity }} {{ number_format($value->product_cost, 2) }} {{ number_format($value->quantity*$value->product_cost, 2) }} {{ number_format($value->retail_price, 2) }} {{ number_format($value->quantity*$value->retail_price, 2) }}
Grand Total: {{ $totalQuantity }} {{ number_format($totalProductCost, 2) }} {{ number_format($totalProductQtyCost, 2) }} {{ number_format($totalRetailPrice, 2) }} {{ number_format($totalSaleValue, 2) }}
@endif