@extends('layouts.master') @section('styles') @endsection @section('content')

Report Management

Export Excel

Monthly Target Achievement Report

@if(count($data['unique_employees'])>0) @foreach($data['unique_employees'] as $unique_employee) @endforeach @endif @if(count($data['unique_employees'])>0) @foreach($data['unique_employees'] as $unique_employee) @endforeach @endif @if (collect($data['data'])->count()>0) @foreach (collect($data['data'])->unique('item_sku') as $item) @php $total_target = 0; $total_target_value = 0; $total_sales = 0; $total_gross_value = 0; $total_revenue = 0; @endphp @if(isset($item)) @foreach($data['unique_employees'] as $unique_employee) @php $count=0; @endphp @foreach(collect($data['data'])->where('item_sku', $item->item_sku) as $itemDetails) @if($itemDetails->employee_name==$unique_employee) @php $total_target += $itemDetails->target; $total_target_value += $itemDetails->target_value; $total_sales += $itemDetails->sales; $total_revenue += $itemDetails->revenue; $total_gross_value += $itemDetails->sales*$itemDetails->item_trade_price; @endphp @php $count++; @endphp @endif @endforeach @if($count==0) @endif @endforeach @else @foreach($data['unique_employees'] as $unique_employee) @endforeach @endif @endforeach @endif
Product SKU Product Name Unit T.P{{$unique_employee}}Overall Team Performance
Target Target Value Sales Gross Value Net Revenue Ach%Target Target Value Sales Gross Value Net Revenue Ach%
{{$item->item_sku}} {{$item->item_name}} {{$item->unit_name}} {{$item->item_trade_price}}{{number_format($itemDetails->target,2)}} {{number_format($itemDetails->target_value,2)}} {{number_format($itemDetails->sales,2)}} {{number_format($itemDetails->sales*$itemDetails->item_trade_price,2)}} {{number_format($itemDetails->revenue,2)}} {{number_format(($itemDetails->sales/$itemDetails->target*100),2)}}%0 0 0 0 0%0 0 0 0 0%{{number_format($total_target,2)}} {{number_format($total_target_value,2)}} {{number_format($total_sales,2)}} {{number_format($total_gross_value,2)}} {{number_format($total_revenue,2)}} {{number_format($total_sales/$total_target*100,2)}}%
@endsection @section('scripts') @endsection