@foreach($periods as $i => $each)
@php $organization = $each->organization @endphp
@php $level = $organization ? $organization->organizationLevel : null @endphp
@php $user = $organization ? $organization->user : null @endphp
@php $position = $organization ? $organization->position : null @endphp
@php $picture = $user && $user->thumb ? $user->thumb : 'profile.png' @endphp
{{ $i + 1 }}
{{ $user ? $user->first_name." ".$user->last_name : null }}
{{ $level ? "-".$level->level."- ".$position->name : null }}
Yearly
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".$each->currency->code }}
{!! Form::open(['method' => 'DELETE', 'class' => 'form-horizontal', 'url' => url("/revenue-target-period/{$each->id}"), 'id' => 'formDeletePeriod']) !!}
id}/edit") }}" class="btn btn-warning">@lang("content.edit")
{!! Form::submit('Delete', [ 'name' => 'delete', 'class' => 'btn btn-danger']) !!}
{!! Form::close() !!}
@endforeach
@php $j = 1 @endphp
@foreach($revenue_targets as $i => $each)
@php $picture = $each->thumb ? $each->thumb : 'profile.png'; @endphp
@php $type_id = $each->type ? $each->type->id : null @endphp
@php $type = $each->type ? $each->type->type : null @endphp
@php $organization = $each->organization @endphp
@php $level = $organization ? $organization->organizationLevel : null; @endphp
@php $position = $organization && $organization->position ? $organization->position->name : "" @endphp
@php $user = $organization ? $organization->user : null @endphp
@php $currency = $each->period ? $each->period->currency : null @endphp
@if(in_array($type, ['Monthly']))
{{ getMonthName($each->period_from) }}
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".($currency ? $currency->code : "") }}
@elseif(in_array($type, ['Quarterly']))
QTR {{ $each->quarter }}
{{ baseDateFormat($each->period_from) }}
{{ baseDateFormat($each->period_to) }}
{{ number_format($each->target)." ".($currency ? $currency->code : "") }}
{{--{!! Form::open(['method' => 'DELETE', 'class' => 'form-horizontal', 'url' => url("/revenue-target/{$each->id}")]) !!}
id}/edit") }}" class="btn btn-warning">Edit
{!! Form::submit('Delete', [ 'name' => 'delete', 'class' => 'btn btn-danger']) !!}
{!! Form::close() !!}--}}
@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 ? $currency->code : "") }}
@endif
@endforeach