@extends('pdf.reports.layouts.pdf') @section('style') @endsection @section('content') @foreach($months as $month) @endforeach @foreach($sales as $name => $user) @if($name == 'totals') @continue @endif @php $row = $user['sales']; @endphp @foreach($months as $k => $month) @endforeach @php $row = $user['salesAmount']; @endphp @foreach($months as $k => $month) @endforeach @endforeach @php $k = 1; @endphp @foreach($sales['totals'] as $key => $row) @if ($k ==1) @else @endif @if ($key == 'salesAmount') @foreach($months as $k => $month) @endforeach @else @foreach($months as $k => $month) @endforeach @endif @endforeach
Salesperson {{$year}}{{$month}}Total
{{$name}} # Sales{{(isset($row[$k]))?$row[$k]:0}}{{array_sum($row)}}
$ Sales{{(isset($row[$k]))?\AppHelper::formatPricePdf($row[$k]):0}}${{\AppHelper::formatPricePdf(array_sum($row))}}
Office totals{{$labels[$key]}}{{(isset($row[$k]))?\AppHelper::formatPricePdf($row[$k]):0}}${{\AppHelper::formatPricePdf(array_sum($row))}}{{(isset($row[$k]))?$row[$k]:0}}{{array_sum($row)}}
@endsection