{{--

Resumo geral de despesas

--}}
Período
{{ $startDate }} a {{ $endDate }}
Faturação
+{{ money(@$totals['sales']['subtotal'], Setting::get('app_currency')) }}
Despesas
-{{ money(@$totals['purchases']['subtotal'], Setting::get('app_currency')) }}
Balanço
{{ @$totals['balance'] >= 0.00 ? '+' : '' }}{{ money(@$totals['balance'], Setting::get('app_currency')) }}
@if(@$data['types'])

Resumo de despesas por tipo

@foreach($data['types'] as $key => $row) @endforeach
Despesa Subtotal IVA Total
{{ @$row['name'] }} {{ money(@$row['subtotal']) }} {{ money(@$row['vat']) }} {{ money(@$row['total']) }}
Total {{ money($geralSubtotal) }} {{ money($geralVat) }} {{ money($geralTotal) }}
@endif @if(@$data['fleet'])

Detalhe por Viatura

@if($details) @foreach(@$data['fleet'] as $vehicleId => $vehicleDetails) @if(!empty(@$vehicleDetails['costs']) || !empty(@$vehicleDetails['gains'])) {!! $rowsHtml !!} @endif @endforeach
Viatura Serviços Despesas Balanço
{{ $vehicleId }} | {{ @$vehicleName }} +{{ money($vehicleGain) }} -{{ money($vehicleCosts) }} {{ $vehicleBalance > 0.00 ? '+' : '' }}{{ money($vehicleBalance) }}
Total +{{ money($vehiclesTotalGain) }} -{{ money($vehiclesTotalCost) }} {{ money($vehiclesTotalGain - $vehiclesTotalCost) }}
@else @foreach(@$data['fleet'] as $row) @if($row['gains'] > 0.00 || $row['costs'] > 0.00) @endif @endforeach
Viatura Serviços Despesas Balanço
{{ $row['name'] }} {{ money(@$row['gains']) }} {{ money(@$row['costs']) }} {{ money(@$row['gains'] - @$row['costs']) }}
Total {{ money($rowTotalGains) }} {{ money($rowTotalCosts) }} {{ money($rowTotalGains - $rowTotalCosts) }}
@endif @endif @if(@$data['users'])

Detalhe por Colaborador

@if($details) @foreach(@$data['users'] as $userId => $userDetails) @if(!empty(@$userDetails['costs']) || !empty(@$userDetails['gains'])) {!! $rowsHtml !!} @endif @endforeach
Operador Serviços Despesas Balanço
{{ @$userName }} +{{ money($userGain) }} -{{ money($userCosts) }} {{ $userBalance > 0.00 ? '+' : '' }}{{ money($userBalance) }}
Total +{{ money($usersTotalGain) }} -{{ money($usersTotalCost) }} {{ money($usersTotalGain - $usersTotalCost) }}
@else @foreach(@$data['users'] as $row) @if($row['gains'] > 0.00 || $row['costs'] > 0.00) @endif @endforeach
Operador Serviços Despesas Balanço
{{ $row['name'] }} {{ money(@$row['gains']) }} {{ money(@$row['costs']) }} {{ money(@$row['gains'] - @$row['costs']) }}
Total {{ money($rowTotalGains) }} {{ money($rowTotalCosts) }} {{ money($rowTotalGains - $rowTotalCosts) }}
@endif @endif