@extends('layouts.master')
@section('page-title')
Update return
@endsection
@section('content')
@include('common.errors')
{{ Form::model($movement, [ 'action' => ['Stock\ReturnController@update', 'id' => $movement->id]]) }}
{{ method_field('PUT') }}
@if($consumers->count() === 1)
{{ Form::label('consumerName', trans('validation.attributes.consumer'), ['class' => 'control-label']) }}
{{ Form::text('consumerName', $consumers->first()->name, ['class' => 'form-control disabled', 'disabled' => 'disabled']) }}
{{ Form::hidden('consumer', $consumers->first()->id) }}
@else
{{ Form::customSelect('consumer', $consumers->pluck('name', 'id'), $movement->stock_consumer_id) }}
@endif
@if($stockRooms->count() === 1)
{{ Form::label('stockRoomName', trans('validation.attributes.stockRoom'), ['class' => 'control-label']) }}
{{ Form::text('stockRoomName', $stockRooms->first()->name, ['class' => 'form-control disabled', 'disabled' => 'disabled']) }}
{{ Form::hidden('stockRoom', $stockRooms->first()->id) }}
@else
{{ Form::customSelect('stockRoom', $stockRooms->pluck('name', 'id'), $movement->stock_room_id) }}
@endif
{{ Form::customText('movedAt', \App\Localization\CarbonExtensions::toUserLocal($movement->moved_at), ['class' => 'form-control datetimepicker-control']) }}
{{ Form::customSelect('good', $goods, $movement->good->id) }}
{{ Form::customText('quantity') }}
{{ Form::label('currencyName', trans('validation.attributes.currency'), ['class' => 'control-label']) }}
{{ Form::text('currencyName', $currency->name, ['class' => 'form-control disabled', 'disabled' => 'disabled']) }}
{{ Form::hidden('unitPriceCurrency', $currency->id) }}