@extends('layouts.app') @section('content')

عرض الطلب: #{{ $purchase->id }}

@if($purchase->status == 'paid')
@endif
{!! Form::model($purchase) !!}
{!! Form::label('id', 'رقم الطلب') !!} {!! Form::text('id', null, ['class' => 'form-control', 'disabled' => true]) !!}
{!! Form::label('current_status', 'حالة الطلب') !!} {!! Form::text('current_status', strip_tags($purchase->readable_status), ['class' => 'form-control', 'disabled' => true]) !!}
{!! Form::label('category', 'التصنيف') !!} {!! Form::text('category', $purchase->category->title, ['class' => 'form-control', 'disabled' => true]) !!}
{!! Form::label('product', 'المنتج') !!} {!! Form::text('product', $purchase->product->title, ['class' => 'form-control', 'disabled' => true]) !!}
{!! Form::label('price', 'سعر الشراء') !!} {!! Form::text('price', $purchase->price . ' ' . setting('store_currency'), ['class' => 'form-control', 'disabled' => true]) !!}
{!! Form::label('date', 'تاريخ الشراء') !!} {!! Form::text('date', $purchase->created_at->format('Y-m-d'), ['class' => 'form-control', 'disabled' => true]) !!}
@if( optional($purchase)->status === 'delivered' && $purchase->product->product_type !== 'ipastore' && optional($purchase->stock)->status == 'used' )
{!! Form::label('content', 'المحتوى') !!} {!! Form::textarea('content', $purchase->stock->code, ['class' => 'form-control']) !!}
@endif
{!! Form::close() !!}
@if($purchase->product->product_type == 'ipastore' && auth()->user()->store_app !== null) @endif @if( optional($purchase)->status === 'delivered' && $purchase->product->product_type !== 'ipastore' && optional($purchase->stock)->status == 'used' ) @endif @endsection @section('scripts') @endsection