@extends('layouts.production') @section('addCss') @endsection @section('content')

{{ str_limit($product->name,15,'...') }} {{ str_limit($product->name_kh,30,'...') }}

@include('layouts.includes.message')
@if(!empty($previous)) @endif @if(!empty($next)) @endif
@if ($product->min_amount > 0) @endif @if ($product->max_amount > 0) @endif @if ($product->expired_date) @endif
{{ Trans('products.sku') }} {{ $product->sku }}
{{ Trans('products.name') }} {{ $product->name }}
{{ Trans('products.product_category') }} {{ $product->category_name}}
{{ Trans('products.price_in') }} {{ money($product->price_in) }}
{{ Trans('products.price') }} {{ money($product->price) }}
{{ Trans('products.price_wholesale') }} {{ money($product->price_wholesale) }}
{{ Trans('products.amount') }} {{ $product->amount }} @if(UserRole::has("transfer_to_stock")) {{Form::open(['method'=>'POST','route'=>['updateAmount',$product->id],'files'=>true,'class'=>'amount_update_form']) }} {{ Form::number('amount',null,[ 'class'=>'form-control', 'min' => '1', 'required' => "required", 'placeholder' => trans('products.amount') ])}} {{ Form::close() }} @endif
{{ trans('products.on_hold') }} {{ $product->on_hold }}
{{ trans('products.available_amount') }} {{ $product->available_amount }}
{{ Trans('products.min_amount') }} {{ $product->min_amount }}
{{ Trans('products.max_amount') }} {{ $product->max_amount }}
{{ Trans('products.expired_date') }} {{ $product->expired_date }}
{{ Trans('products.supplier') }} {{ $product->supplier_name }}
{{ Trans('products.is_service') }} @if($product->is_service) Yes @else No @endif
{{ trans('products.status') }} {{ trans("products.ps.".$product->status) }}
{{ Trans('products.item_location') }} {{ $product->location_name }}
{{ Trans('products.unit') }} {{ $product->unit }}
{{ Trans('products.comment') }} {{ $product->comment }}
{{ HTML::image($product->thumbnail, $product->name, ['class' => 'img-responsive img-thumbnail'])}}

{{ Trans('messages.captions.transaction_history')}}

@foreach($histories as $history) @endforeach
# {{Trans("products.name")}} {{Trans("products.ref_id")}} {{Trans("products.amount")}} {{Trans("products.by")}} {{Trans("dashboard.crud.created_at")}} {{Trans('products.operation_type') }} {{Trans("dashboard.crud.actions")}}
{{ $history->id }} {{ str_limit($history->pname,30,'...') }} {{ Form::text('ref_id',$history->ref_id,['class'=>'form-control input-sm']) }} {{$history->amount }} {{ getField("User","id",$history->user_id,"first_name") }} {{ $history->created_at }} {{ Trans('products.'.$history->operation_type) }} @if(UserRole::has('update_ref')) {{Trans("dashboard.crud.update")}} {{Trans("products.ref_id")}} @endif
Total Histories : {{ $histories->getTotal() }}

{{ $histories->links() }}

@endsection @section('addJs') {{ HTML::script('js/products.js')}} @endsection