@livewire('purchase-order-train-component',['purchase_order' => $purchaseOrder ,'purchase_order_id' => $purchaseOrder->id,'component_name' => 'details'])
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

{{__('messages.Full details of order.')}}

{{__('messages.order_date')}}
{{$purchaseOrder->purchase_order_date}}
{{__('messages.order_from_name')}}
{{$purchaseOrder->order_from_name}}
{{__('messages.order_from')}}
{{$purchaseOrder->order_from}}
{{__('messages.order_by')}}
{{$purchaseOrder->order_by}}
{{__('messages.purchase_vendors')}}
{{($purchaseOrder->purchase_vendor_id)?$purchaseOrder->purchase_vendor->name:'-'}}
{{__('messages.Status')}}
{{$purchaseOrder->purchase_order_status->name}}
{{__('messages.action_by')}}
{{($purchaseOrder->action_by_user_id)?$purchaseOrder->action_by_user->name:'-'}}
{{__('hr_messages.Description')}}
{{$purchaseOrder->vendor_desc}}
{{__('messages.financial_tree')}}
{{($purchaseOrder->company_financial_tree_id)?$purchaseOrder->company_financial_tree->name:'-'}}
{{__('messages.Updated By')}}
{{($purchaseOrder->last_updated_by)?$purchaseOrder->last_updated_by_user->name:"-"}}
{{__('messages.Created At')}}
{{$purchaseOrder->created_at}}
{{__('messages.Updated At')}}
{{$purchaseOrder->updated_at}}

{{__('messages.p_order_detail')}}

# {{__('messages.Product')}} {{__('hr_messages.Description')}} {{__('messages.quantity')}} {{trans_choice('messages.units',1)}} {{__('messages.Created At')}}   @forelse ($purchase_order_details = \App\Models\PurchaseOrderDetail::where('purchase_order_id',$purchaseOrder->id)->get() as $key =>$purchase_order_detail) #{{++$key}} {{__('messages.Product')}} {{($purchase_order_detail->purchase_product_id)?$purchase_order_detail->purchase_product->name:'-'}} {{__('hr_messages.Description')}}{{$purchase_order_detail->product_desc}} {{__('messages.quantity')}}{{$purchase_order_detail->quantity}} {{trans_choice('messages.units',1)}}{{($purchase_order_detail->unit_id)?$purchase_order_detail->unit->name:''}} {{__('messages.Created At')}}{{$purchase_order_detail->created_at}} @if($purchaseOrder->status == "pending")
@can("edit purchase_order_details")
mt-0 {{($purchase_order_detail->purchase_product_id)?$purchase_order_detail->purchase_product->name:'-'}} {{$purchase_order_detail->id}}
edit_purchase_product_id @foreach(\App\Models\PurchaseProduct::all() as $product) @endforeach
edit_unit_id @foreach(\App\Models\Unit::all() as $unit) @endforeach
@if($edit_purchase_product_id == 'others')
edit_product_desc 4
@endif
@endcan @can("delete purchase_order_details") mt-0 {{__('messages.Order Details')}} : {{($purchase_order_detail->purchase_product_id)?$purchase_order_detail->purchase_product->name:'-'}} {{$purchase_order_detail->id}} @endcan @endif
@empty {{__('messages.Empty Result')}} @endforelse
@if($purchaseOrder->status == "pending") @can('add purchase_order_details')
purchase_product_id @foreach(\App\Models\PurchaseProduct::all() as $product) @endforeach
unit_id @foreach(\App\Models\Unit::all() as $unit) @endforeach
@if($purchase_product_id == 'others')
product_desc 4
@endif
@endcan @endif