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

{{ __('sundries.add_sundry') }}

@include('clinical_data::sundries.menu')
@include('flash::message')
@if (session()->has('streamline_setup'))

{{ __('sundries.streamline_setup') }}

{{ Form::open(['route' => 'sundries.store' ,]) }}
{{ Form::label('name', __('sundries.sundry_name')) }} {{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::label('price', __('sundries.buying_price')) }} {{ Form::number('price', '', ['class' => 'form-control']) }}
{{ Form::label('non_insured_price', __('sundries.non_insured_price')) }} {{ Form::number('non_insured_price', '', ['class' => 'form-control']) }}
{{ Form::label('available', __('sundries.is_sundry_available')) }}  {{ Form::radio('available', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('sundries.yes') }}    {{ Form::radio('available', 0, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('sundries.no') }}
{{ Form::label('account_id', __('sundries.income_account')) }} {{ Form::select('account_id', $income_accounts, null, ['class' => 'form-control']) }}
{{ Form::label('cog_account', __('sundries.cost_of_goods')) }} {{ Form::select('cog_account', $cost_of_goods_accounts, null, ['class' => 'form-control']) }}
{{ Form::label('inventory_account', __('sundries.inventory_asset_account')) }} {{ Form::select('inventory_account', $inventory_asset_accounts, null, ['class' => 'form-control']) }}

{{ __('sundries.select_from_list') }}

Select All

@foreach ($sundries as $defaultSundry)
{{ Form::checkbox('selected_sundries[]', $defaultSundry['Item_Name'], false, ['class' => 'item_checkbox']) }} {{ $defaultSundry['Item_Name'] }}   
@endforeach
{{ Form::button(__('sundries.next'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 next']) }} {{ Form::button(__('sundries.skip'),['type'=>'submit','name' => 'skip','value'=>'skip','class'=>'btn btn-default waves-effect waves-light m-r-10']) }} @else {{ Form::open(['route' => 'sundries.store' , 'data-toggle' => 'validator']) }}
{{ Form::label('name', __('sundries.sundry_name')) }} {{ Form::text('name', '', ['class' => 'form-control compulsory']) }}
{{ Form::label('price', __('sundries.buying_price')) }} {{ Form::number('price', '', ['class' => 'form-control compulsory']) }}
{{ Form::label('non_insured_price', __('sundries.non_insured_price')) }} {{ Form::number('non_insured_price', '', ['class' => 'form-control compulsory', 'id' => 'non_insured_price']) }}
{{ Form::label('available', __('sundries.is_sundry_available')) }}  {{ Form::radio('available', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('sundries.yes') }}    {{ Form::radio('available', 0, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('sundries.no') }}
@php $price_list_categories = \Streamline\Models\PriceListCategories::select('patient_category_id', 'id')->get(); @endphp @foreach($price_list_categories as $record)
{{ Form::label('non_insured_price', get_name($record->patient_category_id, 'id', 'name', 'patient_categories').' Price') }} {{ Form::hidden('price_list_category_id[]', $record->id) }} {{ Form::number('price_list_price[]', '', ['class'=>'form-control price_list_price']) }}
@endforeach
{{ Form::label('account_id', __('sundries.income_account')) }} {{ Form::select('account_id', $income_accounts, null, ['class' => 'form-control']) }}
{{ Form::label('form_id', __('sundries.form')) }} {{ Form::select('form_id', $forms, null, ['class' => 'form-control']) }}
{{ Form::label('cog_account', __('sundries.cost_of_goods')) }} {{ Form::select('cog_account', $cost_of_goods_accounts, null, ['class' => 'form-control']) }}
{{ Form::label('inventory_account', __('sundries.inventory_asset_account')) }} {{ Form::select('inventory_account', $inventory_asset_accounts, null, ['class' => 'form-control']) }}
{{ Form::button(__('sundries.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 submit-btn']) }} {{ Form::button(__('sundries.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }} @endif {{ Form::close() }}
@endsection @push('scripts') @endpush