@if(count($warehouseProducts) > 0) @php $gtotalqty = 0 ; $i = 1; @endphp @foreach($warehouseProducts as $key => $row) @php $article = \App\Article::with('category')->with('maincategory')->select('image')->where('code',$row['article'])->first(); @endphp @php if($row['mrp'] >= 1000) { $tax = 12; }else { $tax = 5; } @endphp @php if($row['qty'] > 1) { $row['qty'] = 1; } $gtotalqty = $gtotalqty + $row['qty']; @endphp @php $i++; @endphp @endforeach @endif
# Section Subsection Article Color Size Barcode HSN MRP Tax Qty
{{$i }} {{ !empty($article->maincategory) ? $article->maincategory->name : $row['section'] }} {{ !empty($article->category) ? $article->category->name : $row['subsection'] }} {{ $row['article'] }} {{ $row['color'] }} {{ $row['size'] }} {{ $row['barcode'] }} {{ $row['hsn'] }} {{ $row['mrp'] }}{{ $tax }}{{ $row['qty'] }}
{{$gtotalqty}}