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

{{$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))}}
@endif
@php $p=0; $total=0; $dateForEditNew=$orders->first()->date; $transaction_id=$orders->first()->order_invoice_id; @endphp @forelse ($orders as $i=>$item) {{-- --}} @empty @endforelse
# {{ $orders->first()->transaction_type>200?'Product':'Category' }} Price 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)}} {{$item->transaction_type>200?'('.$item->product->primaryUnit->name.')':''}} @endif {{($item->order_qty*$item->order_price)}} @php $total+=($item->order_qty*$item->order_price); @endphp
{{ 'TOTAL' }} {{$total}}

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