@if (isset($invoice)) {!! Form::model($invoice, array('url' => $type . '/' . $invoice->id, 'method' => 'put', 'files'=> true, 'id'=>'form')) !!} @else {!! Form::open(array('url' => $type, 'method' => 'post', 'files'=> true, 'id'=>'form')) !!} @endif
{!! $errors->first('client_type', '

:message

') !!}
{{ $errors->first('client_id', ':message') }}
@if (isset($invoice))

{{$invoice->client->full_name}}

@if(isset($invoice->client->phone_common)) {{$invoice->client->phone_common}} @endif @if(isset($invoice->client->address)) {{$invoice->client->address}} @endif

@endif
{!! Form::label('apartment_name', trans('proforma.apartment_name'), array('class' => 'control-label')) !!}
{!! Form::select('apartment_name', $apartment_name, null, array( 'class' => 'form-control')) !!} {{ $errors->first('apartment_name', ':message') }}
{!! Form::label('period', trans('proforma.period'), array('class' => 'control-label')) !!}
{!! Form::select('period', $period, null, array( 'class' => 'form-control')) !!} {{ $errors->first('period', ':message') }}
{!! Form::label('meal_type', trans('proforma.meal_type'), array('class' => 'control-label')) !!}
{!! Form::select('meal_type',$meal_type, null, array( 'class' => 'form-control')) !!} {{ $errors->first('meal_type', ':message') }}
{!! Form::label('comment', trans('proforma.comment'), array('class' => 'control-label')) !!}
{!! Form::text('comment', null, array( 'class' => 'form-control')) !!} {{ $errors->first('comment', ':message') }}
{!! Form::label('rental', trans('invoice.rental'), ['class' => 'control-label required']) !!}
{!! Form::text('rental', isset($invoice) ? $invoice->rental : '', ['class' => 'form-control', 'required' => true, 'maxlength'=> 200]) !!}
{{ $errors->first('rental', ':message') }}
{!! Form::label('invoice_date', trans('proforma.proforma_date'), array('class' => 'control-label required')) !!}
{!! Form::text('invoice_date', null, array('class' => 'form-control date', (isset($invoice)?'readonly':''))) !!} {{ $errors->first('invoice_date', ':message') }}
{!! Form::label('due_date', trans('proforma.due_date'), array('class' => 'control-label required')) !!}
{!! Form::text('due_date', null, array('class' => 'form-control date', (isset($invoice)?'readonly':''))) !!} {{ $errors->first('due_date', ':message') }}
{!! Form::label('payment_term', trans('proforma.payment_term'), array('class' => 'control-label required')) !!}
{{ $errors->first('payment_term', ':message') }}
{!! Form::label('status', trans('proforma.status'), array('class' => 'control-label required')) !!}
{!! Form::select('status', $statuses, (isset($invoice)?$invoice->status:null), array('id'=>'status','class' => 'form-control')) !!} {{ $errors->first('status', ':message') }}
@if(isset($invoice) && $invoice->services->count()>0) @foreach($invoice->services as $index => $variants) @endforeach @endif
{{trans('proforma.service')}} {{trans('proforma.description')}} {{trans('proforma.quantity')}} {{trans('proforma.unit_price')}} {{trans('proforma.vat')}} {{trans('proforma.currency')}} {{trans('proforma.subtotal')}}
services[$index]->service_id == '') value="other" @else value="{{$variants->service_id}}" @endif readOnly>
 
{!! Form::label('currency', trans('proforma.currency'), array('class' => 'control-label')) !!}
{{ $errors->first('currency', ':message') }}
{!! Form::label('payment_methods', trans('proforma.payment_method'), array('class' => 'control-label required')) !!}
@foreach ($payment_methods as $value => $method)
payment_method) checked="checked" @endif>
@endforeach {{ $errors->first('payment_method', ':message') }}
{!! Form::label('total', trans('proforma.untaxed_amount'), array('class' => 'control-label')) !!}
{!! Form::text('total', null, array('class' => 'form-control','readonly')) !!} {{ $errors->first('total', ':message') }}
{!! Form::label('vat', trans('proforma.vat'), array('class' => 'control-label')) !!}
{!! Form::select('vat', $vat, null, array('class' => 'form-control', 'onChange' => 'update_total_price()')) !!} {{ $errors->first('vat', ':message') }}
{!! Form::label('tax_amount', trans('proforma.taxes').' ('.floatval(Settings::get('sales_tax')).'%)', array('class' => 'control-label')) !!}
{!! Form::text('tax_amount', null, array('class' => 'form-control','readonly')) !!} {{ $errors->first('tax_amount', ':message') }}
{!! Form::label('grand_total', trans('proforma.total'), array('class' => 'control-label')) !!}
{!! Form::text('grand_total', null, array('class' => 'form-control','readonly')) !!} {{ $errors->first('grand_total', ':message') }}
{!! Form::label('discount', trans('proforma.discount').' (%)', array('class' => 'control-label')) !!}
{{ $errors->first('discount', ':message') }}
{!! Form::label('final_price', trans('proforma.final_price'), array('class' => 'control-label')) !!}
{!! Form::text('final_price', null, array('class' => 'form-control','readonly')) !!} {{ $errors->first('final_price', ':message') }}
@if (isset($invoice))
{!! Form::label('final_price', trans('proforma.update_rates'), array('class' => 'control-label')) !!}
{!! Form::checkbox('update_rates', null, null, array('id' => 'updateRates')) !!}
@endif
{{trans('table.back')}}
{!! Form::close() !!}
@section('scripts') @endsection