@foreach($periods as $i => $each)
@php $organization = $each->organization; @endphp
@php $level = $organization->organizationLevel; @endphp
@php $user = $organization->user; @endphp
@php $position = $organization->position; @endphp
@php $picture = !is_null($user->thumb) ? $user->thumb : 'profile.png'; @endphp
{{ $i + 1 }}

picture}") }}">
{{ $user->first_name." ".$user->last_name }}
{{ "-".$level->level."- ".$position->name }}
Yearly
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".$each->currency->code }}
@endforeach
@php $j = 1 @endphp
@foreach($revenue_targets as $i => $each)
@php $picture = !is_null($each->thumb) ? $each->thumb : 'profile.png'; @endphp
@php $type_id = $each->type->id @endphp
@php $type = $each->type->type @endphp
@php $organization = $each->organization @endphp
@php $level = $organization->organizationLevel; @endphp
@php $position = $organization->position ? $organization->position->name : "" @endphp
@php $user = $organization->user @endphp
@php $currency = $each->period->currency @endphp
@if(in_array($type, ['Monthly']))
{{ getMonthName($each->period_from) }}
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".$currency->code }}
@elseif(in_array($type, ['Quarterly']))
QTR {{ $each->quarter }}
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".$currency->code }}
@else
period_id }}>
{{ $j ++ }}

picture}") }}">
{{ $user->first_name." ".$user->last_name }}
{{ "-".$level->level."- ".$position }}
{{ $type }}
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".$currency->code }}
{!! Form::open(['method' => 'PUT', 'class' => 'form-horizontal', 'url' => url("/revenue-target/{$each->id}/restore")]) !!}
{!! Form::submit('Restore', ['class' => 'btn btn-warning']) !!}
{!! Form::close() !!}
@endif
@endforeach