resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,123 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_all_drugs') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_all_drugs') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('clinical_data::drugs.menu')
<div class="row">
<div class="col-sm-12">
<div class="white-box">
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all', 'data-toggle' => 'validator']]) }}
<div style="float: right; margin-bottom: 5px;">
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.drug_form') }}</th>
<th>{{ __('drugs.drug_unit') }}</th>
<th>{{ __('drugs.pharmacy_stock') }}</th>
<th>{{ __('drugs.store_stock') }}</th>
<th>{{ __('drugs.re_order_level') }}</th>
<th>{{ __('drugs.insurance_coverage') }}</th>
<th>{{ __('drugs.long_term') }}</th>
<th>{{ __('drugs.hssip') }}</th>
</tr>
</thead>
<tfoot>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.drug_form') }}</th>
<th>{{ __('drugs.drug_unit') }}</th>
<th>{{ __('drugs.pharmacy_stock') }}</th>
<th>{{ __('drugs.store_stock') }}</th>
<th>{{ __('drugs.re_order_level') }}</th>
<th>{{ __('drugs.insurance_coverage') }}</th>
<th>{{ __('drugs.long_term') }}</th>
<th>{{ __('drugs.hssip') }}</th>
</tr>
</tfoot>
<tbody>
@foreach($drugs as $drug)
<tr>
<td hidden>
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
</td>
<td>
<p style="display: none">{{ $drug->name }}</p>
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>
{{ Form::select('form_id[]', $drug_forms, $drug->form_id, ['class' => 'form-control']) }}
</td>
<td>
{{ Form::select('unit_id[]', $drug_units, $drug->unit_id, ['class' => 'form-control']) }}
</td>
<td>
{{ Form::number('pharmacy_stock[]', $drug->pharmacy_stock, ['class' => 'form-control', 'readonly']) }}
</td>
<td>
{{ Form::number('store_stock[]', $drug->store_stock, ['class' => 'form-control', 'readonly']) }}
</td>
<td>
{{ Form::number('reorder_level[]', $drug->reorder_level, ['class'=>'form-control']) }}
</td>
<td>
{{ Form::select('insurance_coverage[]', [1 => 'Yes', 0 => 'No'], $drug->insurance_coverage, ['class' => 'form-control']) }}
</td>
<td>
{{ Form::select('long_term[]', [1 => 'Yes', 0 => 'No'], $drug->long_term, ['class' => 'form-control']) }}
</td>
<td>
{{ Form::text('hssip[]', $drug->hssip, ['class' => 'form-control']) }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@include('clinical_data::drugs.menu')
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('.table').DataTable({
pageLength: 100,
});
</script>
@endpush
@@ -0,0 +1,98 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_all_calculations') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_all_calculations') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('clinical_data::drugs.menu')
<div class="row">
<div class="col-sm-12">
<div class="white-box">
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all_calculations', 'data-toggle' => 'validator']]) }}
<div style="float: right; margin-bottom: 5px;">
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.drug_form') }}</th>
<th>{{ __('drugs.drug_pack') }}</th>
<th>{{ __('drugs.drug_strength') }}</th>
</tr>
</thead>
<tfoot>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.drug_form') }}</th>
<th>{{ __('drugs.drug_pack') }}</th>
<th>{{ __('drugs.drug_strength') }}</th>
</tr>
</tfoot>
<tbody>
@foreach($drugs as $drug)
<tr>
<td hidden>
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
</td>
<td>
<p style="display: none">{{ $drug->name }}</p>
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>
{{ Form::select('form_id[]', $drug_forms, $drug->form_id, ['class' => 'form-control']) }}
</td>
<td>
{{ Form::number('pack[]', $drug->pack, ['class' => 'form-control', 'step' => '.01']) }}
</td>
<td>
{{ Form::number('strength[]', $drug->strength, ['class' => 'form-control', 'step' => '.01']) }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ Form::button(__('drugs.submit'),['type'=>'submit', 'class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@include('clinical_data::drugs.menu')
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('.table').DataTable({
pageLength: 100
});
</script>
@endpush
@@ -0,0 +1,169 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<style>
th, td { white-space: nowrap; }
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_all_pricing') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_all_pricing') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('clinical_data::drugs.menu')
<div class="row">
<div class="col-sm-12">
<div class="white-box">
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all_pricing']]) }}
@php $id = 1; @endphp
<div style="float: right; margin-bottom: 5px;">
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
</div>
<div class="table-responsive">
<table class="table table-striped color-bordered-table success-bordered-table">
<thead>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.buying') }}</th>
<th>{{ __('drugs.non_insured_price') }}</th>
@if(get_ward_prescription_model() == 2)
<th>{{ __('drugs.pf_adult') }}</th>
<th>{{ __('drugs.daily_cost_adult') }}</th>
<th>{{ __('drugs.pf_children') }}</th>
<th>{{ __('drugs.daily_cost_children') }}</th>
<th>{{ __('drugs.pf_infant') }}</th>
<th>{{ __('drugs.daily_cost_infant') }}</th>
@endif
</tr>
</thead>
<tfoot>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.buying') }}</th>
<th>{{ __('drugs.non_insured_price') }}</th>
@if(get_ward_prescription_model() == 2)
<th>{{ __('drugs.pf_adult') }}</th>
<th>{{ __('drugs.daily_cost_adult') }}</th>
<th>{{ __('drugs.pf_children') }}</th>
<th>{{ __('drugs.daily_cost_children') }}</th>
<th>{{ __('drugs.pf_infant') }}</th>
<th>{{ __('drugs.daily_cost_infant') }}</th>
@endif
</tr>
</tfoot>
<tbody>
@foreach($drugs as $drug)
@php
$non_insured_price_id = 'non_insured_price' . $id;
$pricing_factor_adult = 'pricing_factor_adult' . $id;
$dc_adult = 'ip_daily_cost_adult' . $id;
$pricing_factor_children = 'pricing_factor_children' . $id;
$dc_children = 'ip_daily_cost_children' . $id;
$pricing_factor_infant = 'pricing_factor_infant' . $id;
$dc_infant = 'ip_daily_cost_infant' . $id;
@endphp
<tr>
<td hidden>
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
</td>
<td>
<p style="display: none">{{ $drug->name }}</p>
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>
{{ Form::number('cost_price[]', $drug->cost_price , ['class' => 'form-control compulsory']) }}
</td>
<td>
{{ Form::number('non_insured_price[]', $drug->non_insured_price , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'id' => $non_insured_price_id]) }}
</td>
@if(get_ward_prescription_model() == 2)
<td>
{{ Form::number('pricing_factor_adult[]', $drug->pricing_factor_adult , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'step' => '0.01', 'id' => $pricing_factor_adult]) }}
</td>
<td>
{{ Form::number('ip_daily_cost_adult[]', ($drug->pricing_factor_adult * $drug->non_insured_price) , ['class' => 'form-control', 'readonly' => 'true', 'id' => $dc_adult]) }}
</td>
<td>
{{ Form::number('pricing_factor_children[]', $drug->pricing_factor_children , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'step' => '0.01', 'id' => $pricing_factor_children]) }}
</td>
<td>
{{ Form::number('ip_daily_cost_children[]', ($drug->pricing_factor_children * $drug->non_insured_price) , ['class' => 'form-control', 'readonly' => 'true', 'id' => $dc_children]) }}
</td>
<td>
{{ Form::number('pricing_factor_infant[]', $drug->pricing_factor_infant , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'step' => '0.01', 'id' => $pricing_factor_infant]) }}
</td>
<td>
{{ Form::number('ip_daily_cost_infant[]', ($drug->pricing_factor_infant * $drug->non_insured_price) , ['class' => 'form-control', 'readonly' => 'true', 'id' => $dc_infant]) }}
</td>
@endif
</tr>
@php $id++ @endphp
@endforeach
</tbody>
</table>
</div>
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@include('clinical_data::drugs.menu')
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('.table').DataTable({
pageLength: 200
});
function calcPrices(id) {
calcAdult(id);
calcChild(id);
calcInfant(id);
}
function calcAdult(id) {
let price_factor = $('#pricing_factor_adult' + id).val();
let non_insured_price = $('#non_insured_price' + id).val();
$('#ip_daily_cost_adult' + id).val(price_factor * non_insured_price);
}
function calcChild(id) {
let price_factor = $('#pricing_factor_children' + id).val();
let non_insured_price = $('#non_insured_price' + id).val();
$('#ip_daily_cost_children' + id).val(price_factor * non_insured_price);
}
function calcInfant(id) {
let price_factor = $('#pricing_factor_infant' + id).val();
let non_insured_price = $('#non_insured_price' + id).val();
$('#ip_daily_cost_infant' + id).val(price_factor * non_insured_price);
}
</script>
@endpush
@@ -0,0 +1,103 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_all_prompts') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_all_prompts') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('clinical_data::drugs.menu')
<div class="row">
<div class="col-sm-12">
<div class="white-box">
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all_prompts', 'data-toggle' => 'validator']]) }}
<div style="float: right; margin-bottom: 5px;">
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.drug_prompt') }}</th>
<th>{{ __('drugs.english_info') }}</th>
<th>{{ __('drugs.vernacular_info') }}</th>
<th>{{ __('drugs.pharmacy_comment') }}</th>
</tr>
</thead>
<tfoot>
<tr>
<th hidden>{{ __('drugs.id') }}</th>
<th>{{ __('drugs.drug_name') }}</th>
<th>{{ __('drugs.drug_prompt') }}</th>
<th>{{ __('drugs.english_info') }}</th>
<th>{{ __('drugs.vernacular_info') }}</th>
<th>{{ __('drugs.pharmacy_comment') }}</th>
</tr>
</tfoot>
<tbody>
@foreach($drugs as $drug)
<tr>
<td hidden>
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
</td>
<td>
<p style="display: none">{{ $drug->name }}</p>
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>
{{ Form::textArea('prompt[]', $drug->prompt, ['class' => 'form-control', 'rows' => 4]) }}
</td>
<td>
{{ Form::textArea('info_english[]', $drug->info_english, ['class' => 'form-control', 'rows' => 4]) }}
</td>
<td>
{{ Form::textArea('info_vernacular[]', $drug->info_vernacular, ['class' => 'form-control', 'rows' => 4]) }}
</td>
<td>
{{ Form::textArea('pharmacy_comment[]', $drug->pharmacy_comment, ['class' => 'form-control', 'rows' => 4]) }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@include('clinical_data::drugs.menu')
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('.table').DataTable({
pageLength: 100
});
</script>
@endpush
@@ -0,0 +1,55 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_drug_calculation') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_calculation') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug]]) }}
<!--- hidden input to differentiate store value -->
{{ Form::hidden('id', 2) }}
<div class="form-group">
{{ Form::label('name', __('drugs.drug_name')) }}
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('form_id', __('drugs.drug_form')) }}
{{ Form::select('form_id', $drug_forms, null, ['class'=>'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('pack', __('drugs.drug_pack')) }}
{{ Form::number('pack', $drug->pack, ['class'=>'form-control compulsory', 'step' => '.01']) }}
</div>
<div class="form-group">
{{ Form::label('strength', __('drugs.drug_strength')) }}
{{ Form::number('strength', $drug->strength, ['class' => 'form-control compulsory', 'step' => '.01']) }}
</div>
</div>
</div>
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@@ -0,0 +1,114 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_drug_pricing') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_pricing') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug]]) }}
{{ Form::hidden('id', 1) }}
<div class="form-group">
{{ Form::label('name', __('drugs.drug_name')) }}
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('cost_price', __('drugs.buying')) }}
{{ Form::number('cost_price', $drug->cost_price , ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('non_insured_price', __('drugs.non_insured_price')) }}
{{ Form::number('non_insured_price', $drug->non_insured_price , ['class' => 'form-control compulsory', 'id' => 'non_insured_price']) }}
</div>
@if($drug->price_list_category && $drug->price_list_category != '')
@php
$price_list_categories = explode(",", $drug->price_list_category);
$price_list_prices = explode(",", $drug->price_list_price);
@endphp
@for($i = 0; $i < count($price_list_categories); $i++)
<div class="form-group">
{{ Form::label('non_insured_price', get_name(get_name($price_list_categories[$i], 'id', 'price_list_categories', 'price_list_categories'), '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']) }}
</div>
@endfor
@endif
@if(get_ward_prescription_model() == 2)
<div class="form-group">
{{ Form::label('pricing_factor_adult', __('drugs.pf_adult')) }}
{{ Form::number('pricing_factor_adult', $drug->pricing_factor_adult , ['class' => 'form-control compulsory', 'onchange' => 'calcAdult(this.value);', 'step' => '0.01']) }}
</div>
<div class="form-group">
{{ Form::label('ip_daily_cost_adult', __('drugs.daily_cost_adult')) }}
{{ Form::number('ip_daily_cost_adult', $drug->ip_daily_cost_adult , ['class' => 'form-control', 'readonly' => 'true', 'id' => 'ip_daily_cost_adult']) }}
</div>
<div class="form-group">
{{ Form::label('pricing_factor_children', __('drugs.pf_children')) }}
{{ Form::number('pricing_factor_children', $drug->pricing_factor_children , ['class' => 'form-control compulsory', 'onchange' => 'calcChild(this.value);', 'step' => '0.01']) }}
</div>
<div class="form-group">
{{ Form::label('ip_daily_cost_children', __('drugs.daily_cost_children')) }}
{{ Form::number('ip_daily_cost_children', $drug->ip_daily_cost_children , ['class' => 'form-control', 'readonly' => 'true', 'id' => 'ip_daily_cost_children']) }}
</div>
<div class="form-group">
{{ Form::label('pricing_factor_infant', __('drugs.pf_infant')) }}
{{ Form::number('pricing_factor_infant', $drug->pricing_factor_infant , ['class' => 'form-control compulsory', 'onchange' => 'calcInfant(this.value);', 'step' => '0.01']) }}
</div>
<div class="form-group">
{{ Form::label('ip_daily_cost_infant', __('drugs.daily_cost_infant')) }}
{{ Form::number('ip_daily_cost_infant', $drug->ip_daily_cost_infant , ['class' => 'form-control', 'readonly' => 'true', 'id' => 'ip_daily_cost_infant']) }}
</div>
@endif
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
</div>
</div>
{{ Form::close() }}
</div>
<script type="text/javascript">
function calcAdult(price) {
let non_insured_price = document.getElementById('non_insured_price').value;
document.getElementById('ip_daily_cost_adult').value = price * non_insured_price;
}
function calcChild(price) {
let non_insured_price = document.getElementById('non_insured_price').value;
document.getElementById('ip_daily_cost_children').value = price * non_insured_price;
}
function calcInfant(price) {
let non_insured_price = document.getElementById('non_insured_price').value;
document.getElementById('ip_daily_cost_infant').value = price * non_insured_price;
}
</script>
@endsection
@@ -0,0 +1,65 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_drug_prompt') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_prompt') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug]]) }}
<!--- hidden input to differentiate store value -->
{{ Form::hidden('id', 0) }}
<div class="form-group">
{{ Form::label('name', __('drugs.drug_name')) }}
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('prompt', __('drugs.drug_prompt')) }}
{{ Form::textArea('prompt', $drug->prompt, ['class'=>'form-control', 'rows' => 4]) }}
</div>
<div class="form-group">
{{ Form::label('info_english', __('drugs.english_info')) }}
{{ Form::textArea('info_english', $drug->info_english, ['class' => 'form-control', 'rows' => 4]) }}
</div>
<div class="form-group">
{{ Form::label('info_vernacular', __('drugs.vernacular_info')) }}
{{ Form::textArea('info_vernacular', $drug->info_vernacular, ['class'=>'form-control', 'rows' => 4]) }}
</div>
<div class="form-group">
{{ Form::label('pharmacy_comment', __('drugs.pharmacy_comment')) }}
{{ Form::textArea('pharmacy_comment', $drug->pharmacy_comment, ['class' => 'form-control', 'rows' => 4]) }}
</div>
<div class="form-group">
{{ Form::label('description', __('drugs.drug_description')) }}
{{ Form::textArea('description', $drug->description, ['class' => 'form-control', 'rows' => 4]) }}
</div>
</div>
</div>
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@@ -0,0 +1,65 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('drugs.edit_drug_prompt') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
<li class="active">{{ __('drugs.edit_prompt') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
{{ Form::model($drug, ['method' => 'ANY', 'route' => ['drugs.update_purchase_packaging',$drug]]) }}
<!--- hidden input to differentiate store value -->
{{ Form::hidden('id', $drug->id) }}
<div class="form-group">
{{ Form::label('name', __('drugs.drug_name')) }}
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('',__('drugs.does_package_unit_have_sub_packages')) }}
<br>
{{ __('drugs.yes') }} {{ Form::radio('does_package_unit_have_sub_packages', 1, false, ['class' => 'have_sub_package', 'required', 'id' => 'does_have_sub_package1', 'onclick'=>'displaySubPackagesDivs()']) }}
{{ __('drugs.no') }} {{ Form::radio('does_package_unit_have_sub_packages', 0, false, ['class' => 'have_sub_package', 'required', 'id' => 'does_not_have_sub_package1', 'onclick'=>'displaySubPackagesDivs()']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group quantity_in_each_package_unit_div">
{{ Form::label('quantity_in_each_package_unit', __('drugs.quantity_in_each_package_unit')) }}
{{ Form::number('quantity_in_each_package_unit', $drug->quantity_in_each_package_unit, ['class' => 'form-control', 'step' => '0.01']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group quantity_in_each_sub_package_div">
{{ Form::label('quantity_in_each_sub_package', __('drugs.quantity_in_each_sub_package')) }}
{{ Form::number('quantity_in_each_sub_package', $drug->quantity_in_each_sub_package, ['class' => 'form-control', 'step' => '0.01']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group quantity_in_each_sub_package_div">
{{ Form::label('number_of_sub_packages_in_main_package', __('drugs.number_of_sub_packages_in_main_package')) }}
{{ Form::number('number_of_sub_packages_in_main_package', $drug->number_of_sub_packages_in_main_package_unit, ['class' => 'form-control', 'step' => '0.01']) }}
<div class="help-block with-errors"></div>
</div>
{{ Form::button(__('drugs.submit'),['type' => 'submit','class' =>' btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
</div>
</div>
{{ Form::close() }}
</div>
@endsection