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">{{ __('insurance_benefits.add_tariff') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
<h4>{{ __('insurance_benefits.item_name') }}: {{ $item_name }}</h4>
<hr>
{{ Form::open(['route' => 'insurance_tariffs.save_tariff']) }}
{{ Form::hidden('benefit_id', $benefit->id, ['id' => 'benefit_id']) }}
{{ Form::hidden('item_id', $item_id, ['id' => 'item_id']) }}
{{ Form::hidden('item_type', $item_type, ['id' => 'item_type']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('tariff_name', __('insurance_benefits.tariff_name')) }}
{{ Form::text('tariff_name', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('cash_price', __('insurance_benefits.cash_price')) }}
{{ Form::number('cash_price', $item_cash_price, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('co_payment', __('insurance_benefits.co_payment')) }}
{{ Form::number('co_payment', $co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_co_payment', __('insurance_benefits.ipd_co_payment')) }}
{{ Form::number('ipd_co_payment', $ipd_co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('age_limit', __('insurance_benefits.age_limit')) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_start',__('insurance_benefits.start')) }}
{{ Form::number('age_limit_start','',['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_end',__('insurance_benefits.end')) }}
{{ Form::number('age_limit_end','',['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('age_type', __('insurance_benefits.age_type')) }}
{{ Form::select('age_type', [0 => 'Days', 1 => 'Months', 2 => 'Years'], 2, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('gender', __('insurance_benefits.gender')) }}
{{ Form::select('gender', [0 => 'All', 1 => 'Male', 2 => 'Female'], 0, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('authorisation', __('insurance_benefits.authorisation')) }}
<br><br>
{{ Form::radio('authorisation', 1, false, ['required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation', 0, false, ['required']) }} No
</div>
<div class="form-group">
{{ Form::label('tariff_price', __('insurance_benefits.tariff_price')) }}
{{ Form::number('tariff_price', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_tariff_price', __('insurance_benefits.ipd_tariff_price')) }}
{{ Form::number('ipd_tariff_price', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,122 @@
@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">{{ __('insurance_benefits.edit_tariff') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
<h4>{{ __('insurance_benefits.item_name') }}: {{ $item_name }}</h4>
<hr>
{{ Form::open(['route' => 'insurance_tariffs.update_tariff']) }}
{{ Form::hidden('tariff_id', $tariff->id, ['id' => 'benefit_id']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('name', __('insurance_benefits.tariff_name')) }}
{{ Form::text('name', $tariff->name, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('cash_price', __('insurance_benefits.cash_price')) }}
{{ Form::number('cash_price', $item_cash_price, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('co_payment', __('insurance_benefits.co_payment')) }}
{{ Form::number('co_payment', $co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_co_payment', __('insurance_benefits.ipd_co_payment')) }}
{{ Form::number('ipd_co_payment', $ipd_co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('age_limit', __('insurance_benefits.age_limit')) }}
@php $age_limits = explode(",", $tariff->age_limit); @endphp
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_start',__('insurance_benefits.start')) }}
{{ Form::number('age_limit_start', $age_limits[0],['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_end',__('insurance_benefits.end')) }}
{{ Form::number('age_limit_end', $age_limits[1],['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('age_type', __('insurance_benefits.age_type')) }}
{{ Form::select('age_type', [0 => 'Days', 1 => 'Months', 2 => 'Years'], $tariff->age_type, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('gender', __('insurance_benefits.gender')) }}
{{ Form::select('gender', [0 => 'All', 1 => 'Male', 2 => 'Female'], $tariff->gender, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('authorisation', __('insurance_benefits.authorisation')) }}
<br><br>
{{ Form::radio('authorisation', 1, $tariff->authorisation == 1, ['required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation', 0, $tariff->authorisation == 0, ['required']) }} No
</div>
<div class="form-group">
{{ Form::label('tariff_price', __('insurance_benefits.tariff_price')) }}
{{ Form::number('tariff_price', $tariff->tariff_price, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_tariff_price', __('insurance_benefits.ipd_tariff_price')) }}
{{ Form::number('ipd_tariff_price', $tariff->ipd_tariff_price, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,131 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<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">{{ __('insurance_benefits.inactive_insurance_tariffs') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.inactive') }}</li>
</ol>
</div>
</div>
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_benefits.tariff_name') }}</th>
<th>{{ __('insurance_benefits.item_name') }}</th>
<th>{{ __('insurance_benefits.item_type') }}</th>
<th>{{ __('insurance_benefits.benefit_name') }}</th>
<th>{{ __('insurance_benefits.plan_name') }}</th>
<th>{{ __('insurance_benefits.gender') }}</th>
<th>{{ __('insurance_benefits.age_limit') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance_benefits.tariff_price') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_tariff_price') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
@endphp
@foreach($tariffs as $tariff)
@php $age_limits = explode(",", $tariff->age_limit); @endphp
<tr>
<td>{{ $tariff->name }}</td>
<td>
@if ($tariff->item_type == 1)
{{ $services[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 2)
{{ $procedures[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 3)
{{ $investigations[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 4)
{{ $drugs[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 5)
{{ $sundries[$tariff->item_id] ?? '' }}
@endif
</td>
<td>
@if ($tariff->item_type == 1)
Services
@elseif ($tariff->item_type == 2)
Procedures
@elseif ($tariff->item_type == 3)
Investigations
@elseif ($tariff->item_type == 4)
Drugs
@elseif ($tariff->item_type == 5)
Sundries
@endif
</td>
<td>{{ $insurance_benefits[$tariff->benefit_id] ?? '' }}</td>
<td>{{ $insurance_plans[$tariff->plan_id] ?? '' }}</td>
<td>{{ ($genders[$tariff->gender] ?? 'All') }}</td>
<td>{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$tariff->age_type] ?? 'years' }}</td>
@php
$item_details = get_item_insurance_details($tariff->item_id, $tariff->item_type, $tariff->benefit_id);
$item_cash_price = $item_details ? $item_details['cash_price'] : 0;
$co_payment = $item_details ? $item_details['co_payment'] : 0;
$ipd_co_payment = $item_details ? ($item_details['ipd_co_payment'] ?? 0) : 0;
@endphp
<td>{{ ugandan_shillings($item_cash_price) }}</td>
<td>{{ ugandan_shillings($co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->tariff_price) }}</td>
<td>{{ ugandan_shillings($ipd_co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->ipd_tariff_price) }}</td>
<td>{{ ($tariff->authorisation == 1 ? 'Yes' : 'No') }}</td>
<td><a href='/insurance_tariffs/activate_tariff/{{ $tariff->id }}' class='btn btn-success btn-sm btn-rounded' onclick="return confirm('Are you sure?')">Restore</a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,174 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<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">{{ __('insurance_benefits.insurance_tariffs') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.view') }}</li>
</ol>
</div>
</div>
<div class="white-box">
{{ Form::open(['method'=>'post','route' => 'insurance_tariffs.view_tariffs']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::label('insurance_plan', 'Insurance Plan') }}
{{ Form::select('insurance_plan',$insurance_plans,'',['class'=>'form-control', 'id' => 'insurance_plan']) }}
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::label('insurance_benefit', 'Insurance Benefit') }}
{{ Form::select('insurance_benefit',$insurance_benefits,'',['class'=>'form-control', 'id' => 'insurance_benefit']) }}
</div>
</div>
<div class="col-md-2">
<div class="form-group" style="margin-top: 25px;">
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
</div>
</div>
</div>
{{ Form::close() }}
</div>
<div class="white-box">
<a href="/insurance_tariffs/view_inactive_tariffs" class="btn btn-warning">View deactivated tariffs</a>
<br><br>
@include('flash::message')
@if($search_text != "")
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br>
@endif
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_benefits.tariff_name') }}</th>
<th>{{ __('insurance_benefits.item_name') }}</th>
<th>{{ __('insurance_benefits.item_type') }}</th>
<th>{{ __('insurance_benefits.benefit_name') }}</th>
<th>{{ __('insurance_benefits.plan_name') }}</th>
<th>{{ __('insurance_benefits.gender') }}</th>
<th>{{ __('insurance_benefits.age_limit') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance_benefits.tariff_price') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_tariff_price') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
@endphp
@foreach($tariffs as $tariff)
@php $age_limits = explode(",", $tariff->age_limit); @endphp
<tr>
<td>{{ $tariff->name }}</td>
<td>
@if ($tariff->item_type == 1)
{{ $services[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 2)
{{ $procedures[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 3)
{{ $investigations[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 4)
{{ $drugs[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 5)
{{ $sundries[$tariff->item_id] ?? '' }}
@endif
</td>
<td>
@if ($tariff->item_type == 1)
Services
@elseif ($tariff->item_type == 2)
Procedures
@elseif ($tariff->item_type == 3)
Investigations
@elseif ($tariff->item_type == 4)
Drugs
@elseif ($tariff->item_type == 5)
Sundries
@endif
</td>
<td>{{ $insurance_benefits[$tariff->benefit_id] ?? '' }}</td>
<td>{{ $insurance_plans[$tariff->plan_id] ?? '' }}</td>
<td>{{ ($genders[$tariff->gender] ?? 'All') }}</td>
<td>{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$tariff->age_type] ?? 'years' }}</td>
@php
$item_details = get_item_insurance_details($tariff->item_id, $tariff->item_type, $tariff->benefit_id);
$item_cash_price = $item_details ? $item_details['cash_price'] : 0;
$co_payment = $item_details ? $item_details['co_payment'] : 0;
$ipd_co_payment = $item_details ? ($item_details['ipd_co_payment'] ?? 0) : 0;
@endphp
<td>{{ ugandan_shillings($item_cash_price) }}</td>
<td>{{ ugandan_shillings($co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->tariff_price) }}</td>
<td>{{ ugandan_shillings($ipd_co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->ipd_tariff_price) }}</td>
<td>{{ ($tariff->authorisation == 1 ? 'Yes' : 'No') }}</td>
<td>@if(Auth::user()->can('insurance-tariffs-edit')) <a href='/insurance_tariffs/edit/{{ $tariff->id }}' class='btn btn-success btn-sm btn-rounded'>Edit</a>@endif</td>
<td>@if(Auth::user()->can('insurance-tariffs-delete')) <a href='/insurance_tariffs/delete/{{ $tariff->id }}' class='btn btn-danger btn-sm btn-rounded' onclick='return confirm("Are you sure?")'>Deactivate</a>@endif</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
$('#insurance_plan, #insurance_benefit').select2({
placeholder: '-- select --',
});
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush