resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,275 @@
@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/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" />
<style type="text/css">
#discounts_table td{
border-left: 1px solid #dddddd;
}
#paid_services_table td{
border-left: 1px solid #dddddd;
}
#services_table td{
border-left: 1px solid #dddddd;
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('streamline_bills.streamline_bills') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('streamline_bills.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('streamline_bills.finance_home') }}</a></li>
<li class="active"><i class="fa fa-bil"></i> {{ __('streamline_bills.streamline_bills') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-12">
@include('flash::message')
<div class="white-box" style="background-color: #F5FFFA">
<div class="row">
<div class="col-md-12">
<div class="pull-left">
<address>
<h3> &nbsp;<b class="text-danger">{{ $hospital_information->name }}</b></h3>
<p class="text-muted m-l-5">{{ $hospital_information->phone_number }}, {{ $hospital_information->email }},
<br/> {{ get_name($hospital_information->sub_county,'id', 'name', 'subcounties') }}, {{ get_name($hospital_information->district,'id', 'name', 'districts') }},
<br/> {{ $hospital_information->country }}.</p>
</address>
</div>
<div class="pull-right text-right">
<address>
<p class="m-t-30"><b> {{ __('streamline_bills.date') }} : </b> <i class="fa fa-calendar"></i> {{ streamline_date_time(\Carbon\Carbon::now()->toDateTimeString()) }}</p>
</address>
</div>
<br/>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col">
<div class="panel panel-default">
<div class="panel-heading">
<div class="row">
<div class="col text-left">
{{ __('streamline_bills.details') }}
</div>
</div>
</div>
{{ Form::open(['method'=>'post','route' => 'streamline_bill.generate']) }}
<div class="panel-body">
<div class="input_fields_wrap">
<div class="row">
<div class="span1"></div>
<div class="col">
<div class=" control-group">
<label class="control-label" for="dates">{{ __('streamline_bills.processed_by') }}:</label>
<div class="form-group">
<div class="input-group">
{{ Form::text('processed_by', get_full_name($user, 'id', 'first_name', 'last_name', 'users'),
['class'=>'form-control required compulsory', 'readonly', 'id'=>'processed_by']) }}
</div>
</div>
</div>
</div>
<div class="form-group col">
<label class="control-label" for="dates">{{ __('streamline_bills.date_type') }}:</label>
<select class="form-control compulsory required" name="dates" id="dates" required>
<option value="">{{ __('streamline_bills.select') }}</option>
<option value="today">{{ __('streamline_bills.today') }}</option>
<option value="yesterday">{{ __('streamline_bills.yesterday') }}</option>
<option value="custom_date">{{ __('streamline_bills.custom_date') }}</option>
<option value="custom_date_range">{{ __('streamline_bills.date_range') }}</option>
</select>
</div>
<div id="sDate" class="col" style="display: none;">
<div class="form-group">
{{ Form::label('start_date',__('streamline_bills.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 id="eDate" class="col" style="display: none;">
<div class="form-group">
{{ Form::label('end_date',__('streamline_bills.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 class='col'>
<div class="input-group" style="margin-top: 28px">
<button class="btn btn-success btn-block btn-rounded">submit</button>
</div>
</div>
</div>
</div>
</div>
{{ Form::close() }}
</div>
</div>
</div>
<div class="row">
<div class="col panel">
<div class="panel-body">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('streamline_bills.patient_name') }}</th>
<th>{{ __('streamline_bills.patient_number') }}</th>
<th>{{ __('streamline_bills.first_visit') }}</th>
<th class="text-center">{{ __('streamline_bills.recorded_by') }}</th>
</tr>
</thead>
<tbody>
@if(count($patients) > 0)
@foreach($patients as $id)
<tr>
<th>{{ get_name($id, 'id', 'first_name', 'patients') }} {{ get_name($id, 'id', 'last_name', 'patients') }}</th>
<th>{{ get_name($id, 'id', 'number', 'patients') }}</th>
<th>{{ streamline_date(get_name($id, 'id', 'created_at', 'patients')) }}</th>
@php $created_by = get_name($id, 'id', 'created_by', 'patients'); @endphp
<th class="text-center">{{ get_full_name($created_by, 'id', 'first_name', 'last_name', 'users') }}</th>
</tr>
@endforeach
@else
<tr>
<th>{{ __('streamline_bills.no_results_found') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
@endif
</tbody>
</table>
<br/>
<div class="text-right">
<h5><strong>{{ __('streamline_bills.number_of_patients') }}: <div class="label label-success">{{ count($patients) }}</div></strong></h5> <br>
<h5><strong>{{ __('streamline_bills.cost_per_patient_annually') }} : <div class="label label-success">{{ ugandan_shillings(1000) }}</div></strong></h5><br>
@php
$total = count($patients) * 1000;
@endphp
<h2><strong>{{ __('streamline_bills.total') }} : {{ ugandan_shillings($total) }}</strong></h2><br>
{{ Form::open(['method'=>'post', 'route'=>'streamline_bill.transfer']) }}
<input type="hidden" name="patient_string" value="{{ $patient_string }}">
<input type="hidden" name="total" value="{{ $total }}">
<button class="btn-danger btn btn-rounded">{{ __('streamline_bills.save_bill') }}</button>
{{ Form::close() }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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/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'
],
"aoColumnDefs": [{
"aTargets": [2,3],
"defaultContent": "",
}]
});
</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>
$('#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>
@endpush
@@ -0,0 +1,201 @@
@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-md-7">
<h4>{{ __('streamline_bills.streamline_bills') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('streamline_bills.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('streamline_bills.finance_home') }}</a></li>
<li class="active"><i class="fa fa-bil"></i> {{ __('streamline_bills.streamline_bills') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-sm-12">
<div style="float: right;">
<button class="btn btn-rounded" style="background-color: #03C03C; color: white;" id="printPurchaseOrderReceipt">
<i class="fa fa-print"></i>
<span style="margin-left: 10px;">{{ __('streamline_bills.print') }}</span>
</button>
<br>
</div>
</div>
</div><br>
@include('flash::message')
<div class="white-box" style="background-color: #F5FFFA" id="printableContent">
<div class="row">
<div class="col-md-12">
<div class="pull-left">
<address>
<h3> &nbsp;<b class="text-danger">{{ $hospital_information->name }}</b></h3>
<p class="text-muted m-l-5">{{ $hospital_information->phone_number }}, {{ $hospital_information->email }},
<br/> {{ get_name($hospital_information->sub_county,'id', 'name', 'subcounties') }}, {{ get_name($hospital_information->district,'id', 'name', 'districts') }},
<br/> {{ $hospital_information->country }}.</p>
</address>
</div>
<div class="pull-right text-right">
<address>
<p class="m-t-30"><b> {{ __('streamline_bills.date') }} : </b> <i class="fa fa-calendar"></i> {{ streamline_date_time(\Carbon\Carbon::now()->toDateTimeString()) }}</p>
</address>
<button class="btn-success btn btn-rounded" disabled>{{ __('streamline_bills.bill_generated') }}</button>
</div>
<br/>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col panel">
<div class="panel-default">
<div class="panel-heading">
<div class="row">
<div class="col text-left">
{{ __('streamline_bills.billing_date') }}
</div>
<div class="col text-right">
@php
if(isset($report->time_frame)){ $time_frame = explode("&", $report->time_frame);}
@endphp
<div class="btn btn-info btn-rounded">{{ streamline_date(isset($time_frame[0]) ? streamline_date($time_frame[0]) : "" ) }}
@if(isset($time_frame[1]))
<b>{{ __('streamline_bills.to') }}</b>
{{ streamline_date($time_frame[1]) }}
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="col panel">
<div class="panel-body">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('streamline_bills.patient_name') }}</th>
<th>{{ __('streamline_bills.patient_number') }}</th>
<th>{{ __('streamline_bills.first_visit') }}</th>
<th class="text-center">{{ __('streamline_bills.recorded_by') }}</th>
</tr>
</thead>
<tbody>
@if(isset($report) > 0)
@php
$patients = explode("/", $report->patients);
@endphp
@foreach($patients as $id)
<tr>
<td>{{ get_full_name($id, 'id', 'first_name', 'last_name', 'patients') }}</td>
<td>{{ get_name($id, 'id', 'number', 'patients') }}r</td>
<td>
@php
$episode_date = \Streamline\Models\PatientEpisode::where('patient_id', $id)->pluck('created_at')->first();
echo streamline_date($episode_date);
@endphp
</td>
<td class="text-center">
@php
$recorded_by = \Streamline\Models\PatientEpisode::where('patient_id', $id)->pluck('created_by')->first();
echo get_full_name($recorded_by, 'id', 'first_name', 'last_name', 'users');
@endphp
</td>
</tr>
@endforeach
@else
<tr>
<th>{{ __('streamline_bills.no_records_found') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
@endif
</tbody>
</table>
<br/>
<div class="text-right">
<h5><strong>{{ __('streamline_bills.number_of_patients') }}: <div class="label label-success"></div></strong></h5> <br>
<h5><strong>{{ __('streamline_bills.cost_per_patient_annually') }} : <div class="label label-success">{{ ugandan_shillings(1000) }}</div></strong></h5><br>
@php
$total = count($patients) * 1000;
@endphp
<h2><strong>Total : {{ ugandan_shillings($total) }}</strong></h2><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
@push('scripts')
<script type="text/javascript">
function printElementContent(elem,title){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
var css = '<link href="/elite/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">';
mywindow.document.write('<html><head><title></title>');
mywindow.document.write('</head><body >');
mywindow.document.write(css);
mywindow.document.write('<center><h3>' + title + '</h3></center>');
mywindow.document.write(document.getElementById(elem).innerHTML);
mywindow.document.write('</body></html>');
mywindow.document.close(); // necessary for IE >= 10
//mywindow.focus(); // necessary for IE >= 10*/
setTimeout(function () {
mywindow.focus();
mywindow.print();
mywindow.remove();
}, 500);
return true;
}
$("#printPurchaseOrderReceipt").click(function(e){
printElementContent('printableContent','Stre@mline Bill');
});
</script>
@endpush
@endpush
@@ -0,0 +1,232 @@
@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/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" />
<style type="text/css">
#discounts_table td{
border-left: 1px solid #dddddd;
}
#paid_services_table td{
border-left: 1px solid #dddddd;
}
#services_table td{
border-left: 1px solid #dddddd;
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('streamline_bills.streamline_bills') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('streamline_bills.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('streamline_bills.finance_home') }}</a></li>
<li class="active"><i class="fa fa-bil"></i> {{ __('streamline_bills.streamline_bills') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-12">
@include('flash::message')
<div class="white-box" style="background-color: #F5FFFA">
<div class="row">
<div class="col-md-12">
<div class="pull-left">
<address>
<h3> &nbsp;<b class="text-danger">{{ $hospital_information->name }}</b></h3>
<p class="text-muted m-l-5">{{ $hospital_information->phone_number }}, {{ $hospital_information->email }},
<br/> {{ get_name($hospital_information->sub_county,'id', 'name', 'subcounties') }}, {{ get_name($hospital_information->district,'id', 'name', 'districts') }},
<br/> {{ $hospital_information->country }}.</p>
</address>
<br/>
<a role="button" class="btn btn-success btn-rounded btn-block" href="{{ route('streamline_bill.create') }}">{{ __('streamline_bills.generate_bill') }}</a>
</div>
<div class="pull-right text-right">
<address>
<p class="m-t-30"><b> {{ __('streamline_bills.date') }} : </b> <i class="fa fa-calendar"></i> {{ streamline_date_time(\Carbon\Carbon::now()->toDateTimeString()) }}</p>
</address>
</div>
<br/>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col panel">
<div class="panel-body">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('streamline_bills.number_of_patients') }}</th>
<th>{{ __('streamline_bills.time_frame') }}</th>
<th>{{ __('streamline_bills.amount_to_be_paid') }}</th>
<th>{{ __('streamline_bills.amount_paid') }}</th>
<th>{{ __('streamline_bills.generated_by') }}</th>
<th></th>
<th>{{ __('streamline_bills.action') }}</th>
</tr>
</thead>
<tbody>
@if(count($reports) > 0)
@foreach($reports as $item)
@php
$ids = explode('/', $item['patients']);
$dates = explode('&', $item['time_frame']);
$count = count($ids);
@endphp
<tr>
<td>
<button onclick="view_patients('{{$item['id']}}')" class="btn btn-info btn-rounded">{{ $count }}</button>
</td>
<td>
<div class="label label-info">
{{ streamline_date($dates[0]) }} to @php if(isset($dates[1])){ echo streamline_date($dates[1]); }else{ echo ""; } @endphp
</div>
</td>
<td>{{ ugandan_shillings($item['amount_to_be_paid']) }}</td>
<td>{{ ugandan_shillings($item['amount_paid']) }}</td>
<td>{{ get_full_name($item['created_by'], 'id', 'first_name', 'last_name', 'users') }}</td>
<td><a href="{{ route('streamline_bill.detail', $item->id) }}" class="btn btn-primary btn-sm btn-rounded"><i class="fa fa-eye"></i> {{ __('streamline_bills.view_invoice') }}</a></td>
<td>
<a href="{{ url('/streamline_bill/delete', $item['id']) }}" onclick="return confirm('Are you sure?')" class="btn btn-danger btn-sm btn-rounded" role="button">
<i class="fa fa-trash"></i>
{{ __('streamline_bills.delete') }}
</a>
</td>
</tr>
@endforeach
@else
<tr>
<th>{{ __('streamline_bills.no_results_found') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="displayPatientsModal" tabindex="-1" role="dialog" aria-labelledby="displayPatientsModalLabel" aria-hidden="true" style="border-radius: 10px; margin-top: 200px ">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Patient on this Bill</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div id="patients_listing"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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/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>
function view_patients(id) {
$.ajax({
method: 'POST',
url: '/streamline_bill/view_patients',
data: {
'id':id
},
success: function(response){
patients = "<ol>"+response+"</ol>";
$('#patients_listing').html(patients);
$('#displayPatientsModal').modal('show');
},
error: function (error) {
console.log(error);
}
});
}
</script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
"aoColumnDefs": [{
"aTargets": [2,3],
"defaultContent": "",
}]
});
</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>
@endpush