@extends('layouts.main') @push('styles') @endpush @section('content')

{{ __('service_items.edit_service') }}

@include('clinical_data::service_items.menu')
@include('flash::message')
{{ Form::model($service, ['method' => 'PUT', 'route' => ['service_items.update',$service], 'data-toggle' => 'validator']) }}
{{ Form::label('name', __('service_items.service_name')) }} {{ Form::text('name', $service->name, ['class' => 'form-control compulsory', 'required']) }}
{{ Form::label('non_insured_price', __('service_items.non_insured_price')) }} {{ Form::number('non_insured_price', $service->non_insured_price, ['class' => 'form-control compulsory', 'required']) }}
@if($service->price_list_category && $service->price_list_category != '') @php $price_list_categories = explode(",", $service->price_list_category); $price_list_prices = explode(",", $service->price_list_price); @endphp @for($i = 0; $i < count($price_list_categories); $i++)
{{ Form::label('non_insured_price', get_name($price_list_categories[$i], 'id', 'name', 'patient_categories').' Price') }} {{ Form::hidden('price_list_category_id[]', $price_list_categories[$i]) }} {{ Form::number('price_list_price[]', $price_list_prices[$i], ['class'=>'form-control price_list_price']) }}
@endfor @endif
{{ Form::label('account_id', __('service_items.chart_account_name')) }} {{ Form::select('account_id', $chart_of_accounts, $service->account_id, ['class'=>'form-control compulsory', 'required']) }}
{{ Form::label('available', __('service_items.is_service_available')) }}  {{ Form::radio('available', 1, $service->available == 1, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('service_items.yes') }}    {{ Form::radio('available', 0, $service->available == 0, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('service_items.no') }}
{{ Form::label('description', __('service_items.description')) }} {{ Form::textArea('description', $service->description, ['class'=>'form-control', 'rows' => 4]) }}
{{ Form::label('type_of_service',__('service_items.type_of_service')) }}
{{ Form::radio('type_of_service', 'Consultation', ($service->item_type == 'Consultation'), ["required"]) }} {{ __('service_items.consultation') }}
{{ Form::radio('type_of_service', 'Co_Payment', ($service->item_type == 'Co_Payment'), ["required"]) }} {{ __('service_items.copayment') }}
{{ Form::radio('type_of_service', 'Service', ($service->item_type == 'Service'), ["required"]) }} {{ __('service_items.service') }}
{{ Form::button(__('service_items.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }} {{ Form::button(__('service_items.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }} {{ Form::close() }}
@endsection @push('scripts') @endpush