@extends('layouts.admin') @section('content')
Target Details
{!! csrf_field() !!}
@if ($errors->has('date_start')) {{ $errors->first('date_start') }} @endif
@if ($errors->has('date_end')) {{ $errors->first('date_end') }} @endif
@if ($errors->has('rsm')) {{ $errors->first('rsm') }} @endif
@if ($errors->has('sales_target')) {{ $errors->first('sales_target') }} @endif
@if ($errors->has('recovery_target')) {{ $errors->first('recovery_target') }} @endif

@if(isset($target->target_details))
@php // count b/w dates $st=substr($target->date_start, strpos($target->date_start, "-") + 1); $ed=substr($target->date_end, strpos($target->date_end, "-") + 1); $count=1; if(abs($st - $ed)>0){ $count=abs($st - $ed)+1; } @endphp @foreach($target->target_details as $key2=>$detail) @if($detail['date']==$target->date_start) @endif @endforeach
# Role Name Sales Target Recovery Target
{{$key2+1}} @if(isset($detail->user->role_user)){{$detail->user->role_user}} @endif @if(isset($detail->user->firstname)){{$detail->user->firstname.' '.$detail->user->lastname}} @endif
@endif

@if(!empty($target)) {!! method_field('PUT') !!} @endif {{ csrf_field() }}
@endsection @section('footer-content') {{--Append Product--}} @endsection