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

{{ str_limit(getField('Product','id',$outlet->product_id,'name'),20) }} {{ str_limit(getField('Product','id',$outlet->product_id,'name_kh'),30) }}

@include('layouts.includes.message')

{{ Trans('products.product_detail')}}

{{ Trans('products.sku') }} {{ $outlet->sku }}
{{ Trans('products.price') }} {{ money($outlet->price) }}
{{ Trans('stock.stock') }} {{ $outlet->stock }}
{{ Trans('products.amount') }} {{ $outlet->amount }} {{ $outlet->unit }}
{{ Trans('stock.location') }} {{ $outlet->location }}
{{ HTML::image($outlet->thumbnail, $outlet->name, ['class' => 'img-responsive img-thumbnail'])}}
@if(Stock::getNumber() == "more")

{{ Trans('stock.transfer_product') }}

@if(UserRole::has("transfer_to_stock")) {{ Form::open(array('route' => 'outlets.store','method'=>'POST', 'class'=>'form-horizontal')) }}
{{Form::number('amount',null,['id'=>'amount','class'=>'form-control','placeholder' => Trans('products.amount'),'required'=>'required'])}}
@if (!empty($stock) && $stock->type == "storage")
{{Form::text('location',stock_location($stock->id, $outlet->product_id),['id'=>'location','class'=>'form-control','placeholder' => Trans('stock.location'), 'required' => 'required'])}}
@endif
{{Form::select('stock_id',$stocks,null,['class' => 'form-control select2'])}}
@endif
@endif

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

@foreach($histories as $history) @endforeach
# {{Trans("products.name")}} {{Trans("products.product_category")}} {{Trans("products.amount")}} {{Trans("products.by")}} {{Trans("dashboard.crud.created_at")}} {{Trans('products.operation_type') }} {{Trans("stock.stock")}}
{{ $history->id }} {{ $history->pname }} {{ getField("ProductCategory","id",getField('Product','id',$history->product_id,'product_category_id'),"name") }} {{ $history->amount }} {{ getField("User","id",$history->user_id,"first_name") }} {{ $history->created_at }} {{ Trans('products.'.$history->operation_type) }} {{ getField("Stock","id",$history->stock_id,"name") }}
Total Histories : {{ $histories->getTotal() }}

{{ $histories->links() }}

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