@if (collect($result)->count()>0)
@foreach (collect($result) as $item)
|
Brand: {{$item->brand_name}} |
Category:
{{$item->main_category_name}} |
@if (collect($item->data['sellable'])->count()>0)
@foreach ($item->data['sellable'] as $stock)
| {{$stock->item_sku}} |
{{$stock->item_name}} |
{{-- {{$stock->sub_category_name}} | --}}
@if(collect($stock->prefs)->count()>0)
@php $t = 0; @endphp
@foreach ($stock->prefs as $pref)
@php $t++ @endphp
{{ ( ($pref['total_after_damage'] > 0) && $stock->resultType == 'minus') ? '-' : '' }}{{$pref['total_after_damage']}} |
@endforeach
@if((3-$t>0))
@for($i=1; $i<=(3-$t); $i++)
0 |
@endfor
@endif
@else
|
@endif
@if(collect($stock->prefs)->count()>0)
@php $t = 0; @endphp
@foreach ($stock->prefs as $pref)
@php $t++ @endphp
{{$pref['total_damage']}} |
@endforeach
@if((3-$t>0))
@for($i=1; $i<=(3-$t); $i++)
0 |
@endfor
@endif
@else
|
@endif
@endforeach
@endif
| Total: |
@if (collect($item->data['sellable_total'])->count()>0)
@foreach ($item->data['sellable_total'] as $unit)
{{$unit->total_inventory}} |
@endforeach
@endif
@if (collect($item->data['damaged_total'])->count()>0)
@foreach ($item->data['damaged_total'] as $unit)
{{$unit->total_inventory}} |
@endforeach
@endif
@endforeach
@endif