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,111 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4 class="page-title">Cancel Invoice</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patient_refund.dashboard') }}</a></li>
<li class="active">Cancel Invoice</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-12">
<h4>Central Billing Details</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('patient_refund.receipt_number') }}</th>
<th>Item Names</th>
<th>Item Prices</th>
<th>{{ __('patient_refund.patient_amount_paid') }}</th>
<th>Patient Category Paid</th>
<th>{{ __('patient_refund.collected_by') }}</th>
<th>{{ __('patient_refund.payment_date') }}</th>
</tr>
</thead>
<tbody>
@php $patient_amount_paid = 0; @endphp
@foreach($deposit_details as $deposit_detail)
<tr>
<td>{{ $deposit_detail->receipt_number }}</td>
@php
$price_array = explode(",", $deposit_detail->items_amounts);
$items_array = explode(",", $deposit_detail->items_ids);
if ($deposit_detail->tag_id == 3) {
$table_name = "drugs";
} elseif ($deposit_detail->tag_id == 2) {
$table_name = "investigations";
} elseif ($deposit_detail->tag_id == 4) {
$table_name = "procedures";
} elseif ($deposit_detail->tag_id == 5) {
$table_name = "sundries";
} elseif ($deposit_detail->tag_id == 8) {
$table_name = "services";
} elseif ($deposit_detail->tag_id == 16) {
$table_name = "eye_glasses";
} else {
$table_name = "";
}
$patient_amount_paid += $deposit_detail->patient_amount_paid;
@endphp
<td>
@php $items_counter = 1; @endphp
@foreach($items_array as $item)
{{ $items_counter }}. {{ get_name($item, 'id', 'name', $table_name) }} <br>
@php $items_counter++; @endphp
@endforeach
</td>
<td>
@php $items_counter = 1; @endphp
@foreach($price_array as $price)
{{ $items_counter }}. {{ ugandan_shillings($price) }} <br>
@php $items_counter++; @endphp
@endforeach
</td>
<td>
{{ ugandan_shillings($deposit_detail->patient_amount_paid) }}
</td>
<td>
{{ ugandan_shillings($deposit_detail->patient_category_amount_paid) }}
</td>
<td>{{ get_full_name($deposit_detail->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time($deposit_detail->created_at) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'patient_finance.confirm_cancel_central_billing_receipt', 'data-toggle' => 'validator']) }}
{{ Form::hidden('receipt_number', $deposit_detail->receipt_number) }}
{{ Form::hidden('patient_amount_paid', $patient_amount_paid) }}
<div class="row">
<div class="col-md-12">
<div class="form-group">
{{ Form::label('cancellation_reason','Cancellation Reason') }}
{{ Form::textarea('cancellation_reason','',['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
<div class="text-center">
{{ Form::button('Cancel Receipt',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick' => 'return confirm("Are you sure you want to continue? You won\'t be able to reverse this process")']) }}
</div>
{{ Form::close() }}
</div>
@endsection
@@ -0,0 +1,105 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4 class="page-title">Cancel Invoice</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patient_refund.dashboard') }}</a></li>
<li class="active">Cancel Invoice</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-12">
<h4>Central Billing Details</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('patient_refund.receipt_number') }}</th>
<th>Item Names</th>
<th>Item Prices</th>
<th>{{ __('patient_refund.patient_amount_paid') }}</th>
<th>{{ __('patient_finance.chi_amount') }}</th>
<th>{{ __('patient_refund.collected_by') }}</th>
<th>{{ __('patient_refund.payment_date') }}</th>
</tr>
</thead>
<tbody>
@php $patient_amount_paid = 0; @endphp
@foreach($deposit_details as $deposit_detail)
<tr>
<td>{{ $deposit_detail->receipt_number }}</td>
@php
$price_array = explode(",", $deposit_detail->patient_co_payment);
$items_array = explode(",", $deposit_detail->items_ids);
if ($deposit_detail->tag_id == 3) {
$table_name = "drugs";
} elseif ($deposit_detail->tag_id == 2) {
$table_name = "investigations";
} elseif ($deposit_detail->tag_id == 4) {
$table_name = "procedures";
} elseif ($deposit_detail->tag_id == 5) {
$table_name = "sundries";
} elseif ($deposit_detail->tag_id == 8) {
$table_name = "services";
} else {
$table_name = "";
}
$patient_amount_paid += $deposit_detail->patient_amount_paid;
@endphp
<td>
@php $items_counter = 1; @endphp
@foreach($items_array as $item)
{{ $items_counter }}. {{ get_name($item, 'id', 'name', $table_name) }} <br>
@php $items_counter++; @endphp
@endforeach
</td>
<td>
@php $items_counter = 1; @endphp
@foreach($price_array as $price)
{{ $items_counter }}. {{ ugandan_shillings($price) }} <br>
@php $items_counter++; @endphp
@endforeach
</td>
<td>{{ ugandan_shillings($deposit_detail->patient_amount_paid) }}</td>
<td>{{ ugandan_shillings($deposit_detail->chi_amount_total) }}</td>
<td>{{ get_full_name($deposit_detail->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time($deposit_detail->created_at) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'patient_finance.confirm_cancel_chi_deposit', 'data-toggle' => 'validator']) }}
{{ Form::hidden('receipt_number', $deposit_detail->receipt_number) }}
{{ Form::hidden('patient_amount_paid', $patient_amount_paid) }}
<div class="row">
<div class="col-md-12">
<div class="form-group">
{{ Form::label('cancellation_reason','Cancellation Reason') }}
{{ Form::textarea('cancellation_reason','',['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
<div class="text-center">
{{ Form::button('Cancel Receipt',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick' => 'return confirm("Are you sure you want to continue? You won\'t be able to reverse this process")']) }}
</div>
{{ Form::close() }}
</div>
@endsection
@@ -0,0 +1,108 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4 class="page-title">Cancel Invoice</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patient_refund.dashboard') }}</a></li>
<li class="active">Cancel Invoice</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-12">
<h4>Invoice Details</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('patient_refund.receipt_number') }}</th>
<th>Item Names</th>
<th>Item Prices</th>
<th>{{ __('patient_refund.patient_amount_paid') }}</th>
<th>{{ __('patient_refund.collected_by') }}</th>
<th>{{ __('patient_refund.payment_date') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ $deposit_details->receipt_number }}</td>
@php
$price_array = explode(",", $deposit_details->items_amounts);
$items_array = explode(",", $deposit_details->items_ids);
if ($billing_point == 3) {
$table_name = "drugs";
} elseif ($billing_point == 2) {
$table_name = "investigations";
} elseif ($billing_point == 4) {
$table_name = "procedures";
} elseif ($billing_point == 5) {
$table_name = "sundries";
} elseif ($billing_point == 8) {
$table_name = "services";
} elseif ($billing_point == 10) {
$table_name = "Inpatient_Deposit";
} else {
$table_name = "";
}
@endphp
<td>
@php $items_counter = 1; @endphp
@foreach($items_array as $item)
@if($table_name == 'Inpatient_Deposit')
{{ $items_counter }}. Inpatient Deposit <br>
@else
{{ $items_counter }}. {{ get_name($item, 'id', 'name', $table_name) }} <br>
@endif
@php $items_counter++; @endphp
@endforeach
</td>
<td>
@php $items_counter = 1; $total_items_amount = 0; @endphp
@foreach($price_array as $price)
{{ $items_counter }}. {{ ugandan_shillings($price) }} <br>
@php $items_counter++; $total_items_amount += $price; @endphp
@endforeach
</td>
<td>
{{ ugandan_shillings($deposit_details->patient_amount) }}
</td>
<td>{{ get_full_name($deposit_details->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time($deposit_details->created_at) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'patient_finance.confirm_cancel_receipt', 'data-toggle' => 'validator']) }}
{{ Form::hidden('deposit_id', $deposit_details->id) }}
{{ Form::hidden('billing_point', $billing_point) }}
{{ Form::hidden('patient_amount_paid', ($total_items_amount - $deposit_details->patient_amount)) }}
{{ Form::hidden('is_invoice', 1) }}
<div class="row">
<div class="col-md-12">
<div class="form-group">
{{ Form::label('cancellation_reason','Cancellation Reason') }}
{{ Form::textarea('cancellation_reason','',['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
<div class="text-center">
{{ Form::button('Cancel Receipt',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick' => 'return confirm("Are you sure you want to continue? You won\'t be able to reverse this process")']) }}
</div>
{{ Form::close() }}
</div>
@endsection
@@ -0,0 +1,130 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4 class="page-title">Cancel Receipt</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patient_refund.dashboard') }}</a></li>
<li class="active">Cancel Receipt</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-12">
<h4>Receipt Details</h4>
<table class="table color-bordered-table success-bordered-table" id="paid_services_table">
<thead>
<tr>
<th>{{ __('patient_refund.receipt_number') }}</th>
<th>Item Names</th>
<th>Item Prices</th>
<th>{{ __('patient_refund.patient_amount_paid') }}</th>
<th>{{ __('patient_refund.collected_by') }}</th>
<th>{{ __('patient_refund.payment_date') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ $deposit_details->receipt_number }}</td>
@php
if ($billing_point == 3) {
$price_array = explode(",", $deposit_details->treatment_subtotals);
$items_array = explode(",", $deposit_details->treatment_items);
$table_name = "drugs";
} elseif ($billing_point == 2) {
$price_array = explode(",", $deposit_details->investigation_amounts);
$items_array = explode(",", $deposit_details->investigation_items);
$table_name = "investigations";
} elseif ($billing_point == 4) {
$price_array = explode(",", $deposit_details->procedure_amounts);
$items_array = explode(",", $deposit_details->procedure_items);
$table_name = "procedures";
} elseif ($billing_point == 5) {
$price_array = explode(",", $deposit_details->sundry_subtotals);
$items_array = explode(",", $deposit_details->sundry_items);
$table_name = "sundries";
} elseif ($billing_point == 8) {
$price_array = explode(",", $deposit_details->items_amounts);
$items_array = explode(",", $deposit_details->items_ids);
$table_name = "services";
} elseif ($billing_point == 10) {
$price_array = explode(",", $deposit_details->items_amounts);
$items_array = explode(",", $deposit_details->items_ids);
$table_name = "services";
} elseif ($billing_point == 16) {
$price_array = explode(",", $deposit_details->subtotals);
$items_array = explode(",", $deposit_details->items);
$table_name = "eye_glasses";
} else {
$price_array = [];
$items_array = [];
$table_name = "";
}
@endphp
<td>
@php $items_counter = 1; @endphp
@foreach($items_array as $item)
@if($item == 'Inpatient_Deposit')
{{ $items_counter }}. Inpatient Deposit <br>
@else
{{ $items_counter }}. {{ get_name($item, 'id', 'name', $table_name) }} <br>
@endif
@php $items_counter++; @endphp
@endforeach
</td>
<td>
@php $items_counter = 1; @endphp
@foreach($price_array as $price)
{{ $items_counter }}. {{ ugandan_shillings($price) }} <br>
@php $items_counter++; @endphp
@endforeach
</td>
<td>
{{ ugandan_shillings($deposit_details->patient_amount_paid) }}
@if($deposit_details->refund_amount > 0)
<br><br>
<span style="color: orangered">
{{ ugandan_shillings($deposit_details->refund_amount) }} {{ __('patient_refund.was_refunded') }}
</span>
@endif
</td>
<td>{{ get_full_name($deposit_details->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time($deposit_details->created_at) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'patient_finance.confirm_cancel_receipt', 'data-toggle' => 'validator']) }}
{{ Form::hidden('deposit_id', $deposit_details->id) }}
{{ Form::hidden('billing_point', $billing_point) }}
{{ Form::hidden('patient_amount_paid', $deposit_details->patient_amount_paid) }}
<div class="row">
<div class="col-md-12">
<div class="form-group">
{{ Form::label('cancellation_reason','Cancellation Reason') }}
{{ Form::textarea('cancellation_reason','',['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
<div class="text-center">
{{ Form::button('Cancel Receipt',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick' => 'return confirm("Are you sure you want to continue? You won\'t be able to reverse this process")']) }}
</div>
{{ Form::close() }}
</div>
@endsection
@@ -0,0 +1,194 @@
@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/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" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-6">
<h4 class="page-title">Cancelled Patient Transactions</h4>
</div>
<div class="col-md-6">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">Dashboard</a></li>
<li class="active">Cancelled Patient Transactions</li>
</ol>
</div>
</div>
<div class="panel">
<div class="panel-body">
{{ Form::open(['route' => 'patient_finance.cancelled_patient_transactions_report', 'class' => 'typeahead', 'method' => 'ANY', 'role' => 'search']) }}
{{ Form::hidden('user_id', 0, ['id' => 'user_id']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group" id="searchby">
{{ Form::label('search_by', 'Cancellation Date') }}
{{ Form::select('search_by', ['0'=>__('pharmacy.last_24_hours'),'1'=>__('pharmacy.custom_date'),'2'=>__('pharmacy.date_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', __('pharmacy.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', __('pharmacy.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">
{{ Form::label('user_number', 'Search By User') }}
<div class="input-group">
<select class="form-control" name="user_number" id="user_number"></select>
</div>
</div>
<div class="col-md-3">
<div class="form-group" style="padding-top: 5px;"><br>
{{ Form::button(__('pharmacy.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
</div>
</div>
</div>
{{ Form::close() }}
</div>
</div>
<div class="white-box">
@include('flash::message')
@if($search_text != "")
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br>
@endif
<div class="table-responsive">
<table class="table table-striped color-bordered-table success-bordered-table table-bordered">
<thead>
<tr>
<th>Patient Name</th>
<th>Billing Point</th>
<th>Originally Billed By</th>
<th>Originally Billed At</th>
<th>Cancelled By</th>
<th>Cancelled At</th>
<th>Cancellation Reason</th>
<th>Receipt/Invoice Number</th>
</tr>
</thead>
<tbody>
@if(count($cancellations) > 0)
@foreach($cancellations as $cancellation)
<tr>
<td>{{ get_full_name($cancellation->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($cancellation->patient_id, 'id', 'number', 'patients') }})</td>
<td>{{ $tags[$cancellation->billing_point] ?? 'N/A' }}</td>
<td>{{ get_full_name($cancellation->originally_billed_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time($cancellation->originally_billed_on) }}</td>
<td>{{ get_full_name($cancellation->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time($cancellation->created_at) }}</td>
<td>{{ $cancellation->cancellation_reason }} - ({{ $cancellation->billing_type == 1 ? 'Receipt' : 'Invoice' }})</td>
<td>{{ $cancellation->receipt_number }}</td>
</tr>
@endforeach
@else
<tr>
<td class="text-center" colspan="8"><code>No results available</code></td>
</tr>
@endif
</tbody>
</table>
</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 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>
$(document).ready(function() {
$('#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();
}
});
$('#user_number').change(function () {
let id = $('#user_number').val();
$('#user_id').val(id);
});
$('#user_number').select2({
placeholder: 'Search by user name',
ajax: {
url: '/users/search_user_by_name',
dataType: 'json',
delay: 250,
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.first_name + " " + item.last_name,
id: item.id
}
})
};
},
cache: true
}
});
});
</script>
@endpush