@extends('admin.layouts.master') @section('title') SKU: {{ $product->sku }}{{ 10000+($product_inventory->id) }} @stop @section('content')
SKU: {{ $product->sku }}{{ 10000+($product_inventory->id) }} - {{ $product_category->name }}, {{ $product->name }}

{{ App::make('BarcodeGenerator')->getBarcodeHTML($product->sku . (10000+($product_inventory->id)), "C39"); }}

Current status: {{ $current_status->status }}
Category: {{ $product_category->name }}
Product: {{ $product->name }}

Date joined to system {{ $product_inventory->created_at->timezone(Config::get('app.view_timezone')) }}
SKU {{ $product->sku }}{{ 10000+($product_inventory->id) }}
Current Status {{ ProductInventory::getProductInventoryStatuses($current_status->status) }}
Product name {{ $product->name }}
Category {{ $product_category->name }}
Total rents count {{ $product_inventory->rent_count }}
Rents count after last service {{ $product_inventory->rent_count_from_last_service }}
Total rent hours {{ $product_inventory->total_rent_hours }}
Rent hours from last service {{ $product_inventory->rent_hour_from_last_service }}
Total service count {{ $product_inventory->statuses()->where('status', 'out_of_service')->get()->count() }}
Last service time @if($last_service = $product_inventory->statuses()->where('status', 'out_of_service')->orderBy('created_at', 'DESC')->first()) {{ $last_service->created_at->timezone(Config::get('app.view_timezone')) }} @else Never @endif

Current Status: {{ ProductInventory::getProductInventoryStatuses($current_status->status) }}

@if(!in_array($current_status->status, array('rented', 'reserved', 'sold'))) {{ Form::open(array('url' => 'admin/products/inventories/'.$product_inventory->id.'/updateStatus')) }}
{{ Form::label('new_status', 'New Status') }} {{ Form::select('new_status', array_merge(array(null => '-- Select -- '), $product_inventory->getPossibleStatuses()), null, array('class' => 'form-control', 'required' => 'required')) }}
{{ Form::label('new_status_comment', 'Comment') }} {{ Form::textarea('new_status_comment', null, array('class' => 'form-control', 'required' => 'required')) }}
{{ Form ::submit('Save', array('class' => 'btn btn-success')) }} {{ Form::close() }} @else
You cannot change status manually at this time!
@endif
@foreach($statuses as $status) @endforeach
Status Time Comment Status Change By
{{ ProductInventory::getProductInventoryStatuses($status->status) }} {{ $status->created_at->timezone(Config::get('app.view_timezone')) }} {{ $status->comment }} @if($status->admin_id) {{ $status->admin->getFullName() }} @else By System @endif
@foreach($repair_statuses as $status) @endforeach
Time Out Time In Comment Status Change By Rent hours Rents count
{{ (new \Carbon\Carbon($status->repairLog->repair_start_time))->timezone(Config::get('app.view_timezone')) }} @if($status->repairLog->back_time) {{ (new \Carbon\Carbon($status->repairLog->back_time))->timezone(Config::get('app.view_timezone')) }} @else Not returned yet @endif {{ $status->comment }} @if($status->admin_id) {{ $status->admin->getFullName() }} @else By System @endif {{ number_format($status->repairLog->rent_hours) }} {{ number_format($status->repairLog->rent_count) }}
@stop @section('scripts') @parent @stop