@can('show target train') @livewire('target-train-component' , ['component_name' => 'target-show', 'target' => $target , 'target_id' => $target->id]) @endcan

@php $monthNum = $target->month; $dateObj = DateTime::createFromFormat('!m', $monthNum); $monthName = $dateObj->format('F'); @endphp {{__('messages.Target')}} {{__('messages.month')}} {{$monthName}}

{{__('messages.Full details of monthly targets.')}}

{{__('messages.month')}}
{{$target->month}}
{{__('messages.year')}}
{{ $target->year}}
{{__('messages.assigned_to')}}
{{ $target->assigned_to_user->name}}
{{__('messages.Created by')}}
{{ ($target->created_by_user)?$target->created_by_user->name :""}}
{{__('messages.comment')}}
{{ $target->comment}}
{{__('messages.total_planned_amount')}}
{{$target->total_planned_amount}} {{($target->currency_id) ? $target->currency->name :""}}
{{__('messages.collection')}}
{{$target->total_collection}} {{($target->currency_id) ? $target->currency->name :""}}
{{__('messages.Updated By')}}
{{($target->last_updated_by_user)?$target->last_updated_by_user->name:"-"}}
{{__('messages.Updated At')}}
{{ $target->updated_at}}
{{__('messages.Created At')}}
{{ $target->created_at}}
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('message-danger'))
{{ session('message-danger') }}
@endif

{{__('messages.monthly target points')}}

@can("show monthly_target_points") # {{__('messages.Category')}} {{__('messages.planned_amount')}} {{__('messages.pending_delivery')}} {{__('messages.delivery')}} {{__('messages.collection')}} {{__('messages.remaining_payments')}} {{__('messages.comment')}} {{__('messages.Updated By')}} @forelse ($monthly_target_points as $point) #{{$loop->iteration}} {{__('messages.Category')}}{{$point->category->name}} {{__('messages.planned_amount')}}{{$point->planned_amount}} {{__('messages.pending_delivery')}}{{$point->pending_delivery}} {{__('messages.delivery')}}{{$point->delivery}} {{__('messages.collection')}}{{$point->collection}} {{__('messages.remaining_payments')}} {{$point->remaining_payments}} {{__('messages.comment')}}{{($point->comment)?$point->comment:"-"}} {{__('messages.Updated By')}}{{($point->last_updated_by_user)?$point->last_updated_by_user->name:"-"}}
@can("edit monthly_target_points") {{__('messages.monthly target points')}} {{$point->id}}
edit_comment 2
@endcan @can("delete monthly_target_points") {{$point->id}} {{__('messages.monthly target points')}} - {{__('messages.Category')}} {{$point->category->name}} @endcan
@empty {{__('messages.Empty Result')}} @endforelse
{{$monthly_target_points->links()}}

{{__('messages.total')}} {{__('messages.planned_amount')}} = {{$monthly_target_points->sum('planned_amount')}}

{{__('messages.total')}} {{__('messages.pending_delivery')}} = {{$monthly_target_points->sum('pending_delivery')}}

{{__('messages.total')}} {{__('messages.delivery')}} = {{$monthly_target_points->sum('delivery')}}

{{__('messages.total')}} {{__('messages.collection')}} = {{$monthly_target_points->sum('collection')}}

{{__('messages.total')}} {{__('messages.remaining_payments')}} = {{$monthly_target_points->sum('remaining_payments')}}

@endcan @can("add monthly_target_points")

category_id @forelse(\App\Models\Category::where("active" ,1)->whereNotIn("id" , $target->monthly_target_points->pluck("category_id"))->where('category_id',null)->get() as $category) @empty @endforelse
comment 2
@endcan