mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 19:51:30 +00:00
resolved conflicts
This commit is contained in:
Executable
+120
@@ -0,0 +1,120 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
@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">{{ __('discount_categories.discount_category') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discount_categories.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discount_categories.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discount_category.index') }}"><i class="fa fa-eye"></i> {{ __('discount_categories.view_discount_categories') }}</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> {{ __('discount_categories.new_discount_category') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{{ Form::open(['method'=>'post','route'=>'discount_category.store']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_category', __('discount_categories.patient_category')) }}
|
||||
{{ Form::select('patient_category', $categories, '', ['class' => 'form-control col-sm-12 compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('donor',__('discount_categories.donor_amount')) }}
|
||||
{{ Form::select('donor', $donors, '', ['class' => 'form-control col-sm-12 compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('discount_name',__('discount_categories.discount_name')) }}
|
||||
{{ Form::text('discount_name','',['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::radio('discount_type', 1, false, ["required",'class'=>'discount_type']) }} {{ __('discount_categories.fixed_figure') }}
|
||||
{{ Form::radio('discount_type', 2, false, ["required",'class'=>'discount_type']) }} {{ __('discount_categories.patient_ceiling') }}
|
||||
{{ Form::radio('discount_type', 3, false, ["required",'class'=>'discount_type']) }} {{ __('discount_categories.patient_top_up') }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div id="fixed_figure" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('donor_fixed_amount',__('discount_categories.donor_amount')) }}
|
||||
{{ Form::number('donor_fixed_amount','',['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_fixed_amount',__('discount_categories.patient_amount')) }}
|
||||
{{ Form::number('patient_fixed_amount','',['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ceiling_figure" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_ceiling',__('discount_categories.patient_amount')) }}
|
||||
{{ Form::number('patient_ceiling','',['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="top_up" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('donor_top_up',__('discount_categories.donor_amount')) }}
|
||||
{{ Form::number('donor_top_up','',['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('discount_categories.save'),['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset(__('discount_categories.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$('.discount_type').change(function(){
|
||||
var discountType = $(this).val();
|
||||
if(discountType == 1){
|
||||
$('#ceiling_figure').hide();
|
||||
$('#fixed_figure').show();
|
||||
$('#top_up').hide();
|
||||
} else if(discountType == 2){
|
||||
$('#fixed_figure').hide();
|
||||
$('#ceiling_figure').show();
|
||||
$('#top_up').hide();
|
||||
} else if(discountType == 3){
|
||||
$('#fixed_figure').hide();
|
||||
$('#ceiling_figure').hide();
|
||||
$('#top_up').show();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+121
@@ -0,0 +1,121 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
@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">{{ __('discount_categories.edit_discount_category') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discount_categories.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discount_categories.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discount_category.index') }}"><i class="fa fa-eye"></i> {{ __('discount_categories.view_discount_categories') }}</a></li>
|
||||
<li class="active">{{ __('discount_categories.edit_discount_category') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{{ Form::model($discount_category, ['method' => 'PUT', 'route' => ['discount_category.update',$discount_category], 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_category',__('discount_categories.patient_category')) }}
|
||||
{{ Form::select('patient_category', $categories, $discount_category->patient_category, ['class' => 'form-control col-sm-12 compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('donor',__('discount_categories.donor_amount')) }}
|
||||
{{ Form::select('donor', $donors, $discount_category->donor_id, ['class' => 'form-control col-sm-12 compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('discount_name',__('discount_categories.discount_name')) }}
|
||||
{{ Form::text('discount_name',$discount_category->name,['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::radio('discount_type', 1, false, ["required",'class'=>'discount_type']) }} {{ __('discount_categories.fixed_figure') }}
|
||||
{{ Form::radio('discount_type', 2, false, ["required",'class'=>'discount_type']) }} {{ __('discount_categories.patient_ceiling') }}
|
||||
{{ Form::radio('discount_type', 3, false, ["required",'class'=>'discount_type']) }} {{ __('discount_categories.patient_top_up') }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div id="fixed_figure" style="<?php if($discount_category->discount_type != 1){echo 'display: none;';} ?>">
|
||||
<div class="form-group">
|
||||
{{ Form::label('donor_fixed_amount',__('discount_categories.donor_amount')) }}
|
||||
{{ Form::number('donor_fixed_amount',$discount_category->donor_amount,['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_fixed_amount',__('discount_categories.patient_amount')) }}
|
||||
{{ Form::number('patient_fixed_amount',$discount_category->patient_amount,['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ceiling_figure" style="<?php if($discount_category->discount_type != 2){echo 'display: none;';} ?>">
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_ceiling',__('discount_categories.patient_amount')) }}
|
||||
{{ Form::number('patient_ceiling',$discount_category->patient_amount,['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="top_up" style="<?php if($discount_category->discount_type != 3){echo 'display: none;';} ?>">
|
||||
<div class="form-group">
|
||||
{{ Form::label('donor_top_up',__('discount_categories.donor_amount')) }}
|
||||
{{ Form::number('donor_top_up',$discount_category->donor_amount,['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('discount_categories.save'),['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset(__('discount_categories.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$('.discount_type').change(function(){
|
||||
let discountType = $(this).val();
|
||||
|
||||
if(discountType == 1){
|
||||
$('#ceiling_figure').hide();
|
||||
$('#fixed_figure').show();
|
||||
$('#top_up').hide();
|
||||
} else if(discountType == 2){
|
||||
$('#fixed_figure').hide();
|
||||
$('#ceiling_figure').show();
|
||||
$('#top_up').hide();
|
||||
} else if(discountType == 3){
|
||||
$('#fixed_figure').hide();
|
||||
$('#ceiling_figure').hide();
|
||||
$('#top_up').show();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+83
@@ -0,0 +1,83 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
@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">{{ __('discount_categories.activate_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discount_categories.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discount_categories.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discount_category.index') }}"><i class="fa fa-eye"></i> {{ __('discount_categories.view_discount_categories') }}</a></li>
|
||||
<li class="active"><i class="fa fa-trash"></i> {{ __('discount_categories.inactive_discount_categories') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('discount_categories.discount_category') }}</th>
|
||||
<th>{{ __('discount_categories.donor') }}</th>
|
||||
<th>{{ __('discount_categories.patient_category') }}</th>
|
||||
<th>{{ __('discount_categories.discount_type') }}</th>
|
||||
<th>{{ __('discount_categories.discount_amount') }}</th>
|
||||
<th>{{ __('discount_categories.patient_amount') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($discount_categories) > 0)
|
||||
@foreach($discount_categories as $discount)
|
||||
<tr>
|
||||
<td>{{ $discount->name }}</td>
|
||||
<td>{{ $donors[$discount->donor_id] }}</td>
|
||||
<td>{{ $categories[$discount->patient_category] }}</td>
|
||||
@php
|
||||
$discount_type = "";
|
||||
if($discount->discount_type==1){
|
||||
$discount_type = "Fixed Figure";
|
||||
}
|
||||
else if($discount->discount_type==2){
|
||||
$discount_type = "Patient Ceiling";
|
||||
}
|
||||
else{
|
||||
$discount_type = "Patient Top-up";
|
||||
}
|
||||
@endphp
|
||||
<td>{{ $discount_type }}</td>
|
||||
<td>{{ ugandan_shillings($discount->donor_amount) }}</td>
|
||||
<td>{{ ugandan_shillings($discount->patient_amount) }}</td>
|
||||
<td>
|
||||
{{ Form::model($discount->id ,['method' => 'POST', 'route' => ['discount_category.activate', $discount->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('discount_categories.are_you_sure')?>')"><i class="fa fa-check"></i> {{ __('discount_categories.activate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="warning"><td class="center" colspan="10">{{ __('discount_categories.no_records_found') }}</td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $discount_categories->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+85
@@ -0,0 +1,85 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
@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">{{ __('discount_categories.patient_category_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discount_categories.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discount_categories.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discount_category.index') }}"><i class="fa fa-eye"></i> {{ __('discount_categories.view_discount_categories') }}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('discount_categories.discount_category') }}</th>
|
||||
<th>{{ __('discount_categories.donor') }}</th>
|
||||
<th>{{ __('discount_categories.patient_category') }}</th>
|
||||
<th>{{ __('discount_categories.discount_type') }}</th>
|
||||
<th>{{ __('discount_categories.discount_amount') }}</th>
|
||||
<th>{{ __('discount_categories.patient_amount') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($discount_categories) > 0)
|
||||
@foreach($discount_categories as $discount)
|
||||
<tr>
|
||||
<td>{{ $discount->name }}</td>
|
||||
<td>{{ $donors[$discount->donor_id] ?? "N/A" }}</td>
|
||||
<td>{{ $categories[$discount->patient_category] ?? "N/A" }}</td>
|
||||
@php
|
||||
$discount_type = "";
|
||||
if($discount->discount_type==1){
|
||||
$discount_type = "Fixed Figure";
|
||||
}
|
||||
else if($discount->discount_type==2){
|
||||
$discount_type = "Patient Ceiling";
|
||||
}
|
||||
else{
|
||||
$discount_type = "Patient Top-up";
|
||||
}
|
||||
@endphp
|
||||
<td>{{ $discount_type }}</td>
|
||||
<td>{{ ugandan_shillings($discount->donor_amount) }}</td>
|
||||
<td>{{ ugandan_shillings($discount->patient_amount) }}</td>
|
||||
<td>
|
||||
<a href="/discount_category/{{ $discount->id }}/edit/" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> {{ __('discount_categories.edit') }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($discount->id ,['method' => 'DELETE', 'route' => ['discount_category.destroy', $discount->id]]) }}
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('<?php echo __('discount_categories.are_you_sure')?>')"><i class="fa fa-trash"></i> {{ __('discount_categories.delete') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="warning"><td class="center" colspan="10">{{ __('discount_categories.no_records_found') }}</td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $discount_categories->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@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">Add Dependants to Category Patient</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="{{ route('discounts.index') }}">Discounts</a></li>
|
||||
<li class="active">Add Dependants to Category Patient</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<h4> Add Dependants</h4>
|
||||
{{ Form::open(['method'=>'post','url' => 'store_dependants_to_category_patient']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_name', 'Patient Name:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
{{ Form::text('patient_name',$patient->first_name.' '.$patient->last_name,['class' => 'form-control', 'readonly']) }}
|
||||
{{ Form::hidden('patient_id',$patient->id,['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_category', 'Patient Category:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
{{ Form::text('patient_category', get_name($patient_category_id, "id", "name", "patient_categories"), ['class' => 'form-control', 'readonly']) }}
|
||||
{{ Form::hidden('patient_category_id', $patient_category_id, ['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$existing_dependants_record_collection = \Streamline\Models\CategoryPatientDependant::where('main_patient_id', $patient->id)->get();
|
||||
$existing_record = null;
|
||||
$dependants_array = [];
|
||||
if (count($existing_dependants_record_collection) > 0) {
|
||||
$existing_record = $existing_dependants_record_collection->first();
|
||||
$dependants_array = explode(",", $existing_record->dependant_patient_ids);
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('current_dependants', 'Current Dependants:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<ul>
|
||||
@for($i=0; $i < count($dependants_array); $i++)
|
||||
<li><a href="{{ url('patients/') }}/{{$dependants_array[$i]}}">{{ get_full_name($dependants_array[$i], "id", "first_name", "last_name", "patients") }}</a></li>
|
||||
@endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('dependenants', 'Dependants') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<select class="patient_name form-control" name="dependants[]" id="patient_name" multiple="true">
|
||||
@if (count($dependants_array) > 0)
|
||||
@for($i=0; $i < count($dependants_array); $i++)
|
||||
@if ($patient->id != $dependants_array[$i])
|
||||
<option value="{{$dependants_array[$i]}}" selected>{{ get_full_name($dependants_array[$i], "id", "first_name", "last_name", "patients") }}</option>
|
||||
@endif
|
||||
@endfor
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', 'Start Date') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-10 input-group">
|
||||
{{ Form::text('start_date',(is_null($existing_record) || is_null($existing_record->start_date)) ? '' : \Carbon\Carbon::createFromFormat('Y-m-d', $existing_record->start_date)->format('d/m/Y'),['class' => 'form-control compulsory','readonly','id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::submit('Submit dependants', ['class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#dependants').select2({
|
||||
minimumInputLength: 3,
|
||||
allowClear: true,
|
||||
placeholder: "Select dependants"
|
||||
});
|
||||
|
||||
$('.patient_name').select2({
|
||||
placeholder: "Search name",
|
||||
ajax: {
|
||||
url: '/search_dependant_name',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name+ " - " + item.number+ " (" + item.phone + ")",
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy',
|
||||
endDate: new Date()
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
@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">{{ __('discounts.patient_category_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discounts.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discounts.index') }}"><i class="fa fa-eye"></i> {{ __('discounts.view_discounts') }}</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> {{ __('discounts.new_discount') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['method'=>'post','route'=>'discounts.store']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="patient_category">{{ __('discounts.patient_category') }}</label>
|
||||
{{ Form::select('patient_category', $categories, '', ['class' => 'form-control col-sm-12 compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="pay_late">{{ __('discounts.pay_later') }}</label>
|
||||
<br>
|
||||
{{ Form::radio('pay_later', 1, false, ["required", 'id' => 'pay_later_yes','onclick' => 'setOptions()']) }} Yes
|
||||
{{ Form::radio('pay_later', 0, false, ["required", 'id' => 'pay_later_no', 'onclick' => 'setOptions()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group discount_div" style="display: none;">
|
||||
<label for="co_payment">{{ __('discounts.co_payment') }}</label>
|
||||
<br>
|
||||
{{ Form::radio('co_payment', 1, false, ['id' => 'co_payment_yes','onclick' => 'setCoPaymentOptions()']) }} Yes
|
||||
{{ Form::radio('co_payment', 0, false, ['id' => 'co_payment_no','onclick' => 'setCoPaymentOptions()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: none;" id="co_payment_share">
|
||||
<label for="co_payment_share">{{ __('discounts.co_payment_share') }}</label>
|
||||
{{ Form::number('co_payment_share',0,['class' => 'form-control', 'max' => '100']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group threshold_radios_div" style="display: none;">
|
||||
{{ Form::label('is_pay_later_threshold_discount','Does a patient have threshold amount') }}
|
||||
<br>
|
||||
{{ Form::radio('is_pay_later_threshold_discount', 1, false, ['id' => 'is_pay_later_threshold_discount_yes', 'onclick' => 'displayOfDiscountThresholdDivs()']) }} Yes
|
||||
{{ Form::radio('is_pay_later_threshold_discount', 0, false, ['id' => 'is_pay_later_threshold_discount_no', 'onclick' => 'displayOfDiscountThresholdDivs()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="set_threshold_div" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('threshold_type','Threshold type') }}
|
||||
{{ Form::select('threshold_type', [''=>'--Select discount type','1'=>'Monthly threshold amount','2'=>'Yearly threshold amount'], '', ['class' => 'form-control compulsory', 'id' => 'threshold_type']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('threshold_amount','Threshold amount') }}
|
||||
{{ Form::number('threshold_amount', null, ['class' => 'form-control compulsory', 'id' => 'threshold_amount']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="discount">{{ __('discounts.discounts_percentage') }}</label>
|
||||
{{ Form::number('discount',0,['class' => 'form-control compulsory', 'max' => '100', 'min' => '0','onchange' => 'setDiscountPercentageOptions(this.value)']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="track_discount_div" style="display: none;">
|
||||
<label for="co_payment">Track Discounts</label>
|
||||
<br>
|
||||
{{ Form::radio('track_discounts', 1, false, ['id' => 'tracking_yes','onclick' => 'setTrackingOption()']) }} Yes
|
||||
{{ Form::radio('track_discounts', 0, false, ['id' => 'tracking_no','onclick' => 'setTrackingOption()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: none;" id="tracking_expense_account_div">
|
||||
<label for="tracking_expense_account">Expense Account</label>
|
||||
{{ Form::select('tracking_expense_account', $expense_accounts, null,['class' => 'form-control', 'id' => 'tracking_expense_account']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::submit('Save',['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset('Cancel',['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
function setOptions() {
|
||||
if (document.getElementById("pay_later_yes").checked) {
|
||||
$('.discount_div').show();
|
||||
$('.threshold_radios_div').show();
|
||||
$('#is_pay_later_threshold_discount_yes').attr('required', true);
|
||||
$('#is_pay_later_threshold_discount_no').attr('required', true);
|
||||
$('#co_payment_yes').attr('required', true);
|
||||
$('#co_payment_no').attr('required', true);
|
||||
}
|
||||
if (document.getElementById("pay_later_no").checked) {
|
||||
$('.discount_div').hide();
|
||||
$('.threshold_radios_div').hide();
|
||||
$('#is_pay_later_threshold_discount_yes').attr('required', false);
|
||||
$('#is_pay_later_threshold_discount_no').attr('required', false);
|
||||
$('#co_payment_yes').attr('required', false);
|
||||
$('#co_payment_no').attr('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
function setCoPaymentOptions() {
|
||||
if (document.getElementById("co_payment_yes").checked) {
|
||||
$('#co_payment_share').show();
|
||||
}
|
||||
if (document.getElementById("co_payment_no").checked) {
|
||||
$('#co_payment_share').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function setTrackingOption() {
|
||||
if (document.getElementById("tracking_yes").checked) {
|
||||
$('#tracking_expense_account_div').show();
|
||||
$('#tracking_expense_account').attr('required', true);
|
||||
}
|
||||
if (document.getElementById("tracking_no").checked) {
|
||||
$('#tracking_expense_account_div').hide();
|
||||
$('#tracking_expense_account').attr('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
function displayOfDiscountThresholdDivs() {
|
||||
if (document.getElementById("is_pay_later_threshold_discount_yes").checked) {
|
||||
$('.set_threshold_div').show();
|
||||
$('#threshold_type').attr('required', true);
|
||||
$('#threshold_amount').attr('required', true);
|
||||
}
|
||||
if (document.getElementById("is_pay_later_threshold_discount_no").checked) {
|
||||
$('.set_threshold_div').hide();
|
||||
$('#threshold_type').attr('required', false);
|
||||
$('#threshold_amount').attr('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
function setDiscountOption() {
|
||||
var selector = document.getElementById('threshold_type');
|
||||
var discountTypeValue = selector[selector.selectedIndex].value;
|
||||
|
||||
if (discountTypeValue == 1) {
|
||||
$('.discount_amount').hide();
|
||||
}
|
||||
|
||||
if (discountTypeValue == 2) {
|
||||
$('.discount_amount').show();
|
||||
}
|
||||
}
|
||||
|
||||
function setDiscountPercentageOptions(percentage) {
|
||||
if (percentage > 0) {
|
||||
$('#track_discount_div').show();
|
||||
$('#tracking_yes').attr('required', true);
|
||||
$('#tracking_no').attr('required', true);
|
||||
} else {
|
||||
$('#track_discount_div').hide();
|
||||
$('#tracking_yes').attr('required', false);
|
||||
$('#tracking_no').attr('required', false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
@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">{{ __('discounts.patient_category_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discounts.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discounts.index') }}"><i class="fa fa-eye"></i> {{ __('discounts.view_discounts') }}</a></li>
|
||||
<li class="active"><i class="fa fa-pencil"></i> {{ __('discounts.edit_discount') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::model($discount, ['method' => 'PUT', 'route' => ['discounts.update',$discount], 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('id', $id) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="patient_category">{{ __('discounts.patient_category') }}</label>
|
||||
{{ Form::text('patient_category_text', $categories[$discount->patient_category] ?? 'Category Deleted', ['class' => 'form-control col-sm-12', 'readonly']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="pay_late">{{ __('discounts.pay_later') }}</label>
|
||||
<br>
|
||||
{{ Form::radio('pay_later', 1, $discount->pay_later == 1, ["required", 'id' => 'pay_later_yes','onclick' => 'setOptions()']) }} Yes
|
||||
{{ Form::radio('pay_later', 0, $discount->pay_later == 0, ["required", 'id' => 'pay_later_no', 'onclick' => 'setOptions()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group discount_div" @if($discount->pay_later == 0) style="display: none;" @endif>
|
||||
<label for="co_payment">{{ __('discounts.co_payment') }}</label>
|
||||
<br>
|
||||
{{ Form::radio('co_payment', 1, $discount->co_payment == 1, ['id' => 'co_payment_yes','onclick' => 'setCoPaymentOptions()']) }} Yes
|
||||
{{ Form::radio('co_payment', 0, $discount->co_payment == 0, ['id' => 'co_payment_no','onclick' => 'setCoPaymentOptions()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" @if($discount->co_payment == 0) style="display: none;" @endif id="co_payment_share">
|
||||
<label for="co_payment_share">{{ __('discounts.co_payment_share') }}</label>
|
||||
{{ Form::number('co_payment_share',$discount->co_payment_share ?? 0,['class' => 'form-control', 'max' => '100']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group threshold_radios_div" @if($discount->pay_later == 0) style="display: none;" @endif>
|
||||
{{ Form::label('is_pay_later_threshold_discount','Does a patient have threshold amount') }}
|
||||
<br>
|
||||
{{ Form::radio('is_pay_later_threshold_discount', 1, !is_null($discount->threshold_type), ['id' => 'is_pay_later_threshold_discount_yes', 'onclick' => 'displayOfDiscountThresholdDivs()']) }} Yes
|
||||
{{ Form::radio('is_pay_later_threshold_discount', 0, is_null($discount->threshold_type), ['id' => 'is_pay_later_threshold_discount_no', 'onclick' => 'displayOfDiscountThresholdDivs()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="set_threshold_div" @if($discount->threshold_type == 0) style="display: none;" @endif>
|
||||
<div class="form-group">
|
||||
{{ Form::label('threshold_type','Threshold type') }}
|
||||
{{ Form::select('threshold_type', [''=>'--Select discount type','1'=>'Monthly threshold amount','2'=>'Yearly threshold amount'], $discount->threshold_type, ['class' => 'form-control compulsory', 'id' => 'threshold_type']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('threshold_amount','Threshold amount') }}
|
||||
{{ Form::number('threshold_amount', $discount->threshold_amount, ['class' => 'form-control compulsory', 'id' => 'threshold_amount']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="discount">{{ __('discounts.discounts_percentage') }}</label>
|
||||
{{ Form::number('discount',$discount->discount,['class' => 'form-control compulsory', 'max' => '100', 'min' => '0','onchange' => 'setDiscountPercentageOptions(this.value)']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="track_discount_div" @if($discount->discount == 0) style="display: none;" @endif>
|
||||
<label for="track_discounts">Track Discounts</label>
|
||||
<br>
|
||||
{{ Form::radio('track_discounts', 1, !is_null($discount->tracking_expense_account), ['id' => 'tracking_yes','onclick' => 'setTrackingOption()']) }} Yes
|
||||
{{ Form::radio('track_discounts', 0, is_null($discount->tracking_expense_account), ['id' => 'tracking_no','onclick' => 'setTrackingOption()']) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" @if(is_null($discount->tracking_expense_account))style="display: none;" @endif id="tracking_expense_account_div">
|
||||
<label for="tracking_expense_account">Expense Account</label>
|
||||
{{ Form::select('tracking_expense_account', $expense_accounts, $discount->tracking_expense_account,['class' => 'form-control', 'id' => 'tracking_expense_account']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::submit('Save',['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset('Cancel',['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
function setOptions() {
|
||||
if (document.getElementById("pay_later_yes").checked) {
|
||||
$('.discount_div').show();
|
||||
$('.threshold_radios_div').show();
|
||||
$('#is_pay_later_threshold_discount_yes').attr('required', true);
|
||||
$('#is_pay_later_threshold_discount_no').attr('required', true);
|
||||
$('#co_payment_yes').attr('required', true);
|
||||
$('#co_payment_no').attr('required', true);
|
||||
}
|
||||
if (document.getElementById("pay_later_no").checked) {
|
||||
$('.discount_div').hide();
|
||||
$('.threshold_radios_div').hide();
|
||||
$('#is_pay_later_threshold_discount_yes').attr('required', false);
|
||||
$('#is_pay_later_threshold_discount_no').attr('required', false);
|
||||
$('#co_payment_yes').attr('required', false);
|
||||
$('#co_payment_no').attr('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
function setCoPaymentOptions() {
|
||||
if (document.getElementById("co_payment_yes").checked) {
|
||||
$('#co_payment_share').show();
|
||||
}
|
||||
if (document.getElementById("co_payment_no").checked) {
|
||||
$('#co_payment_share').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function setTrackingOption() {
|
||||
if (document.getElementById("tracking_yes").checked) {
|
||||
$('#tracking_expense_account_div').show();
|
||||
$('#tracking_expense_account').attr('required', true);
|
||||
}
|
||||
if (document.getElementById("tracking_no").checked) {
|
||||
$('#tracking_expense_account_div').hide();
|
||||
$('#tracking_expense_account').attr('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
function displayOfDiscountThresholdDivs() {
|
||||
if (document.getElementById("is_pay_later_threshold_discount_yes").checked) {
|
||||
$('.set_threshold_div').show();
|
||||
$('#threshold_type').attr('required', true);
|
||||
$('#threshold_amount').attr('required', true);
|
||||
}
|
||||
if (document.getElementById("is_pay_later_threshold_discount_no").checked) {
|
||||
$('.set_threshold_div').hide();
|
||||
$('#threshold_type').attr('required', false);
|
||||
$('#threshold_amount').attr('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
function setDiscountOption() {
|
||||
var selector = document.getElementById('threshold_type');
|
||||
var discountTypeValue = selector[selector.selectedIndex].value;
|
||||
|
||||
if (discountTypeValue == 1) {
|
||||
$('.discount_amount').hide();
|
||||
}
|
||||
|
||||
if (discountTypeValue == 2) {
|
||||
$('.discount_amount').show();
|
||||
}
|
||||
}
|
||||
|
||||
function setDiscountPercentageOptions(percentage) {
|
||||
if (percentage > 0) {
|
||||
$('#track_discount_div').show();
|
||||
$('#tracking_yes').attr('required', true);
|
||||
$('#tracking_no').attr('required', true);
|
||||
} else {
|
||||
$('#track_discount_div').hide();
|
||||
$('#tracking_yes').attr('required', false);
|
||||
$('#tracking_no').attr('required', false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+83
@@ -0,0 +1,83 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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">{{ __('discounts.patient_category_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i>{{ __('discounts.view_discounts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => 'discounts.store_edited_insured_drugs','data-toggle'=>'validator']) }}
|
||||
{{ Form::hidden('patient_category_id', $patient_category_id) }}
|
||||
|
||||
<h3>Drugs covered by {{ get_name($patient_category_id, 'id', 'name', 'patient_categories') }}</h3>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Drug Name</th>
|
||||
<th>Is Not Covered</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
@php
|
||||
$patient_category_coverage = explode(",", $drug->patient_category_coverage);
|
||||
$is_drug_covered = in_array($patient_category_id, $patient_category_coverage);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $drug->name }}</td>
|
||||
<td>
|
||||
@if($is_drug_covered)
|
||||
{{ Form::hidden('current_covered[]', $drug->id) }}
|
||||
@endif
|
||||
|
||||
{{ Form::checkbox('is_covered[]', $drug->id, $is_drug_covered, ['class' => 'item_checkbox']) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('patients.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('patients.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
@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">{{ __('discounts.patient_category_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discounts.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('discounts.index') }}"><i class="fa fa-eye"></i> {{ __('discounts.view_discounts') }}</a></li>
|
||||
<li class="active"><i class="fa fa-trash"></i> {{ __('discounts.inactive_discounts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('discounts.patient_category') }}</th>
|
||||
<th>{{ __('discounts.discount') }}</th>
|
||||
<th>{{ __('discounts.pay_late') }}</th>
|
||||
<th class="text-center">{{ __('discounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($discounts) > 0)
|
||||
@foreach($discounts as $discount)
|
||||
<tr>
|
||||
<td>{{ $categories[$discount->patient_category] }}</td>
|
||||
<td>{{ $discount->discount }}</td>
|
||||
<td>{{ $discount->pay_later == 1 ? "Yes" : "No" }}</td>
|
||||
<td>
|
||||
{{ Form::model($discount->id ,['method' => 'POST', 'route' => ['discounts.activate', $discount->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('Are you sure?')"><i class="fa fa-check"></i> Restore</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="warning"><td class="center" colspan="5">{{ __('discounts.no_discounts_found') }}</td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $discounts->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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">{{ __('discounts.patient_category_discounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('discounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('discounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i>{{ __('discounts.view_discounts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('discounts.patient_category') }}</th>
|
||||
<th>{{ __('discounts.discount') }}</th>
|
||||
<th>{{ __('discounts.co_payment') }}</th>
|
||||
<th>{{ __('discounts.pay_later') }}</th>
|
||||
<th>Threshold</th>
|
||||
<th>Add dependants</th>
|
||||
<th>{{ __('discounts.action') }}</th>
|
||||
<th>{{ __('discounts.action') }}</th>
|
||||
<th>{{ __('discounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($discounts) > 0)
|
||||
@foreach($discounts as $discount)
|
||||
<tr>
|
||||
<td>{{ $categories[$discount->patient_category] ?? "" }}</td>
|
||||
<td>{{ $discount->discount }}</td>
|
||||
<td>@if($discount->co_payment_share) {{ $discount->co_payment_share }} @else <label class='label label-danger'>{{ __('discounts.not_set') }}</label>@endif</td>
|
||||
<td>{{ $discount->pay_later == 1 ? "Yes" : "No" }}</td>
|
||||
<td>{{ is_null($discount->threshold_amount) ? "" : ugandan_shillings($discount->threshold_amount) }}</td>
|
||||
<td>
|
||||
@if(!is_null($discount->threshold_type))
|
||||
@if( Auth::user()->can('view-dependants-to-patient'))
|
||||
{{ Form::open(['method'=>'post','url' => 'discounts/add_dependants']) }}
|
||||
{{ Form::hidden('discount_id', $discount->id) }}
|
||||
{{ Form::submit('View dependants', ['class' => 'btn btn-primary btn-rounded btn-sm']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($discount->pay_later == 1 && Auth::user()->can('change-drugs-covered-by-category'))
|
||||
<a href="/discounts/edit_insured_drugs/{{ $discount->patient_category }}/" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> Edit Insured Drugs</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->can('discount-list'))
|
||||
<a href="/discounts/{{ $discount->id }}/edit/" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> {{ __('discounts.edit') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->can('discount-list'))
|
||||
{{ Form::model($discount->id ,['method' => 'DELETE', 'route' => ['discounts.destroy', $discount->id]]) }}
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to remove this patient discount?')"><i class="fa fa-trash"></i> {{ __('discounts.delete') }}</button>
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="warning"><td class="center" colspan="8">{{ __('discounts.no_discounts_found') }}</td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $discounts->links() }}
|
||||
</div>
|
||||
</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/jszip.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 src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
order: [[3, 'desc']],
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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-6 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Patient Category Dependants</h4>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">Patient Category Dependants</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<h4> Showing patients for {{ $patient_discount->threshold_type == 1 ? "Monthly" : "Yearly" }} Discount <font color="blue">{{ get_name($patient_discount->patient_category, "id", "name", "patient_categories") }}, registered on {{ streamline_date($patient_discount->created_on) }}</font></h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-table success-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Patient Name</th>
|
||||
<th>Threshold Amount</th>
|
||||
<th>Current Balance</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($patient_category_patients) > 0)
|
||||
@foreach($patient_category_patients as $patient)
|
||||
<tr>
|
||||
<td>
|
||||
<b>Main patient:</b><br>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ url('patients/') }}/{{ $patient->id }}">{{ $patient->first_name }} {{ $patient->last_name }} ({{$patient->number}})</a>
|
||||
</li>
|
||||
</ul>
|
||||
@php
|
||||
$existing_dependants_record_collection = \Streamline\Models\CategoryPatientDependant::where('main_patient_id', $patient->id)->get();
|
||||
$existing_record = null;
|
||||
$dependants_array = [];
|
||||
if (count($existing_dependants_record_collection) > 0) {
|
||||
$existing_record = $existing_dependants_record_collection->first();
|
||||
$dependants_array = explode(",", $existing_record->dependant_patient_ids);
|
||||
echo "<b>Dependants</b>";
|
||||
}
|
||||
@endphp
|
||||
<ul>
|
||||
@for($i=0; $i < count($dependants_array); $i++)
|
||||
<li><a href="{{ url('patients/') }}/{{$dependants_array[$i]}}">{{ get_full_name($dependants_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($dependants_array[$i], "id", "number", "patients")}})</a></li>
|
||||
@endfor
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($patient_discount->threshold_amount) }}</td>
|
||||
<td>
|
||||
{{ ugandan_shillings(get_balance_from_category_threshold($patient->id)) }}
|
||||
</td>
|
||||
<td>
|
||||
@if( Auth::user()->can('view-dependants-to-patient') && count($dependants_array) > 0)
|
||||
<a href="{{ url('view_dependants_to_category_patient') }}/{{ $patient->id }}" class="btn btn-info"><i class="fa fa-eye"></i> View dependants</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if( Auth::user()->can('add-dependants-to-patient'))
|
||||
{{ Form::open(['method'=>'post','url' => 'discounts/add_dependants_to_category_patient']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
{{ Form::hidden('patient_category', $patient_discount->patient_category) }}
|
||||
{{ Form::hidden('patient_discount_id', $patient_discount->id) }}
|
||||
{{ Form::submit('Add dependants', ['class' => 'btn btn-primary']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="warning"><td class="center" colspan="9">No records found</td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</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/jszip.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 src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
order: [[3, 'desc']],
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@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">List of dependants</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="{{ route('discounts.index') }}">Discounts</a></li>
|
||||
<li class="active">List of dependants</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@if(!is_null($dependants_record))
|
||||
<h4> List of dependants for <font color="blue">{{ $patient->first_name }} {{ $patient->last_name }} {{ $patient->number }} <strong>({{ get_name($dependants_record->patient_category_id, "id", "name", "patient_categories") }})</strong></font></h4>
|
||||
|
||||
@php
|
||||
$dependants_array = explode(",", $dependants_record->dependant_patient_ids);
|
||||
@endphp
|
||||
<ul>
|
||||
@for($i=0; $i < count($dependants_array); $i++)
|
||||
<li><a href="{{ url('patients/') }}/{{$dependants_array[$i]}}">{{ get_full_name($dependants_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($dependants_array[$i], "id", "number", "patients")}})</a></li>
|
||||
@endfor
|
||||
</ul>
|
||||
@else
|
||||
<font style="color: red; font-size: 18px;"><strong>There are no recorded dependants for this patient </strong></font>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#dependants').select2({
|
||||
placeholder: "Select dependants"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.add_family_deposit') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.add_family_deposit') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ Form::open(['method'=>'post','route'=>'family_accounts.store_family_deposit']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_head',__('family_accounts.family_head')) }}
|
||||
{{ Form::text('family_head', get_full_name($family_account_details->family_head_id, "id", "first_name", "last_name", "patients"), ['class' => 'form-control col-sm-12 compulsory', 'readonly' => 'true']) }}
|
||||
</div>
|
||||
|
||||
{{ Form::hidden('family_account_id', $family_account_details->id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposit_amount',__('family_accounts.amount_deposited')) }}
|
||||
{{ Form::number('deposit_amount', '',['class' => 'form-control compulsory', 'id' => 'deposit_amount', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="label label-primary" id="add_payment_method_button" onclick="add_payment_method();">Add Payment Method</label>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
<div id="payment_methods_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('cash_to_pay','Cash to Pay') }}
|
||||
{{ Form::hidden('original_cash_to_pay', 0, ['id' => 'original_cash_to_pay']) }}
|
||||
{{ Form::number('cash_to_pay',0,['class' => 'form-control','id'=>'cash_to_pay','readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposit_date', __('family_accounts.deposited_on')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('deposit_date', date('d-m-Y'), ['class'=>'form-control compulsory', 'required' , 'readonly', 'id'=>'deposit_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposited_by', __('family_accounts.deposited_by')) }}
|
||||
{{ Form::text('deposited_by', '', ['class'=>'form-control required compulsory', 'required', 'id'=>'deposit_by']) }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h3>{{ __('family_accounts.family_members') }}</h3>
|
||||
@php
|
||||
$family_members_array = explode(",", $family_account_details->family_members_ids);
|
||||
@endphp
|
||||
<ol>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
<a href="patients/{{ $family_members_array[$i] }}">{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}</a>
|
||||
<br>
|
||||
<strong>{{ __('family_accounts.number') }} </strong>{{ get_name($family_members_array[$i], "id", "number","patients") }}
|
||||
<br>
|
||||
<strong>{{ __('family_accounts.contact') }}</strong>{{ get_name($family_members_array[$i], "id", "phone","patients") }}<br>
|
||||
<strong>{{ __('family_accounts.residence') }}</strong>{{ patient_residence($family_members_array[$i]) }}
|
||||
</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.family_dropdown').select2({
|
||||
placeholder: "Select member"
|
||||
});
|
||||
$('.select2-selection.select2-selection--single').css('height','calc(3.85rem)');
|
||||
$('.select2-selection.select2-selection--single').css('padding-top','5px');
|
||||
$('.select2-selection.select2-selection--single').css('border-left', '3px solid #F08080');/*add compulsory class*/
|
||||
$('.select2-selection.select2-selection--single.sec_d').css('border-left', '3px solid #aaa');
|
||||
$('.select2-selection__arrow').css('top','3px');
|
||||
|
||||
$('#deposit_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
});
|
||||
|
||||
$('#deposit_amount').change(function (e) {
|
||||
reset_payment_methods_amounts();
|
||||
});
|
||||
|
||||
function add_payment_method() {
|
||||
$('#payment_methods_div').show();
|
||||
|
||||
if ($('#cash_to_pay').val() == 0) {
|
||||
$('#cash_to_pay').val( $('#deposit_amount').val());
|
||||
$('#original_cash_to_pay').val( $('#deposit_amount').val());
|
||||
}
|
||||
|
||||
$('#payment_methods_div').append('<div class="row"><div class="col-md-6"><label>Payment Method</label><select class="form-control payment_method" name="payment_method[]"><option value="0">--select method--</option><?php echo $patient_payment_methods_options ?></select></div><div class="col-md-6"><label>Payment Amount</label><input name="payment_methods_amount[]" type="number" class="form-control payment_methods_amount" onkeyup="payment_methods_amount_calculate()"></div></div><br>');
|
||||
}
|
||||
|
||||
function payment_methods_amount_calculate() {
|
||||
// tally up all the entered values
|
||||
let total_amount_payment_methods = 0;
|
||||
|
||||
$('.payment_methods_amount').each(function () {
|
||||
total_amount_payment_methods += +$(this).val();
|
||||
});
|
||||
|
||||
let cash_to_pay = $('#original_cash_to_pay').val();
|
||||
cash_to_pay -= total_amount_payment_methods;
|
||||
|
||||
if (cash_to_pay < 0) {
|
||||
alert("You have entered more money in the payment methods than is supposed to be paid");
|
||||
$('#cash_to_pay').val($('#original_cash_to_pay').val());
|
||||
$('.payment_methods_amount').each(function () {
|
||||
$(this).val(0);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#cash_to_pay').val(cash_to_pay);
|
||||
}
|
||||
|
||||
function reset_payment_methods_amounts() {
|
||||
$('#cash_to_pay').val( $('#deposit_amount').val());
|
||||
$('#original_cash_to_pay').val( $('#deposit_amount').val());
|
||||
|
||||
$('.payment_methods_amount').each(function () {
|
||||
$(this).val(0);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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">Cancel Family Account Deposit</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/finance">Finance</a></li>
|
||||
<li><a href="/family_accounts_deposits_report">Family Deposits</a></li>
|
||||
<li class="active">Cancel Family Deposit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Family Members</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$members_array = explode(",", $family_account->family_members_ids);
|
||||
@endphp
|
||||
|
||||
@for($i=0; $i < count($members_array); $i++)
|
||||
<tr>
|
||||
<th><a href="patients/{{ $members_array[$i] }}">{{ get_full_name($members_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($members_array[$i], "id", "number", "patients") }})</a></th>
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{--<div class="col-md-1"></div>--}}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
{{ Form::open(['method'=>'post','url'=>'family_account_deposit_cancellation']) }}
|
||||
|
||||
{{ Form::hidden('deposit_id', $family_deposit->id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposited_by', 'Deposited By') }}
|
||||
{{ Form::text('deposited_by', $family_deposit->deposited_by, ['class'=>'form-control compulsory', 'readonly', ]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposited_amount', 'Deposited Amount') }}
|
||||
{{ Form::text('deposited_amount', ugandan_shillings($family_deposit->deposit_amount), ['class'=>'form-control compulsory', 'readonly', ]) }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('received_by', "Received By") }}
|
||||
{{ Form::text('received_by', get_full_name($family_deposit->created_by, "id", "first_name", "last_name", "users"), ['class'=>'form-control compulsory', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('reason_name', 'Reason For Cancellation') }}
|
||||
{{ Form::textarea('reason', '', ['class'=>'form-control compulsory required', 'rows'=>'5', 'cols' => '10', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::submit('Cancel Deposit', ['class' => 'btn btn-success']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
Executable
+180
@@ -0,0 +1,180 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.create_family_account') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.create_family_account') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{{ Form::open(['method'=>'post','route'=>'family_accounts.store', 'id' => 'family_account_form']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_head', __('family_accounts.family_head')) }}
|
||||
<select class="patient_name form-control" name="family_head" id="family_head_name"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_members',__('family_accounts.family_members')) }}
|
||||
<select class="patient_name form-control" name="family_members[]" id="patient_name" multiple="true"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposit_amount', __('family_accounts.amount_deposited')) }}
|
||||
{{ Form::number('deposit_amount',0,['class' => 'form-control', 'id' => 'deposit_amount']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="initial_div" style="display: none;">
|
||||
<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<span>Is this amount part of the opening family account amounts on Stre@mline. This will affect Equity in case it is</span>
|
||||
</div>
|
||||
{{ Form::label('is_it_opening_family_amount', 'Is it the opening balance on Stre@mline for this family') }}
|
||||
{{ Form::select('is_it_opening_family_amount', [0 => 'No', 1 => 'Yes'], null, ['class' => 'form-control compulsory','required', 'id' => 'is_it_opening_amt']) }}
|
||||
<br>
|
||||
|
||||
<div class="form-group" id="opening_account_div" style="display: none;">
|
||||
{{ Form::label('opening_account_id', 'Opening Account') }}
|
||||
{{ Form::select('opening_account_id', $chart_of_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="input-group" id="opening_date_div" style="display: none;">
|
||||
<input type="text" name="opening_amount_date" placeholder="Opening amount deposit date" class="form-control col-sm-12" autocomplete="off" id="opening_amount_date">
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposited_by', __('family_accounts.deposited_by')) }}
|
||||
{{ Form::text('deposited_by', '', ['class'=>'form-control', 'id'=>'deposit_by']) }}
|
||||
</div>
|
||||
|
||||
@if (Auth::user()->can('add-family-account-credit-limit'))
|
||||
<div class="form-group">
|
||||
{{ Form::label('credit_limit', __('family_accounts.credit_limit')) }}
|
||||
{{ Form::number('credit_limit',0,['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success', 'id' => 'submitBtn'])}}
|
||||
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.family_dropdown').select2({
|
||||
placeholder: "Select member"
|
||||
});
|
||||
|
||||
$('.select2-selection.select2-selection--single').css('height','calc(3.85rem)');
|
||||
$('.select2-selection.select2-selection--single').css('padding-top','5px');
|
||||
$('.select2-selection.select2-selection--single').css('border-left', '3px solid #F08080');/*add compulsory class*/
|
||||
$('.select2-selection.select2-selection--single.sec_d').css('border-left', '3px solid #aaa');
|
||||
$('.select2-selection__arrow').css('top','3px');
|
||||
|
||||
$('#deposit_amount').change(function(e) {
|
||||
//if ($('#deposit_amount').val() > 0) {
|
||||
$('#initial_div').show();
|
||||
//}
|
||||
});
|
||||
|
||||
$('#is_it_opening_amt').click(function(e){
|
||||
var outcome = $("#is_it_opening_amt :selected").val();
|
||||
if (outcome == 1) { //1=yes
|
||||
$('#opening_account_div').show();
|
||||
$('#opening_date_div').show();
|
||||
$('#opening_account_id').attr("required", "true");
|
||||
}
|
||||
else{
|
||||
$('#opening_account_div').hide();
|
||||
$('#opening_date_div').hide();
|
||||
$('#opening_account_id').removeAttr("required");
|
||||
}
|
||||
});
|
||||
|
||||
$('.patient_name').select2({
|
||||
placeholder: "Search name",
|
||||
ajax: {
|
||||
url: '/search_family_account_name',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name+ " - " + item.number+ " (" + item.phone + ")",
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#opening_amount_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
|
||||
$('#submitBtn').click(function(e){
|
||||
let deposit_amount = $('#deposit_amount').val();
|
||||
let is_it_opening_balance = $('#is_it_opening_amt :selected').val();
|
||||
if((deposit_amount < 0) && is_it_opening_balance == 0){
|
||||
alert('Deposited amount can not be negative if it is not the opening balance of the family');
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
docker/statistics/Modules/PatientDiscounts/Resources/views/family_accounts/deposit_receipt.blade.php
Executable
+161
@@ -0,0 +1,161 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4>{{ __('family_accounts.family_account_deposit_receipt') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('family_accounts.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('patient_finance.home') }}">{{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active">{{ __('family_accounts.family_account_deposit_receipt') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
@php
|
||||
$hospital_information = \Streamline\Models\HospitalInformation::first();
|
||||
@endphp
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.tel') }}</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.email') }}</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.cashier') }}</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.date') }}</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.receipt_number') }}</b> {{ $receipt_number }} @if(str_contains(url()->current(), 'family_deposit_reprint'))<span style="color:maroon; font-weight:900">(Reprinted Receipt)</span>@endif</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.deposit_date') }}</b> {{ streamline_date($new_family_deposit->deposit_date) }}</span><br>
|
||||
</p>
|
||||
|
||||
@php
|
||||
$family_account_details = \Streamline\Models\FamilyAccount::find($new_family_deposit->family_account_id);
|
||||
$family_head_name = get_full_name($family_account_details->family_head_id, "id", "first_name", "last_name", "patients");
|
||||
@endphp
|
||||
|
||||
@if(should_members_display_on_deposit_receipt())
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>{{ __('family_accounts.family_members') }}</b></th>
|
||||
<th style="width: 20%"><b>{{ __('family_accounts.amount_deposited') }}</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><ol>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}({{ get_name($family_members_array[$i], "id", "number","patients") }})
|
||||
</li>
|
||||
@endfor
|
||||
</ol></td>
|
||||
<td><b>{{ ugandan_shillings($new_family_deposit->deposit_amount) }}</b></td>
|
||||
</tr>
|
||||
|
||||
@if(count($return_payment_methods) > 0)
|
||||
<tr><td colspan="2"></td></tr>
|
||||
@foreach($return_payment_methods as $key => $value)
|
||||
<tr>
|
||||
<td><b>Patient Paid With {{ ($key == 0) ? 'Cash' : get_name($key, 'id', 'name', 'patient_payment_methods') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($value) }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Family Head: </th>
|
||||
<td>{{$family_head_name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Amount</th>
|
||||
<td>
|
||||
<b>{{ ugandan_shillings($new_family_deposit->deposit_amount) }}</b>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">{{ __('family_accounts.streamline') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+239
@@ -0,0 +1,239 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.family_account_deposit_report') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.family_account_deposit_report') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => 'family_accounts_deposits_report', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_account_id', __('family_accounts.family_of')) }}
|
||||
{{ Form::select('family_account_id', $family_accounts_array, '', ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('staff_member', 'Staff Member') }}
|
||||
{{ Form::select('staff_member', $staff_members, null, ['class' => 'form-control', 'id' => 'staff_member', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Today','1'=>'Yesterday','2'=>'Custom Date','3'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" id="start_date_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="end_date_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@if($search_text != "")
|
||||
<h4><label class="label label-info">{{ $search_text }}</label></h4>
|
||||
<br>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>{{ __('family_accounts.total_deposits') }}</th>
|
||||
<th>Received By</th>
|
||||
<th>Deposited By</th>
|
||||
<th>Deposit Date</th>
|
||||
<th>Transaction Date</th>
|
||||
<th colspan="2">{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_family_deposits = 0; @endphp
|
||||
@foreach($family_deposits as $deposit)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
@php $family_head_id = get_name($deposit->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($family_head_id, "id", "first_name", "last_name", "patients") }} ({{ get_name($family_head_id, "id", "number","patients") }})
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($deposit->deposit_amount) }}
|
||||
@php $total_family_deposits += $deposit->deposit_amount; @endphp
|
||||
</td>
|
||||
<td>{{ $deposit->user_first_name . " " . $deposit->user_last_name }}</td>
|
||||
<td>{{ $deposit->deposited_by }}</td>
|
||||
<td>{{ $deposit->deposit_date }}</td>
|
||||
<td>{{ streamline_date_time($deposit->created_at) }}</td>
|
||||
<td>
|
||||
@if(Auth::user()->can('cancel-family-account-deposit') && $deposit->is_opening_amount != 1 && is_null($deposit->received))
|
||||
{{ Form::open(['url'=>'family_deposit_cancellation_reason']) }}
|
||||
{{ Form::hidden('deposit_id', $deposit->id) }}
|
||||
{{ Form::submit('Cancel Deposit', ['class' => 'btn btn-danger btn-sm', 'onclick' => 'return confirm("Are you sure you want to cancel this family deposit?")']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="/family_accounts/{{ $deposit->family_account_id }}/statement/" class="btn btn-primary btn-xs"><i class="fa fa-book"></i> Statement</a>
|
||||
<br>
|
||||
<a href="/family_deposit_reprint/{{ $deposit->id }}" class="btn btn-info btn-xs btn-rounded">Reprint</a>
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }} Amount Deposited</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_family_deposits) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script>
|
||||
|
||||
$('#start_date,#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if($(this).val() == 2){
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").show();
|
||||
} else if($(this).val() == 3){
|
||||
$("#end_date_div").show();
|
||||
$("#start_date_div").show();
|
||||
} else {
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'FAMILY CONSUMPTION'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'FAMILY CONSUMPTION',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
sheetName: 'FAMILY CONSUMPTION'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'LIST OF DRUGS',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'LIST OF DRUGS',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+181
@@ -0,0 +1,181 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.edit_family_account') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.edit_family_account') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ Form::model($family_account, ['method' => 'PUT', 'route' => ['family_accounts.update',$family_account], 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_head',__('family_accounts.family_head')) }}
|
||||
<select class="patient_name form-control" name="family_head" id="family_head_name">
|
||||
<option value="{{ $family_head_id }}">{{ $family_head_name }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_members',__('family_accounts.family_members')) }}
|
||||
<select class="patient_name form-control" name="family_members[]" multiple="true">
|
||||
@foreach($family_members_array as $family_member)
|
||||
<option value="{{ $family_member }}" selected>{{ get_full_name($family_member, 'id', 'first_name', 'last_name', 'patients') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('current_balance',__('family_accounts.current_balance')) }}
|
||||
{{ Form::number('current_balance', $current_balance,['class' => 'form-control', 'readonly' => 'true']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('opening_amount',__('family_accounts.opening_amount')) }}
|
||||
{{ Form::number('opening_amount', $family_account->opening_amount,['class' => 'form-control','id' => 'opening_amount']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="initial_div" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
|
||||
<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<span>
|
||||
Select affected <b>equity account</b> if the opening amount is the opening balance of this family on Stre@mline
|
||||
</span>
|
||||
</div>
|
||||
{{ Form::label('is_it_opening_family_amount', 'Is opening amount the opening balance on Stre@mline for this family') }}
|
||||
{{ Form::select('is_it_opening_family_amount', [1 => 'Yes', 0 => 'No'], is_null($family_account->opening_account_id) ? null : 1, ['class' => 'form-control compulsory','required', 'id' => 'is_it_opening_amt']) }}
|
||||
<br>
|
||||
|
||||
<div class="form-group" id="opening_account_div" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
|
||||
{{ Form::label('opening_account_id', 'Opening Account') }}
|
||||
{{ Form::select('opening_account_id', $chart_of_accounts, $family_account->opening_account_id, ['class' => 'form-control opening_account_id']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
|
||||
{{ Form::label('opening_account_date', 'Opening Amount Date') }}
|
||||
<div class="input-group" id="opening_date_div" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
|
||||
<input type="text" name="opening_amount_date" value="{{ $family_account->opening_amount_date}}" placeholder="Opening amount deposit date" class="form-control col-sm-12" id="opening_amount_date">
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposited_by', __('family_accounts.deposited_by')) }}
|
||||
{{ Form::text('deposited_by', $opening_deposit_record ? $opening_deposit_record->deposited_by : '', ['class'=>'form-control', 'id'=>'deposit_by']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Auth::user()->can('add-family-account-credit-limit'))
|
||||
<div class="form-group">
|
||||
{{ Form::label('credit_limit', __('family_accounts.credit_limit')) }}
|
||||
{{ Form::number('credit_limit',$family_account->credit_limit,['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.family_dropdown').select2({
|
||||
placeholder: "Select member"
|
||||
});
|
||||
|
||||
$('.select2-selection.select2-selection--single').css('height','calc(3.85rem)');
|
||||
$('.select2-selection.select2-selection--single').css('padding-top','5px');
|
||||
$('.select2-selection.select2-selection--single').css('border-left', '3px solid #F08080');/*add compulsory class*/
|
||||
$('.select2-selection.select2-selection--single.sec_d').css('border-left', '3px solid #aaa');
|
||||
$('.select2-selection__arrow').css('top','3px');
|
||||
|
||||
$('#opening_amount').change(function(e) {
|
||||
if ($('#opening_amount').val() > 0) {
|
||||
$('#initial_div').show();
|
||||
$('#opening_account_div').show();
|
||||
$('#opening_date_div').show();
|
||||
$('#opening_account_id').attr("required", "true");
|
||||
}
|
||||
});
|
||||
|
||||
$('#is_it_opening_amt').click(function(e){
|
||||
var outcome = $("#is_it_opening_amt :selected").val();
|
||||
if (outcome == 1) { //1=yes
|
||||
$('#opening_account_div').show();
|
||||
$('#opening_date_div').show();
|
||||
$('#opening_account_id').attr("required", "true");
|
||||
}
|
||||
else{
|
||||
$('#opening_account_div').hide();
|
||||
$('#opening_date_div').hide();
|
||||
$('#opening_account_id').removeAttr("required");
|
||||
}
|
||||
});
|
||||
|
||||
$('.patient_name').select2({
|
||||
placeholder: "Search name",
|
||||
ajax: {
|
||||
url: '/search_family_account_name',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name+ " - " + item.number+ " (" + item.phone + ")",
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#opening_amount_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.family_account_consumption_report') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.family_account_consumption_report') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => 'family_accounts_consumption_report', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_account_id', __('family_accounts.family_of')) }}
|
||||
{{ Form::select('family_account_id', $family_accounts_array, '', ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('staff_member', 'Staff Member') }}
|
||||
{{ Form::select('staff_member', $staff_members, null, ['class' => 'form-control', 'id' => 'staff_member', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Today','1'=>'Yesterday','2'=>'Custom Date','3'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" id="start_date_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="end_date_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@if($search_text != "")
|
||||
<h4><label class="label label-info">{{ $search_text }}</label></h4>
|
||||
<br>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Patient Information</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>{{ __('family_accounts.reason') }}</th>
|
||||
<th>{{ __('family_accounts.amount_consumed') }}</th>
|
||||
<th>Received By</th>
|
||||
<th>Receipt Number</th>
|
||||
<th>{{ __('family_accounts.date') }}</th>
|
||||
<th>{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_consumptions = 0; @endphp
|
||||
@foreach($family_consumptions as $family_consumption)
|
||||
@php
|
||||
$expenditure_type = $family_consumption->expenditure_tag;
|
||||
$items_received_array = [];
|
||||
|
||||
if (!is_null($family_consumption->receipt_number)) {
|
||||
$filters = ['receipt_number' => $family_consumption->receipt_number];
|
||||
} else {
|
||||
$filters = ['patient_id' => $family_consumption->patient_id, 'episode_id' => $family_consumption->episode_id];
|
||||
}
|
||||
|
||||
if($expenditure_type == "Services"){
|
||||
$service_deposit_record = \Illuminate\Support\Facades\DB::table('service_deposits')->where($filters)->first();
|
||||
|
||||
if ($service_deposit_record){
|
||||
$items_received = explode(",", $service_deposit_record->items_ids);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "services");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Treatment"){
|
||||
$treatment_deposit_record = \Illuminate\Support\Facades\DB::table('treatment_deposits')->where($filters)->first();
|
||||
|
||||
if ($treatment_deposit_record){
|
||||
$items_received = explode(",", $treatment_deposit_record->treatment_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "drugs");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Sundries"){
|
||||
$sundries_deposit_record = \Illuminate\Support\Facades\DB::table('sundries_deposits')->where($filters)->first();
|
||||
|
||||
if ($sundries_deposit_record){
|
||||
$items_received = explode(",", $sundries_deposit_record->sundry_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "sundries");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Investigations"){
|
||||
$investigation_deposit_record = \Illuminate\Support\Facades\DB::table('investigation_deposits')->where($filters)->first();
|
||||
|
||||
if ($investigation_deposit_record){
|
||||
$items_received = explode(",", $investigation_deposit_record->investigation_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "investigations");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Procedures"){
|
||||
$procedure_deposit_record = \Illuminate\Support\Facades\DB::table('procedure_deposits')->where($filters)->first();
|
||||
|
||||
if ($procedure_deposit_record){
|
||||
$items_received = explode(",", $procedure_deposit_record->procedure_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "procedures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $family_consumption->first_name . " " . $family_consumption->last_name }} ({{ $family_consumption->number }})</td>
|
||||
@php $family_head_id = get_name($family_consumption->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($family_head_id, "id", "first_name", "last_name", "patients") }} ({{ get_name($family_head_id, "id", "number","patients") }})
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $family_consumption->expenditure_tag == "Services" ? "Consultation / Services" : $family_consumption->expenditure_tag }}</strong>
|
||||
<ol>
|
||||
@for($j = 0; $j < count($items_received_array); $j++)
|
||||
<li>{{ $items_received_array[$j] }}</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($family_consumption->amount_consumed) }}
|
||||
@php $total_consumptions += $family_consumption->amount_consumed; @endphp
|
||||
</td>
|
||||
<td>{{ $family_consumption->user_first_name . " " . $family_consumption->user_last_name }}</td>
|
||||
<td>{{ $family_consumption->receipt_number }}</td>
|
||||
<td>{{ streamline_date_time($family_consumption->created_at) }}</td>
|
||||
<td>
|
||||
<a href="/family_accounts/{{ $family_consumption->family_account_id }}/statement/" class="btn btn-primary btn-sm"><i class="fa fa-book"></i> Statement</a>
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }} Amount Consumed</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_consumptions) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'FAMILY CONSUMPTION'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'FAMILY CONSUMPTION',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
sheetName: 'FAMILY CONSUMPTION'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'FAMILY CONSUMPTION',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'FAMILY CONSUMPTION',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#start_date,#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if($(this).val() == 2){
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").show();
|
||||
} else if($(this).val() == 3){
|
||||
$("#end_date_div").show();
|
||||
$("#start_date_div").show();
|
||||
} else {
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.activate_family_accounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.activate_family_accounts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="row">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>{{ __('family_accounts.family_members') }}</th>
|
||||
<th>{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($family_accounts as $family_account)
|
||||
<tr>
|
||||
{{-- <td>{{ get_full_name($family_account->family_head_id, "id", "first_name", "last_name", "patients") }} </td> --}}
|
||||
<td>
|
||||
{{ get_full_name($family_account->family_head_id, "id", "first_name", "last_name", "patients") }} ({{ get_name($family_account->family_head_id, "id", "number", "patients") }})
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$members_array = explode(",", $family_account->family_members_ids);
|
||||
@endphp
|
||||
<ol>
|
||||
@for($i=0; $i < count($members_array); $i++)
|
||||
<li>{{ get_full_name($members_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($members_array[$i], "id", "number", "patients") }})</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($family_account->id ,['method' => 'POST', 'route' => ['family_accounts.activate', $family_account->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('Are you sure ?');?>')"><i class="fa fa-check"></i> {{ __('family_accounts.activate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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/jszip.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',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+284
@@ -0,0 +1,284 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@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">{{ __('family_accounts.family_accounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.view_family_accounts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => 'family_accounts_search', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_account_id', __('family_accounts.family_of')) }}
|
||||
{{ Form::select('family_account_id', $family_accounts_array, '', ['class' => 'form-control compulsory', 'id' => 'family_account_id_dropdown']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@if(!is_null($reg_date))
|
||||
<h4>{{ __('family_accounts.showing_consumption_of') }}<font color="blue">{{ streamline_date($reg_date) }}</font></h4>
|
||||
@elseif(!is_null($start_date) && !is_null($end_date))
|
||||
<h4>{{ __('family_accounts.showing_consumption_from') }}<font color="blue">{{ streamline_date($start_date) }}</font> {{ __('family_accounts.to') }} <font color="blue">{{ streamline_date($end_date) }}</font></h4>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>{{ __('family_accounts.family_members') }}</th>
|
||||
<th>{{ __('family_accounts.last_deposit') }}</th>
|
||||
<th>{{ __('family_accounts.current_balance') }}</th>
|
||||
<th>{{ __('family_accounts.opening_amount') }}</th>
|
||||
<th>{{ __('family_accounts.credit_limit') }}</th>
|
||||
<th colspan="4">{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $current_balance_total = 0; @endphp
|
||||
@if(count($family_accounts) > 0)
|
||||
@foreach($family_accounts as $family_account)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>
|
||||
<a href="patients/{{ $family_account->family_head_id }}">{{ get_full_name($family_account->family_head_id, "id", "first_name", "last_name", "patients") }} ({{ get_name($family_account->family_head_id, "id", "number", "patients") }})</a>
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$members_array = explode(",", $family_account->family_members_ids);
|
||||
@endphp
|
||||
<ol>
|
||||
@for($i=0; $i < count($members_array); $i++)
|
||||
<li><a href="patients/{{ $members_array[$i] }}">{{ get_full_name($members_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($members_array[$i], "id", "number", "patients") }})</a></li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$family_deposit_record = \Streamline\Models\FamilyAccountDeposit::where('family_account_id', $family_account->id)->orderBy('id', 'desc')->get();
|
||||
$last_deposit_amount = 0;
|
||||
|
||||
if(count($family_deposit_record) > 0){
|
||||
$last_deposit_record_amount = $family_deposit_record->first();
|
||||
$last_deposit_amount = $last_deposit_record_amount->deposit_amount;
|
||||
}
|
||||
@endphp
|
||||
|
||||
{{ ugandan_shillings($last_deposit_amount) }}<br>
|
||||
<small>(Date: {{ get_name($family_account->id, "family_account_id", "created_at", "family_account_deposits") != "N/A" ? streamline_date(get_name($family_account->id, "family_account_id", "deposit_date", "family_account_deposits")) : "N/A" }})</small>
|
||||
</td>
|
||||
<td>
|
||||
{{ is_numeric($family_account->current_balance) ? ugandan_shillings($family_account->current_balance) : "N/A" }}
|
||||
|
||||
@php $current_balance_total += $family_account->current_balance; @endphp
|
||||
</td>
|
||||
<td>
|
||||
{{ is_numeric($family_account->opening_amount) ? ugandan_shillings($family_account->opening_amount) : "" }}
|
||||
</td>
|
||||
<td>
|
||||
{{ is_numeric($family_account->credit_limit) ? ugandan_shillings($family_account->credit_limit) : "" }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/family_accounts/{{ $family_account->id }}/edit/" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> {{ __('family_accounts.edit') }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::open(['url' => 'family_accounts/add_deposit']) }}
|
||||
{{ Form::hidden('family_account_id', $family_account->id) }}
|
||||
{{ Form::submit('Add deposit', ['class' => 'btn btn-success btn-sm']) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/family_accounts/{{ $family_account->id }}/statement/" class="btn btn-primary btn-sm"><i class="fa fa-book"></i> Statement</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($family_account->id, ['method' => 'DELETE', 'route' => ['family_accounts.destroy', $family_account->id], 'id' => 'delete_form_'.$family_account->id]) }}
|
||||
<button type="submit" class="btn btn-danger btn-sm" id="{{$family_account->id}}"><i class="fa fa-trash"></i> {{ __('family_accounts.deactivate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($current_balance_total) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
$('.btn-danger').click(function(e){
|
||||
let id = $(this).attr('id');
|
||||
e.preventDefault();
|
||||
let sure = confirm('Are you sure you want to remove this family account?');
|
||||
if(sure){
|
||||
$.ajax({
|
||||
url: '/get_family_acc_balance/'+id,
|
||||
data: {},
|
||||
success: function(response){
|
||||
console.log("family balance === "+response);
|
||||
if(response != 0){
|
||||
if(response > 0){
|
||||
alert("The family account has a balance of "+response+". First make a refund to the family before deleting the account");
|
||||
}
|
||||
|
||||
if(response < 0){
|
||||
alert("The family account has a balance of "+response+". Let the family pay the excess balance before deleting the account");
|
||||
}
|
||||
return false;
|
||||
} else{
|
||||
$('#delete_form_'+id).submit();
|
||||
}
|
||||
},
|
||||
error: function(response){
|
||||
console.log(response);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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/jszip.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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script>
|
||||
$('#family_account_id_dropdown').select2({
|
||||
placeholder: "-- select --"
|
||||
});
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
}
|
||||
else if ($(this).val() == 2) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
}
|
||||
else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<a href="{{ url('family_accounts/create') }}" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('family_accounts.create_family_account') }}</span></a>
|
||||
<a href="{{ url('family_accounts') }}" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-pencil"></i> <span style="margin-left: 10px">{{ __('family_accounts.view_family_accounts') }}</span></a>
|
||||
<a href="{{ url('family_accounts') }}" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-pencil"></i> <span style="margin-left: 10px">{{ __('family_accounts.add_family_account') }}</span></a>
|
||||
<a href="{{ route('family_accounts.consumption_report') }}" class="nav-item btn btn-primary" style="border-radius: 5px;"><i class="fa fa-book"></i> <span style="margin-left: 10px">{{ __('family_accounts.family_account_consumption_report') }}</span></a>
|
||||
<a href="{{ url('family_accounts_deposits_report') }}" class="nav-item btn btn-primary" style="border-radius: 5px;"><i class="fa fa-book"></i> <span style="margin-left: 10px">{{ __('family_accounts.family_account_deposit_report') }}</span></a>
|
||||
<a href="{{ route('family_accounts.inactive_family_accounts') }}" class="nav-item btn btn-danger" style="border-radius: 5px;"><i class="fa fa-book"></i> <span style="margin-left: 8px">{{ __('family_accounts.inactive_family_accounts') }}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Patient Receipt - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-size: 0.8em;
|
||||
}
|
||||
/*thead, tfoot { display: table-row-group }*/
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>{{ __('patient_finance.date') }}</b></td>
|
||||
<td colspan="2">{{ streamline_date_time_short($receipt_date) }}</td>
|
||||
<td><b>{{ __('patient_finance.receipt_number') }}</b></td>
|
||||
<td colspan="2">{{ $receipt_number }}</td>
|
||||
<td><b>{{ __('family_accounts.deposit_date') }}</b></td>
|
||||
<td colspan="2">{{ $new_family_deposit->deposit_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table table-bordered" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>{{ __('family_accounts.family_members') }}</b></th>
|
||||
<th style="width: 20%"><b>{{ __('family_accounts.amount_deposited') }}</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<ol>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}({{ get_name($family_members_array[$i], "id", "number","patients") }})
|
||||
</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td><b>{{ ugandan_shillings($new_family_deposit->deposit_amount) }}</b></td>
|
||||
</tr>
|
||||
|
||||
@if(count($return_payment_methods) > 0)
|
||||
<tr><td colspan="2"></td></tr>
|
||||
@foreach($return_payment_methods as $key => $value)
|
||||
<tr>
|
||||
<td><b>Patient Paid With {{ ($key == 0) ? 'Cash' : get_name($key, 'id', 'name', 'patient_payment_methods') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($value) }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<i style="font-size: 0.8em; float: left">© {{ date('Y') }} Stre@mline</i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<i style="float: right">Printed On {{ date(" d M Y h:ia") }} By {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Patient Receipt - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-size: 0.8em;
|
||||
}
|
||||
/*thead, tfoot { display: table-row-group }*/
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>{{ __('patient_finance.receipt_number') }}</b></td>
|
||||
<td>{{ $receipt_number }}</td>
|
||||
<td><b>Refund Date</b></td>
|
||||
<td>{{ $refund_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table table-bordered" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>{{ __('family_accounts.family_members') }}</b></th>
|
||||
<th style="width: 20%"><b>Amount Refunded</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<ol>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}({{ get_name($family_members_array[$i], "id", "number","patients") }})
|
||||
</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td><b>{{ ugandan_shillings($refund_amount) }}</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<i style="font-size: 0.8em; float: left">© {{ date('Y') }} Stre@mline</i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<i style="float: right">Printed On {{ date(" d M Y h:ia") }} By {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Executable
+169
@@ -0,0 +1,169 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">Refund Family Accounts</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> Refund Family Accounts</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ Form::open(['method'=>'post','route'=>'family_accounts.store_family_refund']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('family_head',__('family_accounts.family_head')) }}
|
||||
{{ Form::text('family_head', get_full_name($family_account_details->family_head_id, "id", "first_name", "last_name", "patients"), ['class' => 'form-control col-sm-12 compulsory', 'readonly' => 'true']) }}
|
||||
</div>
|
||||
|
||||
{{ Form::hidden('family_account_id', $family_account_details->id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('current_balance', 'Current Balance') }}
|
||||
{{ Form::number('current_balance', $family_account_details->current_balance,['class' => 'form-control compulsory', 'id' => 'current_balance', 'readonly']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('refund_amount', 'Amount to refund') }}
|
||||
{{ Form::number('refund_amount', '',['class' => 'form-control compulsory', 'id' => 'refund_amount', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_id','Account To Pay From') }}
|
||||
{{ Form::select('account_id', $banks, '', ['class' => 'form-control compulsory','required', 'id' => 'account_id', 'onchange' => 'get_bank_balance()']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_balance','Account Balance') }}
|
||||
{{ Form::text('account_balance', 0, ['class'=>'form-control compulsory', 'id'=>'account_balance', 'readonly']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('refund_date', 'Refund Date') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('refund_date', date('d-m-Y'), ['class'=>'form-control compulsory', 'required' , 'readonly', 'id'=>'refund_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('refunded_to', 'Refunded To') }}
|
||||
{{ Form::text('refunded_to', '', ['class'=>'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success submit_btn'])}}
|
||||
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h3>{{ __('family_accounts.family_members') }}</h3>
|
||||
@php
|
||||
$family_members_array = explode(",", $family_account_details->family_members_ids);
|
||||
@endphp
|
||||
<ol>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
<a href="patients/{{ $family_members_array[$i] }}">{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}</a>
|
||||
<br>
|
||||
<strong>{{ __('family_accounts.number') }} </strong>{{ get_name($family_members_array[$i], "id", "number","patients") }}
|
||||
<br>
|
||||
<strong>{{ __('family_accounts.contact') }}</strong>{{ get_name($family_members_array[$i], "id", "phone","patients") }}<br>
|
||||
<strong>{{ __('family_accounts.residence') }}</strong>{{ patient_residence($family_members_array[$i]) }}
|
||||
</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#refund_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
function get_bank_balance() {
|
||||
let refund_amount = parseInt($('#refund_amount').val());
|
||||
|
||||
if (!isNaN(refund_amount)) {
|
||||
let account_id = $('#account_id').val();
|
||||
|
||||
let today = new Date();
|
||||
let today_formatted = String(today.getDate()).padStart(2, '0') + '-' + String(today.getMonth() + 1).padStart(2, '0') + '-' + today.getFullYear();
|
||||
|
||||
if (account_id !== '') {
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '/banking/get_current_account_balance_per_date',
|
||||
data: {
|
||||
'bank': account_id,
|
||||
'date': today_formatted
|
||||
},
|
||||
async: true,
|
||||
success: function(response) {
|
||||
var bank_record = JSON.parse(response);
|
||||
var account_balance = bank_record['account_balance'];
|
||||
$('#account_balance').val(account_balance);
|
||||
|
||||
if (account_balance <= 0) {
|
||||
alert('Account Balance is Zero(0) UGX');
|
||||
$('.submit_btn').hide();
|
||||
} else if (refund_amount > account_balance) {
|
||||
alert('Your Account Balance is low');
|
||||
$('.submit_btn').hide();
|
||||
} else {
|
||||
$('.submit_btn').show();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(error) {
|
||||
//console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
alert("Please enter the refund before selecting an account");
|
||||
$('#account_id').val('');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+127
@@ -0,0 +1,127 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4>{{ __('family_accounts.family_account_deposit_receipt') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('family_accounts.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('patient_finance.home') }}">{{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active">{{ __('family_accounts.family_account_deposit_receipt') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
@php
|
||||
$hospital_information = \Streamline\Models\HospitalInformation::first();
|
||||
@endphp
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.tel') }}</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.email') }}</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.cashier') }}</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.date') }}</b> {{ streamline_date(date('Y-m-d')) }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.receipt_number') }}</b> {{ $receipt_number }}</span><br>
|
||||
<span class="receipt-label"><b>Refund Date</b> {{ streamline_date($refund_date) }}</span><br>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>{{ __('family_accounts.family_members') }}</b></th>
|
||||
<th style="width: 20%"><b>Amount Refunded</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><ol>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}({{ get_name($family_members_array[$i], "id", "number","patients") }})
|
||||
</li>
|
||||
@endfor
|
||||
</ol></td>
|
||||
<td><b>{{ ugandan_shillings($refund_amount) }}</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">{{ __('family_accounts.streamline') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+507
@@ -0,0 +1,507 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
@if(session()->get("print_family_account_receipt_pdf") == 1)
|
||||
{{ Form::hidden('print_family_account_receipt_pdf', 1, ['id' => 'print_family_account_receipt_pdf']) }}
|
||||
@endif
|
||||
|
||||
@if(session()->get("print_family_account_refund_receipt_pdf") == 1)
|
||||
{{ Form::hidden('print_family_account_refund_receipt_pdf', 1, ['id' => 'print_family_account_refund_receipt_pdf']) }}
|
||||
@endif
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-6 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Family Account Statement <font color="blue">{{ get_full_name($family_account_details->family_head_id, "id", "first_name", "last_name", "patients") }} ({{ get_name($family_account_details->family_head_id, "id", "number","patients") }})</font></h4>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> Family Account Statement</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::family_accounts.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
@php $family_head_id = get_name($family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
|
||||
{{ Form::open(['url' => 'family_accounts/' . $family_account_id . '/statement/', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
{{ Form::hidden('family_account_id', $family_account_id) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="col-md-1">
|
||||
<div style="float: right;">
|
||||
{{ Form::open(['url' => 'family_statement_print'])}}
|
||||
{{ Form::hidden('family_account_id', $family_account_id) }}
|
||||
{{ Form::hidden('reg_date', $reg_date) }}
|
||||
{{ Form::hidden('start_date', $start_date) }}
|
||||
{{ Form::hidden('end_date', $end_date) }}
|
||||
<button type="submit" class="btn btn-rounded" style="background-color: #03C03C; color: white;">
|
||||
<i class="fa fa-print"></i>
|
||||
<span>Print Statement</span>
|
||||
</button>
|
||||
{{ Form::close() }}
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!is_null($reg_date))
|
||||
<h2>Family Statement as at <font color="blue">{{ streamline_date($reg_date) }}</font></h2>
|
||||
@elseif(!is_null($start_date) && !is_null($end_date))
|
||||
<h2>Family statement as at <font color="blue">{{ streamline_date($start_date) }}</font> {{ __('family_accounts.to') }} <font color="blue">{{ streamline_date($end_date) }}</font></h2>
|
||||
@endif
|
||||
|
||||
<h3>Family Deposits</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('family_accounts.deposited_on') }}</th>
|
||||
<th>Received By</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>{{ __('family_accounts.deposited_by') }}</th>
|
||||
<th>{{ __('family_accounts.amount_deposited') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_family_deposits = 0; $current_balance_total = 0; @endphp
|
||||
@if(count($family_deposits) > 0)
|
||||
@foreach($family_deposits as $deposit)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ streamline_date($deposit->deposit_date) }}</td>
|
||||
<td>{{ get_full_name($deposit->created_by, "id", "first_name", "last_name", "users") }}</td>
|
||||
@php $family_head_id = get_name($deposit->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($family_head_id, "id", "first_name", "last_name", "patients") }}
|
||||
({{ get_name($family_head_id, "id", "number","patients") }})
|
||||
</td>
|
||||
@php
|
||||
$family_members_array = [];
|
||||
$family_account_details = \Streamline\Models\FamilyAccount::withTrashed()->find($deposit->family_account_id);
|
||||
$family_members_array = explode(",", $family_account_details->family_members_ids);
|
||||
@endphp
|
||||
{{--<td>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
<a href="patients/{{ $family_members_array[$i] }}">{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($family_members_array[$i], "id", "number","patients") }})</a>
|
||||
</li>
|
||||
@endfor
|
||||
</td>--}}
|
||||
<td>
|
||||
{{ $deposit->deposited_by }}
|
||||
</td>
|
||||
<td>
|
||||
@php $total_family_deposits += $deposit->deposit_amount; @endphp
|
||||
|
||||
{{ ugandan_shillings($deposit->deposit_amount) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="6" class="text-center"><code>No family deposits have been made</code></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ ugandan_shillings($total_family_deposits) }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h3>Family consumption</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('family_accounts.date') }}</th>
|
||||
<th>Member</th>
|
||||
<th>{{ __('family_accounts.reason') }}</th>
|
||||
<th>{{ __('family_accounts.amount_consumed') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_consumptions = 0; @endphp
|
||||
@if(count($family_consumptions) > 0)
|
||||
@foreach($family_consumptions as $member_consumption)
|
||||
|
||||
@php
|
||||
$expenditure_type = $member_consumption->expenditure_tag;
|
||||
$items_received_array = [];
|
||||
|
||||
if($expenditure_type == "Services"){
|
||||
|
||||
$service_deposit_record = \Streamline\Models\ServiceDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($service_deposit_record){
|
||||
$items_received = explode(",", $service_deposit_record->items_ids);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "services");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Treatment"){
|
||||
|
||||
$treatment_deposit_record = \Streamline\Models\TreatmentDeposits::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($treatment_deposit_record){
|
||||
$items_received = explode(",", $treatment_deposit_record->treatment_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "drugs");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Sundries"){
|
||||
|
||||
$sundries_deposit_record = \Streamline\Models\SundryDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($sundries_deposit_record){
|
||||
$items_received = explode(",", $sundries_deposit_record->sundry_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "sundries");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Investigations"){
|
||||
|
||||
$investigation_deposit_record = \Streamline\Models\InvestigationDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($investigation_deposit_record){
|
||||
$items_received = explode(",", $investigation_deposit_record->investigation_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "investigations");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Procedures"){
|
||||
|
||||
$procedure_deposit_record = \Streamline\Models\ProcedureDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($procedure_deposit_record){
|
||||
$items_received = explode(",", $procedure_deposit_record->procedure_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "procedures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
@php $family_head_id = get_name($member_consumption->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ streamline_date($member_consumption->created_at) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ get_full_name($member_consumption->patient_id, "id", "first_name", "last_name", "patients") }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $member_consumption->expenditure_tag == "Services" ? "Consultation / Services" : $member_consumption->expenditure_tag }}</strong>
|
||||
<ol>
|
||||
@for($j = 0; $j < count($items_received_array); $j++)
|
||||
<li>{{ $items_received_array[$j] }}</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($member_consumption->amount_consumed) }}
|
||||
@php
|
||||
$total_consumptions += $member_consumption->amount_consumed;
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="6" class="text-center"><code>No family consumption has been recorded</code></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ ugandan_shillings($total_consumptions) }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h3>Family Refunds</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Refunded On</th>
|
||||
<th>Cashier</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>Refunded To</th>
|
||||
<th>Amount Refunded</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_family_refunds = 0; @endphp
|
||||
@if(count($family_refunds) > 0)
|
||||
@foreach($family_refunds as $refund)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ streamline_date($refund->created_at) }}</td>
|
||||
<td>{{ get_full_name($refund->created_by, "id", "first_name", "last_name", "users") }}</td>
|
||||
@php $family_head_id = get_name($refund->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($family_head_id, "id", "first_name", "last_name", "patients") }}
|
||||
({{ get_name($family_head_id, "id", "number","patients") }})
|
||||
</td>
|
||||
<td>
|
||||
{{ $refund->refund_to }}
|
||||
</td>
|
||||
<td>
|
||||
@php $total_family_refunds += $refund->refund_amount; @endphp
|
||||
|
||||
{{ ugandan_shillings($refund->refund_amount) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="6" class="text-center"><code>No family refunds have been made</code></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ ugandan_shillings($total_family_refunds) }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bolder; font-size: 24px;">
|
||||
<br><br>
|
||||
<span><strong>Current Balance:</strong> {{ is_numeric($family_account_details->current_balance) ? ugandan_shillings($family_account_details->current_balance) : "N/A" }}</span>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<a href="/family_accounts/{{ $family_account_details->id }}/edit/" class="btn btn-info btn-block"><i class="fa fa-pencil"></i> {{ __('family_accounts.edit') }}</a>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
{{ Form::open(['url' => 'family_accounts/add_deposit']) }}
|
||||
{{ Form::hidden('family_account_id', $family_account_details->id) }}
|
||||
{{ Form::submit('Add deposit', ['class' => 'btn btn-success btn-block']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<a href="/family_accounts/{{ $family_account_details->id }}/statement/" class="btn btn-primary btn-block"><i class="fa fa-book"></i> Statement</a>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
{{ Form::model($family_account_details->id ,['method' => 'DELETE', 'route' => ['family_accounts.destroy', $family_account_details->id]]) }}
|
||||
<button type="submit" class="btn btn-danger btn-block" onclick="return confirm('Are you sure you want to remove this family account?')"><i class="fa fa-trash"></i> {{ __('family_accounts.deactivate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<a href="/family_accounts/refund/{{ $family_account_details->id }}" class="btn btn-default btn-block"> Refund Family Account</a>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script>
|
||||
if ($('#print_family_account_receipt_pdf').val() == 1) {
|
||||
var win = window.open('/print_family_account_receipt_pdf_details', '_blank');
|
||||
if (win) {
|
||||
win.focus();
|
||||
} else {
|
||||
alert('Please allow popups for Stre@mline');
|
||||
}
|
||||
}
|
||||
|
||||
if ($('#print_family_account_refund_receipt_pdf').val() == 1) {
|
||||
var win = window.open('/print_family_account_refund_receipt_pdf_details', '_blank');
|
||||
if (win) {
|
||||
win.focus();
|
||||
} else {
|
||||
alert('Please allow popups for Stre@mline');
|
||||
}
|
||||
}
|
||||
|
||||
var family_name = {!! json_encode(get_full_name($family_head_id, "id", "first_name", "last_name", "patients")) !!};
|
||||
$('.table111').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'CONSUMPTION DETAILS FOR THE FAMILY OF '+family_name
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'CONSUMPTION DETAILS FOR THE FAMILY OF '+family_name,
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 3, 4 ]
|
||||
},
|
||||
sheetName: 'CONSUMPTION DETAILS FOR THE FAMILY OF '+family_name
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'CONSUMPTION DETAILS FOR THE FAMILY OF '+family_name,
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 3, 4 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'CONSUMPTION DETAILS FOR THE FAMILY OF '+family_name,
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 3, 4 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
}
|
||||
else if ($(this).val() == 2) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
}
|
||||
else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Inpatient Bill - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style style="text-css">
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
|
||||
thead {
|
||||
/*display: table-header-group;*/
|
||||
}
|
||||
|
||||
tfoot {
|
||||
/*display: table-row-group;*/
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
<h5 class="heading" style="text-align: center;">Family Account Statement for <font color="blue">{{ get_full_name($family_account_details->family_head_id, "id", "first_name", "last_name", "patients")}} ({{ get_name($family_account_details->family_head_id, "id", "number", "patients")}})</font></h5>
|
||||
|
||||
<hr><br>
|
||||
|
||||
<h5>Family Account Deposits</h5>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<table class="table table-sm color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('family_accounts.deposited_on') }}</th>
|
||||
<th>{{ __('family_accounts.received_by') }}</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>{{ __('family_accounts.deposited_by') }}</th>
|
||||
<th>{{ __('family_accounts.amount_deposited') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_family_deposits = 0; $current_balance_total = 0; @endphp
|
||||
@if(count($family_deposits) > 0)
|
||||
@foreach($family_deposits as $deposit)
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ streamline_date($deposit->deposit_date) }}</td>
|
||||
<td>{{ get_full_name($deposit->created_by, "id", "first_name", "last_name", "users") }}</td>
|
||||
@php $family_head_id = get_name($deposit->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($family_head_id, "id", "first_name", "last_name", "patients") }}
|
||||
({{ get_name($family_head_id, "id", "number","patients") }})
|
||||
</td>
|
||||
@php
|
||||
$family_members_array = [];
|
||||
$family_account_details = \Streamline\Models\FamilyAccount::withTrashed()->find($deposit->family_account_id);
|
||||
$family_members_array = explode(",", $family_account_details->family_members_ids);
|
||||
@endphp
|
||||
{{--<td>
|
||||
@for($i = 0; $i < count($family_members_array); $i++)
|
||||
<li>
|
||||
<a href="patients/{{ $family_members_array[$i] }}">{{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }} ({{ get_name($family_members_array[$i], "id", "number","patients") }})</a>
|
||||
</li>
|
||||
@endfor
|
||||
</td>--}}
|
||||
<td>
|
||||
{{ $deposit->deposited_by }}
|
||||
</td>
|
||||
<td>
|
||||
@php $total_family_deposits += $deposit->deposit_amount; @endphp
|
||||
|
||||
{{ ugandan_shillings($deposit->deposit_amount) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ ugandan_shillings($total_family_deposits) }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr><br>
|
||||
|
||||
<h5>Family Account Consumptions</h5>
|
||||
<div class="row">
|
||||
<table class="table table-sm color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('family_accounts.date') }}</th>
|
||||
<th>{{ __('family_accounts.family_member') }}</th>
|
||||
<th>{{ __('family_accounts.reason') }}</th>
|
||||
<th>{{ __('family_accounts.amount_consumed') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_consumptions = 0; @endphp
|
||||
@if(count($family_consumptions) > 0)
|
||||
@foreach($family_consumptions as $member_consumption)
|
||||
|
||||
@php
|
||||
$expenditure_type = $member_consumption->expenditure_tag;
|
||||
$items_received_array = [];
|
||||
|
||||
if($expenditure_type == "Services"){
|
||||
|
||||
$service_deposit_record = \Streamline\Models\ServiceDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($service_deposit_record){
|
||||
$items_received = explode(",", $service_deposit_record->items_ids);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "services");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Treatment"){
|
||||
|
||||
$treatment_deposit_record = \Streamline\Models\TreatmentDeposits::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($treatment_deposit_record){
|
||||
$items_received = explode(",", $treatment_deposit_record->treatment_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "drugs");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Sundries"){
|
||||
|
||||
$sundries_deposit_record = \Streamline\Models\SundryDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($sundries_deposit_record){
|
||||
$items_received = explode(",", $sundries_deposit_record->sundry_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "sundries");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Investigations"){
|
||||
|
||||
$investigation_deposit_record = \Streamline\Models\InvestigationDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($investigation_deposit_record){
|
||||
$items_received = explode(",", $investigation_deposit_record->investigation_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "investigations");
|
||||
}
|
||||
}
|
||||
} elseif($expenditure_type == "Procedures"){
|
||||
|
||||
$procedure_deposit_record = \Streamline\Models\ProcedureDeposit::where(['patient_id' => $member_consumption->patient_id, 'episode_id' => $member_consumption->episode_id])->first();
|
||||
|
||||
if ($procedure_deposit_record){
|
||||
$items_received = explode(",", $procedure_deposit_record->procedure_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "procedures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>
|
||||
{{ streamline_date($member_consumption->created_at) }}
|
||||
</td>
|
||||
@php $family_head_id = get_name($member_consumption->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($member_consumption->patient_id, "id", "first_name", "last_name", "patients") }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $member_consumption->expenditure_tag == "Services" ? "Consultation / Services" : $member_consumption->expenditure_tag }}</strong>
|
||||
<ol>
|
||||
@for($j = 0; $j < count($items_received_array); $j++)
|
||||
<li>{{ $items_received_array[$j] }}</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($member_consumption->amount_consumed) }}
|
||||
@php
|
||||
$total_consumptions += $member_consumption->amount_consumed;
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ ugandan_shillings($total_consumptions) }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr><br>
|
||||
<h5>Family Refunds</h5>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Refunded On</th>
|
||||
<th>Cashier</th>
|
||||
<th>{{ __('family_accounts.family_head') }}</th>
|
||||
<th>Refunded To</th>
|
||||
<th>Amount Refunded</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_family_refunds = 0; @endphp
|
||||
@if(count($family_refunds) > 0)
|
||||
@foreach($family_refunds as $refund)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ streamline_date($refund->created_at) }}</td>
|
||||
<td>{{ get_full_name($refund->created_by, "id", "first_name", "last_name", "users") }}</td>
|
||||
@php $family_head_id = get_name($refund->family_account_id, "id", "family_head_id", "family_accounts") @endphp
|
||||
<td>
|
||||
{{ get_full_name($family_head_id, "id", "first_name", "last_name", "patients") }}
|
||||
({{ get_name($family_head_id, "id", "number","patients") }})
|
||||
</td>
|
||||
<td>
|
||||
{{ $refund->refund_to }}
|
||||
</td>
|
||||
<td>
|
||||
@php $total_family_refunds += $refund->refund_amount; @endphp
|
||||
|
||||
{{ ugandan_shillings($refund->refund_amount) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="6" class="text-center"><code>No family refunds have been made</code></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ ugandan_shillings($total_family_refunds) }}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr><br>
|
||||
|
||||
<div class="row" style="float: right; font-weight: bolder; font-size: 24px; padding-right: 50px; padding-bottom: 20px;">
|
||||
<span><strong>Current Balance:</strong> {{ is_numeric($family_account_details->current_balance) ? ugandan_shillings($family_account_details->current_balance) : "N/A" }}</span>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3>.</h3>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+331
@@ -0,0 +1,331 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">Patient Accounts Consumptions{{ __('patient_accounts.') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> Reports</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('patient_discounts::patient_accounts.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => 'patient_accounts/consumptions_report', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="patient_numbers">
|
||||
{{ Form::label('patient_number',__('investigations.patient_number')) }}
|
||||
{{ Form::text('patient_number', '', ['class' => 'form-control typeahead', 'placeholder' => 'Patient number', 'autocomplete' => 'off', 'spellcheck' => false]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@if(!is_null($reg_date))
|
||||
<h4>Showing consumption of <font color="blue">{{ streamline_date($reg_date) }}</font></h4>
|
||||
@elseif(!is_null($start_date) && !is_null($end_date))
|
||||
<h4>Showing consumption from<font color="blue">{{ streamline_date($start_date) }}</font> to <font color="blue">{{ streamline_date($end_date) }}</font></h4>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Patient Names</th>
|
||||
<th>Amount Consumed</th>
|
||||
<th>Date Consumed</th>
|
||||
<th>Staff</th>
|
||||
<th>Reason</th>
|
||||
<th>{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_consumption = 0; @endphp
|
||||
@foreach($patient_consumptions as $record)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($record->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($record->amount_consumed) }}
|
||||
@php $total_consumption += $record->amount_consumed; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
<td>{{ get_full_name($record->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
@php
|
||||
$tag_id = $record->tag_id;
|
||||
$items_received_array = [];
|
||||
|
||||
if($tag_id == 6 || $tag_id == 8){
|
||||
|
||||
$service_deposit_record = \Streamline\Models\ServiceDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($service_deposit_record){
|
||||
$items_received = explode(",", $service_deposit_record->items_ids);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "services");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 3){
|
||||
|
||||
$treatment_deposit_record = \Streamline\Models\TreatmentDeposits::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($treatment_deposit_record){
|
||||
$items_received = explode(",", $treatment_deposit_record->treatment_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "drugs");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 5){
|
||||
|
||||
$sundries_deposit_record = \Streamline\Models\SundryDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($sundries_deposit_record){
|
||||
$items_received = explode(",", $sundries_deposit_record->sundry_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "sundries");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 2){
|
||||
$investigation_deposit_record = \Streamline\Models\InvestigationDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($investigation_deposit_record){
|
||||
$items_received = explode(",", $investigation_deposit_record->investigation_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "investigations");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 4){
|
||||
|
||||
$procedure_deposit_record = \Streamline\Models\ProcedureDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($procedure_deposit_record){
|
||||
$items_received = explode(",", $procedure_deposit_record->procedure_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "procedures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<td>
|
||||
<strong>{{ get_name($record->tag_id, 'id', 'name', 'finance_point_tags') }}</strong>
|
||||
<ol>
|
||||
@for($j = 0; $j < count($items_received_array); $j++)
|
||||
<li>{{ $items_received_array[$j] }}</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/patient_accounts/view_details/{{ $record->patient_id }}/" class="btn btn-outline-success btn-sm"><i class="fa fa-book"></i> Statement</a>
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_consumption) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.min.js') }}"></script>
|
||||
<script>
|
||||
var substringMatcher = function (strs) {
|
||||
return function findMatches(q, cb) {
|
||||
var matches, substringRegex;
|
||||
|
||||
// an array that will be populated with substring matches
|
||||
matches = [];
|
||||
|
||||
// regex used to determine if a string contains the substring `q`
|
||||
substrRegex = new RegExp(q, 'i');
|
||||
|
||||
// iterate through the pool of strings and for any string that
|
||||
// contains the substring `q`, add it to the `matches` array
|
||||
$.each(strs, function (i, str) {
|
||||
if (substrRegex.test(str)) {
|
||||
matches.push(str);
|
||||
}
|
||||
});
|
||||
|
||||
cb(matches);
|
||||
};
|
||||
};
|
||||
|
||||
$('#patient_numbers .typeahead').typeahead(
|
||||
{
|
||||
hint: true,
|
||||
highlight: true,
|
||||
minLength: 1
|
||||
},
|
||||
{
|
||||
name: 'patient_numbers',
|
||||
source: substringMatcher(<?php echo json_encode($patient_numbers); ?>)
|
||||
}
|
||||
);
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'Patient Accounts'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'Patient Accounts',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
sheetName: 'Patient Accounts'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'Patient Accounts',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'Patient Accounts',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
}
|
||||
else if ($(this).val() == 2) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
}
|
||||
else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4>Patient Account Deposits{{ __('patient_accounts.') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('family_accounts.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('patient_finance.home') }}">{{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active">Patient Account Deposits Receipt{{ __('patient_accounts.') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print{{ __('patient_accounts.') }}</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
@php
|
||||
$hospital_information = \Streamline\Models\HospitalInformation::first();
|
||||
@endphp
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.tel') }}</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.email') }}</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.cashier') }}</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.date') }}</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('family_accounts.receipt_number') }}</b> {{ $receipt_number }}</span><br>
|
||||
<span class="receipt-label"><b>Transaction Date{{ __('patient_accounts.') }}</b> {{ streamline_date($deposit_date) }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('patient_finance.patient_names') }}</b> : {{ $patient->first_name }} {{ $patient->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('patient_finance.patient_number') }}</b> : {{ $patient->number }} </span><br>
|
||||
<span class="receipt-label"><b>{{ __('patient_finance.patient_category') }} :</b> {{ get_name($patient->category_id, "id", "name", "patient_categories") }}</span>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>{{ __('patient_finance.description') }}</b></th>
|
||||
<th style="width: 20%"><b>Amounts{{ __('patient_accounts.') }}</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $description }}</td>
|
||||
<td><b>{{ ugandan_shillings($deposit_amount) }}</b></td>
|
||||
</tr>
|
||||
|
||||
@if(count($return_payment_methods) > 0)
|
||||
<tr><td colspan="2"></td></tr>
|
||||
@foreach($return_payment_methods as $key => $value)
|
||||
<tr>
|
||||
<td><b>Patient Paid With{{ __('patient_accounts.') }} {{ ($key == 0) ? 'Cash' : get_name($key, 'id', 'name', 'patient_payment_methods') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($value) }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">{{ __('family_accounts.streamline') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+268
@@ -0,0 +1,268 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('patient_accounts.patient_accounts_deposits') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('patient_accounts.reports') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('patient_discounts::patient_accounts.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => 'patient_accounts/deposits_report', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="patient_numbers">
|
||||
{{ Form::label('patient_number',__('investigations.patient_number')) }}
|
||||
{{ Form::text('patient_number', '', ['class' => 'form-control typeahead', 'placeholder' => 'Patient number', 'autocomplete' => 'off', 'spellcheck' => false]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@if(!is_null($reg_date))
|
||||
<h4>{{ __('family_accounts.showing_deposit_of') }} <font color="blue">{{ streamline_date($reg_date) }}</font></h4>
|
||||
@elseif(!is_null($start_date) && !is_null($end_date))
|
||||
<h4>{{ __('family_accounts.showing_deposit_from') }}<font color="blue">{{ streamline_date($start_date) }}</font> {{ __('patient_accounts.to') }} <font color="blue">{{ streamline_date($end_date) }}</font></h4>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.deposit_amount') }}</th>
|
||||
<th>{{ __('patient_accounts.deposit_date') }}</th>
|
||||
<th>{{ __('patient_accounts.received_by') }}</th>
|
||||
<th>{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_deposits = 0; @endphp
|
||||
@if(count($patient_deposits) > 0)
|
||||
@foreach($patient_deposits as $deposit)
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($deposit->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($deposit->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($deposit->deposit_amount) }}
|
||||
@php $total_deposits += $deposit->deposit_amount; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date($deposit->deposit_date) }}</td>
|
||||
<td>{{ get_full_name($deposit->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>
|
||||
<a href="/patient_accounts/view_details/{{ $deposit->patient_id }}/" class="btn btn-outline-success btn-sm"><i class="fa fa-book"></i> {{ __('patient_accounts.statement') }}</a>
|
||||
<br><br>
|
||||
@if(Auth::user()->can('cancel-patient-accounts-deposits') && is_null($deposit->received))
|
||||
<a href="/patient_accounts/cancel_deposit/{{ $deposit->id }}/" class="btn btn-outline-primary btn-sm" onclick="return confirm('Are you sure you want to cancel this deposit?')"> {{ __('patient_accounts.cancel_deposit') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_deposits) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.min.js') }}"></script>
|
||||
<script>
|
||||
var substringMatcher = function (strs) {
|
||||
return function findMatches(q, cb) {
|
||||
var matches, substringRegex;
|
||||
|
||||
// an array that will be populated with substring matches
|
||||
matches = [];
|
||||
|
||||
// regex used to determine if a string contains the substring `q`
|
||||
substrRegex = new RegExp(q, 'i');
|
||||
|
||||
// iterate through the pool of strings and for any string that
|
||||
// contains the substring `q`, add it to the `matches` array
|
||||
$.each(strs, function (i, str) {
|
||||
if (substrRegex.test(str)) {
|
||||
matches.push(str);
|
||||
}
|
||||
});
|
||||
|
||||
cb(matches);
|
||||
};
|
||||
};
|
||||
|
||||
$('#patient_numbers .typeahead').typeahead(
|
||||
{
|
||||
hint: true,
|
||||
highlight: true,
|
||||
minLength: 1
|
||||
},
|
||||
{
|
||||
name: 'patient_numbers',
|
||||
source: substringMatcher(<?php echo json_encode($patient_numbers); ?>)
|
||||
}
|
||||
);
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'Patient Accounts'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'Patient Accounts',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
sheetName: 'Patient Accounts'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'Patient Accounts',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'Patient Accounts',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
}
|
||||
else if ($(this).val() == 2) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
}
|
||||
else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+147
@@ -0,0 +1,147 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('family_accounts.add_family_deposit') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.add_family_deposit') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('patient_discounts::patient_accounts.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('patient_discounts::patient_accounts.patient_details')
|
||||
|
||||
@include('flash::message')
|
||||
{{ Form::open(['method'=>'post','route'=>'patient_accounts.store_deposit']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposit_amount',__('family_accounts.amount_deposited')) }}
|
||||
{{ Form::number('deposit_amount', '',['class' => 'form-control compulsory', 'id' => 'deposit_amount', 'required']) }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="label label-primary" id="add_payment_method_button" onclick="add_payment_method();">{{ __('patient_accounts.add_payment_method') }}</label>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
<div id="payment_methods_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('cash_to_pay',__('patient_accounts.cash_to_pay')) }}
|
||||
{{ Form::hidden('original_cash_to_pay', 0, ['id' => 'original_cash_to_pay']) }}
|
||||
{{ Form::number('cash_to_pay',0,['class' => 'form-control','id'=>'cash_to_pay','readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success'])}}
|
||||
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('deposit_date', __('family_accounts.deposited_on')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('deposit_date', date('d-m-Y'), ['class'=>'form-control compulsory', 'required' , 'readonly', 'id'=>'deposit_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.family_dropdown').select2({
|
||||
placeholder: "Select member"
|
||||
});
|
||||
$('.select2-selection.select2-selection--single').css('height','calc(3.85rem)');
|
||||
$('.select2-selection.select2-selection--single').css('padding-top','5px');
|
||||
$('.select2-selection.select2-selection--single').css('border-left', '3px solid #F08080');/*add compulsory class*/
|
||||
$('.select2-selection.select2-selection--single.sec_d').css('border-left', '3px solid #aaa');
|
||||
$('.select2-selection__arrow').css('top','3px');
|
||||
|
||||
$('#deposit_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
});
|
||||
|
||||
$('#deposit_amount').change(function (e) {
|
||||
reset_payment_methods_amounts();
|
||||
});
|
||||
|
||||
function add_payment_method() {
|
||||
$('#payment_methods_div').show();
|
||||
|
||||
if ($('#cash_to_pay').val() == 0) {
|
||||
$('#cash_to_pay').val( $('#deposit_amount').val());
|
||||
$('#original_cash_to_pay').val( $('#deposit_amount').val());
|
||||
}
|
||||
|
||||
$('#payment_methods_div').append('<div class="row"><div class="col-md-6"><label>Payment Method</label><select class="form-control payment_method" name="payment_method[]"><option value="0">--select method--</option><?php echo $patient_payment_methods_options ?></select></div><div class="col-md-6"><label>Payment Amount</label><input name="payment_methods_amount[]" type="number" class="form-control payment_methods_amount" onkeyup="payment_methods_amount_calculate()"></div></div><br>');
|
||||
}
|
||||
|
||||
function payment_methods_amount_calculate() {
|
||||
// tally up all the entered values
|
||||
let total_amount_payment_methods = 0;
|
||||
|
||||
$('.payment_methods_amount').each(function () {
|
||||
total_amount_payment_methods += +$(this).val();
|
||||
});
|
||||
|
||||
let cash_to_pay = $('#original_cash_to_pay').val();
|
||||
cash_to_pay -= total_amount_payment_methods;
|
||||
|
||||
if (cash_to_pay < 0) {
|
||||
alert("You have entered more money in the payment methods than is supposed to be paid");
|
||||
$('#cash_to_pay').val($('#original_cash_to_pay').val());
|
||||
$('.payment_methods_amount').each(function () {
|
||||
$(this).val(0);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#cash_to_pay').val(cash_to_pay);
|
||||
}
|
||||
|
||||
function reset_payment_methods_amounts() {
|
||||
$('#cash_to_pay').val( $('#deposit_amount').val());
|
||||
$('#original_cash_to_pay').val( $('#deposit_amount').val());
|
||||
|
||||
$('.payment_methods_amount').each(function () {
|
||||
$(this).val(0);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
<div class="panel panel-default" style="border-radius: 5px;">
|
||||
<div class="panel-body">
|
||||
@if(Auth::user()->can('view-patient-accounts-deposits'))
|
||||
<a href="{{ route('patient_accounts.deposits_report') }}" class="nav-item btn btn-success"><i class="fa fa-plus"></i> <span style="margin-left: 10px;">{{ __('patient_accounts.patient_accounts_deposits_reports') }}</span></a>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->can('view-patient-accounts-refunds'))
|
||||
<a href="{{ route('patient_accounts.refunds_report') }}" class="nav-item btn btn-success"><i class="fa fa-plus"></i> <span style="margin-left: 10px;">{{ __('patient_accounts.patient_accounts_refunds_reports') }}</span></a>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->can('view-patient-accounts-consumptions'))
|
||||
<a href="{{ route('patient_accounts.consumptions_report') }}" class="nav-item btn btn-success"><i class="fa fa-plus"></i> <span style="margin-left: 10px;">{{ __('patient_accounts.patient_accounts_consumption_reports') }}</span></a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="color: black">{{ __('layout.patient_number') }}</th>
|
||||
<th style="color: black">{{ __('layout.patient_names') }}</th>
|
||||
<th style="color: black">{{ __('layout.gender') }}</th>
|
||||
<th style="color: black">{{ __('layout.age') }}</th>
|
||||
<th style="color: black">{{ __('patient_accounts.phone_number') }}</th>
|
||||
<th style="color: black">{{ __('patient_accounts.email') }}</th>
|
||||
<th style="color: black">{{ __('layout.patient_category') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $dob = new Carbon\Carbon($patient->date_of_birth) @endphp
|
||||
<tr>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<td>{!! insurance_flag($patient->id) !!}</td>
|
||||
<td>{{ $patient->gender == 1 ? __('layout.male') : __('layout.female') }}</td>
|
||||
<td>{{ $dob->diffInYears(Carbon\Carbon::now()) }} ({{ __('patient_accounts.years') }})</td>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
<td>{{ $patient->email }}</td>
|
||||
<td>{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Patient Receipt - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-size: 0.8em;
|
||||
}
|
||||
/*thead, tfoot { display: table-row-group }*/
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>{{ __('patient_finance.patient_names') }}</b></td>
|
||||
<td>{{ get_full_name($patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td><b>{{ __('patient_finance.date') }}</b></td>
|
||||
<td colspan="2">{{ streamline_date_time_short($receipt_date) }}</td>
|
||||
<td><b>{{ __('patient_finance.receipt_number') }}</b></td>
|
||||
<td colspan="2">{{ $receipt_number }}</td>
|
||||
<td><b>{{ __('patient_accounts.transaction_date') }}</b></td>
|
||||
<td colspan="2">{{ $deposit_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table table-bordered" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>{{ __('patient_accounts.details') }}</b></th>
|
||||
<th style="width: 20%"><b>{{ __('patient_accounts.amounts') }}</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $description }}</td>
|
||||
<td><b>{{ ugandan_shillings($deposit_amount) }}</b></td>
|
||||
</tr>
|
||||
|
||||
@if(count($return_payment_methods) > 0)
|
||||
<tr><td colspan="2"></td></tr>
|
||||
@foreach($return_payment_methods as $key => $value)
|
||||
<tr>
|
||||
<td><b>{{ __('patient_accounts.patient_paid_with') }} {{ ($key == 0) ? 'Cash' : get_name($key, 'id', 'name', 'patient_payment_methods') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($value) }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<i style="font-size: 0.8em; float: left">© {{ date('Y') }} Stre@mline</i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<i style="float: right">{{ __('patient_accounts.printed_on') }} {{ date(" d M Y h:ia") }} {{ __('patient_accounts.by') }} {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Inpatient Bill - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
<h5 class="heading" style="text-align: center;">{{ $search_info }}</h5>
|
||||
|
||||
<hr><br>
|
||||
|
||||
@if(count($patient_deposits) > 0)
|
||||
<h4><b>{{ __('patient_accounts.deposits') }}</b></h4>
|
||||
|
||||
<div>
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.deposit_amount') }}</th>
|
||||
<th>{{ __('patient_accounts.deposit_date') }}</th>
|
||||
<th>{{ __('patient_accounts.received_by') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_deposits = 0; @endphp
|
||||
@foreach($patient_deposits as $deposit)
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($deposit->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($deposit->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($deposit->deposit_amount) }}
|
||||
@php $total_deposits += $deposit->deposit_amount; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date($deposit->deposit_date) }}</td>
|
||||
<td>{{ get_full_name($deposit->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_deposits) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@if(count($patient_refunds) > 0)
|
||||
<h4><b>{{ __('patient_accounts.refunds') }}</b></h4>
|
||||
|
||||
<div>
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_amount') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_date') }}</th>
|
||||
<th>{{ __('patient_accounts.received_by') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_refunds = 0; @endphp
|
||||
@foreach($patient_refunds as $refund)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($refund->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($refund->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($refund->refund_amount) }}
|
||||
@php $total_refunds += $refund->refund_amount; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date($refund->refund_date) }}</td>
|
||||
<td>{{ get_full_name($refund->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_refunds) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@if(count($patient_consumptions) > 0)
|
||||
<h4><b>{{ __('patient_accounts.consumption') }}</b></h4>
|
||||
|
||||
<div>
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.amount_consumed') }}</th>
|
||||
<th>{{ __('patient_accounts.date_consumed') }}</th>
|
||||
<th>{{ __('patient_accounts.reason') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_consumption = 0; @endphp
|
||||
@foreach($patient_consumptions as $record)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($record->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($record->amount_consumed) }}
|
||||
@php $total_consumption += $record->amount_consumed; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
@php
|
||||
$tag_id = $record->tag_id;
|
||||
$items_received_array = [];
|
||||
|
||||
if($tag_id == 6 || $tag_id == 8){
|
||||
|
||||
$service_deposit_record = \Streamline\Models\ServiceDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($service_deposit_record){
|
||||
$items_received = explode(",", $service_deposit_record->items_ids);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "services");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 3){
|
||||
|
||||
$treatment_deposit_record = \Streamline\Models\TreatmentDeposits::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($treatment_deposit_record){
|
||||
$items_received = explode(",", $treatment_deposit_record->treatment_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "drugs");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 5){
|
||||
|
||||
$sundries_deposit_record = \Streamline\Models\SundryDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($sundries_deposit_record){
|
||||
$items_received = explode(",", $sundries_deposit_record->sundry_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "sundries");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 2){
|
||||
$investigation_deposit_record = \Streamline\Models\InvestigationDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($investigation_deposit_record){
|
||||
$items_received = explode(",", $investigation_deposit_record->investigation_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "investigations");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 4){
|
||||
|
||||
$procedure_deposit_record = \Streamline\Models\ProcedureDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($procedure_deposit_record){
|
||||
$items_received = explode(",", $procedure_deposit_record->procedure_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "procedures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<td>
|
||||
<strong>{{ get_name($record->tag_id, 'id', 'name', 'finance_point_tags') }}</strong>
|
||||
<ol>
|
||||
@for($j = 0; $j < count($items_received_array); $j++)
|
||||
<li>{{ $items_received_array[$j] }}</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_consumption) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bolder; font-size: 24px;">
|
||||
<br><br>
|
||||
<span><strong>{{ __('patient_accounts.current_balance') }}:</strong> {{ ugandan_shillings(get_name($patient_id, 'id', 'patient_account_balance', 'patients')) }}</span>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
docker/statistics/Modules/PatientDiscounts/Resources/views/patient_accounts/refund_deposit.blade.php
Executable
+136
@@ -0,0 +1,136 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('patient_accounts.refund_patient_accounts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('patient_accounts.refund_patient_accounts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('patient_discounts::patient_accounts.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('patient_discounts::patient_accounts.patient_details')
|
||||
|
||||
{{ Form::open(['method'=>'post','route'=>'patient_accounts.save_refund_deposit']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('current_balance', __('patient_accounts.current_balance')) }}
|
||||
{{ Form::number('current_balance', $current_balance,['class' => 'form-control compulsory', 'id' => 'current_balance', 'readonly']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('refund_amount', __('patient_accounts.refund_amount')) }}
|
||||
{{ Form::number('refund_amount', '',['class' => 'form-control compulsory', 'id' => 'refund_amount', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('refund_date', __('patient_accounts.refund_date')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('refund_date', date('d-m-Y'), ['class'=>'form-control compulsory', 'required' , 'readonly', 'id'=>'refund_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_id',__('patient_accounts.account_to_pay_from')) }}
|
||||
{{ Form::select('account_id', $banks, '', ['class' => 'form-control compulsory','required', 'id' => 'account_id', 'onchange' => 'get_bank_balance()']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_balance',__('patient_accounts.account_balance')) }}
|
||||
{{ Form::text('account_balance', 0, ['class'=>'form-control compulsory', 'id'=>'account_balance', 'readonly']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('refund_reason', __('patient_accounts.refunded_reason')) }}
|
||||
{{ Form::textarea('refund_reason', '',['class' => 'form-control compulsory', 'required', 'rows' => '5']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success submit_btn'])}}
|
||||
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#refund_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
function get_bank_balance() {
|
||||
let refund_amount = parseInt($('#refund_amount').val());
|
||||
|
||||
if (!isNaN(refund_amount)) {
|
||||
let account_id = $('#account_id').val();
|
||||
|
||||
let today = new Date();
|
||||
let today_formatted = String(today.getDate()).padStart(2, '0') + '-' + String(today.getMonth() + 1).padStart(2, '0') + '-' + today.getFullYear();
|
||||
|
||||
if (account_id !== '') {
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '/banking/get_current_account_balance_per_date',
|
||||
data: {
|
||||
'bank': account_id,
|
||||
'date': today_formatted
|
||||
},
|
||||
async: true,
|
||||
success: function(response) {
|
||||
var bank_record = JSON.parse(response);
|
||||
var account_balance = bank_record['account_balance'];
|
||||
$('#account_balance').val(account_balance);
|
||||
|
||||
if (account_balance <= 0) {
|
||||
alert('Account Balance is Zero(0) UGX');
|
||||
$('.submit_btn').hide();
|
||||
} else if (refund_amount > account_balance) {
|
||||
alert('Your Account Balance is low');
|
||||
$('.submit_btn').hide();
|
||||
} else {
|
||||
$('.submit_btn').show();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(error) {
|
||||
//console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
alert("Please enter the refund before selecting an account");
|
||||
$('#account_id').val('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
docker/statistics/Modules/PatientDiscounts/Resources/views/patient_accounts/refunds_report.blade.php
Executable
+271
@@ -0,0 +1,271 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">{{ __('patient_accounts.patient_accounts_refunds') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('patient_accounts.reports') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('patient_discounts::patient_accounts.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => 'patient_accounts/refunds_report', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="patient_numbers">
|
||||
{{ Form::label('patient_number',__('investigations.patient_number')) }}
|
||||
{{ Form::text('patient_number', '', ['class' => 'form-control typeahead', 'placeholder' => 'Patient number', 'autocomplete' => 'off', 'spellcheck' => false]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@if(!is_null($reg_date))
|
||||
<h4>{{ __('family_accounts.showing_deposit_of') }} <font color="blue">{{ streamline_date($reg_date) }}</font></h4>
|
||||
@elseif(!is_null($start_date) && !is_null($end_date))
|
||||
<h4>{{ __('family_accounts.showing_deposit_from') }}<font color="blue">{{ streamline_date($start_date) }}</font> {{ __('patient_accounts.to') }} <font color="blue">{{ streamline_date($end_date) }}</font></h4>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_amount') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_record_date') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_transaction_date') }}</th>
|
||||
<th>{{ __('patient_accounts.refunded_by') }}</th>
|
||||
<th>{{ __('patient_accounts.refunded_reason') }}</th>
|
||||
<th>{{ __('family_accounts.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_refunds = 0; @endphp
|
||||
@foreach($patient_refunds as $refund)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($refund->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($refund->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($refund->refund_amount) }}
|
||||
@php $total_refunds += $refund->refund_amount; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date_time($refund->created_at) }}</td>
|
||||
<td>{{ streamline_date($refund->refund_date) }}</td>
|
||||
<td>{{ get_full_name($refund->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ $refund->refund_reason }}</td>
|
||||
<td>
|
||||
<a href="/patient_accounts/view_details/{{ $refund->patient_id }}/" class="btn btn-outline-success btn-sm"><i class="fa fa-book"></i> {{ __('patient_accounts.statement') }}</a>
|
||||
<br><br>
|
||||
@if(Auth::user()->can('cancel-patient-accounts-deposits'))
|
||||
<a href="/patient_accounts/cancel_refund/{{ $refund->id }}/" class="btn btn-outline-primary btn-sm" onclick="return confirm('Are you sure you want to cancel this refund?')"> {{ __('patient_accounts.cancel_refund') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_refunds) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.min.js') }}"></script>
|
||||
<script>
|
||||
var substringMatcher = function (strs) {
|
||||
return function findMatches(q, cb) {
|
||||
var matches, substringRegex;
|
||||
|
||||
// an array that will be populated with substring matches
|
||||
matches = [];
|
||||
|
||||
// regex used to determine if a string contains the substring `q`
|
||||
substrRegex = new RegExp(q, 'i');
|
||||
|
||||
// iterate through the pool of strings and for any string that
|
||||
// contains the substring `q`, add it to the `matches` array
|
||||
$.each(strs, function (i, str) {
|
||||
if (substrRegex.test(str)) {
|
||||
matches.push(str);
|
||||
}
|
||||
});
|
||||
|
||||
cb(matches);
|
||||
};
|
||||
};
|
||||
|
||||
$('#patient_numbers .typeahead').typeahead(
|
||||
{
|
||||
hint: true,
|
||||
highlight: true,
|
||||
minLength: 1
|
||||
},
|
||||
{
|
||||
name: 'patient_numbers',
|
||||
source: substringMatcher(<?php echo json_encode($patient_numbers); ?>)
|
||||
}
|
||||
);
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'Patient Accounts'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'Patient Accounts',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
sheetName: 'Patient Accounts'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'Patient Accounts',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'Patient Accounts',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
}
|
||||
else if ($(this).val() == 2) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
}
|
||||
else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+363
@@ -0,0 +1,363 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-6 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('patient_accounts.patient_account_statement') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('family_accounts.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('patient_accounts.patient_account_statement') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('patient_discounts::patient_accounts.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['url' => '/patient_accounts/statement', 'method' => 'ANY']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('family_accounts.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>__('family_accounts.last_24_hours'),'1'=>__('family_accounts.custom_date'),'2'=>__('family_accounts.custom_range')], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('family_accounts.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('family_accounts.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('family_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="col-md-1">
|
||||
<div style="float: right;">
|
||||
{{ Form::open(['url' => '/patient_accounts/print_statement', 'target' => '_blank'])}}
|
||||
{{ Form::hidden('reg_date', $reg_date) }}
|
||||
{{ Form::hidden('start_date', $start_date) }}
|
||||
{{ Form::hidden('end_date', $end_date) }}
|
||||
{{ Form::hidden('search_by', $search_by) }}
|
||||
<button type="submit" class="btn btn-rounded" style="background-color: #03C03C; color: white;">
|
||||
<i class="fa fa-print"></i>
|
||||
<span>{{ __('patient_accounts.print_statement') }}</span>
|
||||
</button>
|
||||
{{ Form::close() }}
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('patient_discounts::patient_accounts.patient_details')
|
||||
|
||||
@if(count($patient_deposits) > 0)
|
||||
<h4><b>{{ __('patient_accounts.deposits') }}</b></h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.deposit_amount') }}</th>
|
||||
<th>{{ __('patient_accounts.deposit_date') }}</th>
|
||||
<th>{{ __('patient_accounts.received_by') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_deposits = 0; @endphp
|
||||
@foreach($patient_deposits as $deposit)
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($deposit->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($deposit->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($deposit->deposit_amount) }}
|
||||
@php $total_deposits += $deposit->deposit_amount; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date($deposit->deposit_date) }}</td>
|
||||
<td>{{ get_full_name($deposit->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_deposits) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@if(count($patient_refunds) > 0)
|
||||
<h4><b>{{ __('patient_accounts.refunds') }}</b></h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_amount') }}</th>
|
||||
<th>{{ __('patient_accounts.refund_date') }}</th>
|
||||
<th>{{ __('patient_accounts.received_by') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_refunds = 0; @endphp
|
||||
@foreach($patient_refunds as $refund)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($refund->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($refund->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($refund->refund_amount) }}
|
||||
@php $total_refunds += $refund->refund_amount; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date($refund->refund_date) }}</td>
|
||||
<td>{{ get_full_name($refund->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_refunds) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@if(count($patient_consumptions) > 0)
|
||||
<h4><b>{{ __('patient_accounts.consumption') }}</b></h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('patient_accounts.patient_names') }}</th>
|
||||
<th>{{ __('patient_accounts.amount_consumed') }}</th>
|
||||
<th>{{ __('patient_accounts.date_consumed') }}</th>
|
||||
<th>{{ __('patient_accounts.reason') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; $total_consumption = 0; @endphp
|
||||
@foreach($patient_consumptions as $record)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($record->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($record->amount_consumed) }}
|
||||
@php $total_consumption += $record->amount_consumed; @endphp
|
||||
</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
@php
|
||||
$tag_id = $record->tag_id;
|
||||
$items_received_array = [];
|
||||
|
||||
if($tag_id == 6 || $tag_id == 8){
|
||||
|
||||
$service_deposit_record = \Streamline\Models\ServiceDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($service_deposit_record){
|
||||
$items_received = explode(",", $service_deposit_record->items_ids);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "services");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 3){
|
||||
|
||||
$treatment_deposit_record = \Streamline\Models\TreatmentDeposits::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($treatment_deposit_record){
|
||||
$items_received = explode(",", $treatment_deposit_record->treatment_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "drugs");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 5){
|
||||
|
||||
$sundries_deposit_record = \Streamline\Models\SundryDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($sundries_deposit_record){
|
||||
$items_received = explode(",", $sundries_deposit_record->sundry_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "sundries");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 2){
|
||||
$investigation_deposit_record = \Streamline\Models\InvestigationDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($investigation_deposit_record){
|
||||
$items_received = explode(",", $investigation_deposit_record->investigation_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "investigations");
|
||||
}
|
||||
}
|
||||
} elseif($tag_id == 4){
|
||||
|
||||
$procedure_deposit_record = \Streamline\Models\ProcedureDeposit::where('receipt_number', $record->receipt_number)->first();
|
||||
|
||||
if ($procedure_deposit_record){
|
||||
$items_received = explode(",", $procedure_deposit_record->procedure_items);
|
||||
|
||||
for($i = 0; $i < count($items_received); $i++){
|
||||
$items_received_array[] = get_name($items_received[$i], "id", "name", "procedures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<td>
|
||||
<strong>{{ get_name($record->tag_id, 'id', 'name', 'finance_point_tags') }}</strong>
|
||||
<ol>
|
||||
@for($j = 0; $j < count($items_received_array); $j++)
|
||||
<li>{{ $items_received_array[$j] }}</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>{{ __('family_accounts.total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($total_consumption) }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bolder; font-size: 24px;">
|
||||
<br><br>
|
||||
<span><strong>{{ __('patient_accounts.current_balance') }}:</strong> {{ ugandan_shillings($patient->patient_account_balance) }}</span>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
@if(Auth::user()->can('view-patient-accounts-deposits'))
|
||||
<div class="col-md-4">
|
||||
<a href="/patient_accounts/make_deposit/" class="btn btn-success btn-block"> {{ __('patient_accounts.make_deposit') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-patient-accounts-refunds'))
|
||||
<div class="col-md-4">
|
||||
<a href="/patient_accounts/refund_deposit/" class="btn btn-primary btn-block"> {{ __('patient_accounts.refund_deposit') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-2"></div>
|
||||
</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/jszip.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script>
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
}
|
||||
else if ($(this).val() == 2) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
}
|
||||
else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
@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">{{ __('finance_reports.guarantor_agreement') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/finance_reports">{{ __('finance_reports.reports_home') }}</a></li>
|
||||
<li class="active">{{ __('finance_reports.guarantor_agreement') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('patient_finance.print') }}</button></div>
|
||||
|
||||
<div id="divToPrint">
|
||||
<div class="row" style="padding: 10px;">
|
||||
<div class="col-sm-6">
|
||||
<img style="margin: auto; height: 83px;" src="/uploads/logo/logo.png">
|
||||
</div>
|
||||
<div class="col-sm-6"></div>
|
||||
</div>
|
||||
<div class="row" style="padding: 10px;">
|
||||
<div class="col-sm-12">
|
||||
{{ __('patient_finance.agreement1') }}
|
||||
<b>{{ ugandan_shillings($amount_to_pay) }}</b>
|
||||
{{ __('patient_finance.agreement2') }}
|
||||
<b>{{ ugandan_shillings($amount_owed) }}</b>
|
||||
{{ __('patient_finance.agreement3') }}
|
||||
(<b>{{ $patient_names }}</b>)
|
||||
{{ __('patient_finance.agreement4') }}
|
||||
<b>{{ $payment_date }}</b>
|
||||
{{ __('patient_finance.agreement5') }}
|
||||
<b>{{ $arrangement }}</b>
|
||||
{{ __('patient_finance.agreement6') }}.
|
||||
<br><br><br>
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.signed_by') }}:</b></div>
|
||||
<div class="col-sm-4"><b>{{ __('patient_finance.name') }}: {{ $guarantor_name }}</b></div>
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.grade') }}:</b></div>
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.department') }}:</b></div>
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.date') }}:</b></div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.witnessed_by') }}:</b></div>
|
||||
<div class="col-sm-4"><b>{{ __('patient_finance.name') }}:</b></div>
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.grade') }}:</b></div>
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.department') }}:</b></div>
|
||||
<div class="col-sm-2"><b>{{ __('patient_finance.date') }}:</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<strong>{{ __('patient_finance.date') }} Printed:</strong> {{ \Carbon\Carbon::now()->format('D m Y') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4>Debt Plan Receipt</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('patient_debtors.staff_guarantors') }}">Debt Plan Report</a></li>
|
||||
<li class="active">Debt Plan Receipt</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>Tel:</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>Email:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>Cashier:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>Receipt Number: </b> {{ $new_receipt_number }}</span><br>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>Description</b></th>
|
||||
<th style="width: 20%"><b>Amount</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Comment</td>
|
||||
<td>{{ $request->comment }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expected Amount</td>
|
||||
<td>{{ ugandan_shillings($request->amount_owed) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amount Paid</td>
|
||||
<td>{{ ugandan_shillings($request->amount_paid) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Balance</td>
|
||||
<td>{{ ugandan_shillings($request->balance) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">© Stre@mline</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</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">Debt Plan Receipt</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('finance_reports.index') }}">Reports</a></li>
|
||||
<li class="active">Receipt</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@include('flash::message')
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-3">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-12" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>Tel:</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>Email:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>Cashier:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>Receipt Number:</b>
|
||||
@php
|
||||
$amount_paid = unserialize($payment->amount_paid_history);
|
||||
$date_paid = unserialize($payment->date_paid_history);
|
||||
$staff_in_charge = unserialize($payment->staff_in_charge_history);
|
||||
$comments = unserialize($payment->comment_history);
|
||||
$receipts = unserialize($payment->receipt_history);
|
||||
$balances = unserialize($payment->balance_history);
|
||||
@endphp
|
||||
@foreach ($receipts as $item)
|
||||
{{ $item }}
|
||||
@endforeach
|
||||
</span><br>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 60%; justify-content: center"><b>Description</b></th>
|
||||
<th style="width: 20%"><b>Amount</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>Expected Amount:</td>
|
||||
<td>
|
||||
{{ ugandan_shillings(get_name($payment->debt_plan_id, 'id', 'staff_guarantor_to_pay', 'debt_plan')) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amount Paid:</td>
|
||||
<td>
|
||||
@foreach ($amount_paid as $item)
|
||||
{{ ugandan_shillings($item) }}<br>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Balance:</td>
|
||||
<td>
|
||||
@foreach ($balances as $item)
|
||||
{{ ugandan_shillings($item) }}<br>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Reason:</td>
|
||||
<td>Debt Plan Payment</td>
|
||||
</tr>
|
||||
|
||||
{{--<tr>--}}
|
||||
{{--<td><strong>Total Paid:</strong></td>--}}
|
||||
{{--<td><strong>{{ ugandan_shillings($payment->amount_received) }}</strong></td>--}}
|
||||
{{--</tr>--}}
|
||||
<tr>
|
||||
<td><strong>Received By</strong></td>
|
||||
<td><strong>{{ get_full_name($payment->created_by, 'id', 'first_name', 'last_name', 'users') }}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">© Stre@mline</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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">Receive Guarantor Payments</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/finance_reports">Reports Dashboard</a></li>
|
||||
<li class="active">Guarantor Payments</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="panel panel-default col-md-12">
|
||||
<div class="panel-body panel-primary">
|
||||
<h2><strong>Payment Debt Plan</strong></h2>
|
||||
<br/>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Guarantor Name</th>
|
||||
<th>Payment Arrangement</th>
|
||||
<th>Amount To Pay</th>
|
||||
<th>Amount Paid</th>
|
||||
<th>Completion Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $amount_paid_on_debt = 0; @endphp
|
||||
@if(!is_null($debts))
|
||||
<td>
|
||||
@php
|
||||
$guarantor_ids_array = explode(",", $debts->staff_guarantor);
|
||||
@endphp
|
||||
<ul>
|
||||
@if ($debts->guarantor_type == 1)
|
||||
@for ($i = 0; $i < count($guarantor_ids_array); $i++)
|
||||
<li>{{ get_full_name($guarantor_ids_array[$i], 'id', 'first_name', 'last_name', 'users') }}</li>
|
||||
@endfor
|
||||
@else
|
||||
@for ($i = 0; $i < count($guarantor_ids_array); $i++)
|
||||
<li>{{ get_full_name($guarantor_ids_array[$i], 'id', 'first_name', 'last_name', 'non_staff_guarantors') }}</li>
|
||||
@endfor
|
||||
@endif
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ get_name($debts->debt_plan_arrangement, 'id', 'name', 'debt_plan_arrangements') }}</td>
|
||||
<td>{{ ugandan_shillings($debts->staff_guarantor_to_pay) }}
|
||||
<td>
|
||||
<?php $amount_paid_on_debt = $debts->amount_paid_off ?? 0; ?>
|
||||
{{ ugandan_shillings($amount_paid_on_debt) }}
|
||||
</td>
|
||||
<td>
|
||||
@if (!is_null($debts->fourth_installment_date))
|
||||
{{ streamline_date($debts->fourth_installment_date) }}
|
||||
@elseif(!is_null($debts->third_installment_date))
|
||||
{{ streamline_date($debts->third_installment_date) }}
|
||||
@elseif(!is_null($debts->second_installment_date))
|
||||
{{ streamline_date($debts->second_installment_date) }}
|
||||
@elseif(!is_null($debts->first_installment_date))
|
||||
{{ streamline_date($debts->first_installment_date) }}
|
||||
@endif
|
||||
</td>
|
||||
@else
|
||||
<td colspan="6"><span style="color: red;">RECORDS NOT FOUND</span></td>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel panel-default col-md-12">
|
||||
<div class="panel-body panel-primary">
|
||||
<h2><strong>Payment History</strong></h2>
|
||||
<br/>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Balance</th>
|
||||
<th>Amount Paid</th>
|
||||
<th>Receipt No.</th>
|
||||
<th>Date</th>
|
||||
<th>Staff In Charge</th>
|
||||
<th>Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($debt_with_balances)
|
||||
@foreach($debt_with_balances as $debt_with_balance)
|
||||
<tr>
|
||||
<td>{{ ugandan_shillings($debt_with_balance->balance) }}</td>
|
||||
<td>{{ ugandan_shillings($debt_with_balance->amount_paid) }}</td>
|
||||
<td>{{ $debt_with_balance->receipt_number }}</td>
|
||||
<td>{{ streamline_date($debt_with_balance->date_paid) }}</td>
|
||||
<td>{{ $users_array[$debt_with_balance->created_by] }}</td>
|
||||
<td>{{ $debt_with_balance->comment }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<td colspan="6"><span style="color: red;">RECORDS NOT FOUND</span></td>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body panel-primary">
|
||||
@php $amount_owed = $debts->staff_guarantor_to_pay - $amount_paid_on_debt @endphp
|
||||
@if($amount_owed < 1)
|
||||
<h3 style="color: green">Payment has been made in full</h3>
|
||||
@else
|
||||
{{ Form::open(['route' => 'patient_debtors.process_debt_plan_payment_staff', 'data-toggle' => 'validator']) }}
|
||||
<br/>
|
||||
<h3>Make Payment</h3>
|
||||
<br/>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('amount_label', 'Expected Amount') }}
|
||||
<div class="input-group">
|
||||
{{ Form::number('amount_owed', $amount_owed,
|
||||
['class'=>'form-control compulsory required', 'readonly', 'id'=>'amount_owed']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('amount_paid_label', 'Amount Paid') }}
|
||||
<div class="input-group">
|
||||
{{ Form::number('amount_paid', 0, ['class'=>'form-control compulsory required', 'id'=>'amount_paid']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('balance_label', 'Balance') }}
|
||||
<div class="input-group">
|
||||
{{ Form::number('balance', '', ['class'=>'form-control compulsory required', 'readonly', 'id'=>'balance']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('date_label', 'Date of Payment') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('date', '', ['class'=>'form-control compulsory required','readonly', 'id'=>'date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment_label', 'Comment') }}
|
||||
<div class="input-group">
|
||||
{{ Form::textarea('comment','', ['class'=>'form-control compulsory required', 'id'=>'comment']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::hidden('staff_guarantor', $debts->staff_guarantor, ['id' => 'staff_guarantor']) }}
|
||||
{{ Form::hidden('payment_id', $debts->id, ['id' => 'payment_id']) }}
|
||||
<div class="form-group">
|
||||
<a class="btn btn-danger" id="write_off_btn">Write Off Debt</a>
|
||||
{{ Form::submit('Make Payment', ['class'=>'btn btn-success pull-right']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal" id="write_off_modal" tabindex="-1" role="dialog" aria-labelledby="write_off_modal_label" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-center">
|
||||
<h5 class="modal-title" id="write_off_modal_label"><b>Write Off Balance</b></h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Amount To Be Written Off</label>
|
||||
<input id="amount_to_write_off" type="number" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Write Off Memo</label>
|
||||
<textarea id="write_off_memo" type="number" rows="5" class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Expense Account</label>
|
||||
{{ Form::select('expense_account', $expense_accounts, '', ['class'=>'form-control', 'id'=>'expense_account']) }}
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded btn-block btn-success" id="complete_write_off">Complete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#write_off_btn').click(function() {
|
||||
let amount_owed = $('#amount_owed').val();
|
||||
$('#amount_to_write_off').val(amount_owed);
|
||||
$('#write_off_modal').modal('show');
|
||||
});
|
||||
|
||||
$('#complete_write_off').click(function() {
|
||||
let amount = $('#amount_to_write_off').val();
|
||||
let expense_account = $('#expense_account').val();
|
||||
let write_off_memo = $('#write_off_memo').val();
|
||||
let amount_paid = $('#amount_paid').val();
|
||||
let amount_owed = $('#amount_owed').val();
|
||||
let staff_guarantor = $('#staff_guarantor').val();
|
||||
let payment_id = $('#payment_id').val();
|
||||
|
||||
if (amount === '') {
|
||||
alert('Please Enter An Amount To Write Off.')
|
||||
} else if (expense_account === '') {
|
||||
alert('Please Select An Expense Account To Write Off To.')
|
||||
} else if (write_off_memo === '') {
|
||||
alert('Please Enter A Memo For This Write Off.')
|
||||
} else {
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '/patient_debtors/write_off_debt_plan',
|
||||
data: {
|
||||
'amount': amount, 'amount_paid': amount_paid, 'amount_owed': amount_owed, 'staff_guarantor': staff_guarantor,
|
||||
'expense_account': expense_account, 'write_off_memo': write_off_memo, 'payment_id': payment_id
|
||||
},
|
||||
success: function(response) {
|
||||
if(!response.includes("no")) {
|
||||
alert("Write off has been completed successfully");
|
||||
window.location.href = '/patient_debtors/staff_guarantors';
|
||||
} else {
|
||||
alert("An error occurred. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#amount_paid').change(function (e) {
|
||||
e.preventDefault();
|
||||
let amount = $('#amount_owed').val();
|
||||
let bal = amount - this.value;
|
||||
$('#balance').val(bal);
|
||||
});
|
||||
|
||||
$('#table').DataTable();
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+150
@@ -0,0 +1,150 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4>Debtor Payment Receipt</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('patient_debtors.debtors') }}">Debtors Report</a></li>
|
||||
<li class="active">Debtor Payment Receipt</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;">
|
||||
@if(is_cashier_receipt_type_print_html())
|
||||
<button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print</button>
|
||||
@else
|
||||
<form action="{{ route('patient_debtors.print_debtor_receipt_pdf_details') }}" method="post" target="_blank">
|
||||
{{ csrf_field() }}
|
||||
<input value="{{ $request->comment }}" type="hidden" name="comment"/>
|
||||
<input value="{{ $request->amount_owed }}" type="hidden" name="amount_owed"/>
|
||||
<input value="{{ $request->amount_paid }}" type="hidden" name="amount_paid"/>
|
||||
<input value="{{ $request->balance }}" type="hidden" name="balance"/>
|
||||
<input value="{{ serialize($payment_methods) }}" type="hidden" name="payment_methods"/>
|
||||
<input value="{{ $new_receipt_number }}" type="hidden" name="receipt_number"/>
|
||||
<input value="{{ $patient->id }}" type="hidden" name="patient_id"/>
|
||||
<button type="submit" class="btn btn-success glyphicon glyphicon-print"> Print</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>Tel:</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>Email:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>Cashier:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>Receipt Number: </b> {{ $new_receipt_number }}</span><br>
|
||||
<span class="receipt-label"><b>Patient Names: </b> {{ $patient->first_name }} {{ $patient->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>Patient Number: </b> {{ $patient->number }}</span><br>
|
||||
<span class="receipt-label"><b>Patient Category: </b> {{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}</span><br>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>Description</b></th>
|
||||
<th style="width: 20%"><b>Amount</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Comment</td>
|
||||
<td>{{ $request->comment }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expected Amount</td>
|
||||
<td>{{ ugandan_shillings($request->amount_owed) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amount Paid</td>
|
||||
<td>{{ ugandan_shillings($request->amount_paid) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Balance</td>
|
||||
<td>{{ ugandan_shillings($request->balance) }}</td>
|
||||
</tr>
|
||||
@if(count($payment_methods) > 0)
|
||||
<tr><td colspan="2"></td></tr>
|
||||
@foreach($payment_methods as $key => $value)
|
||||
<tr>
|
||||
<td><b>Patient Paid With {{ ($key == 0) ? 'Cash' : get_name($key, 'id', 'name', 'patient_payment_methods') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($value) }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">© Stre@mline</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+307
@@ -0,0 +1,307 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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" />
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@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">Debtors</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/finance_reports">Reports Dashboard</a></li>
|
||||
<li class="active">Debtors Reports</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['method'=>'post','route' => 'patient_debtors.debtors']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 b-r">
|
||||
<div class="form-group">
|
||||
<label>Staff Member:</label>
|
||||
<select class="form-control compulsory required" name="staff_member" id="staff_member" required>
|
||||
<option value="">-select-</option>
|
||||
<option value="ALL STAFF">ALL STAFF</option>
|
||||
@foreach($users as $item)
|
||||
<option value="{{ $item->id }}">{{ $item->username }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>Select Date:</label>
|
||||
<select class="form-control compulsory required" name="dates" id="dates" required>
|
||||
<option value="">-select-</option>
|
||||
<option value="today">TODAY</option>
|
||||
<option value="yesterday">YESTERDAY</option>
|
||||
<option value="custom_date">CUSTOM DATE</option>
|
||||
<option value="custom_date_range">DATE RANGE</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div id="sDate" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', 'Date On') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date', '', ['class'=>'form-control required compulsory', 'readonly', 'id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div id="eDate" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date', 'End Date') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date', '', ['class'=>'form-control required compulsory', 'readonly', 'id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
{{ Form::submit('Submit', ['class'=>'btn btn-success btn-rounded btn-block pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body panel-primary">
|
||||
@if(count($debtors) > 0)
|
||||
|
||||
<h2><strong>Report For Debtors</strong></h2>
|
||||
<br/>
|
||||
@if(isset($display))
|
||||
<h3 class="label label-info"> {!! $display !!}</h3>
|
||||
@endif
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Date</th>
|
||||
<th>Patient No.</th>
|
||||
<th>Patient Name</th>
|
||||
<th>Staff In-charge</th>
|
||||
<th>Receipt No.</th>
|
||||
<th>Initial Debt Amount</th>
|
||||
<th>Amount Paid</th>
|
||||
<th>Balance</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
$sum_total_amount = 0;
|
||||
$sum_amount_paid = 0;
|
||||
$sum_balance = 0;
|
||||
$counter = 1;
|
||||
@endphp
|
||||
|
||||
@if(count($debtors) > 0)
|
||||
<tbody>
|
||||
@foreach($debtors as $debtor)
|
||||
|
||||
@php
|
||||
$payment = Streamline\Models\DebtorPayment::where('debt_id', $debtor->id)->first();
|
||||
$balance_remaining = $debtor->balance_remaining ?? $debtor->balance;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>
|
||||
{{ streamline_date($debtor->created_at) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ get_name($debtor->patient_id, 'id', 'number', 'patients') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ get_full_name($debtor->patient_id, 'id', 'first_name', 'last_name', 'patients') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ get_full_name($debtor->created_by, 'id', 'first_name', 'last_name', 'users') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $debtor->receipt_number }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($debtor->balance) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($debtor->amount_paid_off ?? 0) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($balance_remaining) }}
|
||||
</td>
|
||||
|
||||
@if(is_null($payment))
|
||||
<td>
|
||||
<a class="btn btn-success btn-block btn-sm btn-rounded" style="color: white" href="{{ route('patient_debtors.receive_debtor_payment', implode(",",array($debtor->id, "new"))) }}">Receive Payment</a>
|
||||
</td>
|
||||
<td></td>
|
||||
@elseif($payment)
|
||||
@if($balance_remaining > 0)
|
||||
<td>
|
||||
<a class="btn btn-warning btn-sm btn-block btn-rounded" style="color: white" href="{{ route('patient_debtors.receive_debtor_payment', implode(",",array($debtor->id, "update"))) }}">Update Payment</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-info btn-sm btn-block btn-rounded" style="color: white" href="{{ route('patient_debtors.history_debtor_payments', $debtor->id) }}"><i class="fa fa-eye"></i> View Receipts</a>
|
||||
</td>
|
||||
@elseif($balance_remaining == 0)
|
||||
<td>
|
||||
<a class="btn btn-info btn-block btn-sm btn-rounded" style="color: white" href="{{ route('patient_debtors.history_debtor_payments', $debtor->id) }}"><i class="fa fa-eye"></i> View Receipts</a>
|
||||
</td>
|
||||
<td></td>
|
||||
@else
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
@else
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
</tr>
|
||||
@php
|
||||
$sum_total_amount += $debtor->balance;
|
||||
$sum_amount_paid += ($debtor->amount_paid_off ?? 0);
|
||||
$sum_balance += $balance_remaining;
|
||||
$counter++;
|
||||
@endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Total</td>
|
||||
<td>{{ ugandan_shillings($sum_total_amount) }}</td>
|
||||
<td>{{ ugandan_shillings($sum_amount_paid) }}</td>
|
||||
<td>{{ ugandan_shillings($sum_balance) }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@else
|
||||
<td colspan="9"><span style="color: red;">RECORDS NOT FOUND</span></td>
|
||||
@endif
|
||||
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="offset-5"></div>
|
||||
<div class="col-md-6" style="margin-top: 70px;">
|
||||
<h3 class="btn btn-warning"><strong>Select a Valid date range</strong>e</h3>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#dates').change(function (e) {
|
||||
|
||||
if($(this).val() === "custom_date"){
|
||||
|
||||
$("#eDate").hide();
|
||||
$("#sDate").show();
|
||||
|
||||
}else if($(this).val() === "custom_date_range"){
|
||||
|
||||
$("#sDate").show();
|
||||
$("#eDate").show();
|
||||
}else{
|
||||
|
||||
$("#eDate").hide();
|
||||
$("#sDate").hide();
|
||||
}
|
||||
});
|
||||
</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/jszip.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 type="text/javascript">
|
||||
|
||||
jQuery('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
],
|
||||
"aoColumnDefs": [{
|
||||
"aTargets": [2,3],
|
||||
"defaultContent": "",
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#staff_member').select2({
|
||||
placeholder: "-- select --"
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
@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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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">Debtor Payment Receipt</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('patient_debtors.debtors') }}">Debtors Report</a></li>
|
||||
<li class="active">Debtor Payment Receipt</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box" id="divToPrint">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<style type="text/css" media="print" >
|
||||
/*class for the element we don’t want to print*/
|
||||
.no-print{
|
||||
display:none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-5">
|
||||
<p style="text-align: center; font-size: 0.8em">
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>Tel:</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>Email:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>Department:</b> Finance</span><br>
|
||||
<span class="receipt-label"><b>Date:</b> {{ streamline_date(\Carbon\Carbon::now()->toDateTimeString()) }}</span><br>
|
||||
<span class="receipt-label"><b>Patient Name:</b> {{ get_name($patient_id, 'id', 'first_name', 'patients') }} {{ get_name($patient_id, 'id', 'last_name', 'patients') }}</span><br>
|
||||
<span class="receipt-label"><b>Patient Number</b> : {{ get_name($patient_id, 'id', 'number', 'patients') }}</span><br>
|
||||
</p>
|
||||
|
||||
@php $x = 0; @endphp
|
||||
@foreach($payments as $payment)
|
||||
<table style="font-size: 0.8em; font-weight: normal; font-family: monospace">
|
||||
<tr class="no-print">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th width="10%"></th>
|
||||
</tr>
|
||||
<tr class="{{ $x }} no-print print-all">
|
||||
<td>Amount Paid: </td>
|
||||
<td>{{ ugandan_shillings($payment->amount_paid) }}</td>
|
||||
|
||||
<td class="no-print" style="font-size: 1em;">
|
||||
@if(is_cashier_receipt_type_print_html())
|
||||
<button id="{{ $x }}" class="btn float-right btn-sm btn-primary waves-effect waves-light no-print print-btn">
|
||||
<i class="fa fa-print m-r-5"></i> <span>Print</span>
|
||||
</button>
|
||||
@else
|
||||
<form action="{{ route('patient_debtors.reprint_debtor_receipt_pdf_details') }}" method="post" target="_blank">
|
||||
{{ csrf_field() }}
|
||||
<input value="{{ $debtor_id }}" type="hidden" name="debt_id"/>
|
||||
<input value="{{ $payment->id }}" type="hidden" name="is_single_print"/>
|
||||
<input value="{{ $patient_id }}" type="hidden" name="patient_id"/>
|
||||
<button type="submit" class="btn float-right btn-sm btn-primary waves-effect waves-light">
|
||||
<i class="fa fa-print m-r-5"></i> <span>Print</span>
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<br><br><br>
|
||||
|
||||
@if(is_null($payment->received_id))
|
||||
<a class="btn float-right btn-sm btn-danger waves-effect waves-light" href="/patient_debtors/reverse_debtor_payment/{{ $payment->id }}" onclick="return confirm('Are you sure you want to reverse this debtor payment?')">
|
||||
<i class="fa fa-trash m-r-5"></i>Reverse
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="{{ $x }} no-print print-all">
|
||||
<td>Balance: </td>
|
||||
<td>{{ ugandan_shillings($payment->balance) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="{{ $x }} no-print print-all">
|
||||
<td>Receipt Number: </td>
|
||||
<td>
|
||||
{{ $payment->receipt_number }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="{{ $x }} no-print print-all">
|
||||
<td>Received By: </td>
|
||||
<td>
|
||||
{{ get_full_name($payment->created_by, 'id', 'first_name', 'last_name', 'users') }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="{{ $x }} no-print print-all">
|
||||
<td>Comment : </td>
|
||||
<td>
|
||||
{{ $payment->comment }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="{{ $x }} no-print print-all">
|
||||
<td>Received On : </td>
|
||||
<td>
|
||||
{{ streamline_date($payment->date_paid) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=" no-print"><td colspan="2"><hr ></td></tr>
|
||||
|
||||
</table>
|
||||
@php $x++; @endphp
|
||||
@endforeach
|
||||
|
||||
<i style="font-size: 0.7em; float: left">Viewed By : {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</i>
|
||||
<i style="font-size: 0.6em; float: right">© Stre@mline</i>
|
||||
</div>
|
||||
@if(count($payments) > 1)
|
||||
<div class="col-md-4 no-print">
|
||||
<div style="float: right;">
|
||||
@if(is_cashier_receipt_type_print_html())
|
||||
<button class="btn btn-primary btn-sm print-all-debtor-receipts">Print all receipts</button><br>
|
||||
@else
|
||||
<form action="{{ route('patient_debtors.reprint_debtor_receipt_pdf_details') }}" method="post" target="_blank">
|
||||
{{ csrf_field() }}
|
||||
<input value="{{ $debtor_id }}" type="hidden" name="debt_id"/>
|
||||
<input value="0" type="hidden" name="is_single_print"/>
|
||||
<input value="{{ $patient_id }}" type="hidden" name="patient_id"/>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Print all receipts</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$(".print-all-debtor-receipts").click(function () {
|
||||
$(".print-all").each(function () {
|
||||
$(this).removeClass("no-print");
|
||||
});
|
||||
|
||||
// print the whole document
|
||||
print_debtor_receipt();
|
||||
|
||||
// add no-print attribute to all for the selected debts
|
||||
$(".print-all").each(function () {
|
||||
$(this).addClass("no-print");
|
||||
});
|
||||
});
|
||||
|
||||
// prepare for printing single debt receipt
|
||||
$(".print-btn").click(function () {
|
||||
var id = $(this).attr("id");
|
||||
|
||||
// remove no-print attribute from all for the selected debts
|
||||
$("." + id).each(function () {
|
||||
$(this).removeClass("no-print");
|
||||
});
|
||||
|
||||
// print the whole document
|
||||
print_debtor_receipt();
|
||||
|
||||
// add no-print attribute to all for the selected print_debtor_receipt
|
||||
$("." + id).each(function () {
|
||||
$(this).addClass("no-print");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// print for a single debt receipt
|
||||
function print_debtor_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4>Debt Plan Receipt</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/">Debt Plan Report</a></li>
|
||||
<li class="active">Debt Plan Receipt</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> Print</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>Tel:</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>Email:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>Cashier:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
{{--<span class="receipt-label"><b>Date:</b> {{ streamline_date_time_short($request->date) }}</span><br>--}}
|
||||
@php
|
||||
$new_receipt_number = generateReceiptNumberFromDB();
|
||||
@endphp
|
||||
<span class="receipt-label"><b>Receipt Number: </b> {{ $new_receipt_number }}</span><br>
|
||||
{{--<span class="receipt-label"><b>REF</b> : {{ get_patient_name($request->patient_id) }}</span><br>--}}
|
||||
{{--<span class="receipt-label"><b>Category :</b> {{ get_name($patient->category_id, "id", "name", "patient_categories") }}</span>--}}
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>Description</b></th>
|
||||
<th style="width: 20%"><b>Amount</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Reason</td>
|
||||
<td>Patient Debt Plan Receipt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff Guarantor To Pay</td>
|
||||
<td>{{ ugandan_shillings($debt_plan->staff_guarantor_to_pay) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Patient Amount Paid</td>
|
||||
<td>{{ ugandan_shillings($debt_plan->amount_owed - $debt_plan->staff_guarantor_to_pay) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Amount</td>
|
||||
<td>{{ ugandan_shillings($debt_plan->amount_owed) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">© Stre@mline</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Patient Receipt - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-size: 0.8em;
|
||||
}
|
||||
/*thead, tfoot { display: table-row-group }*/
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>Patient Names</b></td>
|
||||
<td>{{ get_full_name($patient_id, 'id', 'first_name', 'last_name', 'patients') }}</td>
|
||||
<td><b>Patient Number</b></td>
|
||||
<td>{{ get_name($patient_id, 'id', 'number', 'patients') }}</td>
|
||||
<td><b>Patient Category</b></td>
|
||||
<td>{{ get_name(get_name($patient_id, 'id', 'category_id', 'patients'), 'id', 'name', 'patient_categories') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Cashier</b></td>
|
||||
<td colspan="2">{{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</td>
|
||||
<td><b>Receipt Number</b></td>
|
||||
<td colspan="2">{{ $receipt_number }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table table-bordered" id="receipt_table">
|
||||
<thead>
|
||||
<th style="width: 60%"><b>Description</b></th>
|
||||
<th style="width: 20%"><b>Amount</b></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Comment</td>
|
||||
<td>{{ $comment }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expected Amount</td>
|
||||
<td>{{ ugandan_shillings($amount_owed) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amount Paid</td>
|
||||
<td>{{ ugandan_shillings($amount_paid) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Balance</td>
|
||||
<td>{{ ugandan_shillings($balance) }}</td>
|
||||
</tr>
|
||||
@if(count($payment_methods) > 0)
|
||||
<tr><td colspan="2"></td></tr>
|
||||
@foreach($payment_methods as $key => $value)
|
||||
<tr>
|
||||
<td><b>Patient Paid With {{ ($key == 0) ? 'Cash' : get_name($key, 'id', 'name', 'patient_payment_methods') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($value) }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<i style="font-size: 0.8em; float: left">© {{ date('Y') }} Stre@mline</i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<i style="float: right">Printed On {{ date(" d M Y h:ia") }} By {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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">Receive Debtor Payments</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/finance_reports">Reports Dashboard</a></li>
|
||||
<li class="active">Debtors</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
$back_date = \Streamline\Models\HospitalInformation::first()->pluck('back_date');
|
||||
@endphp
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="panel panel-default col-md-12">
|
||||
<div class="panel-body panel-primary">
|
||||
<h2><strong>Debtor Payment</strong></h2>
|
||||
<br/>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Patient Number</th>
|
||||
<th>Patient Name</th>
|
||||
<th>Amount To Pay</th>
|
||||
<th>Amount Paid</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!is_null($debts))
|
||||
<td>{{ get_name($debts->patient_id, 'id', 'number', 'patients') }}</td>
|
||||
<td>{{ get_full_name($debts->patient_id, 'id', 'first_name', 'last_name', 'patients') }}</td>
|
||||
<td>{{ ugandan_shillings($debts->balance) }}
|
||||
<td>{{ ugandan_shillings($debts->amount_paid_off) }}</td>
|
||||
@else
|
||||
<td colspan="3"><span style="color: red;">RECORDS NOT FOUND</span></td>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel panel-default col-md-12">
|
||||
<div class="panel-body panel-primary">
|
||||
<h2><strong>Payment History</strong></h2>
|
||||
<br/>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Balance</th>
|
||||
<th>Amount Paid</th>
|
||||
<th>Receipt No.</th>
|
||||
<th>Date</th>
|
||||
<th>Staff In Charge</th>
|
||||
<th>Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($debt_payments as $debt_payment)
|
||||
<tr>
|
||||
<td>{{ ugandan_shillings($debt_payment->balance) }}</td>
|
||||
<td>{{ ugandan_shillings($debt_payment->amount_paid) }}</td>
|
||||
<td>{{ $debt_payment->receipt_number }}</td>
|
||||
<td>{{ streamline_date($debt_payment->date_paid) }}</td>
|
||||
<td>{{ get_full_name($debt_payment->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ $debt_payment->comment }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body panel-primary">
|
||||
<?php $amount_owed = !is_null($debts->balance_remaining) ? $debts->balance_remaining : $debts->balance ?>
|
||||
@if($amount_owed < 1)
|
||||
<h3 style="color: green">Payment has been made in full</h3>
|
||||
@else
|
||||
{{ Form::open(['route' => 'patient_debtors.process_debtor_payment', 'data-toggle' => 'validator']) }}
|
||||
<h3>Make Payment</h3>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('amount_label', 'Expected Amount') }}
|
||||
<div class="input-group">
|
||||
{{ Form::number('amount_owed', $amount_owed,
|
||||
['class'=>'form-control compulsory required', 'readonly', 'id'=>'amount_owed']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('amount_paid_label', 'Amount Paid') }}
|
||||
<div class="input-group">
|
||||
{{ Form::number('amount_paid', 0, ['class'=>'form-control compulsory', 'id'=>'amount_paid', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="label label-primary" id="add_payment_method_button" onclick="add_payment_method();">Add Payment Method</label>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
<div id="payment_methods_div" style="display: none">
|
||||
<div class="form-group">
|
||||
{{ Form::label('cash_to_pay','Cash to Pay') }}
|
||||
{{ Form::hidden('original_cash_to_pay', 0, ['id' => 'original_cash_to_pay']) }}
|
||||
{{ Form::number('cash_to_pay',0,['class' => 'form-control','id'=>'cash_to_pay','readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('balance_label', 'Balance Remaining on Debt') }}
|
||||
<div class="input-group">
|
||||
{{ Form::number('balance', '', ['class'=>'form-control compulsory required', 'readonly', 'id'=>'balance', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('date_label', 'Date of Payment') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('date', date('d-m-Y'), ['class'=>'form-control compulsory','readonly', 'id'=>'date', 'required']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment_label', 'Comment') }}
|
||||
<div class="input-group">
|
||||
{{ Form::textarea('comment','', ['class'=>'form-control compulsory', 'id'=>'comment', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::hidden('patient_id', $debts->patient_id, ['id' => 'patient_id']) }}
|
||||
{{ Form::hidden('debt_id', $debts->id, ['id' => 'debt_id']) }}
|
||||
|
||||
<a class="btn btn-danger" id="write_off_btn">Write Off Debt</a>
|
||||
{{ Form::submit('Receive Payment', ['class'=>'btn btn-success pull-right', 'onclick'=>"return confirm('Are you sure you want to complete this payment')"]) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal" id="write_off_modal" tabindex="-1" role="dialog" aria-labelledby="write_off_modal_label" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-center">
|
||||
<h5 class="modal-title" id="write_off_modal_label"><b>Write Off Balance</b></h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Amount To Be Written Off</label>
|
||||
<input id="amount_to_write_off" type="number" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Write Off Memo</label>
|
||||
<textarea id="write_off_memo" type="number" rows="5" class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Expense Account</label>
|
||||
{{ Form::select('expense_account', $expense_accounts, '', ['class'=>'form-control', 'id'=>'expense_account']) }}
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded btn-block btn-success" id="complete_write_off">Complete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#table').DataTable();
|
||||
|
||||
$('#write_off_btn').click(function() {
|
||||
let amount_owed = $('#amount_owed').val();
|
||||
$('#amount_to_write_off').val(amount_owed);
|
||||
$('#write_off_modal').modal('show');
|
||||
});
|
||||
|
||||
$('#complete_write_off').click(function() {
|
||||
let amount = $('#amount_to_write_off').val();
|
||||
let expense_account = $('#expense_account').val();
|
||||
let write_off_memo = $('#write_off_memo').val();
|
||||
let debt_id = $('#debt_id').val();
|
||||
let patient_id = $('#patient_id').val();
|
||||
let amount_owed = $('#amount_owed').val();
|
||||
let balance = $('#balance').val();
|
||||
|
||||
if (amount === '') {
|
||||
alert('Please Enter An Amount To Write Off.')
|
||||
} else if (expense_account === '') {
|
||||
alert('Please Select An Expense Account To Write Off To.')
|
||||
} else if (write_off_memo === '') {
|
||||
alert('Please Enter A Memo For This Write Off.')
|
||||
} else {
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '/patient_debtors/write_off_debts',
|
||||
data: {
|
||||
'amount': amount, 'debt_id': debt_id, 'amount_owed': amount_owed, 'patient_id': patient_id,
|
||||
'expense_account': expense_account, 'write_off_memo': write_off_memo, 'balance': balance
|
||||
},
|
||||
success: function(response) {
|
||||
if(!response.includes("not")) {
|
||||
alert("Write off has been completed successfully");
|
||||
window.location.href = '/patient_debtors/debtors';
|
||||
} else {
|
||||
alert("An error occurred. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
let min_days = <?php echo $back_date[0]; ?>;
|
||||
var min_date = new Date();
|
||||
min_date.setDate(min_date.getDate()-min_days);
|
||||
$('#date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
endDate: new Date(),
|
||||
startDate: min_date,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#amount_paid').change(function (e) {
|
||||
e.preventDefault();
|
||||
let amount = $('#amount_owed').val();
|
||||
let bal = amount - this.value;
|
||||
if(bal < 0 ){
|
||||
alert("Please Don't Exceed the Required Amount, Thank You.");
|
||||
this.value = 0;
|
||||
}else if(bal > 0 || bal === 0){
|
||||
$('#balance').val(bal);
|
||||
}
|
||||
reset_payment_methods_amounts();
|
||||
});
|
||||
|
||||
function add_payment_method() {
|
||||
$('#payment_methods_div').show();
|
||||
|
||||
if ($('#cash_to_pay').val() == 0) {
|
||||
$('#cash_to_pay').val( $('#amount_paid').val());
|
||||
$('#original_cash_to_pay').val( $('#amount_paid').val());
|
||||
}
|
||||
|
||||
$('#payment_methods_div').append('<div class="row"><div class="col-md-6"><label>Payment Method</label><select class="form-control payment_method" name="payment_method[]"><option value="0">--select method--</option><?php echo $patient_payment_methods_options ?></select></div><div class="col-md-6"><label>Payment Amount</label><input name="payment_methods_amount[]" type="number" class="form-control payment_methods_amount" onkeyup="payment_methods_amount_calculate()"></div></div><br>');
|
||||
}
|
||||
|
||||
function payment_methods_amount_calculate() {
|
||||
// tally up all the entered values
|
||||
let total_amount_payment_methods = 0;
|
||||
|
||||
$('.payment_methods_amount').each(function () {
|
||||
total_amount_payment_methods += +$(this).val();
|
||||
});
|
||||
|
||||
let cash_to_pay = $('#original_cash_to_pay').val();
|
||||
cash_to_pay -= total_amount_payment_methods;
|
||||
|
||||
if (cash_to_pay < 0) {
|
||||
alert("You have entered more money in the payment methods than is supposed to be paid");
|
||||
$('#cash_to_pay').val($('#original_cash_to_pay').val());
|
||||
$('.payment_methods_amount').each(function () {
|
||||
$(this).val(0);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#cash_to_pay').val(cash_to_pay);
|
||||
}
|
||||
|
||||
function reset_payment_methods_amounts() {
|
||||
$('#cash_to_pay').val( $('#amount_paid').val());
|
||||
$('#original_cash_to_pay').val( $('#amount_paid').val());
|
||||
|
||||
$('.payment_methods_amount').each(function () {
|
||||
$(this).val(0);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Patient Receipt - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-size: 0.8em;
|
||||
}
|
||||
/*thead, tfoot { display: table-row-group }*/
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>Patient Names</b></td>
|
||||
<td>{{ get_full_name($patient_id, 'id', 'first_name', 'last_name', 'patients') }}</td>
|
||||
<td><b>Patient Number</b></td>
|
||||
<td>{{ get_name($patient_id, 'id', 'number', 'patients') }}</td>
|
||||
<td><b>Patient Category</b></td>
|
||||
<td>{{ get_name(get_name($patient_id, 'id', 'category_id', 'patients'), 'id', 'name', 'patient_categories') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@foreach($debt_payments as $debt_payment)
|
||||
<table class="table table-bordered" id="receipt_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Amount Paid</b></td>
|
||||
<td>{{ ugandan_shillings($debt_payment->amount_paid) }}</td>
|
||||
<td><b>Balance</b></td>
|
||||
<td>{{ ugandan_shillings($debt_payment->balance) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Comment</b></td>
|
||||
<td>{{ $debt_payment->comment }}</td>
|
||||
<td><b>Received By</b></td>
|
||||
<td>{{ get_full_name($debt_payment->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Receipt Number</b></td>
|
||||
<td>{{ $debt_payment->receipt_number }}</td>
|
||||
<td><b>Received On</b></td>
|
||||
<td>{{ streamline_date($debt_payment->date_paid) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endforeach
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<i style="font-size: 0.8em; float: left">© {{ date('Y') }} Stre@mline</i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<i style="float: right">Printed On {{ date(" d M Y h:ia") }} By {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
docker/statistics/Modules/PatientDiscounts/Resources/views/patient_debtors/staffGuarantors.blade.php
Executable
+246
@@ -0,0 +1,246 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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" />
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@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">Guarantors</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('finance_reports.index') }}"><i class="fa fa-list"></i> Reports Home</a></li>
|
||||
<li class="active">Guarantors</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@include('flash::message')
|
||||
<div class="row white-box">
|
||||
{{ Form::open(['method'=>'post','route' => 'patient_debtors.staff_guarantors']) }}
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('staff_member', 'Select Guarantor') }}
|
||||
<select class="form-control compulsory required" name="staff_member" id="staff_member" required>
|
||||
<option value="">-- Select --</option>
|
||||
<option value="ALL STAFF">ALL GUARANTORS</option>
|
||||
@foreach($users as $item)
|
||||
<option value="{{ $item->id }}">{{ $item->first_name. " ".$item->last_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', 'Start Date') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date', '', ['class'=>'form-control compulsory required', 'readonly', 'id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date', 'End Date') }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date', '', ['class'=>'form-control compulsory required', 'readonly', 'id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" style="margin-top: 20px;">
|
||||
{{ Form::submit('Submit', ['class'=>'btn btn-success pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<h4> {!! $display ?? '' !!}</h4>
|
||||
<br>
|
||||
<br/>
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Guarantor Name</th>
|
||||
<th>Patient Name</th>
|
||||
<th>Date Of Bill</th>
|
||||
<th>Arrangement For Balance</th>
|
||||
<th>Completion Date</th>
|
||||
<th>Authorised By</th>
|
||||
<th>Comment</th>
|
||||
<th>Guarantor To Pay</th>
|
||||
<th>Amount Paid</th>
|
||||
<th>Balance</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
$sum_total_amount = 0;
|
||||
$sum_amount_paid = 0;
|
||||
$sum_balance = 0;
|
||||
@endphp
|
||||
@if(count($debts) > 0)
|
||||
<tbody>
|
||||
@foreach($debts as $debt)
|
||||
<tr>
|
||||
<td>
|
||||
@php
|
||||
$guarantor_ids_array = explode(",", $debt->staff_guarantor);
|
||||
@endphp
|
||||
<ul>
|
||||
@if ($debt->guarantor_type == 1)
|
||||
@for ($i = 0; $i < count($guarantor_ids_array); $i++)
|
||||
<li>{{ get_full_name($guarantor_ids_array[$i], 'id', 'first_name', 'last_name', 'users') }}</li>
|
||||
@endfor
|
||||
@else
|
||||
@for ($i = 0; $i < count($guarantor_ids_array); $i++)
|
||||
<li>{{ get_full_name($guarantor_ids_array[$i], 'id', 'first_name', 'last_name', 'non_staff_guarantors') }}</li>
|
||||
@endfor
|
||||
@endif
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ get_name($debt->patient_id, 'id', 'first_name', 'patients') }} {{ get_name($debt->patient_id, 'id', 'last_name', 'patients') }}</td>
|
||||
<td>{{ streamline_date($debt->created_at) }}</td>
|
||||
<td>{{ get_name($debt->debt_plan_arrangement, 'id', 'name', 'debt_plan_arrangements') }}</td>
|
||||
<td>
|
||||
@if (!is_null($debt->fourth_installment_date))
|
||||
{{ streamline_date($debt->fourth_installment_date) }}
|
||||
@elseif(!is_null($debt->third_installment_date))
|
||||
{{ streamline_date($debt->third_installment_date) }}
|
||||
@elseif(!is_null($debt->second_installment_date))
|
||||
{{ streamline_date($debt->second_installment_date) }}
|
||||
@elseif(!is_null($debt->first_installment_date))
|
||||
{{ streamline_date($debt->first_installment_date) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ get_full_name($debt->authorised_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ $debt->comment ?? "N/A" }}</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($debt->staff_guarantor_to_pay) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($debt->amount_paid_off) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($debt->balance_remaining) }}
|
||||
</td>
|
||||
<td><a class="btn btn-primary btn-sm btn-rounded" target="_blank" href="/patient_debtors/debt_plan_guarantor_agreement/{{ $debt->id }}">{{ __('patient_finance.print_guarantor_agreement') }}</a></td>
|
||||
|
||||
@php
|
||||
$current_amount_paid = ($debt->amount_paid_off ?? 0);
|
||||
$sum_total_amount += $debt->staff_guarantor_to_pay;
|
||||
$sum_amount_paid += $current_amount_paid;
|
||||
$sum_balance += $debt->balance_remaining ?? $debt->staff_guarantor_to_pay;
|
||||
@endphp
|
||||
<td>
|
||||
@if($current_amount_paid == 0)
|
||||
{{ Form::open(['method'=>'post', 'route'=>'patient_debtors.receive_debt_plan_payments_staff']) }}
|
||||
{{ Form::hidden('debt_plan_id', $debt->id) }}
|
||||
{{ Form::hidden('status', 'new') }}
|
||||
{{ Form::submit('Receive Payment', ['class'=>'btn btn-success btn-sm btn-rounded']) }}
|
||||
{{ Form::close() }}
|
||||
@elseif ($current_amount_paid < $debt->staff_guarantor_to_pay)
|
||||
{{ Form::open(['method'=>'post', 'route'=>'patient_debtors.receive_debt_plan_payments_staff']) }}
|
||||
{{ Form::hidden('debt_plan_id', $debt->id) }}
|
||||
{{ Form::hidden('status', 'update') }}
|
||||
{{ Form::submit('Update Payment', ['class'=>'btn btn-warning btn-sm btn-rounded']) }}
|
||||
{{ Form::close() }}
|
||||
@elseif ($current_amount_paid == $debt->staff_guarantor_to_pay)
|
||||
{{ Form::open(['method'=>'post', 'route'=>'patient_debtors.receive_debt_plan_payments_staff']) }}
|
||||
{{ Form::hidden('debt_plan_id', $debt->id) }}
|
||||
{{ Form::hidden('status', 'update') }}
|
||||
{{ Form::submit('View Payments', ['class'=>'btn btn-primary btn-sm btn-rounded']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Total</td>
|
||||
<td>{{ ugandan_shillings($sum_total_amount) }}</td>
|
||||
<td>{{ ugandan_shillings($sum_amount_paid) }}</td>
|
||||
<td>{{ ugandan_shillings($sum_balance) }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@else
|
||||
<td colspan="7"><span style="color: red;">RECORDS NOT FOUND</span></td>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
</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/jszip.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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#staff_member').select2({
|
||||
placeholder: "-- select --"
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
],
|
||||
"aoColumnDefs": [{
|
||||
"aTargets": [2,3],
|
||||
"defaultContent": "",
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
@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-md-8">
|
||||
<h4 class="page-title">Editing drugs pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('finance::markup_tags.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<strong>Existing markups</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($markup_tags as $tag)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $tag->name }}</td>
|
||||
<td>{{ $tag->percentage }}%</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::open(['route' => 'price_list_category.save_apply_markup_to_drugs', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('markup_tag', 'Select Markup to apply') }}
|
||||
{{ Form::select('markup_tag', $tags_select, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<input id="select_all" type="checkbox"> Select all drugs
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table" id="items_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Current Cash Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$counter = 1;
|
||||
@endphp
|
||||
|
||||
@foreach($drugs as $drug)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $drug->price_list_category));
|
||||
$price_list_price_array = explode(",", $drug->price_list_price);
|
||||
$price_list_price = isset($price_list_price_array[$key]) ? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $drug->name }}</td>
|
||||
<td>{{ ugandan_shillings($drug->non_insured_price) }}</td>
|
||||
<td>{{ ugandan_shillings($price_list_price) }}</td>
|
||||
<td><input class="item_checkbox" type="checkbox" name="checked_drug[]" value="{{ $drug->id }}"></td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Apply',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#items_table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
@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-md-8">
|
||||
<h4 class="page-title">Editing drugs pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('finance::markup_tags.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<strong>Existing markups</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($markup_tags as $tag)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $tag->name }}</td>
|
||||
<td>{{ $tag->percentage }}%</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::open(['route' => 'price_list_category.save_apply_markup_to_eye_glasses', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('markup_tag', 'Select Markup to apply') }}
|
||||
{{ Form::select('markup_tag', $tags_select, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="checkbox checkbox-success">
|
||||
<input id="select_all" type="checkbox">
|
||||
<label for="select_all"> Select all Eye Glases </label>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table" id="items_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Current Cash Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$counter = 1;
|
||||
@endphp
|
||||
|
||||
@foreach($eye_glasses as $eye_glass)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $eye_glass->price_list_category));
|
||||
$price_list_price_array = explode(",", $eye_glass->price_list_price);
|
||||
$price_list_price = isset($price_list_price_array[$key]) ? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $eye_glass->name }}</td>
|
||||
<td>{{ ugandan_shillings($eye_glass->non_insured_price) }}</td>
|
||||
<td>{{ ugandan_shillings($price_list_price) }}</td>
|
||||
<td>
|
||||
<input class="item_checkbox" type="checkbox" name="checked_eye_glass[]" value="{{ $eye_glass->id }}">
|
||||
</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Apply',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#items_table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
@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-md-8">
|
||||
<h4 class="page-title">Editing investigations pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('finance::markup_tags.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<strong>Existing markups</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($markup_tags as $tag)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $tag->name }}</td>
|
||||
<td>{{ $tag->percentage }}%</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::open(['route' => 'price_list_category.save_apply_markup_to_investigations', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('markup_tag', 'Select Markup to apply') }}
|
||||
{{ Form::select('markup_tag', $tags_select, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<input id="select_all" type="checkbox"> Select all investigations
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table" id="items_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Current Cash Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($investigations as $investigation)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $investigation->price_list_category));
|
||||
$price_list_price_array = explode(",", $investigation->price_list_price);
|
||||
$price_list_price = isset($price_list_price_array[$key]) ? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $investigation->name }}</td>
|
||||
<td>{{ ugandan_shillings($investigation->non_insured_price) }}</td>
|
||||
<td>{{ ugandan_shillings($price_list_price) }}</td>
|
||||
<td><input class="item_checkbox" type="checkbox" name="checked_investigation[]" value="{{ $investigation->id }}"></td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Apply',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#items_table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
@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-md-8">
|
||||
<h4 class="page-title">Editing procedures pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('finance::markup_tags.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<strong>Existing markups</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($markup_tags as $tag)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $tag->name }}</td>
|
||||
<td>{{ $tag->percentage }}%</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::open(['route' => 'price_list_category.save_apply_markup_to_procedures', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('markup_tag', 'Select Markup to apply') }}
|
||||
{{ Form::select('markup_tag', $tags_select, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<input id="select_all" type="checkbox"> Select all procedures
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table" id="items_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Current Cash Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($procedures as $procedure)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $procedure->price_list_category));
|
||||
$price_list_price_array = explode(",", $procedure->price_list_price);
|
||||
$price_list_price = isset($price_list_price_array[$key]) ? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $procedure->name }}</td>
|
||||
<td>{{ ugandan_shillings($procedure->non_insured_price) }}</td>
|
||||
<td>{{ ugandan_shillings($price_list_price) }}</td>
|
||||
<td><input class="item_checkbox" type="checkbox" name="checked_procedure[]" value="{{ $procedure->id }}"></td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Apply',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
/*$('#items_table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
buttons: []
|
||||
});*/
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
@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-md-8">
|
||||
<h4 class="page-title">Editing services pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('finance::markup_tags.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<strong>Existing markups</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($markup_tags as $tag)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $tag->name }}</td>
|
||||
<td>{{ $tag->percentage }}%</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::open(['route' => 'price_list_category.save_apply_markup_to_services', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('markup_tag', 'Select Markup to apply') }}
|
||||
{{ Form::select('markup_tag', $tags_select, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<input id="select_all" type="checkbox"> Select all services
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table" id="items_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Current Cash Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($services as $service)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $service->price_list_category));
|
||||
$price_list_price_array = explode(",", $service->price_list_price);
|
||||
$price_list_price = isset($price_list_price_array[$key]) ? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $service->name }}</td>
|
||||
<td>{{ ugandan_shillings($service->non_insured_price) }}</td>
|
||||
<td>{{ ugandan_shillings($price_list_price) }}</td>
|
||||
<td><input class="item_checkbox" type="checkbox" name="checked_service[]" value="{{ $service->id }}"></td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Apply',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#items_table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
@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-md-8">
|
||||
<h4 class="page-title">Editing sundries pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('finance::markup_tags.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<strong>Existing markups</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($markup_tags as $tag)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $tag->name }}</td>
|
||||
<td>{{ $tag->percentage }}%</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::open(['route' => 'price_list_category.save_apply_markup_to_sundries', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('markup_tag', 'Select Markup to apply') }}
|
||||
{{ Form::select('markup_tag', $tags_select, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<input id="select_all" type="checkbox"> Select all sundries
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table" id="items_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Current Cash Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $counter = 1; @endphp
|
||||
@foreach($sundries as $sundry)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $sundry->price_list_category));
|
||||
$price_list_price_array = explode(",", $sundry->price_list_price);
|
||||
$price_list_price = isset($price_list_price_array[$key]) ? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>{{ $sundry->name }}</td>
|
||||
<td>{{ ugandan_shillings($sundry->non_insured_price) }}</td>
|
||||
<td>{{ ugandan_shillings($price_list_price) }}</td>
|
||||
<td><input class="item_checkbox" type="checkbox" name="checked_sundry[]" value="{{ $sundry->id }}"></td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Apply',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#items_table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<style type="text/css">
|
||||
.modal-dialog {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
}
|
||||
</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">Add Category</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/index">Price List Categories</a></li>
|
||||
<li class="active">Create</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::price_list_category.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'price_list_category.store', 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('patient_category_id','Patient Category') }}
|
||||
{{ Form::select('patient_category_id', $patient_categories, '', ['class' => 'form-control col-sm-12 compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pay_for_invoice','Invoice Patient Category For Pay Later Patients (If this price list will apply to other patient categories, tick no. If it is only for this patient category, tick yes.)') }}
|
||||
<br>
|
||||
{{ Form::radio('pay_for_invoice', 1, false, ["required"]) }} Yes
|
||||
{{ Form::radio('pay_for_invoice', 0, false, ["required"]) }} No
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
@endpush
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-8">
|
||||
<h4 class="page-title">Editing pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/index">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::price_list_category.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded col-md-12" href="/price_list_category/edit_pricing_sundries/{{ $id }}"> Edit Sundries Pricing</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded col-md-12" href="/price_list_category/edit_pricing_procedures/{{ $id }}"> Edit Procedures Pricing</a>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded col-md-12" href="/price_list_category/edit_pricing_investigations/{{ $id }}"> Edit Investigations Pricing</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded col-md-12" href="/price_list_category/edit_pricing_drugs/{{ $id }}"> Edit Drugs Pricing</a>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded col-md-12" href="/price_list_category/edit_pricing_services/{{ $id }}"> Edit Services Pricing</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded col-md-12" href="/price_list_category/edit_pricing_eye_glasses/{{ $id }}"> Edit Eye Glasses Pricing</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
@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" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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-md-8">
|
||||
<h4 class="page-title">Editing {{ $item_name }} pricing for {{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category">Price List Categories</a></li>
|
||||
<li class="active">Edit</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include('patient_discounts::price_list_category.menu')
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => [$route,$id], 'method' => 'ANY', 'role' => 'search']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="drug_names">
|
||||
{{ Form::select('search_items_ids[]',$items,'',['id'=>'items_ids', 'multiple'=>true, 'class' => 'form-control col-sm-8 items_ids']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-info"><span class="glyphicon glyphicon-search"></span> {{ __('pharmacy.search') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@if(count($filtered_items) > 0)
|
||||
{{ Form::open(['route' => [$route_markups,$id], 'method' => 'ANY', 'role' => 'search']) }}
|
||||
{{ Form::hidden('filtered_items', json_encode($filtered_items), ['class' => 'form-control']) }}
|
||||
<button class="btn btn-primary" type="submit" >Apply Markup Tags</button>
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- <div class="col-md-6">
|
||||
<div style="float: right; margin-bottom: 5px;">
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
{{ Form::open(['route' => $route_submit, 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('price_list_category_id', $id) }}
|
||||
<br>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th hidden>Id</th>
|
||||
<th>{{ $title }}</th>
|
||||
<th>Default (Cash) Price</th>
|
||||
<th>{{ get_name(get_name($id, 'id', 'patient_category_id', 'price_list_categories'), 'id', 'name', 'patient_categories') }} Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($filtered_items as $record)
|
||||
@php
|
||||
$key = array_search($id, explode(",", $record->price_list_category));
|
||||
$price_list_price_array = explode(",", $record->price_list_price);
|
||||
$price_list_price = ($key !== false )? $price_list_price_array[$key] : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td hidden>
|
||||
{{ Form::text('id[]', $record->id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>{{ $record->name }}</td>
|
||||
<td>
|
||||
{{ Form::number('non_insured_price[]', $record->non_insured_price , ['class' => 'form-control compulsory', 'readonly']) }}
|
||||
<span style="display: none">{{ $record->non_insured_price }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('price_list_price[]', $price_list_price , ['class' => 'form-control compulsory']) }}
|
||||
<span style="display: none">{{ $price_list_price }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td rowspan="4" class="text-danger">Select Items</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br>
|
||||
{{ Form::button(__('price_list_category.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('price_list_category.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</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/jszip.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>
|
||||
$('.items_ids').select2({
|
||||
placeholder: "Select"
|
||||
});
|
||||
$('.table').DataTable({
|
||||
// pageLength: 600,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
footer: true,
|
||||
title: 'PRICE LIST - STRE@MLINE',
|
||||
exportOptions: {
|
||||
columns: [ 1, 2, 3 ]
|
||||
},
|
||||
},
|
||||
{ extend: 'excel',
|
||||
footer: true,
|
||||
title: 'PRICE LIST - STRE@MLINE',
|
||||
exportOptions: {
|
||||
columns: [ 1, 2, 3 ]
|
||||
},
|
||||
sheetName: 'PRICE LIST ON STREAMLINE'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
footer: true,
|
||||
title: 'PRICE LIST - STRE@MLINE',
|
||||
repeatingHead: {
|
||||
logo: '<?php echo asset("uploads/logo/logo-sm.png"); ?>',
|
||||
logoPosition: 'right',
|
||||
logoStyle: '',
|
||||
},
|
||||
exportOptions: {
|
||||
columns: [ 1, 2, 3 ]
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
footer: true,
|
||||
title: 'PRICE LIST - STRE@MLINE',
|
||||
exportOptions: {
|
||||
columns: [ 1, 2, 3 ]
|
||||
}
|
||||
}
|
||||
],
|
||||
sorting: false,
|
||||
paging:false,
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+82
@@ -0,0 +1,82 @@
|
||||
@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">Activate Price List Categories</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="/price_list_category/index">Price List Categories</a></li>
|
||||
<li class="active">Activate</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::price_list_category.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<p class="text-muted m-b-30">Export data to Copy, CSV, Excel, PDF & Print</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category Name</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($categories as $category)
|
||||
<tr>
|
||||
<td>{{ $patient_categories[$category->patient_category_id] }}</td>
|
||||
<td>
|
||||
{{ Form::model($category->id ,['method' => 'POST', 'route' => ['price_list_category.activate', $category->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('Are you sure?')"><i class="fa fa-check"></i> Activate</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</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/jszip.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',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
@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">Price List Categories</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">View</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patient_discounts::price_list_category.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category Name</th>
|
||||
@if(Auth::user()->can('price-list-category-edit-pricing'))
|
||||
<th></th>
|
||||
@endif
|
||||
@if(Auth::user()->can('price-list-category-delete'))
|
||||
<th></th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($categories as $category)
|
||||
<tr>
|
||||
<td>{{ isset($patient_categories[$category->patient_category_id]) ? $patient_categories[$category->patient_category_id] : "N/A" }}</td>
|
||||
@if(Auth::user()->can('price-list-category-edit-pricing'))
|
||||
<td>
|
||||
<a href="/price_list_category/edit_pricing/{{ $category->id }}" class="btn btn-info"><i class="fa fa-pencil"></i> Edit Pricing</a>
|
||||
</td>
|
||||
@endif
|
||||
@if(Auth::user()->can('price-list-category-delete'))
|
||||
<td>
|
||||
{{ Form::model($category->id ,['method' => 'DELETE', 'route' => ['price_list_category.destroy', $category->id]]) }}
|
||||
<button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> Delete</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</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/jszip.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',
|
||||
buttons: [
|
||||
'copy', 'csv', 'pdf', 'print', 'excel'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
@if(Auth::user()->can('price-list-category-create'))
|
||||
<a href="{{ route('price_list_category.create') }}" class="nav-item btn btn-success ti-plus"> Add Price List Category</a>
|
||||
@endif
|
||||
@if(Auth::user()->can('price-list-category-view'))
|
||||
<a href="{{ route('price_list_category.index') }}" class="nav-item btn btn-info ti-eye"> View Price List Categories</a>
|
||||
@endif
|
||||
@if(Auth::user()->can('price-list-category-delete'))
|
||||
<a href="{{ route('price_list_category.inactive') }}" class="nav-item btn btn-danger ti-eye"> Inactive Price List Categories</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user