@php
$p=1;
$action_id=9;
@endphp
@forelse ($orders as $i=>$item)
{{ ($p++) }}
{{ $item->order_no }}
{{ date('d-M-Y h:i A',strtotime($item->created_at)) }}
{{ $item->special==1?'Special':'Normal' }}
{{ $item->group==0?'All':$item->groupInfo->name }}
{{--
{{ $item->showroom?$item->showroom->name_eng:'N\A' }}
--}}
{{--
{{ $item->showroom?$item->showroom->cost_center:'N\A' }}
--}}
{{ ($item->delivery_status==2?'DELIVERED':($item->delivery_status==0?'PENDING':'REJECTED')) }}
{{--
@if(($item->approve_status==2))
Approved
@else
@if($action_step_id=checkCostCenterWiseApproval($item->approvals,$action_id,$item->cost_center_id))
Aprrove
@elseif($item->approvals && count($item->approvals->where('admin_id',active_user()))>0)
You've Approved at {{date('d-m-Y',strtotime($item->approvals->where('admin_id',active_user())->first()->created_at))}}
@else
{{'No Acess'}}
@endif
@endif
--}}
Print
@if ($item->delivery_status == 2)
@php
$showBill=0;
$invoice=$item->fgStoreInvoice??$item->storeInvoice;
@endphp
@if($invoice && $invoice->status==1)
Bill
@endif
@endif
@empty
@endforelse