@extends('layouts.admin') @section('header-content') @endsection @section('content')
@if($so_target->customer_add) @endif @if($so_target->customer_visit) @endif @if($so_target->productwise) @endif
Target Detail @if( Auth::user()->can('modify_targets')) @endif
Sales Officer @if(isset($so_target->user->firstname)) {{$so_target->user->firstname.' '.$so_target->user->lastname}} @endif Date {{$so_target->date}}
Target Type @if($so_target->productwise) Productwise, @endif @if($so_target->customer_add) Customer Add, @endif @if($so_target->customer_visit) Customer Visit, @endif Customer Add Target {{$so_target->customer_add_target}}
Customer Visit Target {{$so_target->customer_visit_target}}
Product Target
@foreach($so_target->target_details as $key2=>$detail) @endforeach
# Product Target Achieved Target
{{$key2+1}} @if(isset($detail->product->name)){{$detail->product->name}} @endif @if(isset($detail->target)){{$detail->target/12 }} Dozen @endif @php $ach=$so_target->Achievedtarget($detail->product_id,$so_target->date,$so_target->so_id); $rem=0; if(!empty($ach)){ $rem=($ach)%12; echo round(($ach)/12).' Dozen ' ; } @endphp @if(!empty($rem) && $rem!=0) {{(' + '.$rem . ' piece ')}} @endif
@endsection