@extends('admin.layout.master') @section('title',($type==215?'TARGET':'FORECAST').' LIST') @section('custom_style') @endsection @section ('content')

{{($type==215?'TARGET':'FORECAST').' LIST'}}

{{-- --}}
{{-- @if($type<4) --}}
{{-- @endif --}}
{!!getDateInput('date_from','date_from',Request()->date_from)!!} {!!getDateInput('date_to','date_to',Request()->date_to)!!}
{{--
--}} {{--
--}}
@csrf @php $checkPermission=checkAuthPermission($type==215?'target.update':'marketing.forecast_update'); @endphp
@if($checkPermission)
@endif @php $p=1; $action_id=9; $total=0; @endphp @forelse ($orders as $i=>$item) @empty @endforelse
# Date Month Transaction No Name Amount Action
{{ ($p++) }} {{ date('d-M-Y h:i A',strtotime($item->date)) }} {{ date('M-Y',strtotime($item->details->first()->start_date)) }} {{ $item->order_no }} {{ $item->party?$item->party->name_eng:'N/A' }} @php $sub=$item->details->sum(function($q){return ($q->order_qty*$q->order_price);}); $total+=$sub; @endphp {{round($sub)}} Detail @if($checkPermission) Edit Delete @endif
TOTAL {{round($total)}}

{{--
--}} @endsection @section('script') @stop