{{$select['select']['year']}}年单品销售排名(占比)
@if(Auth::user()->role->code != 'c001') @include('report/select')   @endif  年份
{{:$months = range(1,12)}} @foreach($single['year'] as $year => $total) {{:arsort($total['money'])}} @if(count($months)) @foreach($months as $month) @endforeach @endif @foreach($total['money'] as $key => $product) {{:$total = array_sum((array)$product)}} @foreach($months as $month) @endforeach @endforeach
产品名称 {{$month}}月 合计
{{$single['name'][$key]}} - {{$single['spec'][$key]}}
{{(int)$single['money'][$year][$key][$month]}}
{{(int)$single['amount'][$year][$key][$month]}}
@if($single['money'][$year][$key][$month] > 0) {{number_format(($single['money'][$year][$key][$month]/$total)*100,2)}}% @endif
{{$total}}
{{(int)array_sum($single['amount'][$year][$key])}}
@if($total > 0) {{number_format(($total/$single['money2'][$year])*100,2)}}% @endif
@endforeach