@extends('admin.layout.master') @section('title','FORECAST') @section('custom_style') @endsection @section ('content')
@include('admin.layout.title_header', ['title'=>'FORECAST '.(Request()->edit_forecast?'EDIT':'SHOW')])

{{$orders->first()->transaction_type}}. {{ $orders->first()->party?$orders->first()->party->name_eng:'N/A' }}

{{date('d-M-Y h:i A',strtotime($orders->first()->date))}}
{{-- --}} {{-- --}} @php $p=0; $total=0; $dateForEditNew=$orders->first()->date; $transaction_id=$orders->first()->transaction_id; @endphp @forelse ($orders as $i=>$item) {{-- --}} @empty @endforelse
#Date{{ $orders->first()->transaction_type>200?'Product':'Category' }}SRPrice Qty {{'Subtotal'}}
{{ (++$p) }} {{ date('d-M-Y h:i A',strtotime($item->date)) }} {{ $item->transaction_type>200?$item->product->name_eng:$item->category->name_eng }} {{($item->order_price*$item->unit_qty)}} @if(Request()->edit_forecast) @else {{($item->order_qty/$item->unit_qty)}} @endif {{($item->order_qty*$item->order_price)}} @php $total+=($item->order_qty*$item->order_price); @endphp
{{ 'TOTAL' }} {{$total}}

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