init project
This commit is contained in:
150
resources/views/activity_logs.blade.php
Normal file
150
resources/views/activity_logs.blade.php
Normal file
@@ -0,0 +1,150 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:250px;
|
||||
padding:20px;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:{{''==''?'none':'block'}};
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-bold"><i class="mdi mdi-dots-vertical menu-icon"></i>d {{__('general.profile')}}</h4>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12">
|
||||
<form method="GET">
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3">
|
||||
<input type="date" name="date_from" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" name="date_to" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="module" class="form-control">
|
||||
<option value="">All Modules</option>
|
||||
<option value="App\Models\User">User</option>
|
||||
<option value="App\Models\Patient">Patient</option>
|
||||
<option value="App\Models\Order">Order</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Action</th>
|
||||
<th>Module</th>
|
||||
<th>Description</th>
|
||||
<th>Date</th>
|
||||
<th>Detail</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($activities as $activity)
|
||||
<tr>
|
||||
<td>{{ $activity->causer->name ?? 'System' }}</td>
|
||||
<td>{{ $activity->event }}</td>
|
||||
<td>{{ class_basename($activity->subject_type) }}</td>
|
||||
<td>{{ $activity->description }}</td>
|
||||
<td>{{ $activity->created_at->format('Y-m-d H:i') }}</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-info" onclick='showDetail(@json($activity->properties))'>View</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
{{ $activities->links() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
function showDetail(data)
|
||||
{
|
||||
let oldData = JSON.stringify(data.old, null, 2);
|
||||
let newData = JSON.stringify(data.attributes, null, 2);
|
||||
|
||||
Swal.fire({
|
||||
title: 'Change Detail',
|
||||
html:
|
||||
"<b>Before</b><pre>"+oldData+"</pre>"+
|
||||
"<b>After</b><pre>"+newData+"</pre>",
|
||||
width:800
|
||||
});
|
||||
}
|
||||
|
||||
</html>
|
||||
|
||||
210
resources/views/aggregate_report.blade.php
Normal file
210
resources/views/aggregate_report.blade.php
Normal file
@@ -0,0 +1,210 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('report.summary_rpt_tittle')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-2 inv-search">
|
||||
<form method="get" action="{{url('report/summary-report')}}">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 col-md-10 col-lg-8 pr-0">
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="start-invoice-date">{{__('invoice.table_date_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input id="start-invoice-date" value="{{isset($_GET['start_date']) ? $_GET['start_date'] : ''}}" name="start_date" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
<input id="to-invoice-date" value="{{isset($_GET['end_date']) ? $_GET['end_date'] : ''}}" name="end_date" class="form-control rounded-left-0 rounded-right-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
|
||||
<button class="btn btn-sm btn-inverse-secondary rounded-left-0 rounded-right-0 px-3" title="Search" type="submit"><i class="fa fa-search"></i> {{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/summary-report')}}" class="btn btn-sm btn-inverse-warning rounded-left-0 rounded-right-0 pt-3" title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-sm btn-inverse-secondary rounded-left-0 rounded-top-right-25 rounded-bottom-right-25 dropdown-toggle" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu btn-light" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<h6>{{__('report.summary_report_section_by_sample_source')}}</h6>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_clinic_name')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_male_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_female_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_total_sample')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['sample_source_data'] as $j=>$l)
|
||||
<tr>
|
||||
<td class="py-2 pl-4">{{$l['clinic_name']}}</td>
|
||||
<td class="py-2 text-right">{{$l['total_male_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$l['total_female_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$l['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6>{{__('report.summary_report_section_by_test')}}</h6>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_rpt_test_type')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_male_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_female_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_total_patient')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $k=>$val)
|
||||
@if(!is_array($val))
|
||||
<tr class="bg-white">
|
||||
<td class="py-2 font-weight-medium pl-3 text-left" colspan="4"><u>{{$val}}</u></td>
|
||||
</tr>
|
||||
@else
|
||||
@foreach($val as $v)
|
||||
<tr>
|
||||
<td class="py-2 pl-4">{{$v['group_result']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_male_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_female_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6>{{__('report.summary_report_section_by_category')}}</h6>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_category_name')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_male_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_female_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_total_patient')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$total_male = 0;
|
||||
$total_female = 0;
|
||||
$total_patient = 0;
|
||||
?>
|
||||
@foreach($report_data['test_category_data'] as $raw=>$v)
|
||||
<?php
|
||||
$total_male += $v['total_male_patient'];
|
||||
$total_female += $v['total_female_patient'];
|
||||
$total_patient += $v['total_patient'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="py-2 pl-4">{{$v['category']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_male_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_female_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr class="bg-light">
|
||||
<td class="py-2 pl-4">{{__('report.total')}}</td>
|
||||
<td class="py-2 text-right">{{$total_male}}</td>
|
||||
<td class="py-2 text-right">{{$total_female}}</td>
|
||||
<td class="py-2 text-right">{{$total_patient}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
|
||||
@include('modal.summary_report_print')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
{{--<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>--}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
162
resources/views/antibiotic.blade.php
Normal file
162
resources/views/antibiotic.blade.php
Normal file
@@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('antibiotic.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('antibiotic/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('antibiotic.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_antibiotic']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-antibiotic" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('antibiotic.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('antibiotic.table_action')}}</th>
|
||||
<th class="py-2">{{__('antibiotic.table_name')}}</th>
|
||||
{{-- <th class="py-2">Laboratory</th>--}}
|
||||
{{-- <th class="py-2 text-center" width="100px">{{__('antibiotic.table_status')}}</th>--}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($antibiotics as $k=>$antibiotic)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_antibiotic']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$antibiotic->id}}" data-toggle="modal" data-target="#modal-antibiotic" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($antibiotic->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$antibiotic->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_antibiotic']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$antibiotic->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$antibiotic->name_en}}</td>
|
||||
{{-- <td class="py-1">{{$antibiotic->lab->name_en}}</td>--}}
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
{{-- <i class="mdi {{$antibiotic->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>--}}
|
||||
{{-- </td>--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $antibiotics->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-antibiotic">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('Sample Source')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('antibiotic.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="Antibiotic name">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('antibiotic.form_sort')}}</label>
|
||||
<input type="number" class="form-control" value="0" name="weight" id="weight">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('antibiotic.save')}}";
|
||||
var update_url = "{{url('antibiotic.update')}}";
|
||||
var delete_url = "{{url('antibiotic.delete')}}";
|
||||
var restore_url = "{{url('antibiotic.restore')}}";
|
||||
var get_url = "{{url('antibiotic.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('antibiotic.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('antibiotic.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/antibiotic.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
272
resources/views/appointment.blade.php
Normal file
272
resources/views/appointment.blade.php
Normal file
@@ -0,0 +1,272 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.appointment')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('appointment/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="date" value="{{isset($_GET['appointment_date']) ? $_GET['appointment_date'] : ''}}" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" name="appointment_date">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_appointment']))
|
||||
<button class="btn btn-sm btn-inverse-success rounded-25 waves-effect px-3 ml-3" type="button" data-action="new" data-toggle="modal" data-target="#modal-appointment" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="quantity_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('comment.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('comment.table_action')}}</th>
|
||||
<th class="py-2">{{__('appointment.patient')}}</th>
|
||||
<th class="py-2">{{__('appointment.date')}}</th>
|
||||
<th class="py-2">{{__('appointment.type')}}</th>
|
||||
<th class="py-2">{{__('appointment.doctor')}}</th>
|
||||
<th class="py-2">{{__('appointment.description')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($appointments as $k=>$appointment)
|
||||
<tr>
|
||||
<td class="py-2 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<a href="{{url('sample/patient/'.$appointment->patient->id)}}/new" class="btn btn-sm btn-inverse-success mr-2 pt-1" title="{{__('sample.form_btn_new_sample')}}"><i class="mdi mdi-test-tube"></i> <i class="mdi mdi-plus" style="margin-left: -10px;"></i></a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_appointment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$appointment->id}}" data-toggle="modal" data-target="#modal-appointment" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_appointment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$appointment->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-2">{{$appointment->patient->name_en . ' - ' .$appointment->patient->phone_number}}</td>
|
||||
<td class="py-2">{{date('d-M-Y h:i A', strtotime($appointment->appointment_date))}}</td>
|
||||
<td class="py-1">{{$appointment->appointment_type}}</td>
|
||||
<td class="py-1">{{$appointment->doctor->name_en ?? ''}}</td>
|
||||
<td class="py-1">{{$appointment->description}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $appointments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.appointment')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
let base_url = "{{url('appointment')}}";
|
||||
|
||||
$('#patient-id').select2({
|
||||
tags: false,
|
||||
allowClear: true,
|
||||
ajax: {
|
||||
url: '{{url('patient/live-search')}}',
|
||||
dataType: 'json',
|
||||
delay: 10
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnSaveAppointment").on('click',function(e){
|
||||
e.preventDefault();
|
||||
data_id = $('#data-id').val();
|
||||
let url = base_url.toString() + (data_id < 1 ? '/save' : '/update').toString();
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
uid : data_id,
|
||||
patient_id: $('#patient-id').val(),
|
||||
appointment_type: $('#appointment_type').val(),
|
||||
appointment_date: $('#appointment_date').val(),
|
||||
doctor_id: $('#doctor_id').val(),
|
||||
description : $('#description').val()
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function delete_data(uid){
|
||||
Swal.fire({
|
||||
text: confirm_delete_record,
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: confirm_ok_delete,
|
||||
cancelButtonText: confirm_cancel
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: base_url.toString() + '/delete',
|
||||
method:'POST',
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid : uid,
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#modal-appointment').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var action = button.data('action') // Extract info from data-* attributes
|
||||
var modal = $(this);
|
||||
$('#comment-desc').val("");
|
||||
if(action === "new"){
|
||||
// Clear inputs
|
||||
modal.find('.modal-body input[name="uid"]').val(0);
|
||||
modal.find('.modal-body select[name="patient_id"]').val('').trigger('change')
|
||||
modal.find('.modal-body select[name="appointment_type"]').val('').trigger('change')
|
||||
modal.find('.modal-body select[name="doctor_id"]').val('').trigger('change')
|
||||
$('#description').val('')
|
||||
}else if(action === "edit"){
|
||||
uid = button.data('uid');
|
||||
modal.find('.modal-body input[name="uid"]').val(uid);
|
||||
$.ajax({
|
||||
url: base_url.toString() + '/get',
|
||||
type:"POST",
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid: uid,
|
||||
},
|
||||
success:function(res){
|
||||
let data = res.data;
|
||||
modal.find('.modal-body select[name="patient_id"]').val(data.patient_id).trigger('change');
|
||||
modal.find('.modal-body select[name="appointment_type"]').val(data.appointment_type).trigger('change');
|
||||
modal.find('.modal-body select[name="doctor_id"]').val(data.doctor_id).trigger('change');
|
||||
modal.find('.modal-body input[name="appointment_date"]').val(data.appointment_date);
|
||||
$('#description').val(data.description)
|
||||
if(!res.success) handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function searchPatientToForm(patientElementId){
|
||||
Swal.fire({
|
||||
html:"<p style='text-align: left;'>Search the patient with their name, phone, Khmer ID, or patient ID</p>",
|
||||
input: "text",
|
||||
showCancelButton: !0,
|
||||
confirmButtonText: "<i class='fa fa-search mr-2'></i>Search",
|
||||
cancelButtonText: "Close",
|
||||
position: 'top',
|
||||
showLoaderOnConfirm: !1,
|
||||
confirmButtonColor: "#4fb51a",
|
||||
preConfirm: function (n) {
|
||||
return new Promise(function (t) {
|
||||
$.ajax({
|
||||
url: patient_base_url + "/async",
|
||||
method:'get',
|
||||
dataType:'json',
|
||||
data:{kword: n},
|
||||
success:function(response)
|
||||
{
|
||||
if(response.data.length<1 || !response.success){
|
||||
Swal.showValidationMessage('No patient found!')
|
||||
Swal.enableButtons()
|
||||
}
|
||||
else {
|
||||
t(response.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
allowOutsideClick:!1,
|
||||
}).then(function (t) {
|
||||
if(!t.dismiss){
|
||||
$('#'+patientElementId).html('');
|
||||
t.value.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.patient_uuid + ' - ' + item.name_en;
|
||||
$('#'+patientElementId).append(patientOption);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#searchPatientAddForm").click(function () {
|
||||
searchPatientToForm('patient-id')
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
201
resources/views/audit-logs/index.blade copy.php
Normal file
201
resources/views/audit-logs/index.blade copy.php
Normal file
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
@include('layout.header')
|
||||
|
||||
<!-- DataTables CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css">
|
||||
|
||||
<style>
|
||||
.audit-filter {
|
||||
background: #f8f9fa;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
|
||||
@include('layout.navbar')
|
||||
@include('layout.breadscrum')
|
||||
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
<h4>Audit Log List</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<!-- FILTER SECTION -->
|
||||
<div class="audit-filter">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
<input type="date" id="date_from" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<input type="date" id="date_to" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<select id="event" class="form-control">
|
||||
<option value="">All Events</option>
|
||||
<option value="created">Created</option>
|
||||
<option value="updated">Updated</option>
|
||||
<option value="deleted">Deleted</option>
|
||||
<option value="User Login">Login</option>
|
||||
<option value="User Logout">Logout</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<select id="user_id" class="form-control">
|
||||
<option value="">All Users</option>
|
||||
|
||||
@foreach($users as $user)
|
||||
<option value="{{ $user->id }}">
|
||||
{{ $user->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<button id="filter" class="btn btn-primary">
|
||||
Filter
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AUDIT TABLE -->
|
||||
<table id="auditTable" class="table table-bordered table-striped">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Event</th>
|
||||
<th>Module</th>
|
||||
<th>Record ID</th>
|
||||
<th>User</th>
|
||||
<th>IP</th>
|
||||
<th>Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<!-- JS Libraries -->
|
||||
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.print.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
const table = $('#auditTable').DataTable({
|
||||
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
|
||||
ajax: {
|
||||
url: "{{ route('audit.logs.data') }}",
|
||||
data: function (d) {
|
||||
d.date_from = $('#date_from').val();
|
||||
d.date_to = $('#date_to').val();
|
||||
d.event = $('#event').val();
|
||||
d.user_id = $('#user_id').val();
|
||||
}
|
||||
},
|
||||
|
||||
columns: [
|
||||
{ data: 'id' },
|
||||
{ data: 'description' },
|
||||
{ data: 'module' },
|
||||
{ data: 'subject_id' },
|
||||
{ data: 'user' },
|
||||
{ data: 'ip' },
|
||||
{ data: 'created_at' },
|
||||
{ data: 'action', orderable: false, searchable: false }
|
||||
],
|
||||
|
||||
dom: 'Bfrtip',
|
||||
|
||||
buttons: [
|
||||
'copy',
|
||||
'csv',
|
||||
'excel',
|
||||
'pdf',
|
||||
'print'
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Filter button
|
||||
$('#filter').click(function () {
|
||||
table.draw();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).on('click', '.view-log', function () {
|
||||
|
||||
const data = $(this).data('log');
|
||||
|
||||
const oldData = JSON.stringify(data.old, null, 2);
|
||||
const newData = JSON.stringify(data.attributes, null, 2);
|
||||
|
||||
Swal.fire({
|
||||
title: "Audit Detail",
|
||||
html:
|
||||
"<h5>Before</h5><pre>" + oldData + "</pre>" +
|
||||
"<h5>After</h5><pre>" + newData + "</pre>",
|
||||
width: 900
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
284
resources/views/audit-logs/index.blade.php
Normal file
284
resources/views/audit-logs/index.blade.php
Normal file
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
@include('layout.header')
|
||||
|
||||
<!-- DataTables CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css">
|
||||
|
||||
<style>
|
||||
.audit-filter {
|
||||
background: #fff;
|
||||
padding: 5px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
div.dt-buttons>.dt-button:hover:not(.disabled), div.dt-buttons>div.dt-button-split .dt-button:hover:not(.disabled) {
|
||||
background: #3b86d1 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
div.dt-buttons>.dt-button, div.dt-buttons>div.dt-button-split .dt-button {
|
||||
background: rgba(59, 134, 209, 0.2) !important;
|
||||
border-radius: 10px !important;
|
||||
color: #3b86d1 !important;
|
||||
border: none !important;
|
||||
}
|
||||
table.dataTable tbody th, table.dataTable tbody td {
|
||||
padding: 4px 10px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
|
||||
@include('layout.navbar')
|
||||
@include('layout.breadscrum')
|
||||
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Card -->
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-bold"><i class="mdi mdi-dots-vertical menu-icon"></i> Audit Logs</h4>
|
||||
<!-- Filters -->
|
||||
<div class="audit-filter">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('invoice.table_date_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input id="start-invoice-date" value="{{isset($_GET['from_date']) ? $_GET['from_date'] : ''}}" name="date_from" class="form-control rounded-right-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
<input id="to-invoice-date" value="{{isset($_GET['to_date']) ? $_GET['to_date'] : ''}}" name="date_to" class="form-control rounded-left-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('ព្រឹត្តការណ៍')}}</label>
|
||||
<select id="event" class="form-control">
|
||||
<option value="">All Events</option>
|
||||
<option value="created">Created</option>
|
||||
<option value="updated">Updated</option>
|
||||
<option value="deleted">Deleted</option>
|
||||
<option value="User Login">Login</option>
|
||||
<option value="User Logout">Logout</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('អ្នកប្រើប្រាស់')}}</label>
|
||||
<div class="input-group">
|
||||
<select id="user_id" class="form-control rounded-right-0">
|
||||
<option value="">All Users</option>
|
||||
@foreach($users as $user)
|
||||
<option value="{{ $user->id }}">
|
||||
{{ $user->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button id="filter" class="btn btn-sm btn-inverse-secondary rounded-bottom-right-25 rounded-top-right-25 px-3" title="Search" type="button"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Audit Table -->
|
||||
<table id="auditTable" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>DATE</th>
|
||||
<th>EVENT</th>
|
||||
<th>TABLE</th>
|
||||
<th>USER</th>
|
||||
<th>ACTION</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="logModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Log Preview</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal">x</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<h5>INFO</h5>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td width="150"><b>Type</b></td>
|
||||
<td id="log_type"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>Table</b></td>
|
||||
<td id="log_table"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>Time</b></td>
|
||||
<td id="log_time"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>Done by</b></td>
|
||||
<td id="log_user"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h5 class="mt-4">FIELD CHANGES</h5>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Previous</th>
|
||||
<th>Current</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="log_fields"></tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<!-- JS Libraries -->
|
||||
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.print.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
const table = $('#auditTable').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
|
||||
ajax: {
|
||||
url: "{{ route('audit.logs.data') }}",
|
||||
data: function (d) {
|
||||
d.date_from = $('#date_from').val();
|
||||
d.date_to = $('#date_to').val();
|
||||
d.event = $('#event').val();
|
||||
d.user_id = $('#user_id').val();
|
||||
}
|
||||
},
|
||||
|
||||
columns: [
|
||||
{ data: 'id' },
|
||||
{ data: 'created_at' },
|
||||
{ data: 'description' },
|
||||
{ data: 'module' },
|
||||
{ data: 'user' },
|
||||
{ data: 'action', orderable:false, searchable:false }
|
||||
],
|
||||
|
||||
dom: 'Bfrtip',
|
||||
|
||||
buttons: [
|
||||
'copy',
|
||||
'csv',
|
||||
'excel',
|
||||
'pdf',
|
||||
'print'
|
||||
]
|
||||
});
|
||||
|
||||
$('#filter').click(function () {
|
||||
table.draw();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).on("click",".view-log",function(){
|
||||
|
||||
let log = $(this).data("log");
|
||||
|
||||
let description = $(this).data("description");
|
||||
let user = $(this).data("user");
|
||||
let time = $(this).data("time");
|
||||
let module = $(this).data("module");
|
||||
|
||||
$("#log_type").text(description);
|
||||
$("#log_table").text(module);
|
||||
$("#log_time").text(time);
|
||||
$("#log_user").text(user);
|
||||
|
||||
let oldData = log.old ?? {};
|
||||
let newData = log.attributes ?? {};
|
||||
|
||||
let rows = "";
|
||||
|
||||
Object.keys(newData).forEach(function(field){
|
||||
|
||||
let oldValue = oldData[field] ?? "-";
|
||||
let newValue = newData[field] ?? "-";
|
||||
|
||||
let highlight = oldValue != newValue ? "style='background:#fff3cd'" : "";
|
||||
|
||||
rows += `
|
||||
<tr ${highlight}>
|
||||
<td>${field}</td>
|
||||
<td>${oldValue}</td>
|
||||
<td>${newValue}</td>
|
||||
</tr>`;
|
||||
});
|
||||
|
||||
$("#log_fields").html(rows);
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('logModal'));
|
||||
modal.show();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
36
resources/views/auth/confirm-password.blade.php
Normal file
36
resources/views/auth/confirm-password.blade.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="/">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
<div class="mb-4 text-sm text-gray-600">
|
||||
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
|
||||
</div>
|
||||
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-4" :errors="$errors" />
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}">
|
||||
@csrf
|
||||
|
||||
<!-- Password -->
|
||||
<div>
|
||||
<x-label for="password" :value="__('Password')" />
|
||||
|
||||
<x-input id="password" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required autocomplete="current-password" />
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<x-button>
|
||||
{{ __('Confirm') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-auth-card>
|
||||
</x-guest-layout>
|
||||
36
resources/views/auth/forgot-password.blade.php
Normal file
36
resources/views/auth/forgot-password.blade.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="/">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
<div class="mb-4 text-sm text-gray-600">
|
||||
{{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }}
|
||||
</div>
|
||||
|
||||
<!-- Session Status -->
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-4" :errors="$errors" />
|
||||
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
@csrf
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-label for="email" :value="__('Email')" />
|
||||
|
||||
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<x-button>
|
||||
{{ __('Email Password Reset Link') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-auth-card>
|
||||
</x-guest-layout>
|
||||
56
resources/views/auth/login.blade.php
Normal file
56
resources/views/auth/login.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="/">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
<!-- Session Status -->
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-4" :errors="$errors" />
|
||||
|
||||
<form method="POST" action="{{ route('login') }}">
|
||||
@csrf
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-label for="email" :value="__('Email')" />
|
||||
|
||||
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-label for="password" :value="__('Password')" />
|
||||
|
||||
<x-input id="password" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required autocomplete="current-password" />
|
||||
</div>
|
||||
|
||||
<!-- Remember Me -->
|
||||
<div class="block mt-4">
|
||||
<label for="remember_me" class="inline-flex items-center">
|
||||
<input id="remember_me" type="checkbox" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" name="remember">
|
||||
<span class="ml-2 text-sm text-gray-600">{{ __('Remember me') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
@if (Route::has('password.request'))
|
||||
<a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ route('password.request') }}">
|
||||
{{ __('Forgot your password?') }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<x-button class="ml-3">
|
||||
{{ __('Log in') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-auth-card>
|
||||
</x-guest-layout>
|
||||
59
resources/views/auth/register.blade.php
Normal file
59
resources/views/auth/register.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="/">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-4" :errors="$errors" />
|
||||
|
||||
<form method="POST" action="{{ route('register') }}">
|
||||
@csrf
|
||||
|
||||
<!-- Name -->
|
||||
<div>
|
||||
<x-label for="name" :value="__('Name')" />
|
||||
|
||||
<x-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus />
|
||||
</div>
|
||||
|
||||
<!-- Email Address -->
|
||||
<div class="mt-4">
|
||||
<x-label for="email" :value="__('Email')" />
|
||||
|
||||
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-label for="password" :value="__('Password')" />
|
||||
|
||||
<x-input id="password" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required autocomplete="new-password" />
|
||||
</div>
|
||||
|
||||
<!-- Confirm Password -->
|
||||
<div class="mt-4">
|
||||
<x-label for="password_confirmation" :value="__('Confirm Password')" />
|
||||
|
||||
<x-input id="password_confirmation" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password_confirmation" required />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ route('login') }}">
|
||||
{{ __('Already registered?') }}
|
||||
</a>
|
||||
|
||||
<x-button class="ml-4">
|
||||
{{ __('Register') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-auth-card>
|
||||
</x-guest-layout>
|
||||
48
resources/views/auth/reset-password.blade.php
Normal file
48
resources/views/auth/reset-password.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="/">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-4" :errors="$errors" />
|
||||
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
@csrf
|
||||
|
||||
<!-- Password Reset Token -->
|
||||
<input type="hidden" name="token" value="{{ $request->route('token') }}">
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-label for="email" :value="__('Email')" />
|
||||
|
||||
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email', $request->email)" required autofocus />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-label for="password" :value="__('Password')" />
|
||||
|
||||
<x-input id="password" class="block mt-1 w-full" type="password" name="password" required />
|
||||
</div>
|
||||
|
||||
<!-- Confirm Password -->
|
||||
<div class="mt-4">
|
||||
<x-label for="password_confirmation" :value="__('Confirm Password')" />
|
||||
|
||||
<x-input id="password_confirmation" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password_confirmation" required />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<x-button>
|
||||
{{ __('Reset Password') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-auth-card>
|
||||
</x-guest-layout>
|
||||
39
resources/views/auth/verify-email.blade.php
Normal file
39
resources/views/auth/verify-email.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="/">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
<div class="mb-4 text-sm text-gray-600">
|
||||
{{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }}
|
||||
</div>
|
||||
|
||||
@if (session('status') == 'verification-link-sent')
|
||||
<div class="mb-4 font-medium text-sm text-green-600">
|
||||
{{ __('A new verification link has been sent to the email address you provided during registration.') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-4 flex items-center justify-between">
|
||||
<form method="POST" action="{{ route('verification.send') }}">
|
||||
@csrf
|
||||
|
||||
<div>
|
||||
<x-button>
|
||||
{{ __('Resend Verification Email') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
|
||||
<button type="submit" class="underline text-sm text-gray-600 hover:text-gray-900">
|
||||
{{ __('Log Out') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-auth-card>
|
||||
</x-guest-layout>
|
||||
93
resources/views/bacteriology_report.blade.php
Normal file
93
resources/views/bacteriology_report.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Bacteriology Report</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="start_date" class="col-sm-5 col-form-label">Start Date (dd/mm/yyyy)</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="start_date" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="end_date" class="col-sm-5 col-form-label">End Date (dd/mm/yyyy)</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="end_date" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="sample_source" class="col-sm-5 col-form-label">Sample Type</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_source">
|
||||
<option value="none">Select</option>
|
||||
<option>Blood Culture</option>
|
||||
<option>Urine</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="physician_name" class="col-sm-5 col-form-label">Organism</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="physician_name">
|
||||
<option value="none">Select</option>
|
||||
<option>Burkhudorial</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row float-right">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-eye btn-icon-prepend"></i>
|
||||
Preview
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-printer btn-icon-prepend"></i>
|
||||
Print
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-warning btn-icon-text">
|
||||
<i class="typcn typcn-refresh-outline btn-icon-prepend"></i>
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
198
resources/views/base.blade.php
Normal file
198
resources/views/base.blade.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{{ config('app.name', 'doctora') }}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url(env("APP_URL").'storage/assets/images/favicon.png') }}" />
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/overwrite.select2.css')}}">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&family=Khmer&family=Moul&display=swap" rel="stylesheet">
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: url("{{ url(env("APP_URL").'storage/assets/images/bg-login.png') }}") center right;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
@if ( Config::get('app.locale') == 'kh')
|
||||
font-family: "Kantumruy Pro", sans-serif;
|
||||
@endif
|
||||
|
||||
}
|
||||
|
||||
.kantumruy-pro {
|
||||
font-family: "Kantumruy Pro", sans-serif;
|
||||
font-optical-sizing: auto;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.container-box {
|
||||
background: #37ff761c;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.24);
|
||||
max-width: 512px;
|
||||
}
|
||||
.container{
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
.left-panel {
|
||||
background: url('https://cdn.leonardo.ai/users/911cfb44-ec95-4591-b2a1-3ec14b37a49c/generations/d4729acc-ccfe-4add-a19e-36e03140779e/segments/3:4:1/Flux_Dev_A_modern_hospital_setting_with_a_diverse_group_of_doc_2.jpg') no-repeat center center;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
color: white;
|
||||
}
|
||||
.overlay {
|
||||
position: absolute;
|
||||
background-color: rgba(255, 255, 255, 0.45);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.left-panel .text {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 30px;
|
||||
color: #b71c1c;
|
||||
}
|
||||
.left-panel .text h2 {
|
||||
font-family: 'Brush Script MT', cursive;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login-panel {
|
||||
padding: 20px;
|
||||
}
|
||||
.login-panel h2 {
|
||||
color: #2196f3;
|
||||
font-weight: bold;
|
||||
}
|
||||
.social-buttons img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.footer-icons {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
font-size: 30px;
|
||||
}
|
||||
.footer-icons img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.dropdown-menu.show{
|
||||
left: -45px !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
.form-label{
|
||||
font-size: 18px !important;
|
||||
}
|
||||
.select2-selection__rendered {
|
||||
line-height: 43px !important;
|
||||
}
|
||||
.select2-container .select2-selection--single, .select2-selection--multiple {
|
||||
border-color: #afccf3 !important;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 45px !important;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
line-height: 28px !important;
|
||||
padding-top: 4px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.select2-selection__arrow {
|
||||
height: 45px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="lang position-absolute" style="right: 50px; top: 20px; z-index: 999999;">
|
||||
<div class="dropdown float-right" style="font-size: 10px">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle d-flex align-items-center rounded-0 border-0" type="button" id="dropdownMenuSizeButton3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="material-icons text-black-50" style="font-size: 17px !important;"><i class="bi bi-translate"></i> {{ App::getLocale()=='kh' ? 'ភាសាខ្មែរ' : 'English' }}</span>
|
||||
</button>
|
||||
<div class="dropdown-menu mr-5" aria-labelledby="dropdownMenuSizeButton3">
|
||||
@include('partials/language_switcher')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container container-box" style="border: 1px solid #dcdef1 !important; box-shadow: none !important;">
|
||||
<div class="row g-0">
|
||||
<div class="col-md-12 login-panel">
|
||||
<div class="auth-form-light text-left">
|
||||
<div class="brand-logo text-center">
|
||||
<img style="width: 45% !important;" src="{{url(env("APP_URL").'storage/assets/images/logo-dark.png')}}" alt="logo">
|
||||
</div>
|
||||
<hr>
|
||||
<h6 class="font-weight-light text-white" style="line-height: 25px;">{{ __('login.select_base') }}</h6>
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-4" :errors="$errors" />
|
||||
<form method="POST" action="{{ url('base.save') }}" class="pt-3">
|
||||
@csrf
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<i class="mdi mdi-hospital-building position-absolute" style="top:10px; left:15px;"></i>
|
||||
</div>
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2 form-control-lg text-dark" name="lab_id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $lab)
|
||||
<option value="{{$lab->id}}">{{ $lab->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-grid mt-5">
|
||||
<button type="submit" class="btn btn-lg font-weight-medium auth-form-btn" style="background: #08c74d !important; color: #fff;">{{ __('login.confirm_base') }}</button>
|
||||
</div>
|
||||
<div class="d-grid pt-3 mt-5">
|
||||
<a href="{{route('logout')}}" class="text-black text-decoration-none text-white "><i class="typcn typcn-eject text-primary"></i> {{ __('login.logout') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
let choose_option = "{{__('general.choose_option')}}";
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/vendor.bundle.base.js')}}"></script>
|
||||
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/select2.js')}}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
159
resources/views/clone_lab.blade.php
Normal file
159
resources/views/clone_lab.blade.php
Normal file
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:250px;
|
||||
padding:20px;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:{{''==''?'none':'block'}};
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('laboratory.clone_lab')}}</h4>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form method="post" action="{{url('laboratory/clone-data')}}" class="p-2" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.source_lab')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control rounded-0 select2" required name="source_lab" id="source-lab" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $department)
|
||||
@if($department->id == Session::get('base_lab_id'))
|
||||
<option value="{{$department->id}}">{{$department->name_en }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
{{-- <div class="input-group-append">--}}
|
||||
{{-- <button id="btnViewLabData" class="btn btn-sm rounded-0 btn-info px-3" type="button">View Data</button>--}}
|
||||
{{-- </div>--}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="data">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.target_lab')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" required name="target_lab" id="target-lab" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $department)
|
||||
@if($department->id != Session::get('base_lab_id'))
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<button class="btn rounded-0 btn-info px-3" type="submit"><i class="mdi mdi-content-duplicate"></i> {{__('laboratory.start_clone')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
|
||||
$("#btnViewLabData").on('click',function(e){
|
||||
e.preventDefault();
|
||||
data_id = $('#data-id').val();
|
||||
let url = "{{url('laboratory/get-data')}}/"+$('#source-lab').val();
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"get",
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
let data = (res.data)
|
||||
data.map(item =>{
|
||||
console.log(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
174
resources/views/comment.blade.php
Normal file
174
resources/views/comment.blade.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('comment.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('comment/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('comment.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_comment']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-comment" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="quantity_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('comment.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('comment.table_action')}}</th>
|
||||
<th class="py-2">{{__('comment.table_name')}}</th>
|
||||
<th class="py-2" width="250px">{{__('comment.table_sample_type')}}</th>
|
||||
<th class="py-2" width="250px">{{__('comment.table_department')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('comment.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($comments as $k=>$comment)
|
||||
<tr>
|
||||
<td class="py-2 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_comment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$comment->id}}" data-toggle="modal" data-target="#modal-comment" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($comment->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$comment->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_comment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$comment->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-2">{{substr($comment->comment_desc,0,50)}}...</td>
|
||||
<td class="py-2">{{$comment->sample_type->name_en}}</td>
|
||||
<td class="py-1">{{$comment->sample_type->department->name_en}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$comment->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $comments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-comment">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('comment.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return (event.key != 'Enter' || (event.target.matches('textarea')));">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('comment.form_department')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="department_id" id="department-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($departments as $department)
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('comment.form_sample_type')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="sample_type_id" multiple id="sample-type-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('comment.form_name')}} <span class="text-danger">*</span></label>
|
||||
<!--<input type="text" class="form-control" name="comment_desc" id="comment-desc" placeholder="{{__('comment.form_name')}}">-->
|
||||
<textarea class="form-control" rows="3" style="line-height:25px" name="comment_desc" id="comment-desc" placeholder="{{__('comment.form_name')}}"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
let base_comment_url = "{{url('comment')}}";
|
||||
let modal_add_title = "{{__('comment.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('comment.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/comment.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
46
resources/views/components/alert.blade.php
Normal file
46
resources/views/components/alert.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
{{ session('error') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('warning'))
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
{{ session('warning') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('info'))
|
||||
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
||||
{{ session('info') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
document.querySelectorAll('.alert').forEach(function(el){
|
||||
el.remove();
|
||||
});
|
||||
},10000);
|
||||
</script>
|
||||
38
resources/views/components/application-logo.blade.php
Normal file
38
resources/views/components/application-logo.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
{{ session('error') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('warning'))
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
{{ session('warning') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('info'))
|
||||
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
||||
{{ session('info') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
9
resources/views/components/auth-card.blade.php
Normal file
9
resources/views/components/auth-card.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100">
|
||||
<div>
|
||||
{{ $logo }}
|
||||
</div>
|
||||
|
||||
<div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white shadow-md overflow-hidden sm:rounded-lg">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
7
resources/views/components/auth-session-status.blade.php
Normal file
7
resources/views/components/auth-session-status.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@props(['status'])
|
||||
|
||||
@if ($status)
|
||||
<div {{ $attributes->merge(['class' => 'font-medium text-sm text-green-600 alert alter-danger']) }}>
|
||||
{{ $status }}
|
||||
</div>
|
||||
@endif
|
||||
16
resources/views/components/auth-validation-errors.blade.php
Normal file
16
resources/views/components/auth-validation-errors.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@props(['errors'])
|
||||
|
||||
@if ($errors->any())
|
||||
<div {{ $attributes }}>
|
||||
|
||||
{{-- <div class="font-medium text-red-600 alert alert-danger">--}}
|
||||
{{-- {{ __('Whoops! Something went wrongff.') }}--}}
|
||||
{{-- </div>--}}
|
||||
|
||||
<ul class="mt-3 list-disc list-inside text-sm text-red-600 alert alert-danger">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li class="list-unstyled">{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
3
resources/views/components/button.blade.php
Normal file
3
resources/views/components/button.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:ring ring-gray-300 disabled:opacity-25 transition ease-in-out duration-150']) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
1
resources/views/components/dropdown-link.blade.php
Normal file
1
resources/views/components/dropdown-link.blade.php
Normal file
@@ -0,0 +1 @@
|
||||
<a {{ $attributes->merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }}</a>
|
||||
43
resources/views/components/dropdown.blade.php
Normal file
43
resources/views/components/dropdown.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white'])
|
||||
|
||||
@php
|
||||
switch ($align) {
|
||||
case 'left':
|
||||
$alignmentClasses = 'origin-top-left left-0';
|
||||
break;
|
||||
case 'top':
|
||||
$alignmentClasses = 'origin-top';
|
||||
break;
|
||||
case 'right':
|
||||
default:
|
||||
$alignmentClasses = 'origin-top-right right-0';
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($width) {
|
||||
case '48':
|
||||
$width = 'w-48';
|
||||
break;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
|
||||
<div @click="open = ! open">
|
||||
{{ $trigger }}
|
||||
</div>
|
||||
|
||||
<div x-show="open"
|
||||
x-transition:enter="transition ease-out duration-200"
|
||||
x-transition:enter-start="transform opacity-0 scale-95"
|
||||
x-transition:enter-end="transform opacity-100 scale-100"
|
||||
x-transition:leave="transition ease-in duration-75"
|
||||
x-transition:leave-start="transform opacity-100 scale-100"
|
||||
x-transition:leave-end="transform opacity-0 scale-95"
|
||||
class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}"
|
||||
style="display: none;"
|
||||
@click="open = false">
|
||||
<div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
|
||||
{{ $content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
3
resources/views/components/input.blade.php
Normal file
3
resources/views/components/input.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
@props(['disabled' => false])
|
||||
|
||||
<input {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'rounded-md shadow-sm border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}>
|
||||
5
resources/views/components/label.blade.php
Normal file
5
resources/views/components/label.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
@props(['value'])
|
||||
|
||||
<label {{ $attributes->merge(['class' => 'block font-medium text-sm text-gray-700']) }}>
|
||||
{{ $value ?? $slot }}
|
||||
</label>
|
||||
11
resources/views/components/nav-link.blade.php
Normal file
11
resources/views/components/nav-link.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
@props(['active'])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
|
||||
: 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out';
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
11
resources/views/components/responsive-nav-link.blade.php
Normal file
11
resources/views/components/responsive-nav-link.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
@props(['active'])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out'
|
||||
: 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out';
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
532
resources/views/dashboard.blade.php
Normal file
532
resources/views/dashboard.blade.php
Normal file
@@ -0,0 +1,532 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.content-wrapper .card {
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 mb-0 grid-margin stretch-card flex-column">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterSample('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterSample('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterSample('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="#" onclick="filterSample('last_year')">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_samples') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalSample">{{number_format($totalSample,0)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthSampleBox">
|
||||
@if($growthSample>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthSample}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthSample}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="font-weight-bold ml-2 text-info" id="sampleData">{{__($displaySample)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterIncome('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterIncome('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterIncome('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="{{url('dashboard?filter=income&dt=last_year')}}">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_income') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalIncome">$ {{number_format($totalIncome,2)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthIncomeBox">
|
||||
@if($growthIncome>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthIncome}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthIncome}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="text-info font-weight-bold ml-2" id="displayIncome">{{__($displayIncome)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterPatient('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterPatient('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterPatient('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="#" onclick="filterPatient('last_year')">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_patient') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalPatient">{{number_format($totalPatient,0)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthPatientBox">
|
||||
@if($growthPatient>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthPatient}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthPatient}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="text-info font-weight-bold ml-2" id="displayPatient">{{__($displayPatient)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterRejectedSample('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterRejectedSample('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterRejectedSample('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="#" onclick="filterRejectedSample('last_year')">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_rejected_sample') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalRejectedSample">{{number_format($totalRejectedSample,0)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthRejectedSampleBox">
|
||||
@if($growthRejectedSample>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthRejectedSample}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthRejectedSample}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="text-info font-weight-bold ml-2" id="displayRejectedSample">{{($displayRejectedSample)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.monthly_sample_trend') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="samplesCompare"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.monthly_income_trend') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="revenueCompare"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.sample_source_distribution') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="sourceDistributor"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.panel_distribution') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="topTests"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/chart.js/Chart.min.js')}}"></script>
|
||||
{{-- <script src="{{url(env("APP_URL").'storage/assets/js/chart.js')}}"></script> --}}
|
||||
<script>
|
||||
function generateColorCodeByYear(year) {
|
||||
const seed = parseInt(year.toString().slice(-2));
|
||||
const red = (Math.sin(seed * 1) * 127 + 128) | 0;
|
||||
const green = (Math.sin(seed * 2) * 127 + 128) | 0;
|
||||
const blue = (Math.sin(seed * 3) * 127 + 128) | 0;
|
||||
|
||||
return `#${red.toString(16).padStart(2, '0')}${green.toString(16).padStart(2, '0')}${blue.toString(16).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
function generateColors(count) {
|
||||
const baseColors = [
|
||||
'#2563eb',
|
||||
'#16a34a',
|
||||
'#f59e0b',
|
||||
'#dc2626',
|
||||
'#8b5cf6',
|
||||
'#14b8a6',
|
||||
'#e11d48',
|
||||
'#10b981',
|
||||
'#f97316',
|
||||
'#3b82f6',
|
||||
'#22c55e',
|
||||
'#fbbf24',
|
||||
'#ef4444',
|
||||
'#a855f7',
|
||||
'#06b6d4',
|
||||
'#e53935',
|
||||
];
|
||||
|
||||
return Array.from({ length: count }, (_, i) =>
|
||||
baseColors[i % baseColors.length]
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var urlSourceDistribution = "{{url('dashboard/source-distribution')}}";
|
||||
fetch(urlSourceDistribution)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const labels = data.map(d => d.sample_source);
|
||||
const counts = data.map(d => d.total_samples);
|
||||
|
||||
const colors = generateColors(labels.length);
|
||||
|
||||
new Chart(document.getElementById('sourceDistributor'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: '{{__("general.total_samples")}}',
|
||||
data: counts,
|
||||
backgroundColor: colors
|
||||
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' }
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var urlTopTests = "{{url('dashboard/panel-distribution')}}";
|
||||
fetch(urlTopTests)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const labels = data.map(d => d.panel);
|
||||
const counts = data.map(d => d.total_samples);
|
||||
|
||||
const panelDisColors = generateColors(labels.length);
|
||||
|
||||
new Chart(document.getElementById('topTests'), {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: '{{__("general.total_samples")}}',
|
||||
data: counts,
|
||||
backgroundColor: panelDisColors
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' },
|
||||
scales: {
|
||||
y: { beginAtZero: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function renderGrowth(growthData, boxId) {
|
||||
let icon = '';
|
||||
let colorClass = '';
|
||||
|
||||
if (growthData>= 0) {
|
||||
icon = '<i class="typcn typcn-arrow-up-thick text-primary"></i>';
|
||||
colorClass = 'text-primary';
|
||||
} else {
|
||||
icon = '<i class="typcn typcn-arrow-down-thick text-danger"></i>';
|
||||
colorClass = 'text-danger';
|
||||
}
|
||||
|
||||
boxId.innerHTML = `
|
||||
${icon}
|
||||
<p class="${colorClass} mb-0">${growthData}%</p>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
var urlFilterSample = "{{url('dashboard/filter/samples')}}";
|
||||
function filterSample(filter) {
|
||||
fetch(`${urlFilterSample}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthSample, document.getElementById('growthSampleBox'));
|
||||
$('#sampleData').text(data.displaySample);
|
||||
$('#totalSample').text(data.displaySampleResult);
|
||||
});
|
||||
}
|
||||
|
||||
var urlFilterIncome = "{{url('dashboard/filter/income')}}";
|
||||
function filterIncome(filter) {
|
||||
fetch(`${urlFilterIncome}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthIncome, document.getElementById('growthIncomeBox'));
|
||||
$('#displayIncome').text(data.displayIncome);
|
||||
$('#totalIncome').text('$ ' + data.displayIncomeResult);
|
||||
});
|
||||
}
|
||||
|
||||
var urlFilterPatient = "{{url('dashboard/filter/patient')}}";
|
||||
function filterPatient(filter) {
|
||||
fetch(`${urlFilterPatient}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthPatient, document.getElementById('growthPatientBox'));
|
||||
$('#displayPatient').text(data.displayPatient);
|
||||
$('#totalPatient').text(data.displayPatientResult);
|
||||
});
|
||||
}
|
||||
|
||||
var urlFilterRejectedSample = "{{url('dashboard/filter/rejected-sample')}}";
|
||||
function filterRejectedSample(filter) {
|
||||
fetch(`${urlFilterRejectedSample}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthRejectedSample, document.getElementById('growthRejectedSampleBox'));
|
||||
$('#displayRejectedSample').text(data.displayRejectedSample);
|
||||
$('#totalRejectedSample').text(data.displayRejectedSampleResult);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
const now = new Date();
|
||||
|
||||
const trend_thisYear = now.getFullYear();
|
||||
const trend_lastYear = trend_thisYear - 1;
|
||||
var urlTrend = "{{url('dashboard/trend/samples-comparison')}}";
|
||||
fetch(urlTrend)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
|
||||
const labels = data.map(d => d.month);
|
||||
const thisYear = data.map(d => d.this_year);
|
||||
const lastYear = data.map(d => d.last_year);
|
||||
|
||||
new Chart(document.getElementById('samplesCompare'), {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [
|
||||
{
|
||||
label: trend_thisYear,
|
||||
data: thisYear,
|
||||
borderColor: '#ffffff', //green
|
||||
backgroundColor: 'rgba(235,156,37,0.85)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
},
|
||||
{
|
||||
label: trend_lastYear,
|
||||
data: lastYear,
|
||||
borderColor: '#ffffff', //green
|
||||
backgroundColor: 'rgba(4,100,144,0.96)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' },
|
||||
scales: {
|
||||
y: { beginAtZero: true }
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var urlRevenueTrend = "{{url('dashboard/trend/revenue-comparison')}}";
|
||||
fetch(urlRevenueTrend)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
|
||||
const labels = data.map(d => d.month);
|
||||
const thisYear = data.map(d => d.this_year);
|
||||
const lastYear = data.map(d => d.last_year);
|
||||
|
||||
new Chart(document.getElementById('revenueCompare'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [
|
||||
{
|
||||
label: trend_thisYear,
|
||||
data: thisYear,
|
||||
borderColor: '#2563eb', // blue
|
||||
backgroundColor: 'rgba(37, 99, 235, 0.1)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
},
|
||||
{
|
||||
label: trend_lastYear,
|
||||
data: lastYear,
|
||||
borderColor: '#10b981', //green
|
||||
backgroundColor: 'rgba(16, 185, 129, 0.1)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' },
|
||||
scales: {
|
||||
y: { beginAtZero: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
164
resources/views/department.blade.php
Normal file
164
resources/views/department.blade.php
Normal file
@@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('department.table_title')}}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('department/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('department.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_department']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-department" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('department.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('department.table_action')}}</th>
|
||||
<th class="py-2">{{__('department.table_name')}}</th>
|
||||
<th class="py-2">{{__('department.table_sample_type')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($departments as $k=>$department)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_department']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$department->id}}" data-toggle="modal" data-target="#modal-department" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($department->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_lab({{$department->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_department']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_lab({{$department->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$department->name}}</td>
|
||||
<td class="py-1">
|
||||
@foreach($department->samples as $sample)
|
||||
<label style="font-size: 9px" class="badge badge-outline-info rounded-25">{{$sample->name_en}}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $departments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-department">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('department.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('department.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name_en" />
|
||||
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('department.form_sort')}}</label>
|
||||
<input type="number" class="form-control" name="weight" id="weight" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('department.save')}}";
|
||||
var update_url = "{{url('department.update')}}";
|
||||
var delete_url = "{{url('department.delete')}}";
|
||||
var restore_url = "{{url('department.restore')}}";
|
||||
var get_url = "{{url('department.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('department.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('department.form_edit_tittle')}}";
|
||||
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/department.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
207
resources/views/doctor_report.blade.php
Normal file
207
resources/views/doctor_report.blade.php
Normal file
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
|
||||
<style>
|
||||
.main-panel{
|
||||
width: calc(100% - 306px) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.doctor_report')}}</h4>
|
||||
{{-- <small><code>*</code> is generated based on number of test selected</small>--}}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-2 inv-search">
|
||||
<form method="get" action="{{url('report/doctor-report')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-5 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('report.doctor_date_range_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input name="start_date" value="{{isset($_GET['start_date']) ? date('Y-m-d',strtotime($_GET['start_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-right-0">
|
||||
<input name="end_date" value="{{isset($_GET['end_date']) ? date('Y-m-d',strtotime($_GET['end_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-left-0 ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_sample_source_filter')}}</label>
|
||||
<select class="form-control " name="sample_source">
|
||||
<option></option>
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
<option {{$sampleSource->id==@$_GET['sample_source'] ? 'selected':''}} value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_physician_filter')}}</label>
|
||||
<select class="form-control select2" name="physician">
|
||||
<option></option>
|
||||
<option {{'All'==@$_GET['physician'] ? 'selected':''}} value="All">All</option>
|
||||
@foreach($physicians as $physician)
|
||||
<option {{$physician->id==@$_GET['physician'] ? 'selected':''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7 col-lg-5">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en"> </label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary rounded-25" title="Search" type="submit"><i class="fa fa-search"></i> {{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/doctor-report')}}" class="btn rounded-25 btn-inverse-warning ml-1 mx-3 " title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-light rounded-25 dropdown-toggle ml-1" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal_detail" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}} Detail Report</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
@if($report_data['report_id']==3)
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">Date</th>
|
||||
<th class="py-2">Patient Name</th>
|
||||
<th class="py-2" >Sample No</th>
|
||||
<th class="py-2">Test Name</th>
|
||||
<th class="py-2">Physician Name</th>
|
||||
<th class="py-2" >Total Amount</th>
|
||||
<th class="py-2">Net Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="py-2 text-center">{{$v['date']}}</td>
|
||||
<td class="py-2">{{$v['patient']}}</td>
|
||||
<td class="py-2 text-center">{{$v['sample_number']}}</td>
|
||||
<td class="py-2" style="word-wrap: break-word; width:250px !important;">{{$v['test_name']}}</td>
|
||||
<td class="py-2">{{$v['physician']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_amount']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@elseif($report_data['report_id']==1)
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_clinic_name')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.doctor_exam')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.doctor_net_amount')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="py-2">{{$v['sample_source_name']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_exam']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@else
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">Physician</th>
|
||||
<th class="py-2 text-right" width="250px">Exam</th>
|
||||
<th class="py-2 text-right" width="250px">Net Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="py-2">{{$v['physician_name']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_exam']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tbody>
|
||||
</tbody>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.doctor_report_print')
|
||||
|
||||
@include('modal.doctor_report_detail_print')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
{{--<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>--}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
633
resources/views/edit_vaccination.blade.php
Normal file
633
resources/views/edit_vaccination.blade.php
Normal file
@@ -0,0 +1,633 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
<style>
|
||||
#form-test-sample .form-group label {
|
||||
line-height: 0.2rem !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card min-vh-70">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('vaccination.edit_title')}}</h4>
|
||||
<hr>
|
||||
<form method="post" class="p-2" action="{{route('vaccination.update')}}" id="form-test-sample">
|
||||
@csrf
|
||||
<input type="hidden" name="uid" required value="{{$vaccinations->id}}">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-vertical sample-creation-form">
|
||||
<div class="row ">
|
||||
<div class="col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.form_patient')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2" name="patient_id" id="patient-id" style=" width: 100% !important;">
|
||||
<option {{$vaccinations->patient_id==1?'selected':''}} value="1">Walk In Patient</option>
|
||||
@foreach($patients as $patient)
|
||||
<option {{$vaccinations->patient_id==$patient->id?'selected':''}} value="{{$patient->id}}">{{($patient->patient_uuid . ' - ' . $patient->name_en) . ((!empty($patient->phone_number) ? ' - '.$patient->phone_number: ''))}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" id="searchPatientAddForm" type="button"><i class="fa fa-search"></i> {{__('general.btn_search')}} </button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button class="btn btn-info waves-effect rounded-0 px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient" data-backdrop="static"><i class="typcn typcn-plus"></i>
|
||||
{{__('patient.form_add_title')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('vaccination.date')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" value="{{date('Y-m-d',strtotime($vaccinations->vaccination_date))}}" class="form-control rounded-0" name="vaccination_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('vaccination.next_visit')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" value="{{date('Y-m-d',strtotime($vaccinations->next_visit_date))}}" class="form-control rounded-0" name="next_visit_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border p-0">
|
||||
<div class="col-sm-8 p-0">
|
||||
<table class="table table-bordered" >
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('vaccination.name')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.unit_price')}} ($)</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.qty')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.subtotal')}}</th>
|
||||
<th width="50px" class="py-2 text-right">
|
||||
<button class="btn btn-info btn-md waves-effect rounded-0" id="btn-add-new-med-item" type="button"><i class="typcn typcn-plus"></i></button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="vaccination-item">
|
||||
@foreach($vaccinations->vaccinationDetail as $vaccination_item)
|
||||
<tr>
|
||||
<td class="py-2">
|
||||
<select name="medicine_item_id[]" class="form-control vaccine-item form-control-xxs select2" style="width: 100%;">
|
||||
<option></option>
|
||||
@foreach($medicineItems as $medicineItem)
|
||||
<option {{$vaccination_item->medicine_item_id == $medicineItem->id ? 'selected' :'' }} data-price="{{$medicineItem->sale_price}}" value="{{$medicineItem->id}}"> {{$medicineItem->medicine->name}} </option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="number" name="unit_price[]" value="{{$vaccination_item->unit_price}}" min="0" step="0" class="form-control unit-price">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="number" name="quantity[]" value="{{$vaccination_item->qty}}" min="1" step="1" class="form-control quantity">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="hidden" name="sub_total[]" class="form-control sub-total">
|
||||
<input type="number" readonly value="{{($vaccination_item->unit_price * $vaccination_item->qty) }}" class="form-control bg-white sub-total-to-display">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<button class="btn btn-danger btn-remove-vaccine-item btn-md waves-effect rounded-0" type="button"><i class="typcn typcn-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-4 p-4 border-left">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.exchange_rate')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" class="form-control bg-white form-control-xxs rounded-0" value="{{($vaccinations->exchange_rate<=0 ? $labSettings->exchange_rate : $vaccinations->exchange_rate)}}" name="exchange_rate" id="exchange_rate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_total_cost')}} <span class="text-danger">($)</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" readonly required step="any" value="{{$vaccinations->total}}" class="form-control bg-white form-control-xxs rounded-0" name="total" id="total-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_discount')}} <span class="text-danger">(%)</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required maxlength="2" step="any" value="{{$vaccinations->discount}}" class="form-control form-control-xxs rounded-0" name="discount" id="discount-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_net_cost')}} <span class="text-danger"></span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" readonly value="{{$vaccinations->gross_total}}" class="form-control bg-white form-control-xxs rounded-0" name="gross_total" id="net-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 bg-light px-0 pt-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.pay_type')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control form-control-xxs select2_ rounded-0 py-0" name="pay_type" id="pay_type" style=" width: 100% !important;">
|
||||
<option value="1" {{$vaccinations->pay_type==1 ? 'selected' : ''}}>{{__('invoice.cash_paid')}}</option>
|
||||
<option value="2" {{$vaccinations->pay_type==2 ? 'selected' : ''}}>{{__('invoice.bank_paid')}}</option>
|
||||
<option value="3" {{$vaccinations->pay_type==3 ? 'selected' : ''}}>{{__('invoice.cash_paid')}} + {{__('invoice.bank_paid')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_paid')}} <small class="text-info">({{__('invoice.cash_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" value="{{$vaccinations->deposit}}" class="form-control form-control-xxs rounded-0" name="deposit" id="paid-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_paid')}} <small class="text-ifno">({{__('invoice.bank_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" value="{{$vaccinations->bank_deposit}}" class="form-control form-control-xxs rounded-0" name="bank_deposit" id="bank-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_date')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s', strtotime($vaccinations->first_paid_date))}}" class="form-control form-control-xxs rounded-0" name="first_paid_date" id="paid-date" placeholder="DD-MM-YYYY">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.bank_name')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="{{$vaccinations->bank_name}}" class="form-control form-control-xxs rounded-0" name="bank_name" id="bank_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.transaction_no')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="{{$vaccinations->transaction_ref}}" class="form-control form-control-xxs rounded-0" name="transaction_ref" id="transaction_ref">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_owe_amount')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" readonly step="any" value="{{$vaccinations->balance}}" class="form-control bg-white form-control-xxs rounded-0" name="balance" id="owe-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 pt-4 text-right">
|
||||
<button type="button" class="btn btn-inverse-success mr-2 ml-5 btn-print-invoice" data-toggle="modal" data-target="#print_invoice_modal" data-backdrop="static"><i class="mdi mdi-printer"></i> <span>{{__('sample.btn_print')}}</span></button>
|
||||
<button class="btn btn-info" type="submit"><i class="mdi mdi-content-save"></i> {{__('vaccination.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Patient -->
|
||||
<div class="modal fade modal-primary" id="modal-patient">
|
||||
<div class="modal-dialog show modal-semi-xxl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('patient.form_add_title')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="patient-code">{{__('patient.form_code')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {{$labSettings->patient_code == 1 ? ' disabled readonly ' : ''}} name="patient_code" id="patient-code" placeholder="{{__('patient.form_code')}}">
|
||||
<div class="input-group-append">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="patient_name" id="patient-name" placeholder="{{__('patient.form_name')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.form_dob')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append mr-3" style="flex: 5 !important;">
|
||||
<input class="form-control datepicker" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input class="form-control" name="year" onkeypress="return isNumber(event);" maxlength="2" type="text" id="year" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_year')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="month" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_month')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="day" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_day')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" checked name="gender" data-id="1" value="1">
|
||||
{{__('patient.form_sex_male')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> {{__('patient.form_sex_other')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_khid')}}</label>
|
||||
<input type="text" class="form-control" name="khid_number" id="khid-number" placeholder="{{__('patient.form_khid')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_phone')}}</label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="{{__('patient.form_phone')}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_house')}}</label>
|
||||
<input type="text" class="form-control" name="house_number" id="house-number" placeholder="{{__('patient.form_house')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_street')}}</label>
|
||||
<input type="text" class="form-control" name="street_number" id="street-number" placeholder="{{__('patient.form_street')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_province')}} </label>
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_district')}}</label>
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_commune')}}</label>
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_village')}}</label>
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="savePatient"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(Auth::id()==199999999)
|
||||
@include('modal.preview_vaccination_invoice')
|
||||
@else
|
||||
@include('modal.preview_vaccination_invoice_')
|
||||
@endif
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
|
||||
var is_print_invoice = "{{isset($_GET['print'])? true : false}}";
|
||||
if(is_print_invoice){
|
||||
$('.btn-print-invoice').trigger('click');
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var message = '{!! session('message') !!}';
|
||||
if(message=='success')
|
||||
{
|
||||
alertify.success("@lang('vaccination.update_success')");
|
||||
}
|
||||
if(message=='error')
|
||||
{
|
||||
alertify.error("@lang('vaccination.update_fail')");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment-precise-range.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
$(document).on('change','.vaccine-item', function () {
|
||||
let unit_price = $('option:selected', this).attr('data-price');
|
||||
let quantity = $(this).closest('tr').find('.quantity').val();
|
||||
let total = unit_price * quantity
|
||||
$(this).closest('tr').find('.unit-price').val(unit_price);
|
||||
$(this).closest('tr').find('.sub-total').val(total);
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$(document).on('change','#vaccination-item .unit-price, #vaccination-item .quantity', function () {
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$(document).on('click','.btn-remove-vaccine-item', function () {
|
||||
if($('#vaccination-item tr').length>1){
|
||||
Swal.fire({
|
||||
text: confirm_delete_record,
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: confirm_ok_delete,
|
||||
cancelButtonText: confirm_cancel
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$(this).closest('tr').remove()
|
||||
calculateVaccineData();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
$('#btn-add-new-med-item').click(function () {
|
||||
var $tr = $('#vaccination-item').find('tr:last');
|
||||
var $clone = $tr.clone();
|
||||
$clone.find('td:eq(0) span').remove()
|
||||
$clone.find('.unit-price').val(0);
|
||||
$clone.find('.quantity').val(1);
|
||||
$clone.find('.vaccine-item').val('');
|
||||
$clone.find('.sub-total').val(0);
|
||||
$clone.find('.sub-total-to-display').val(0);
|
||||
$('#vaccination-item').append($clone)
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: '',
|
||||
allowClear: true,
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
function calculateVaccineData() {
|
||||
let total_amt = 0;
|
||||
$('#vaccination-item').find('tr').each(function () {
|
||||
let unit_price = $(this).find('.unit-price').val()
|
||||
let quantity = $(this).find('.quantity').val()
|
||||
let total = unit_price * quantity
|
||||
$(this).closest('tr').find('.sub-total').val(total)
|
||||
$(this).closest('tr').find('.sub-total-to-display').val(total.toFixed(2))
|
||||
total_amt +=total
|
||||
})
|
||||
$('#total-amount').val(total_amt)
|
||||
let discount_amt =$('#discount-amount').val()
|
||||
$('#net-amount').val((total_amt * (1-(discount_amt/100))).toFixed(2))
|
||||
let own_amount = parseFloat($('#net-amount').val()) - (parseFloat( $('#paid-amount').val()) + parseFloat( $('#bank-amount').val()) )
|
||||
$('#owe-amount').val(toFixedNumber(own_amount,2))
|
||||
}
|
||||
|
||||
$('#discount-amount').change(function () {
|
||||
if($('#discount-amount').val()>100) $('#discount-amount').val(100)
|
||||
calculateVaccineData()
|
||||
})
|
||||
|
||||
$('#paid-amount, #bank-amount').keyup(function () {
|
||||
let own_amount = parseFloat($('#net-amount').val()) - (parseFloat( $('#paid-amount').val()) + parseFloat( $('#bank-amount').val()) )
|
||||
$('#owe-amount').val(toFixedNumber(own_amount,2))
|
||||
});
|
||||
|
||||
function searchPatientToForm(patientElementId){
|
||||
Swal.fire({
|
||||
html:"<p style='text-align: left;'>Search the patient with their name, phone, Khmer ID, or patient ID</p>",
|
||||
input: "text",
|
||||
showCancelButton: !0,
|
||||
confirmButtonText: "<i class='fa fa-search mr-2'></i>Search",
|
||||
cancelButtonText: "Close",
|
||||
position: 'top',
|
||||
showLoaderOnConfirm: !1,
|
||||
confirmButtonColor: "#4fb51a",
|
||||
preConfirm: function (n) {
|
||||
return new Promise(function (t) {
|
||||
$.ajax({
|
||||
url: patient_base_url + "/async",
|
||||
method:'get',
|
||||
dataType:'json',
|
||||
data:{kword: n},
|
||||
success:function(response)
|
||||
{
|
||||
if(response.data.length<1 || !response.success){
|
||||
Swal.showValidationMessage('No patient found!')
|
||||
Swal.enableButtons()
|
||||
}
|
||||
else {
|
||||
t(response.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
allowOutsideClick:!1,
|
||||
}).then(function (t) {
|
||||
if(!t.dismiss){
|
||||
$('#'+patientElementId).html('');
|
||||
t.value.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.patient_uuid + ' - ' + item.name_en;
|
||||
$('#'+patientElementId).append(patientOption);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#searchPatientAddForm").click(function () {
|
||||
searchPatientToForm('patient-id')
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function calculateAge(dob, current_date) {
|
||||
dob = moment(dob);
|
||||
current_date = current_date ? moment(current_date) : moment();
|
||||
return moment.preciseDiff(dob, current_date, true)
|
||||
}
|
||||
|
||||
var $patient_info_form = $("#modal-patient");
|
||||
$patient_info_form.find("#dob").on("change", function() {
|
||||
var dob_split = $(this).val().split("-")
|
||||
var dob = new Date(dob_split[1]+'-'+dob_split[0]+'-'+dob_split[2]);
|
||||
|
||||
if (dob) {
|
||||
current_date = moment();
|
||||
var age = calculateAge(dob);
|
||||
$patient_info_form.find("#year").val(age.years);
|
||||
$patient_info_form.find("#month").val(age.months);
|
||||
var days = age.days === 0 && age.months === 0 && age.years === 0 ? 1 : age.days;
|
||||
$patient_info_form.find("#day").val(days);
|
||||
}
|
||||
});
|
||||
|
||||
$patient_info_form.on("keyup change", "#year, #month, #day", function (evt) {
|
||||
var years = $patient_info_form.find("#year").val() || 0;
|
||||
var months = $patient_info_form.find("#month").val() || 0;
|
||||
var days = $patient_info_form.find("#day").val() || 0;
|
||||
var dob = moment();
|
||||
dob.subtract(days, 'days');
|
||||
dob.subtract(months, 'months');
|
||||
dob.subtract(years, 'years');
|
||||
var dob_split = dob.toDate().toLocaleDateString().split("/")
|
||||
var dob = dob_split[1].padStart(2,"0")+'-'+dob_split[0].padStart(2,"0")+'-'+dob_split[2];
|
||||
$patient_info_form.find("#dob").val(dob);
|
||||
});
|
||||
|
||||
|
||||
$('#province-id').change(function () {
|
||||
getDistrictsByProvinceId('district-id', $(this).val())
|
||||
})
|
||||
|
||||
$('#district-id').change(function () {
|
||||
getCommunesByDistrictId('commune-id', $(this).val())
|
||||
})
|
||||
|
||||
$('#commune-id').change(function () {
|
||||
getVillagesByCommuneId('village-id', $(this).val())
|
||||
})
|
||||
|
||||
|
||||
$("#savePatient").on('click',function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: patient_base_url.toString()+'.save',
|
||||
type:"POST",
|
||||
dataType:"JSON",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
name_en: $('#patient-name').val(),
|
||||
patient_uuid: $('#patient-code').val(),
|
||||
dob: $('#dob').val(),
|
||||
gender: $("input[name='gender']:checked").attr('data-id'),
|
||||
marital_status: $("input[name='marital_status']:checked").attr('data-id'),
|
||||
phone_number: $('#phone-number').val(),
|
||||
province_id: $('#province-id').val(),
|
||||
district_id : $('#district-id').val(),
|
||||
commune_id: $('#commune-id').val(),
|
||||
village_id: $('#village-id').val(),
|
||||
khid_number: $('#khid-number').val(),
|
||||
house_number: $('#house-number').val(),
|
||||
street_number: $('#street-number').val()
|
||||
},
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
var patient = res.data
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',patient.id);
|
||||
patientOption.setAttribute('selected','selected');
|
||||
patientOption.text = patient.patient_uuid + ' - ' + patient.name_en;
|
||||
$('#patient-id').append(patientOption);
|
||||
|
||||
$('#modal-patient .close').click();
|
||||
$('#patient-id').trigger('change')
|
||||
|
||||
}else{
|
||||
alertify.error("Can't create patient.")
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
64
resources/views/errors/404.blade.php
Normal file
64
resources/views/errors/404.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Laboratory Information System - LIS</title>
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/typicons/typicons.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/overwrite.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url(env("APP_URL").'storage/assets/images/favicon.png') }}" />
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/mdi/css/materialdesignicons.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/font-awesome/css/font-awesome.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/css/alertify.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/overwrite.select2.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/scrollbars.css')}}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-scroller">
|
||||
<div class="container-fluid page-body-wrapper full-page-wrapper">
|
||||
<div class="content-wrapper d-flex align-items-center text-center error-page bg-info">
|
||||
<div class="row flex-grow">
|
||||
<div class="col-lg-7 mx-auto text-white">
|
||||
<div class="row align-items-center d-flex flex-row">
|
||||
<div class="col-lg-6 text-lg-right pr-lg-4">
|
||||
<h1 class="display-1 mb-0">404</h1>
|
||||
</div>
|
||||
<div class="col-lg-6 error-page-divider text-lg-left pl-lg-4">
|
||||
<h2>SORRY!</h2>
|
||||
<h3 class="font-weight-light">Service not available.</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-12 text-center mt-xl-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-12 mt-xl-2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content-wrapper ends -->
|
||||
</div>
|
||||
<!-- page-body-wrapper ends -->
|
||||
</div>
|
||||
<!-- container-scroller -->
|
||||
<!-- base:js -->
|
||||
|
||||
|
||||
|
||||
<!-- endinject -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
45
resources/views/expired_item.blade.php
Normal file
45
resources/views/expired_item.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Expired item</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
256
resources/views/financial_report.blade.php
Normal file
256
resources/views/financial_report.blade.php
Normal file
@@ -0,0 +1,256 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
<style>
|
||||
#report_tb tr td{
|
||||
padding: 10px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.financial_report')}}</h4>
|
||||
{{-- <small><code>*</code> is generated based on the invoice</small>--}}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-2 inv-search">
|
||||
<form method="get" action="{{url('report/financial-report')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('report.doctor_date_range_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input name="start_date" value="{{isset($_GET['start_date']) ? date('Y-m-d',strtotime($_GET['start_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-right-0">
|
||||
<input name="end_date" value="{{isset($_GET['end_date']) ? date('Y-m-d',strtotime($_GET['end_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-left-0">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_sample_source_filter')}}</label>
|
||||
<select class="form-control" name="sample_source">
|
||||
<option></option>
|
||||
<option {{ isset($_GET['sample_source']) && $_GET['sample_source'] == -1 ? 'selected':''}} value="-1">{{__('Vaccination ')}}</option>
|
||||
<option {{ isset($_GET['sample_source']) && $_GET['sample_source'] == -2 ? 'selected':''}} value="-2">{{__('Dialy Report')}}</option>
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
<option {{$sampleSource->id==@$_GET['sample_source'] ? 'selected':''}} value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_physician_filter')}}</label>
|
||||
<select class="form-control select2" name="physician">
|
||||
<option></option>
|
||||
<option {{'All'==@$_GET['physician'] ? 'selected':''}} value="All">All</option>
|
||||
@foreach($physicians as $physician)
|
||||
<option {{$physician->id==@$_GET['physician'] ? 'selected':''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7 col-lg-5 p-0 m-0">
|
||||
<div class="form-group">
|
||||
<label for="lab-name-en"> </label>
|
||||
<div class="input-group p-0 m-0">
|
||||
<div class="input-group-append p-0 m-0">
|
||||
<button class="btn btn-inverse-secondary rounded-25" title="Search" type="submit"><i class="fa fa-search"></i> {{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/financial-report')}}" class="btn rounded-25 btn-inverse-warning ml-1 mx-3 " title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 dropdown-toggle" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="report_tb">
|
||||
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td style="padding-left: 10px; text-align:center;">Invoice Date</td>
|
||||
<td style="padding-left: 10px; text-align:center;">Sample No</td>
|
||||
<td style="padding-left: 10px;">Patient Name</td>
|
||||
<td style="padding-left: 10px; text-align:center;">Physician</td>
|
||||
<td style="padding-right: 10px;">Exchange Rate</td>
|
||||
<td style="padding-right: 10px;">Total</td>
|
||||
<td style="padding-right: 10px;">Discount</td>
|
||||
<td style="padding-right: 10px;">Net Amount</td>
|
||||
<td style="padding-right: 10px;">Cash Pay</td>
|
||||
<td style="padding-right: 10px;">Bank Pay</td>
|
||||
<td style="padding-right: 10px;">Owe</td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i=1;
|
||||
$totalPrice = 0;
|
||||
$totalPriceRiel = 0;
|
||||
$total = 0;
|
||||
$totalRiel = 0;
|
||||
$total_discount = 0;
|
||||
$total_discountRiel = 0;
|
||||
$total_paid = 0;
|
||||
$total_paidRiel = 0;
|
||||
$total_bank_paid = 0;
|
||||
$total_bank_paidRiel = 0;
|
||||
$total_owe = 0;
|
||||
$total_oweRiel = 0;
|
||||
|
||||
@endphp
|
||||
@foreach($financialReport as $row)
|
||||
<tr>
|
||||
<td style="text-align:center;">{{$row['date']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['sample_number']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['patient']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['physician']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{@$row['exchange_rate']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_amount']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_discount']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_net_amount']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_paid']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_bank_paid']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_owe']}}</td>
|
||||
|
||||
</tr>
|
||||
@php
|
||||
$totalPrice+=$row['total_net_amount'];
|
||||
$totalPriceRiel+=($row['total_net_amount'] * @$row['exchange_rate']);
|
||||
$total += $row['total_amount'];
|
||||
$totalRiel += ($row['total_amount'] * @$row['exchange_rate']);
|
||||
$total_discount += $row['total_discount'];
|
||||
$total_discountRiel += ($row['total_discount'] * @$row['exchange_rate']);
|
||||
$total_paid += $row['total_paid'];
|
||||
$total_paidRiel += ($row['total_paid'] * @$row['exchange_rate']);
|
||||
$total_bank_paid+=$row['total_bank_paid'];
|
||||
$total_bank_paidRiel+=($row['total_bank_paid'] * @$row['exchange_rate']);
|
||||
$total_owe += $row['total_owe'];
|
||||
$total_oweRiel += ($row['total_owe'] * @$row['exchange_rate']);
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr><td colspan="11" style="padding-left:20px"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="5">{{__('TOTAL')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($totalRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_discountRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($totalPriceRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_paidRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_bank_paidRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_oweRiel))}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="5">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_discountRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalPriceRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_paidRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_bank_paidRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_oweRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="5">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_discountRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalPriceRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_paidRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_bank_paidRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_oweRiel * ($ownBenefitRate/100))))}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.financial_report_print')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
{{--<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>--}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
411
resources/views/home.blade.php
Normal file
411
resources/views/home.blade.php
Normal file
@@ -0,0 +1,411 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.content-wrapper .card {
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 mb-0 grid-margin stretch-card flex-column">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card " style="border-left: 5px solid #33db40 !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.today_sample') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold">{{$todaySamples}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-flask fa-2x text-gray"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #5881dd !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.this_month_sample') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold">{{$thisMonthSamples}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-flask fa-2x text-gray"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #f39915 !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1">{{ __('general.last_month_sample') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold">{{$previousMonthSamples}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-flask fa-2x text-gray"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #555 !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1">{{ __('general.average_sample') }} <span class="small">({{date('Y',strtotime("-1 year"))}})</span></div>
|
||||
<div class="h5 mb-0 font-weight-bold ">{{$averageSamples}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-flask fa-2x text-gray"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row h-100">
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #5881dd !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.today_income') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold ">{{$labSettings->currency==1 ? number_format(ceil($todayIncome / 100) * 100) : number_format($todayIncome,2)}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-2x text-gray">
|
||||
{{$labSettings->currency==1 ? '៛' : '$'}}
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #33db40 !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1">{{ __('general.this_month_income') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold ">{{$labSettings->currency==1 ? number_format(ceil($thisMonthIncome / 100) * 100) : number_format($thisMonthIncome,2)}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-2x text-gray">
|
||||
{{$labSettings->currency==1 ? '៛' : '$'}}
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #dc3545 !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.last_month_income') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold ">{{$labSettings->currency==1 ? number_format(ceil($lastMonthIncome / 100) * 100) : number_format($lastMonthIncome,2)}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-2x text-gray">
|
||||
{{$labSettings->currency==1 ? '៛' : '$'}}
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card" style="border-left: 5px solid #f39915 !important;" >
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1">{{ __('general.last_year_income') }}</div>
|
||||
<div class="h5 mb-0 font-weight-bold ">{{$labSettings->currency==1 ? number_format(ceil($lastYearIncome / 100) * 100) : number_format($lastYearIncome,2)}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-2x text-gray">
|
||||
{{$labSettings->currency==1 ? '៛' : '$'}}
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.sample_statistic') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="sales-chart-d" height="150"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<div class="dropdown">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Bar Chart
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="javascript:;">Bar Chart</a>
|
||||
<a class="dropdown-item" href="javascript:;">Pie Chart</a>
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.sample_source_statistic') }}</h6>
|
||||
<div class="dropdown">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{__('general.chart_filter_this_month')}}
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="javascript:;">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="javascript:;">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="javascript:;">{{__('general.chart_filter_this_year')}}</a>
|
||||
<a class="dropdown-item" href="javascript:;">{{__('general.chart_filter_last_year')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="sales-chart-b" height="150"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/chart.js/Chart.min.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
// Set interval to reload the page every 2 minutes (120000 milliseconds)
|
||||
setInterval(function () {
|
||||
location.reload();
|
||||
}, 120000);
|
||||
});
|
||||
|
||||
function generateColorCodeByYear(year) {
|
||||
const seed = parseInt(year.toString().slice(-2));
|
||||
const red = (Math.sin(seed * 1) * 127 + 128) | 0;
|
||||
const green = (Math.sin(seed * 2) * 127 + 128) | 0;
|
||||
const blue = (Math.sin(seed * 3) * 127 + 128) | 0;
|
||||
|
||||
return `#${red.toString(16).padStart(2, '0')}${green.toString(16).padStart(2, '0')}${blue.toString(16).padStart(2, '0')}`;
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
let sampleSourceData = <?php echo json_encode($sampleSourceChart);?>;
|
||||
let sampleYearData = Object.values(<?php echo json_encode($sampleYear);?>);
|
||||
|
||||
let preparedSampleChartData = [];
|
||||
let maxYear = Math.ceil((parseInt("<?php echo $maxYear?>"))/50) * 50;
|
||||
let maxSampleSource = Math.ceil((parseInt("<?php echo $maxSampleSource?>"))/20) * 20;
|
||||
|
||||
let arrLabel = [];
|
||||
sampleYearData.map(item=>{
|
||||
|
||||
let years = Object.values(item.year);
|
||||
let singleSampleChart = {
|
||||
label : years[0],
|
||||
data : Object.values(item.data),
|
||||
backgroundColor: generateColorCodeByYear(years[0])
|
||||
};
|
||||
arrLabel = Object.values(item.month);
|
||||
preparedSampleChartData.push(singleSampleChart);
|
||||
});
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
$(function() {
|
||||
// sales-chart-d start
|
||||
if ($("#sales-chart-d").length) {
|
||||
var SalesChartDCanvas = $("#sales-chart-d").get(0).getContext("2d");
|
||||
var SalesChartD = new Chart(SalesChartDCanvas, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: arrLabel,
|
||||
datasets: preparedSampleChartData
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: true,
|
||||
layout: {
|
||||
padding: {
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
display: true,
|
||||
gridLines: {
|
||||
display: true,
|
||||
drawBorder: true
|
||||
},
|
||||
ticks: {
|
||||
display: true,
|
||||
min: 0,
|
||||
max: maxYear,
|
||||
stepSize: 50,
|
||||
fontSize: 10,
|
||||
fontColor: "#001737",
|
||||
}
|
||||
}],
|
||||
xAxes: [{
|
||||
stacked: false,
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
fontColor: "#001737",
|
||||
fontSize: 10
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(0, 0, 0, 0)",
|
||||
display: true
|
||||
},
|
||||
barPercentage: .3
|
||||
}]
|
||||
},
|
||||
legend: {
|
||||
display: true
|
||||
},
|
||||
elements: {
|
||||
point: {
|
||||
radius: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
// sales-chart-d end
|
||||
|
||||
if ($("#sales-chart-b").length) {
|
||||
var SalesChartDCanvas = $("#sales-chart-b").get(0).getContext("2d");
|
||||
var SalesChartD = new Chart(SalesChartDCanvas, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: sampleSourceData.sample_source,
|
||||
datasets: [
|
||||
{
|
||||
label: sampleSourceData.period_type[0]+' Samples',
|
||||
data: sampleSourceData.total_samples,
|
||||
backgroundColor: '#3b86d1'
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: true,
|
||||
layout: {
|
||||
padding: {
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
display: true,
|
||||
gridLines: {
|
||||
display: true,
|
||||
drawBorder: true
|
||||
},
|
||||
ticks: {
|
||||
display: true,
|
||||
min: 0,
|
||||
max: maxSampleSource,
|
||||
stepSize: 20,
|
||||
fontSize: 10,
|
||||
fontColor: "#001737",
|
||||
}
|
||||
}],
|
||||
xAxes: [{
|
||||
stacked: false,
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
fontColor: "#001737",
|
||||
fontSize: 10
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(0, 0, 0, 0)",
|
||||
display: false
|
||||
},
|
||||
barPercentage: .3
|
||||
}]
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
elements: {
|
||||
point: {
|
||||
radius: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
99
resources/views/individual_report.blade.php
Normal file
99
resources/views/individual_report.blade.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Individual Report</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="patient_name" class="col-sm-5 col-form-label">Patient Name</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="patient_name">
|
||||
<option value="none">Select</option>
|
||||
<option>Mr A</option>
|
||||
<option>Mr B</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Patient Hospital ID</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="lab_id">
|
||||
<option value="none">Select</option>
|
||||
<option>001-30082022</option>
|
||||
<option>002-30082022</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="phonenumber" class="col-sm-5 col-form-label">Phone Number</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="phone_number" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Sample Number</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_number">
|
||||
<option value="">Select</option>
|
||||
<option>001-09082022</option>
|
||||
<option>002-09082022</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row float-right">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-eye btn-icon-prepend"></i>
|
||||
Preview
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-printer btn-icon-prepend"></i>
|
||||
Print
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning btn-icon-text">
|
||||
<i class="typcn typcn-refresh-outline btn-icon-prepend"></i>
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
203
resources/views/inventory.blade.php
Normal file
203
resources/views/inventory.blade.php
Normal file
@@ -0,0 +1,203 @@
|
||||
'<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Inventory Report')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 bg-gradient-light border-1 border-solid border-gray p-4 inv-search">
|
||||
<form method="get" action="{{url('inventory/report/view')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Report Type')}}</label>
|
||||
<select class="form-control" id="report_type_filter" name="report_type">
|
||||
<option></option>
|
||||
<option {{(isset($_GET['report_type']) && $_GET['report_type']==1 ? 'selected' : '')}} value="1">Inventory On hand</option>
|
||||
<option {{(isset($_GET['report_type']) && $_GET['report_type']==2 ? 'selected' : '')}} value="2">Expire Report</option>
|
||||
{{-- <option {{(isset($_GET['report_type']) && $_GET['report_type']==3 ? 'selected' : '')}} value="2">Need Restock</option>--}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="report_date_range" class="col-sm-12 col-md-5 col-lg-4 {{(isset($_GET['report_type']) && $_GET['report_type']!=1 ? 'd-block' : 'd-none')}}">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('Report Date')}}</label>
|
||||
<div class="input-group">
|
||||
<input name="start_date" value="{{isset($_GET['start_date']) && !empty($_GET['start_date']) ? date('Y-m-d',strtotime($_GET['start_date'])) : date('Y-m-01')}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control">
|
||||
<input name="end_date" value="{{isset($_GET['end_date']) && !empty($_GET['end_date']) ? date('Y-m-d',strtotime($_GET['end_date'])) : date('Y-m-d')}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-7 col-lg-5">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en"> </label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-info ml-4 px-3" title="Search" type="submit"><i class="fa fa-search"></i>{{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/doctor-report')}}" class="btn btn-inverse-warning px-3 ml-4" title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-white rounded-0 dropdown-toggle ml-4" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
@if(!empty($report_data['report_data']) && $report_data['report_id']==1)
|
||||
<p>{{$report_data['report_name']}}</p>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Item Group</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">On hand</th>
|
||||
<th class="p-1">Last Stock In</th>
|
||||
<th class="p-1">Last Stock Out</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1">{{$v->item_group}}</td>
|
||||
<td class="p-1">{{$v->item_name}}</td>
|
||||
<td class="p-1 text-right">{{floatval($v->available_quantity)}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_in_date) ? date('d-m-Y',strtotime($v->stock_in_date)) : ''}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_out_date) ? date('d-m-Y',strtotime($v->stock_out_date)) : ''}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($report_data['report_data']) && $report_data['report_id']==2)
|
||||
<p>{{$report_data['report_name']}}</p>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Item Group</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">Stock In</th>
|
||||
<th class="p-1">Stock In Date</th>
|
||||
<th class="p-1">Expire Date</th>
|
||||
<th class="p-1"># Month</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1">{{$v->item_group}}</td>
|
||||
<td class="p-1">{{$v->item_name}}</td>
|
||||
<td class="p-1 text-right">{{$v->stock_in}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_in_date) ? date('d-m-Y',strtotime($v->stock_in_date)) : ''}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->expiry_date) ? date('d-m-Y',strtotime($v->expiry_date)) : ''}}</td>
|
||||
<td class="p-1 text-right">{{$v->months}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(isset($_GET['report_type']))
|
||||
@include('modal.inventory_onhand_print')
|
||||
@endif
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$('#report_type_filter').change(function(){
|
||||
let reportTypeId = $(this).val();
|
||||
if(reportTypeId==1){
|
||||
//$('#report_date_range').css('display','none');
|
||||
$('#report_date_range').removeClass("d-block");
|
||||
$('#report_date_range').addClass('d-none');
|
||||
}
|
||||
else{
|
||||
$('#report_date_range').removeClass("d-none");
|
||||
$('#report_date_range').addClass('d-block');
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
45
resources/views/invoice_list.blade.php
Normal file
45
resources/views/invoice_list.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Invoice List</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
570
resources/views/lab_profile.blade.php
Normal file
570
resources/views/lab_profile.blade.php
Normal file
@@ -0,0 +1,570 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card" style="min-height: 80vh;">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('laboratory.info')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button class="btn btn-sm btn-inverse-success waves-effect px-3 ml-2 rounded-25 float-right" type="button" data-action="new" data-toggle="modal" data-target="#modal-laboratory" data-backdrop="static"><i class="typcn typcn-pencil"></i> {{__('laboratory.form_edit_tittle')}}</button>
|
||||
@endif
|
||||
</h4>
|
||||
|
||||
<div class="row px-3">
|
||||
<div class="col-lg-12 pr-4 border rounded-lg pt-3 pl-4 mt-2 bg-light">
|
||||
<h6 class="text-info">{{__('laboratory.info')}}</h6>
|
||||
<div class="py-2">
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.table_name_kh')}}</span>
|
||||
<span class="text-muted col-sm-10">{{$info->name_kh}}</span>
|
||||
</div>
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.table_name_en')}}</span>
|
||||
<span class="text-muted col-sm-10">{{$info->name_en}}</span>
|
||||
</div>
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('lab_profile.short_name')}}</span>
|
||||
<span class=" text-muted col-sm-10">{{$info->short_name}}</span>
|
||||
</div>
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.phone')}}</span>
|
||||
<span class=" text-muted col-sm-10">{{$info->phone}}</span>
|
||||
</div>
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('lab_profile.emial')}}</span>
|
||||
<span class=" text-muted col-sm-10">{{$info->email}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 pr-4 border rounded-lg pt-3 pl-4 mt-3 bg-light">
|
||||
<h6 class="text-info">{{__('lab_profile.address')}}</h6>
|
||||
<div class="py-2">
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.form_address_kh')}}</span>
|
||||
<span class="text-muted col-sm-10">{{$info->address_kh}}</span>
|
||||
</div>
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.form_address_en')}}</span>
|
||||
<span class="text-muted col-sm-10">{{$info->address_en}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 pr-4 border rounded-lg pt-3 pl-4 mt-3 bg-light">
|
||||
<h6 class="text-info">{{__('laboratory.license')}}</h6>
|
||||
<div class="py-2">
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.start_date')}}</span>
|
||||
<span class="text-muted col-sm-10">{{date('l, F j, Y g:i A', strtotime($info->start_date))}}</span>
|
||||
</div>
|
||||
<div class="row font-14 py-1">
|
||||
<span class="float-left col-sm-2">{{__('laboratory.expiry_date')}}</span>
|
||||
<span class="text-muted col-sm-10">{{date('l, F j, Y g:i A', strtotime($info->end_date))}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal mt-5 fade modal-primary" id="modal-laboratory">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('laboratory.form_edit_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="{{url('laboratory-profile/update')}}" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="lab_id" id="lab-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('laboratory.table_name_kh')}} <span class="text-danger">*</span> </label>
|
||||
<input type="text" class="form-control form-control-sm" name="name_kh" id="lab-name-kh" value="{{$info->name_kh}}" placeholder="{{__('laboratory.table_name_kh')}}"/>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.table_name_en')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex:1 !important;">
|
||||
<input type="text" class="form-control form-control-sm rounded-right-0" name="name_en" id="lab-name-en" value="{{$info->name_en}}" placeholder="{{__('laboratory.table_name_en')}}">
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<input type="text" class="form-control form-control-sm rounded-left-0" style="width: 100px !important;" name="short_name" id="lab-code" value="{{$info->short_name}}" maxlength="3" placeholder="{{__('lab_profile.short_name')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.table_phon')}} </label>
|
||||
<input type="text" class="form-control form-control-sm" name="phone_number" id="phone-number" value="{{$info->phone_number}}" placeholder="{{__('patient.table_phon')}}"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('lab_profile.emial')}} </label>
|
||||
<input type="email" class="form-control form-control-sm" name="email" id="email" value="{{$info->email}}" placeholder="{{__('lab_profile.emial')}}"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
<div class="row form-group mb-1">
|
||||
<div class="col-sm-12">
|
||||
<label for="address-kh" class="control-label">{{__('laboratory.form_address_kh')}}</label>
|
||||
<input type="text" class="form-control form-control-sm" name="address_kh" id="address-kh" value="{{$info->address_kh}}" placeholder="{{__('laboratory.form_address_kh')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="address-en">{{__('laboratory.form_address_en')}}</label>
|
||||
<input type="text" class="form-control form-control-sm" name="address_en" id="address-en" value="{{$info->address_en}}" placeholder="{{__('laboratory.form_address_en')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="d-none" id="submit-data"></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" onclick="$('#submit-data').click()" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/org.vendor.bundle.base.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
let base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
let sample_number = "{{$info->sample_number}}";
|
||||
let patient_code = "{{$info->patient_code}}";
|
||||
let technician_label = "{{$info->technician_label}}";
|
||||
let discount_type = "{{$info->discount_type}}";
|
||||
let phone_number = "{{$info->phone_number}}";
|
||||
let email = "{{$info->email}}";
|
||||
|
||||
let currency = "{{$info->currency}}";
|
||||
|
||||
let exchange_rate = "{{$info->exchange_rate}}";
|
||||
let abnormal_text_color = "{{$info->abnormal_text_color}}";
|
||||
let show_result_footer = "{{$info->show_result_footer}}";
|
||||
let abnormal_result_font_weight = "{{$info->abnormal_result_font_weight}}";
|
||||
let result_header_id = "{{$info->result_header_id}}";
|
||||
let invoice_template_id = "{{$info->invoice_template_id}}";
|
||||
|
||||
function generateSlug(text) {
|
||||
return text
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.slice(0, 3)
|
||||
.map(word => word[0])
|
||||
.join('')
|
||||
.toUpperCase().padEnd(3, 'X');
|
||||
}
|
||||
|
||||
document.getElementById('lab-name-en').addEventListener('input', function () {
|
||||
document.getElementById('lab-code').value = generateSlug(this.value);
|
||||
});
|
||||
|
||||
function showPreview(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-1-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* alternative logo start */
|
||||
|
||||
function showAlternativeLogo(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-2-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alternative-logo-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#alternative-logo-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-logo/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alternative-logo').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-logo/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-2-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
/* alterntive logo end */
|
||||
|
||||
/* default_footer start */
|
||||
|
||||
function showDefaultFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-4-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#default-footer-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#default-footer-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/default-footer/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-default-footer').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/default-footer/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-4-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* default_footer end */
|
||||
|
||||
/* alternative footer start */
|
||||
|
||||
function showAlternativeFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-3-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alternative-footer-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alternative-footer-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-footer/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alternative-footer').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-footer/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-3-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* alternative footer end */
|
||||
|
||||
|
||||
function showPreviewAlterVerifyImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("alter-verify-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alter-verify-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alter-verify-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-verify-sign/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alter-verify-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-verify-sign/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#alter-verify-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function showPreviewAlterLabtechImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("alter-labtech-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alter-labtech-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alter-labtech-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-labtech-sign/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alter-labtech-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-labtech-sign/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#alter-labtech-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/avatar/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-lab-logo').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/avatar/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-1-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function postLabConfigure(attr_code, attr_value) {
|
||||
let url = base_url + '/configure/save';
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
attribute_code : attr_code,
|
||||
attribute_value: attr_value
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function postLabSettingSetter() {
|
||||
let url = base_url + '/save';
|
||||
|
||||
technician_label = $('#technician-label').val()
|
||||
sample_number = $("input[name='sample_number']:checked").attr('data-id')
|
||||
patient_code = $("input[name='patient_number']:checked").attr('data-id')
|
||||
discount_type = $("input[name='discount_type']:checked").attr('data-id')
|
||||
exchange_rate = $('#exchange-rate').val()
|
||||
abnormal_text_color = $('#abnormal-text-color').val()
|
||||
show_result_footer = $('input[name="show_result_footer"]:checked').attr('data-id')
|
||||
abnormal_result_font_weight = $('input[name="abnormal_result_font_weight"]:checked').attr('data-id')
|
||||
result_header_id = $('input[name="result_header_id"]:checked').attr('data-id')
|
||||
invoice_template_id = $('input[name="invoice_template_id"]:checked').attr('data-id')
|
||||
|
||||
if($('#phone-number').val()!='') phone_number = $('#phone-number').val()
|
||||
if($('#email').val()!='') email = $('#email').val()
|
||||
|
||||
currency = $("input[name='currency']:checked").attr('data-id')
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
sample_number : sample_number,
|
||||
patient_code: patient_code,
|
||||
discount_type: discount_type,
|
||||
technician_label: technician_label,
|
||||
phone_number: phone_number,
|
||||
email: email,
|
||||
exchange_rate: exchange_rate,
|
||||
abnormal_text_color: abnormal_text_color,
|
||||
show_result_footer: show_result_footer,
|
||||
abnormal_result_font_weight: abnormal_result_font_weight,
|
||||
result_header_id: result_header_id,
|
||||
currency:currency,
|
||||
invoice_template_id: invoice_template_id
|
||||
},
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
$('.sample-number-mode-getter label').text(res.data.sample_number == 0 ? 'Manual' : 'Auto-generate')
|
||||
$('.patient-number-mode-getter label').text(res.data.patient_code == 0 ? 'Manual' : 'Auto-generate')
|
||||
$('.discount-type-getter label').text(res.data.discount_type == 1 ? '(%) Percentage' : '($) Price')
|
||||
$('.verify-label-getter label').text(res.data.verify_label)
|
||||
$('.technician-label-getter label').text(res.data.technician_label)
|
||||
$('.phone-getter span').text(res.data.phone_number)
|
||||
$('.email-getter span').text(res.data.email)
|
||||
$('.base-currency-mode-getter label').text(res.data.currency == 0 ? 'USD ($)' :'Riel (៛)')
|
||||
$('.invoice-template-mode-getter label').text(res.data.invoice_template_id == 1 ? '{{__('laboratory-profile.invoice_detail')}}' : '{{__('laboratory-profile.invoice_summary')}}')
|
||||
}
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** verify label image */
|
||||
|
||||
$('#verify-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/verifies/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function showPreviewVerifyImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("verify-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#verify-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btn-remove-verify-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/verifies/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#verify-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
762
resources/views/laboratory.blade.php
Normal file
762
resources/views/laboratory.blade.php
Normal file
@@ -0,0 +1,762 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.item-config {
|
||||
background: #feffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1edfc;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('general.laboratory_settings')}}</h4>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<h6 class="text-muted"><span class="mdi mdi-square-rounded text-muted"></span> {{__('general.general_settings')}}</h6>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.sample_numner_conf')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.sample-number-mode-setter','.sample-number-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="sample-number-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->sample_number==0? __('lab_profile.manual') :__('lab_profile.system_generate')}}</label>
|
||||
</div>
|
||||
<div class="sample-number-mode-setter" style="display: none">
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->sample_number==0? 'checked':''}} data-id="0" name="sample_number"> {{__('lab_profile.manual')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->sample_number==1? 'checked':''}} data-id="1" name="sample_number"> {{__('lab_profile.system_generate')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.patient_numner_conf')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.patient-number-mode-setter','.patient-number-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="patient-number-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->patient_code==0? __('lab_profile.manual'):__('lab_profile.system_generate')}}</label>
|
||||
</div>
|
||||
<div class="patient-number-mode-setter" style="display: none">
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->patient_code==0? 'checked':''}} data-id="0" name="patient_number"> {{__('lab_profile.manual')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->patient_code==1? 'checked':''}} data-id="1" name="patient_number"> {{__('lab_profile.system_generate')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.based_currency')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.base-currency-mode-setter','.base-currency-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="base-currency-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->currency==0? __('USD ($)') :__('Riel (៛)')}}</label>
|
||||
</div>
|
||||
<div class="base-currency-mode-setter" style="display: none">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->currency==0? 'checked':''}} data-id="0" name="currency"> {{__('USD ($)')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->currency==1? 'checked':''}} data-id="1" name="currency"> {{__('Riel (៛)')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.type_of_discount_conf')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.discount-type-setter','.discount-type-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="discount-type-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->discount_type == 1 ? '(%) '.__('lab_profile.percentage'):'($) '.__('lab_profile.price')}}</label>
|
||||
</div>
|
||||
<div class="discount-type-setter" style="display: none">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->discount_type==1? 'checked':''}} data-id="1" name="discount_type"> (%) {{__('lab_profile.percentage')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->discount_type==2? 'checked':''}} data-id="2" name="discount_type"> ($) {{__('lab_profile.price')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.exchange_rate')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.exchange-rate-setter','.exchange-rate-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="exchange-rate-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">1 USD = {{$info->exchange_rate}} </label>
|
||||
</div>
|
||||
<div class="exchange-rate-setter" style="display: none">
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control rounded-right-0 form-control-sm" id="exchange-rate" value="{{$info->exchange_rate}}" placeholder="{{__('Exchange Rate')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('sidebar.invoice')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.invoice-template-mode-setter','.invoice-template-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="invoice-template-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25"> {{$info->is_auto_make_invoice==0? __('lab_profile.manual'):__('lab_profile.system_generate')}}</label>
|
||||
|
||||
<label class="badge badge-outline-secondary rounded-25"> {{$info->invoice_template_id==1? __('lab_profile.invoice_detail'): ($info->invoice_template_id==2 ? __('lab_profile.invoice_summary') : ($info->invoice_template_id==3 ? __('lab_profile.detail_with_panel') : ''))}}</label>
|
||||
</div>
|
||||
<div class="invoice-template-mode-setter" style="display: none">
|
||||
<p class="text-muted">{{__('invoice.form_btn_generate_invoice')}}</p>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->is_auto_make_invoice==0? 'checked':''}} data-id="0" name="is_auto_make_invoice"> {{__('lab_profile.manual')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->is_auto_make_invoice==1? 'checked':''}} data-id="1" name="is_auto_make_invoice"> {{__('lab_profile.system_generate')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
|
||||
<p class="text-muted">{{__('lab_profile.invoice_template')}}</p>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->invoice_template_id==1? 'checked':''}} data-id="1" name="invoice_template_id"> {{__('lab_profile.invoice_detail')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->invoice_template_id==3? 'checked':''}} data-id="3" name="invoice_template_id"> {{__('lab_profile.detail_with_panel')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->invoice_template_id==2? 'checked':''}} data-id="2" name="invoice_template_id"> {{__('lab_profile.invoice_summary')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="mt-3 text-muted"><span class="mdi mdi-square-rounded text-muted"></span> {{__('general.result_settings')}}</h6>
|
||||
|
||||
@php
|
||||
$configures = collect($info->labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$resultTemplateId = ($configures->where('atrribute_code', 'RESULT_TEMPLATE')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.header_font_name')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.header-font-name-mode-setter','.header-font-name-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="header-font-name-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontNameHeader}}</label>
|
||||
</div>
|
||||
<div class="header-font-name-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-name-header">
|
||||
<option {{$fontNameHeader=='Times New Roman'?'selected' : ''}} value="Times New Roman">Times New Roman</option>
|
||||
<option {{$fontNameHeader=='Nimbus Mono'?'selected' : ''}} value="Nimbus Mono">Nimbus Mono</option>
|
||||
<option {{$fontNameHeader=='Calibri'?'selected' : ''}} value="Calibri">Calibri</option>
|
||||
<option {{$fontNameHeader=='Courier New'?'selected' : ''}} value="Courier New">Courier New</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_NAME_FOR_RESULT_HEADER', $('#result-font-name-header').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.header_font_size')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.header-font-size-mode-setter','.header-font-size-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="header-font-size-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontSizeHeader}}</label>
|
||||
</div>
|
||||
<div class="header-font-size-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-size-header">
|
||||
<option {{$fontSizeHeader=='8.5pt' ? 'selected':''}} value="8.5pt">8.5pt</option>
|
||||
<option {{$fontSizeHeader=='9pt' ? 'selected':''}} value="9pt">9pt</option>
|
||||
<option {{$fontSizeHeader=='10pt' ? 'selected':''}} value="10pt">10pt</option>
|
||||
<option {{$fontSizeHeader=='11pt' ? 'selected':''}} value="11pt">11pt</option>
|
||||
<option {{$fontSizeHeader=='12pt' ? 'selected':''}} value="12pt">12pt</option>
|
||||
<option {{$fontSizeHeader=='13pt' ? 'selected':''}} value="13pt">13pt</option>
|
||||
<option {{$fontSizeHeader=='14pt' ? 'selected':''}} value="14pt">14pt</option>
|
||||
<option {{$fontSizeHeader=='15pt' ? 'selected':''}} value="15pt">15pt</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_SIZE_FOR_RESULT_HEADER', $('#result-font-size-header').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.body_font_name')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.body-font-name-mode-setter','.body-font-name-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="body-font-name-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontName}}</label>
|
||||
</div>
|
||||
<div class="body-font-name-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-name">
|
||||
<option {{$fontName=='Times New Roman'?'selected' : ''}} value="Times New Roman">Times New Roman</option>
|
||||
<option {{$fontName=='Nimbus Mono'?'selected' : ''}} value="Nimbus Mono">Nimbus Mono</option>
|
||||
<option {{$fontName=='Calibri'?'selected' : ''}} value="Calibri">Calibri</option>
|
||||
<option {{$fontName=='Courier New'?'selected' : ''}} value="Courier New">Courier New</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_NAME_FOR_RESULT', $('#result-font-name').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.body_font_size')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.body-font-size-mode-setter','.body-font-size-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="body-font-size-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontSize}}</label>
|
||||
</div>
|
||||
<div class="body-font-size-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-size">
|
||||
<option {{$fontSize=='8.5pt' ? 'selected':''}} value="8.5pt">8.5pt</option>
|
||||
<option {{$fontSize=='9pt' ? 'selected':''}} value="9pt">9pt</option>
|
||||
<option {{$fontSize=='10pt' ? 'selected':''}} value="10pt">10pt</option>
|
||||
<option {{$fontSize=='11pt' ? 'selected':''}} value="11pt">11pt</option>
|
||||
<option {{$fontSize=='12pt' ? 'selected':''}} value="12pt">12pt</option>
|
||||
<option {{$fontSize=='13pt' ? 'selected':''}} value="13pt">13pt</option>
|
||||
<option {{$fontSize=='14pt' ? 'selected':''}} value="14pt">14pt</option>
|
||||
<option {{$fontSize=='15pt' ? 'selected':''}} value="15pt">15pt</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_SIZE_FOR_RESULT', $('#result-font-size').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.abnormal_result')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.abr-font-weight-mode-setter','.abr-font-weight-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="abr-font-weight-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->abnormal_result_font_weight == 1 ? __('lab_profile.font_bold') : __('lab_profile.font_normal') }}</label>
|
||||
<label class="badge badge-outline-secondary rounded-25"><span class="rounded-25" style="width: 50px; height: 10px; background: {{$info->abnormal_text_color}}; float: left;"></span>.</label>
|
||||
</div>
|
||||
<div class="abr-font-weight-mode-setter" style="display: none">
|
||||
<p>{{__('lab_profile.font_weight')}}</p>
|
||||
<div class="form-check form-check-primary d-flex ml-1">
|
||||
<label class="form-check-label ">
|
||||
<input onclick="postLabSettingSetter()" {{$info->abnormal_result_font_weight==1 ? 'checked':''}} type="radio" class="checkbox" data-id="1" value="1" name="abnormal_result_font_weight" id="font-weight-bold"> {{__('lab_profile.font_bold')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-primary d-flex ml-1">
|
||||
<label class="form-check-label">
|
||||
<input onclick="postLabSettingSetter()" {{$info->abnormal_result_font_weight==0 ? 'checked':''}} type="radio" class="checkbox" data-id="0" value="0" name="abnormal_result_font_weight" id="font-weight-normal"> {{__('lab_profile.font_normal')}}
|
||||
</label>
|
||||
</div>
|
||||
<p>{{__('lab_profile.text_color')}}</p>
|
||||
<div class="input-group ml-1">
|
||||
<input type="color" id="abnormal-text-color" class="rounded-right-0 form-control form-control-sm p-0" value="{{$info->abnormal_text_color}}">
|
||||
<div class="input-group-append">
|
||||
<button onclick="postLabSettingSetter()" type="button" class="btn btn-xs btn-inverse-info px-3" style="font-size: 12px; padding: 5px"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.verify_label')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.verify-label-mode-setter','.verify-label-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="verify-label-mode-getter">
|
||||
<img style="height: 33px !important;" src="{{!empty($info->verify_label) ? url(env("APP_URL").'storage/images/avatars/labs/'.$info->verify_label) :''}}">
|
||||
</div>
|
||||
<div class="verify-label-mode-setter" style="display: none">
|
||||
<form id="verify-image-upload-form" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="center_">
|
||||
<div class="form-input">
|
||||
<div class="preview" style="width: 120px;">
|
||||
<img id="verify-image-preview" src="{{!empty($info->verify_label) ? url(env("APP_URL").'storage/images/avatars/labs/'.$info->verify_label) :''}}">
|
||||
</div>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<label for="verify-image" class="rounded btn-light">
|
||||
<i class="mdi mdi-image-filter"></i> <span style="font-size: 12px">{{__('physician.form_logo_upload')}}</span>
|
||||
</label>
|
||||
<button type="button" id="btn-remove-verify-label" class="btn btn-xs btn-danger ml-2" style="padding: 2px !important; margin-top: -3px !important;"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
<input type="file" name="image" id="verify-image" accept="image/*" onchange="showPreviewVerifyImage(event);">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/org.vendor.bundle.base.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
let base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
let sample_number = "{{$info->sample_number}}";
|
||||
let patient_code = "{{$info->patient_code}}";
|
||||
let technician_label = "{{$info->technician_label}}";
|
||||
let discount_type = "{{$info->discount_type}}";
|
||||
let phone_number = "{{$info->phone_number}}";
|
||||
let email = "{{$info->email}}";
|
||||
|
||||
let currency = "{{$info->currency}}";
|
||||
|
||||
let exchange_rate = "{{$info->exchange_rate}}";
|
||||
let abnormal_text_color = "{{$info->abnormal_text_color}}";
|
||||
let show_result_footer = "{{$info->show_result_footer}}";
|
||||
let abnormal_result_font_weight = "{{$info->abnormal_result_font_weight}}";
|
||||
let result_header_id = "{{$info->result_header_id}}";
|
||||
let invoice_template_id = "{{$info->invoice_template_id}}";
|
||||
let is_auto_make_invoice = "{{$info->is_auto_make_invoice}}";
|
||||
|
||||
function generateSlug(text) {
|
||||
return text
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.slice(0, 3)
|
||||
.map(word => word[0])
|
||||
.join('')
|
||||
.toUpperCase().padEnd(3, 'X');
|
||||
}
|
||||
|
||||
|
||||
function showPreview(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-1-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* alternative logo start */
|
||||
|
||||
function showAlternativeLogo(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-2-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alternative-logo-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#alternative-logo-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-logo/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alternative-logo').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-logo/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-2-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
/* alterntive logo end */
|
||||
|
||||
/* default_footer start */
|
||||
|
||||
function showDefaultFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-4-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#default-footer-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#default-footer-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/default-footer/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-default-footer').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/default-footer/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-4-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* default_footer end */
|
||||
|
||||
/* alternative footer start */
|
||||
|
||||
function showAlternativeFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-3-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alternative-footer-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alternative-footer-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-footer/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alternative-footer').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-footer/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-3-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* alternative footer end */
|
||||
|
||||
|
||||
function showPreviewAlterVerifyImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("alter-verify-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alter-verify-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alter-verify-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-verify-sign/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alter-verify-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-verify-sign/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#alter-verify-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/avatar/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function postLabConfigure(attr_code, attr_value) {
|
||||
let url = base_url + '/configure/save';
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
attribute_code : attr_code,
|
||||
attribute_value: attr_value
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function postLabSettingSetter() {
|
||||
let url = base_url + '/save';
|
||||
|
||||
technician_label = $('#technician-label').val()
|
||||
sample_number = $("input[name='sample_number']:checked").attr('data-id')
|
||||
patient_code = $("input[name='patient_number']:checked").attr('data-id')
|
||||
discount_type = $("input[name='discount_type']:checked").attr('data-id')
|
||||
exchange_rate = $('#exchange-rate').val()
|
||||
abnormal_text_color = $('#abnormal-text-color').val()
|
||||
show_result_footer = 1
|
||||
abnormal_result_font_weight = $('input[name="abnormal_result_font_weight"]:checked').attr('data-id')
|
||||
result_header_id = 1 //$('input[name="result_header_id"]:checked').attr('data-id')
|
||||
invoice_template_id = $('input[name="invoice_template_id"]:checked').attr('data-id')
|
||||
is_auto_make_invoice = $('input[name="is_auto_make_invoice"]:checked').attr('data-id')
|
||||
|
||||
if($('#phone-number').val()!='') phone_number = $('#phone-number').val()
|
||||
if($('#email').val()!='') email = $('#email').val()
|
||||
|
||||
currency = $("input[name='currency']:checked").attr('data-id')
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
sample_number : sample_number,
|
||||
patient_code: patient_code,
|
||||
discount_type: discount_type,
|
||||
technician_label: technician_label,
|
||||
phone_number: phone_number,
|
||||
email: email,
|
||||
exchange_rate: exchange_rate,
|
||||
abnormal_text_color: abnormal_text_color,
|
||||
show_result_footer: show_result_footer,
|
||||
abnormal_result_font_weight: abnormal_result_font_weight,
|
||||
result_header_id: result_header_id,
|
||||
currency:currency,
|
||||
invoice_template_id: invoice_template_id,
|
||||
is_auto_make_invoice: is_auto_make_invoice
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** verify label image */
|
||||
|
||||
$('#verify-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/verifies/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function showPreviewVerifyImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("verify-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#verify-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btn-remove-verify-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/verifies/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#verify-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
0
resources/views/layout/breadscrum.blade.php
Normal file
0
resources/views/layout/breadscrum.blade.php
Normal file
204
resources/views/layout/common_script.blade.php
Normal file
204
resources/views/layout/common_script.blade.php
Normal file
@@ -0,0 +1,204 @@
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Commons
|
||||
*/
|
||||
|
||||
// routes url
|
||||
|
||||
let csrf_token = "{{ csrf_token() }}";
|
||||
|
||||
let get_refs_base_url = "{{url('refs')}}";
|
||||
let sample_redir_url = "{{url('sample')}}";
|
||||
let patient_base_url = "{{url('patient')}}";
|
||||
let inventory_base_url = "{{url('inventory')}}";
|
||||
var vaccination_base_url = "{{url('vaccination')}}";
|
||||
var sample_base_url = "{{url('sample')}}";
|
||||
let queue_redir_url = "{{url('queue')}}";
|
||||
|
||||
|
||||
let confirm_delete_record = "{{__('general.confirm_delete_record')}}";
|
||||
let confirm_ok_delete = "{{__('general.confirm_ok_delete')}}";
|
||||
let delete_success = "{{__('general.delete_success')}}";
|
||||
let delete_failed = "{{__('general.delete_failed')}}";
|
||||
let choose_option = "{{__('general.choose_option')}}";
|
||||
let confirm_cancel = "{{__('general.confirm_cancel')}}";
|
||||
|
||||
let confirm_restore_record = "{{__('general.confirm_restore_record')}}";
|
||||
let confirm_ok_restore = "{{__('general.confirm_ok_restore')}}";
|
||||
let confirm_cancel_restore = "{{__('general.confirm_cancel_restore')}}";
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/vendor.bundle.base.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/chart.js/Chart.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/off-canvas.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/hoverable-collapse.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/template.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/settings.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/todolist.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/alertify.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/global_funs.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$(".select2, .select2-multiple").select2({
|
||||
placeholder: '{{__('general.select2_tag_placeholder')}}',
|
||||
"language": {
|
||||
"noResults": function(){
|
||||
return "{{__('general.select2_no_result')}}!";
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$(".select2-tags").select2({
|
||||
placeholder: '{{__('general.select2_tag_placeholder')}}',
|
||||
tags:true
|
||||
});
|
||||
|
||||
|
||||
var url = document.location.toString();
|
||||
if (url.match('#')) {
|
||||
$('.nav-tabs a[href="#' + url.split('#')[1] + '-tab"]').tab('show');
|
||||
} //add a suffix
|
||||
|
||||
// Change hash for page-reload
|
||||
$('.nav-tabs a').on('shown.bs.tab', function (e) {
|
||||
window.location.hash = e.target.hash;
|
||||
})
|
||||
|
||||
alertify.set('notifier','position', 'top-right');
|
||||
|
||||
var $loading = $('#loadingDiv').hide();
|
||||
$(document)
|
||||
|
||||
$('form').attr('autocomplete','off')
|
||||
|
||||
.ajaxStart(function () {
|
||||
$loading.fadeIn();
|
||||
})
|
||||
.ajaxStop(function () {
|
||||
$loading.fadeOut()
|
||||
});
|
||||
|
||||
|
||||
function toggleElements(elementShow, elementHide){
|
||||
$(elementHide).toggle()
|
||||
$(elementShow).toggle()
|
||||
}
|
||||
|
||||
function showPreviewSignature(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("signature-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#signature-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#signature-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'user/profile/signature/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {},
|
||||
error: function (xhr, status, error) {}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-signature').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'user/profile/signature/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#signature-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.btn-change-password').click(function () {
|
||||
$.ajax({
|
||||
url: "{{url('user/password/change')}}",
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
current_password : $('#cur-password').val(),
|
||||
new_password: $('#new-password').val(),
|
||||
new_password_confirmation: $('#confirm-password').val()
|
||||
},
|
||||
success:function(res){
|
||||
console.log(res)
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$.ajax({
|
||||
url: "{{ route('alert-notifications') }}",
|
||||
type: "GET",
|
||||
success: function(res){
|
||||
if(res.success){
|
||||
let notify = $('#notify');
|
||||
notify.addClass('rounded-bottom-right-15')
|
||||
notify.addClass('rounded-bottom-left-15')
|
||||
notify.empty();
|
||||
notify.append('<p class="mb-0 font-weight-normal font-13 float-left dropdown-header text-muted" style="margin-right: 150px">{{__('general.notification')}}</p>');
|
||||
res.data.forEach(function(appointment){
|
||||
notify.append('<a class="dropdown-item preview-item app-modal" data-info="Patient: '+appointment.patient.name_en+', Phone: '+appointment.patient.phone_number+', Description: '+appointment.description+', Date: '+appointment.appointment_date+', Doctor: '+appointment.doctor.name_en+', Ap-Type: ' + appointment.appointment_type+'" href="#"><span class="mdi mdi-bell-outline fa"></span><div class="preview-item-content flex-grow"><p class="font-weight-light small-text text-success mb-0">'+appointment.patient.name_en+' - '+appointment.appointment_date+'</p></div></a>');
|
||||
})
|
||||
}
|
||||
$('#app_notify').text(res.count > 0 ? res.count : '').toggleClass('d-none', res.count < 1);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="modal" id="appointment-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">{{__('general.notification')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="confirmation-modal-body">
|
||||
<h5 class="text-muted font-14">{{__('appointment.date')}} : <span id="modal-appointment-date" class="text-dark pull-right"></span></h5>
|
||||
<h5 class="text-muted font-14">{{__('appointment.patient')}} : <span id="modal-patient-name" class="text-dark pull-right"></span></h5>
|
||||
<h5 class="text-muted font-14">{{__('patient.table_phon')}} : <span id="modal-patient-phone" class="text-dark pull-right"></span></h5>
|
||||
<h5 class="text-muted font-14">{{__('appointment.type')}} : <span id="modal-ap-type" class="text-dark pull-right"></span></h5>
|
||||
<h5 class="text-muted font-14">{{__('appointment.doctor')}} : <span id="modal-doctor-name" class="text-dark pull-right"></span></h5>
|
||||
<h5 class="text-muted font-14">{{__('appointment.description')}} <br><br> <span id="modal-description" class="text-dark"></span></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).on('click', '.app-modal', function(e){
|
||||
e.preventDefault();
|
||||
let info = $(this).data('info');
|
||||
let infoArr = info.split(', ');
|
||||
$('#modal-patient-name').text(infoArr[0].split(': ')[1]);
|
||||
$('#modal-patient-phone').text(infoArr[1].split(': ')[1]);
|
||||
$('#modal-description').text(infoArr[2].split(': ')[1]);
|
||||
$('#modal-appointment-date').text(infoArr[3].split(': ')[1]);
|
||||
$('#modal-doctor-name').text(infoArr[4].split(': ')[1]);
|
||||
$('#modal-ap-type').text(infoArr[5].split(': ')[1]);
|
||||
$('#appointment-modal').modal('show');
|
||||
});
|
||||
</script>
|
||||
10
resources/views/layout/footer.blade.php
Normal file
10
resources/views/layout/footer.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
<footer class="footer position-fixed w-100" style="bottom: 0; /*width: calc(100% - 236px);*/ z-index: 2;">
|
||||
<div class="card border-0" style="background-color: #29c6ff0f !important; border-top: 1px solid #c0dfe9 !important;">
|
||||
<div class="card-body py-2">
|
||||
<div class="d-sm-flex justify-content-right justify-content-sm-between_ text-center">
|
||||
<span class="text-center text-sm-left d-block d-sm-inline-block">{{__('© '.date('Y').' ' . env('APP_NAME'))}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
53
resources/views/layout/header.blade.php
Normal file
53
resources/views/layout/header.blade.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{env('APP_TITLE', 'Laboratory Information System')}}</title>
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/typicons/typicons.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/overwrite.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url(env("APP_URL").'storage/assets/images/favicon.png') }}" />
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/mdi/css/materialdesignicons.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/font-awesome/css/font-awesome.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/css/alertify.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/overwrite.select2.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/scrollbars.css')}}">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css"/>
|
||||
|
||||
{{-- <link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&family=Khmer&family=Moul&display=swap" rel="stylesheet"> --}}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/layout_'.App::currentLocale().'.css')}}">
|
||||
|
||||
<style>
|
||||
body, ul, li, a, table, td, th, button, select, input, textarea {
|
||||
@if ( Config::get('app.locale') == 'kh')
|
||||
font-family: "Kantumruy Pro", sans-serif;
|
||||
@endif
|
||||
}
|
||||
|
||||
.font-14, .form-group label {
|
||||
font-size: {{ Config::get('app.locale') == 'kh' ? '1.1rem' : '14px' }} !important;
|
||||
}
|
||||
.form-control, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--single .select2-search__field, .typeahead, .tt-query, .tt-hint {
|
||||
font-size: {{ Config::get('app.locale') == 'kh' ? '1rem' : '14px' }} !important;
|
||||
}
|
||||
.nav .menu-icon {
|
||||
color: #12931d !important;
|
||||
}
|
||||
.dropdown-item p{
|
||||
font-size: {{ Config::get('app.locale') == 'kh' ? '1.1rem' : '0.875rem' }} !important;
|
||||
}
|
||||
.select2-container--default .select2-dropdown {
|
||||
font-size: {{ Config::get('app.locale') == 'kh' ? '1.1rem' : '0.875rem' }} !important;
|
||||
}
|
||||
</style>
|
||||
18
resources/views/layout/loading.blade.php
Normal file
18
resources/views/layout/loading.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div id="loadingDiv">
|
||||
|
||||
{{-- <div class="spinner-border" role="status">--}}
|
||||
{{-- <span class="visually-hidden"></span>--}}
|
||||
{{-- </div>--}}
|
||||
|
||||
<div class="">
|
||||
<div class="bar-loader">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
129
resources/views/layout/navbar.blade.php
Normal file
129
resources/views/layout/navbar.blade.php
Normal file
@@ -0,0 +1,129 @@
|
||||
|
||||
@php
|
||||
$current_locale= App::currentLocale();
|
||||
$baseLab = (array) Session::get('base_lab');
|
||||
$labName = $baseLab['name_'.$current_locale];
|
||||
@endphp
|
||||
|
||||
<nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
|
||||
<div class="navbar-brand-wrapper d-flex justify-content-center">
|
||||
<div class="navbar-brand-inner-wrapper d-flex justify-content-between align-items-center w-100">
|
||||
<a class="navbar-brand brand-logo" href="javascript:void(0)"><img style="width: 100% !important;" src="{{ url(env("APP_URL").'storage/assets/images/logo.png') }}" alt="logo"/></a>
|
||||
<a class="navbar-brand brand-logo-mini pl-3" href="javascript:void(0)"><img style="width: 65px !important; height: 65px !important;" src="{{url(env("APP_URL").'storage/assets/images/logo-mini.png')}}" alt="logo"/></a>
|
||||
<button class="navbar-toggler text-success navbar-toggler align-self-center" type="button" data-toggle="minimize" style="/*position: absolute; left: 14.5rem; color: #fff !important;*/">
|
||||
<span class="mdi mdi-backburger text-success position-absolute" style="font-size: 20pt; top: 20px; background: #fff; margin-left: 5px; padding: 3px;"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-menu-wrapper d-flex align-items-center justify-content-end">
|
||||
|
||||
<ul class="navbar-nav text-white mr-lg-2 d-none">
|
||||
|
||||
<li class="nav-item nav-profile dropdown">
|
||||
<a class="nav-link" href="#" data-toggle="dropdown" id="profileDropdown">
|
||||
<span class="nav-profile-name" style="font-size:20px !important; font-weight: 600; ">{{$labName}}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav text-white navbar-nav-right">
|
||||
|
||||
<li class="nav-item dropdown show pl-0 ml-0 rounded-bottom-left-15 rounded-bottom-right-15">
|
||||
<a class="nav-link count-indicator dropdown-toggle d-flex justify-content-center align-items-center rounded-0 shadow-none " id="messageDropdown" href="#" data-toggle="dropdown" aria-expanded="true">
|
||||
<i class="mdi mdi mdi-bell mx-0"></i>
|
||||
<span class="badge rounded-25 badge-danger" style="margin-left: -10px; margin-top: -15px; border: 1px solid #404040;" id="app_notify"></span>
|
||||
<span class="count {{count($sharedMessage)<1 ? 'd-none':''}}" style="top: 6px !important; width: 15px!important; height: 15px!important; font-size: 9px!important;">{{count($sharedMessage)}}</span>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list" aria-labelledby="messageDropdown" id="notify"></div>
|
||||
</li>
|
||||
<li class="nav-item dropdown show pl-0 ml-0 rounded-0">
|
||||
<a style="padding-left: 9px !important; padding-right: 9px !important;" class="nav-link count-indicator dropdown-toggle d-flex justify-content-center align-items-center rounded-0" id="messageDropdown" href="#" data-toggle="dropdown" aria-expanded="true">
|
||||
<i class="fi fi-{{$current_locale=='en'?'gb':$current_locale}} flag-icon-squared mx-0 rounded-25 "></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list rounded-bottom-left-15 rounded-bottom-right-15" aria-labelledby="messageDropdown">
|
||||
@include('partials/language_switcher')
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown rounded-0 show pl-0 ml-0">
|
||||
<a class="nav-link count-indicator dropdown-toggle d-flex justify-content-center align-items-center rounded-0 shadow-none" id="messageDropdown" href="#" data-toggle="dropdown" aria-expanded="true">
|
||||
<i class="mdi mdi-account-circle position-absolute"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list rounded-bottom-left-15 rounded-bottom-right-15" aria-labelledby="messageDropdown">
|
||||
<a class="dropdown-item preview-item" href="{{url('my-profile')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-account-circle fa"></i> {{ __('general.profile') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@if(count(Auth::user()->lab_covers)!=1)
|
||||
<a class="dropdown-item preview-item" href="{{route('base.change')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-swap-horizontal fa"></i> {{ __('laboratory.change_base') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
<a class="dropdown-item preview-item" href="{{route('logout')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-logout fa"></i> {{ __('general.logout') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown rounded-0 show pl-0 ml-0">
|
||||
<a class="nav-link count-indicator dropdown-toggle d-flex justify-content-center align-items-center rounded-0 shadow-none" id="messageDropdown" href="#" data-toggle="dropdown" aria-expanded="true">
|
||||
<i class="mdi mdi-apps position-absolute"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list rounded-bottom-right-15 rounded-bottom-left-15" aria-labelledby="messageDropdown">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<a class="dropdown-item preview-item" href="{{url('laboratory-profile')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-hospital-building fa"></i> {{__('laboratory.info')}}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_user_account','create_user_account','update_user_account', 'delete_user_account']))
|
||||
<a class="dropdown-item preview-item" href="{{ route('user') }}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-account-group fa"></i> {{ __('general.manage_user_accounts') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_user_role','create_user_role','update_user_role', 'delete_user_role']))
|
||||
<a class="dropdown-item preview-item" href="{{route('role')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-account-key fa"></i> {{ __('general.manage_user_roles') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['system_settings']))
|
||||
<a class="dropdown-item preview-item" href="{{url('laboratory')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="fa fa-cog fa"></i> {{ __('general.laboratory_settings') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_audit_logs']))
|
||||
<a class="dropdown-item preview-item" href="{{url('activity-logs')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-history fa"></i> {{ __('general.activity_logs') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
|
||||
<span class="mdi mdi-backburger text-white"></span>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
91
resources/views/layout/sidebar.blade.php
Normal file
91
resources/views/layout/sidebar.blade.php
Normal file
@@ -0,0 +1,91 @@
|
||||
@include('layout/loading')
|
||||
<nav class="sidebar sidebar-offcanvas" id="sidebar">
|
||||
<ul class="nav">
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_dashboard']))
|
||||
<li class="nav-item {{ request()->is('dashboard') ? 'active' : '' }}">
|
||||
<a class="nav-link" href="{{ route('homepage') }}">
|
||||
<i class="mdi mdi-ballot menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">{{ __('sidebar.dashboard') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_patient']))
|
||||
<li class="nav-item {{ request()->segment(1) == 'patient' ? 'active' : '' }}">
|
||||
<a class="nav-link" href="{{ route('patient') }}">
|
||||
<i class="mdi mdi-clipboard-account menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">{{ __('sidebar.patients') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_sample','create_sample']))
|
||||
<li class="nav-item {{ request()->segment(1) == 'sample' ? 'active' : '' }}">
|
||||
<a class="nav-link" data-toggle="collapse" href="#samples" aria-expanded="false" aria-controls="laboratory">
|
||||
<i class="mdi mdi-account-child-circle menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">គ្រប់គ្រង Aliquots</span>
|
||||
<i class="menu-arrow"></i>
|
||||
</a>
|
||||
<div class="collapse {{ in_array(request()->segment(1), ['sample']) ? 'show' : '' }}" id="samples">
|
||||
<ul class="nav flex-column sub-menu">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(1) == 'sample' && request()->segment(2)=='new') ? 'active' : '' }}" href="{{url('sample/new')}}">{{ __('sidebar.new_sample') }}</a></li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_sample']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(1) == 'sample' && (request()->segment(2)=='search' || request()->segment(2)=='')) ? 'active' : '' }}" href="{{url('sample/search?kword=&sample_date=today')}}">{{ __('sidebar.view_sample') }}</a></li>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_doctor_report','generate_summary_report', 'generate_financial_report']))
|
||||
<li class="nav-item {{ request()->segment(1) == 'report' ? 'active' : '' }}">
|
||||
<a class="nav-link" data-toggle="collapse" href="#reports" aria-expanded="false" aria-controls="reports">
|
||||
<i class="mdi mdi-chart-bar-stacked menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">{{ __('sidebar.report') }}</span>
|
||||
<i class="menu-arrow"></i>
|
||||
</a>
|
||||
<div class="collapse {{ in_array(request()->segment(1), ['report']) ? 'show' : '' }}" id="reports">
|
||||
<ul class="nav flex-column sub-menu">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_summary_report']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(2) == 'summary-report') ? 'active' : '' }}" href="{{ url('report/summary-report') }}">{{ __('sidebar.aggregate_report') }}</a></li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_doctor_report']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(2) == 'doctor-report') ? 'active' : '' }}" href="{{ url('report/doctor-report') }}">{{ __('sidebar.doctor_report') }}</a></li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_financial_report']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(2) == 'financial-report') ? 'active' : '' }}" href="{{ url('report/financial-report') }}">{{ __('sidebar.financial_report') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li class="nav-item {{ in_array(request()->segment(1), ['laboratory-profile', 'department', 'sample-type', 'test', 'comment', 'organism', 'antibiotic', 'quantity', 'sample-source', 'patient-type', 'physician', 'lab-users']) ? 'active' : '' }}">
|
||||
<a class="nav-link" data-toggle="collapse" href="#lab-manager" aria-expanded="false" aria-controls="lab_manager">
|
||||
<i class="fa fa-folder-open-o menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">គ្រប់គ្រងសម្ភារៈ</span>
|
||||
<i class="menu-arrow"></i>
|
||||
</a>
|
||||
<div class="collapse {{ in_array(request()->segment(1), ['laboratory-profile', 'department', 'sample-type', 'test', 'comment', 'organism', 'antibiotic', 'quantity', 'sample-source', 'patient-type', 'physician', 'lab-users']) ? 'show' : '' }}" id="lab-manager">
|
||||
<ul class="nav flex-column sub-menu">
|
||||
<li class="nav-item"> <a class="nav-link" href="">បន្ទប់</a></li>
|
||||
<li class="nav-item"> <a class="nav-link" href="">ទូរបង្កក</a></li>
|
||||
<li class="nav-item"> <a class="nav-link" href="">ប្រភេទសារពាង្គកាយ/មេរោគ</a></li>
|
||||
<li class="nav-item"> <a class="nav-link" href="">ប្រភេទសំណាក</a></li>
|
||||
<li class="nav-item"> <a class="nav-link" href="">ប្រភពសំណាក</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item {{ request()->is('my-profile') ? 'active' : '' }}">
|
||||
<a class="nav-link" href="{{ url('my-profile') }}">
|
||||
<i class="mdi mdi-account-circle menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">{{ __('general.profile') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
36
resources/views/layouts/app.blade.php
Normal file
36
resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
{{-- <!-- Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap"> --}}
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
</head>
|
||||
<body class="font-sans antialiased">
|
||||
<div class="min-h-screen bg-gray-100">
|
||||
@include('layouts.navigation')
|
||||
|
||||
<!-- Page Heading -->
|
||||
<header class="bg-white shadow">
|
||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
||||
{{ $header }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Page Content -->
|
||||
<main>
|
||||
{{ $slot }}
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
24
resources/views/layouts/guest.blade.php
Normal file
24
resources/views/layouts/guest.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="font-sans text-gray-900 antialiased">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
92
resources/views/layouts/navigation.blade.php
Normal file
92
resources/views/layouts/navigation.blade.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<nav x-data="{ open: false }" class="bg-white border-b border-gray-100">
|
||||
<!-- Primary Navigation Menu -->
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between h-16">
|
||||
<div class="flex">
|
||||
<!-- Logo -->
|
||||
<div class="shrink-0 flex items-center">
|
||||
<a href="{{ route('dashboard') }}">
|
||||
<x-application-logo class="block h-10 w-auto fill-current text-gray-600" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Navigation Links -->
|
||||
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
|
||||
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||
{{ __('Dashboard') }}
|
||||
</x-nav-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Settings Dropdown -->
|
||||
<div class="hidden sm:flex sm:items-center sm:ml-6">
|
||||
<x-dropdown align="right" width="48">
|
||||
<x-slot name="trigger">
|
||||
<button class="flex items-center text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out">
|
||||
<div>{{ Auth::user()->name }}</div>
|
||||
|
||||
<div class="ml-1">
|
||||
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<!-- Authentication -->
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
|
||||
<x-dropdown-link :href="route('logout')"
|
||||
onclick="event.preventDefault();
|
||||
this.closest('form').submit();">
|
||||
{{ __('Log Out') }}
|
||||
</x-dropdown-link>
|
||||
</form>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
</div>
|
||||
|
||||
<!-- Hamburger -->
|
||||
<div class="-mr-2 flex items-center sm:hidden">
|
||||
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out">
|
||||
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
|
||||
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
||||
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Responsive Navigation Menu -->
|
||||
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
|
||||
<div class="pt-2 pb-3 space-y-1">
|
||||
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||
{{ __('Dashboard') }}
|
||||
</x-responsive-nav-link>
|
||||
</div>
|
||||
|
||||
<!-- Responsive Settings Options -->
|
||||
<div class="pt-4 pb-1 border-t border-gray-200">
|
||||
<div class="px-4">
|
||||
<div class="font-medium text-base text-gray-800">{{ Auth::user()->name }}</div>
|
||||
<div class="font-medium text-sm text-gray-500">{{ Auth::user()->email }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 space-y-1">
|
||||
<!-- Authentication -->
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
|
||||
<x-responsive-nav-link :href="route('logout')"
|
||||
onclick="event.preventDefault();
|
||||
this.closest('form').submit();">
|
||||
{{ __('Log Out') }}
|
||||
</x-responsive-nav-link>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
151
resources/views/login.blade.php
Normal file
151
resources/views/login.blade.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{{ config('app.name', 'doctora') }}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url(env("APP_URL").'storage/assets/images/favicon.png') }}" />
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&family=Khmer&family=Moul&display=swap" rel="stylesheet">
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: url("{{ url(env("APP_URL").'storage/assets/images/bg-login.png') }}") center right;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
@if ( Config::get('app.locale') == 'kh')
|
||||
font-family: "Kantumruy Pro", sans-serif;
|
||||
@endif
|
||||
|
||||
}
|
||||
|
||||
.kantumruy-pro {
|
||||
font-family: "Kantumruy Pro", sans-serif;
|
||||
font-optical-sizing: auto;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.container-box {
|
||||
background: #37ff761c;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.24);
|
||||
max-width: 512px;
|
||||
}
|
||||
.container{
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
.left-panel {
|
||||
background: url("{{ url(env("APP_URL").'storage/assets/images/bg-cover.jpg') }}") no-repeat;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
color: gray;
|
||||
/* min-height: 300px; */
|
||||
}
|
||||
.overlay {
|
||||
position: absolute;
|
||||
background-color: rgba(255, 255, 255, 0.45);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.left-panel .text {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 30px;
|
||||
color: #b71c1c;
|
||||
}
|
||||
.left-panel .text h2 {
|
||||
font-family: 'Brush Script MT', cursive;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login-panel {
|
||||
padding: 20px;
|
||||
}
|
||||
.login-panel h2 {
|
||||
color: #2196f3;
|
||||
font-weight: bold;
|
||||
}
|
||||
.social-buttons img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.footer-icons {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
font-size: 30px;
|
||||
}
|
||||
.footer-icons img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.dropdown-menu.show{
|
||||
left: -45px !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
.form-label{
|
||||
font-size: 18px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="lang position-absolute" style="right: 50px; top: 20px; z-index: 999999;">
|
||||
<div class="dropdown float-right" style="font-size: 10px">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle d-flex align-items-center rounded-0 border-0" type="button" id="dropdownMenuSizeButton3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="material-icons text-black-50 " style="font-size: 17px !important;"><i class="bi bi-translate"></i> {{ App::getLocale()=='kh' ? 'ភាសាខ្មែរ' : 'English' }}</span>
|
||||
</button>
|
||||
<div class="dropdown-menu mr-5" aria-labelledby="dropdownMenuSizeButton3">
|
||||
@include('partials/language_switcher')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container container-box" style="border: 1px solid #dcdef1 !important; box-shadow: none !important;">
|
||||
<div class="row g-0">
|
||||
<div class="col-md-12 login-panel">
|
||||
<div class="text-center mb-4">
|
||||
<img style="width: 45% !important;" src="{{url(env("APP_URL").'storage/assets/images/logo-dark.png')}}" alt="logo">
|
||||
<h6 class="font-weight-light text-white" style="line-height: 25px; font-size: 20px;">{{__('login.sign_in_to_continue')}}</h6>
|
||||
<!-- Validation Errors -->
|
||||
<x-auth-validation-errors class="mb-1" :errors="$errors" />
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('login') }}" class="pt-3">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-white">{{ __('login.email') }} <span style="color:red">*</span></label>
|
||||
<input type="email" class="form-control form-control-lg rounded bg-transparent" name="email" placeholder="{{ __('login.email') }}"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-white">{{__('login.password')}} <span style="color:red">*</span></label>
|
||||
<input type="password" name="password" class="form-control form-control-lg bg-transparent rounded" placeholder="{{__('login.password')}}"/>
|
||||
</div>
|
||||
<div class="d-grid my-5">
|
||||
<button type="submit" class="btn btn-lg" style="background: #08c74d !important; color: #fff;"> {{ __('login.sign_in') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/vendor.bundle.base.js')}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
289
resources/views/medicine.blade.php
Normal file
289
resources/views/medicine.blade.php
Normal file
@@ -0,0 +1,289 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.medicine')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/medicine/search')}}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Medical item name')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-item" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('Code')}}</th>
|
||||
<th class="py-2">{{__('Medical Item')}}</th>
|
||||
<th class="py-2">{{__('Medical Item Group')}}</th>
|
||||
<th class="py-2">{{__('Unit Price')}}</th>
|
||||
<th class="py-2">{{__('Sale Price')}}</th>
|
||||
{{-- <th class="py-2" width="100px">{{__('Is Vaccination')}}</th>--}}
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineItems as $k=>$medicineItem)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineItem->id}}" data-toggle="modal" data-target="#modal-medicine-item" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($medicineItem->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$medicineItem->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineItem->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineItem->code}}</td>
|
||||
<td class="py-1">{{$medicineItem->medicine->name}}</td>
|
||||
<td class="py-1">{{@$medicineItem->medicineGroup->name_en}}</td>
|
||||
<td class="py-1">{{$medicineItem->unit_price}}</td>
|
||||
<td class="py-1">{{$medicineItem->sale_price}}</td>
|
||||
{{-- <td class="py-1 text-center"><i class="mdi {{$medicineItem->is_vaccination == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline_'}}"></i></td>--}}
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineItem->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineItems->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-item">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Supplier')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="lab-name-en">{{__('Medical Item')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control rounded-0 select2" name="medicine_id" id="medicine-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($medicines as $medicine)
|
||||
<option value="{{$medicine->id}}">{{$medicine->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine']))
|
||||
<button class="btn btn-sm btn-inverse-warning px-3" type="button" onclick="editMedicine()"><i class="mdi mdi-table-edit"></i> </button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine']))
|
||||
<button class="btn btn-sm rounded-0 btn-inverse-info px-3" type="button" onclick="addNewMedicine('medicine-id')"><i class="typcn typcn-plus"></i> </button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.code')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="medicine_code" id="medicine-code" placeholder="{{__('test_sample.code')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Medical Item Group')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" name="medicine_group_id" id="medicine-group-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($medicineGroups as $medicineGroup)
|
||||
<option value="{{$medicineGroup->id}}">{{$medicineGroup->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Description')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="dosage" id="dosage" placeholder="{{__('Description or dosage in case item is medicine')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Unit Price')}}</label>
|
||||
<input type="number" class="form-control rounded-0" name="unit_price" id="unit-price" placeholder="{{__('Unit Price')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Sale Price')}}</label>
|
||||
<input type="number" class="form-control rounded-0" name="sale_price" id="sale-price" placeholder="{{__('Sale Price')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-check form-check-flat form-check-primary mb-1 mt-1">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" data-id="1" class="checkbox" value="1" name="is_vaccination" id="is-vaccination"> {{__('Is Vaccination')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/medicine/save')}}";
|
||||
var update_url = "{{url('inventory/medicine/update')}}";
|
||||
var delete_url = "{{url('inventory/medicine/delete')}}";
|
||||
var restore_url = "{{url('inventory/medicine/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/medicine/get')}}";
|
||||
|
||||
var medicine_base_url = "{{url('inventory/ref-medicine')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Medical Item')}}";
|
||||
let modal_edit_title = "{{__('Edit Medical Item')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine.js')}}"></script>
|
||||
|
||||
<script>
|
||||
function editMedicine(){
|
||||
let selectedOption = $('#medicine-id option:selected');
|
||||
let selectedText = selectedOption.text();
|
||||
let selectedVal = selectedOption.val();
|
||||
if(selectedVal>0){
|
||||
editMedicineName(selectedVal, selectedText, 'medicine-id')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
204
resources/views/medicine_group.blade.php
Normal file
204
resources/views/medicine_group.blade.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Medical Item Group')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/medicine-group/search')}}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Medical item group name...')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine_group']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-group" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('Medical Item Group')}}</th>
|
||||
{{-- <th class="py-2" width="100px">{{__('Is Vaccination')}}</th>--}}
|
||||
<th class="py-2" width="500px">{{__('Description')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineGroups as $k=>$medicineGroup)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine_group']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineGroup->id}}" data-toggle="modal" data-target="#modal-medicine-group" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($medicineGroup->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$medicineGroup->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine_group']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineGroup->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineGroup->name_en}}</td>
|
||||
{{-- <td class="py-1 text-center"><i class="mdi {{$medicineGroup->is_gvaccination == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline_'}}"></i></td>--}}
|
||||
<td class="py-1">{{$medicineGroup->description}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineGroup->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineGroups->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-group">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Medical Item Group')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Medical Item Group')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('Medical item group name...')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-check form-check-flat form-check-primary mb-1 mt-1 d-none">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" data-id="1" class="checkbox" value="1" name="is_vaccination" id="is-vaccination"> {{__('Is Vaccination')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="label-description">{{__('Description')}} <span class="text-danger"></span></label>
|
||||
<textarea id="description" rows="8" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/medicine-group/save')}}";
|
||||
var update_url = "{{url('inventory/medicine-group/update')}}";
|
||||
var delete_url = "{{url('inventory/medicine-group/delete')}}";
|
||||
var restore_url = "{{url('inventory/medicine-group/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/medicine-group/get')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Medical Item Group')}}";
|
||||
let modal_edit_title = "{{__('Edit Medical Item Group')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine_group.js')}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
193
resources/views/medicine_unit.blade.php
Normal file
193
resources/views/medicine_unit.blade.php
Normal file
@@ -0,0 +1,193 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Medical Item Unit')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/medicine-unit/search')}}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Medical item unit name')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine_unit']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-unit" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="150px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('Medical Item Unit Name')}}</th>
|
||||
<th class="py-2" width="300px">{{__('Packaged Item')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineUnits as $k=>$medicineUnit)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine_unit']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineUnit->id}}" data-toggle="modal" data-target="#modal-medicine-unit" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($medicineUnit->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$medicineUnit->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine_unit']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineUnit->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineUnit->name_en}}</td>
|
||||
<td class="py-1">{{$medicineUnit->unit_packing}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineUnit->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineUnits->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-unit">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Medicine Unit')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Medicine Unit Name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('Medicine Unit Name')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="label-description">{{__('Unit Packing')}} <span class="text-danger"></span></label>
|
||||
<input type="number" value="1" step="0.5" class="form-control" name="unit_packing" id="unit-packing" placeholder="{{__('Unit Packing')}}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/medicine-unit/save')}}";
|
||||
var update_url = "{{url('inventory/medicine-unit/update')}}";
|
||||
var delete_url = "{{url('inventory/medicine-unit/delete')}}";
|
||||
var restore_url = "{{url('inventory/medicine-unit/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/medicine-unit/get')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Medical Item Unit')}}";
|
||||
let modal_edit_title = "{{__('Edit Medical Item Unit')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine_unit.js')}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
91
resources/views/modal/appointment.blade.php
Normal file
91
resources/views/modal/appointment.blade.php
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
<div class="modal fade modal-primary" id="modal-appointment">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('sidebar.appointment')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form-save-patient-appointment" onkeydown="return (event.key != 'Enter' || (event.target.matches('textarea')));">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
@if(!in_array(request()->segment(1), ['sample']))
|
||||
<div class="form-group" style="margin-bottom: 1.5rem !important;">
|
||||
<label for="lab-code" class="control-label">{{__('appointment.patient')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" required name="patient_id" id="patient-id" style=" width: 100% !important;">
|
||||
<option value=""></option>
|
||||
@foreach($patients as $patient)
|
||||
<option {{$patient_id == $patient->id ? 'selected':''}} value="{{$patient->id}}">{{($patient->patient_uuid . ' - ' . $patient->name_en) . ((!empty($patient->phone_number) ? ' - '.$patient->phone_number: ''))}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('appointment.duration')}}</label>
|
||||
<input type="number" name="duration" class="form-control" id="duration" value="" onchange="cal_apointment_date(this.value)">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('appointment.date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" name="appointment_date" class="form-control" onchange="getDateDiff(this.value)" id="appointment_date" value="{{date('Y-m-d\TH:i:s')}}">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('appointment.type')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2-tags rounded-0 border-light" name="appointment_type" id="appointment_type" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($conceptCodes as $conceptCode)
|
||||
<option value="{{$conceptCode->appointment_type}}">{{$conceptCode->appointment_type}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('appointment.doctor')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2_ rounded-0 border-light" name="doctor_id" id="doctor_id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($physicians as $doctor)
|
||||
<option value="{{$doctor->id}}">{{$doctor->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('appointment.description')}} <span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" style="line-height:15px" name="description" id="description" rows="2"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSaveAppointment"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function cal_apointment_date(dur) {
|
||||
var ap_date = new Date();
|
||||
console.log(new Date(ap_date.setDate(ap_date.getDate() + parseInt(dur))))
|
||||
ap_date.setMinutes(ap_date.getMinutes() - ap_date.getTimezoneOffset());
|
||||
$("#appointment_date").val(new Date(ap_date).toISOString().slice(0,16));
|
||||
}
|
||||
|
||||
function getDateDiff(appDate){
|
||||
var d1 = new Date(); //"now"
|
||||
var d2 = new Date(appDate); // some date
|
||||
var diff = Math.abs(d1-d2); // difference in milliseconds
|
||||
console.log(diff)
|
||||
$('#duration').val(Math.round(diff/86400000))
|
||||
}
|
||||
|
||||
</script>
|
||||
108
resources/views/modal/assign_test.blade.php
Normal file
108
resources/views/modal/assign_test.blade.php
Normal file
@@ -0,0 +1,108 @@
|
||||
|
||||
<!-- Modal Assign Test -->
|
||||
<div class="modal fade modal-primary" id="modal-assign-test">
|
||||
<div class="modal-dialog modal-xxl">
|
||||
<div class="modal-content vh-100__" style="height:calc(100vh - 80px)">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('sample.assign_test_modal_title')}}</h6>
|
||||
<span class="pl-3 text-muted font-13 text-uppercase">{{__('sample.form_sample_number')}}: <b class="pl-1 sample-number text-info">-</b></span>
|
||||
<span class="pl-3 text-muted text-uppercase">{{__('sample.form_patient_name')}}: <b class="pl-1 patient-name text-info">-</b></span>
|
||||
<span class="pl-4 text-muted text-uppercase">{{__('sample.form_patient_code')}}: <b class="pl-1 patient-code text-info">-</b></span>
|
||||
<span class="pl-3 text-muted text-uppercase">{{__('sample.physician_name')}}: <b class="pl-1 sample-source text-info">-</b></span>
|
||||
|
||||
|
||||
<div class="col-sm-2 autocomplete p-0 float-right">
|
||||
<div class=" input-group">
|
||||
<input type="text" id="mySearchTest" placeholder="{{__('sample.assign_test_modal_title')}}" class="form-control rounded-0 form-control-sm">
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-sm btn-white"><i class="mdi mdi-checkbox-marked-outline"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" style="margin-left: 20px !important;" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white" style="padding-top: 5px !important;">
|
||||
<div class="row mt-0">
|
||||
<div class="col-sm-12" id="test-group-slot">
|
||||
@foreach($testGroups as $group)
|
||||
<div class="btn-group btn-xs mr-2" id="tsg-{{$group->id}}" role="group">
|
||||
<button onclick="useTemplate({{$group->id}})" class="btn btn-xs rounded-right-0 rounded-top-left-25 rounded-bottom-left-25 btn-light rounded-0 my-1" type="button">{{$group->group_name}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_test_group']))
|
||||
<button onclick="deleteGroupTemplate({{$group->id}})" type="button" title="Delete group tests" class="btn rounded-left-0 btn-xs rounded-bottom-right-25 rounded-top-right-25 btn-light my-1">
|
||||
<i class="mdi mdi-close"></i>
|
||||
</button>
|
||||
@else
|
||||
<button type="button" disabled title="Delete group tests" class="btn rounded-left-0 btn-xs rounded-bottom-right-25 rounded-top-right-25 btn-light my-1">
|
||||
<i class="mdi mdi-close"></i>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
<button onclick="clearAllSelection()" type="button" class="btn btn-xs btn-inverse-warning rounded-25 float-right">
|
||||
{{__('sample.clear_selection')}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="form-assign-test" class="mb-5">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="sample_id" id="sample-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row" id="test-item-list"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row footer_fixed">
|
||||
<div class="col-sm-12 " >
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
@if(!isset($sample->invoice))
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_invoice']))
|
||||
@if(isset($sample))
|
||||
<button type="button" class="btn btn-inverse-info rounded-25 ml-5 mr-2" data-toggle="modal" id="btnShowInvoice" data-target="#modal-invoice" data-backdrop="static"><i class="typcn typcn-plus"></i> <span class="save">{{__('sample.assign_test_make_invoice')}}</span></button>
|
||||
@else
|
||||
<button type="button" class="btn btn-inverse-info rounded-25 mr-2" onclick="redirectMakeInvoice()" ><span class="save" > <i class="typcn typcn-plus"></i> {{__('sample.assign_test_make_invoice')}}</span></button>
|
||||
@endif
|
||||
@endif
|
||||
@else
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_invoice','update_invoice']))
|
||||
<a href="{{url('invoice/edit/'.$sample->invoice->id)}}" class="btn btn-inverse-info rounded-25 mr-2"><span class="save" >{{__('invoice.form_edit_title')}}</span></a>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_test_group']))
|
||||
<button onclick="saveTestGroup()" class="btn btn-inverse-info rounded-25 px-3 " type="button"><i class="typcn typcn-plus"></i> {{__('sample.assign_test_save_template')}}</button>
|
||||
@endif
|
||||
|
||||
<span class="pl-3">{{__('sample.assign_test_total_test')}} : <b id="total-test">0</b></span>
|
||||
<span class="pl-3">{{__('sample.assign_test_total_fee_text')}} : <b id="total-test-payment">$ 0.00</b></span>
|
||||
<span class="pl-3">{{__('អត្រាប្តូរប្រាក់')}} : <b id="exchange_rate">{{$labSettings->exchange_rate}}</b></span>
|
||||
</div>
|
||||
<div class="col-lg-6 text-right pr-4">
|
||||
@if(isset($sample))
|
||||
<button type="button" class="btn btn-inverse-info mr-2 rounded-25" id="print-label" data-toggle="modal" data-target="#print_sample_label_modal" data-backdrop="static"><span class="update" ><i class="mdi mdi-printer"></i> {{__('sample.print_label')}}</span></button>
|
||||
@else
|
||||
<button type="button" class="btn btn-inverse-info mr-2 rounded-25" onclick="redirectPrintLabel()" ><span class="update" ><i class="mdi mdi-printer"></i> {{__('sample.print_label')}}</span></button>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_sample']))
|
||||
<button type="button" class="btn btn-info rounded-25 mr-2 btnAssignTest" id="save-assign-test" value="save_test_only"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.assign_test_btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_result','update_result']))
|
||||
<button type="button" class="btn btn-inverse-info rounded-25 mr-2 btnAssignTest save-assign-test-popup-result" data-uri="" value="save_test_and_add_result"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.assign_test_btn_save_add_result')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<a href="{{url('sample/new')}}" class="btn btn-inverse-success rounded-25 mr-2"><i class="fa fa-plus"></i> <span class="save">{{__('sample.form_add_title')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></a>
|
||||
@endif
|
||||
<button type="button" class="btn btn-secondary rounded-25 mr-5" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
326
resources/views/modal/doctor_report_detail_print.blade.php
Normal file
326
resources/views/modal/doctor_report_detail_print.blade.php
Normal file
@@ -0,0 +1,326 @@
|
||||
<div class="modal fade" id="print_preview_modal_detail" style=" padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1-dt', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait" style="width:21cm !important;"><div class="psample-result active" id="presult-1-dt">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{__('Laboratory Total Billing Report')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@if(!empty($printRawByPhysician))
|
||||
@if(date('d/m/Y',strtotime($_GET['start_date']))==date('d/m/Y',strtotime($_GET['end_date'])))
|
||||
<p style="text-align: center">{{__('Date:') . date('d/m/Y',strtotime($_GET['start_date']))}}</p>
|
||||
@else
|
||||
<p style="text-align: center">{{__('From Date:') . date('d/m/Y',strtotime($_GET['start_date'])) . ' To Date: '.date('d/m/Y',strtotime($_GET['end_date']))}}</p>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<!--<td style="padding-left: 10px">No</td>-->
|
||||
<td width="100px" style="padding-left: 10px; text-align:center;">Invoice Date</td>
|
||||
<td width="150px" style="padding-left: 10px;">Patient Name</td>
|
||||
<td style="padding-left: 10px;">Test Name</td>
|
||||
<td width="150px" style="padding-right: 10px;">Total</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i=1;
|
||||
$totalPrice = 0;
|
||||
@endphp
|
||||
@foreach($printRawByPhysician as $row)
|
||||
<tr>
|
||||
<td style="text-align:center;">{{$row['date']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['patient']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['test_name']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@php
|
||||
$totalPrice+=$row['total_net_amount'];
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr><td colspan="4" style="padding-left:20px">Exchange Rate : 1 USD = {{$labSettings->exchange_rate}}</td></tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="2">{{__('TOTAL')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> ($):</b> {{number_format(($totalPrice),2)}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> (៛):</b> {{number_format(($totalPrice * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="2">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($labSettings->is_hide_comission_percentage/100)),2)}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> (៛):</b> {{number_format((($totalPrice*($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="2">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($ownBenefitRate/100)),2)}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> (៛):</b> {{number_format((($totalPrice*($ownBenefitRate/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- @endforeach --}}
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm"></td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Reported By')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">........................ <br>
|
||||
{{date('d-m-Y H:i')}}<br>
|
||||
<!--@if(!empty(Auth::user()->signature))-->
|
||||
<!-- <img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">-->
|
||||
<!--@else-->
|
||||
<!-- <br>-->
|
||||
<!--@endif-->
|
||||
<!--<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
342
resources/views/modal/doctor_report_print.blade.php
Normal file
342
resources/views/modal/doctor_report_print.blade.php
Normal file
@@ -0,0 +1,342 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{__('Laboratory Total Billing Report')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@foreach($printDoctorData as $k=>$v)
|
||||
<br>
|
||||
<p style="text-align: center">{{$v['sample_source']}}</p>
|
||||
@if(date('d/m/Y',strtotime($_GET['start_date']))==date('d/m/Y',strtotime($_GET['end_date'])))
|
||||
<p style="text-align: center">{{__('Date:') . date('d/m/Y',strtotime($_GET['start_date']))}}</p>
|
||||
@else
|
||||
<p style="text-align: center">{{__('From Date:') . date('d/m/Y',strtotime($_GET['start_date'])) . ' To Date: '.date('d/m/Y',strtotime($_GET['end_date']))}}</p>
|
||||
@endif
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td style="padding-left: 10px">No</td>
|
||||
<td style="padding-left: 10px;">Register Date</td>
|
||||
<td style="padding-left: 10px;">Sample Number</td>
|
||||
<td style="padding-left: 10px;">Patient Name</td>
|
||||
<td style="padding-left: 10px;">Sex</td>
|
||||
<td style="padding-left: 10px;">Age</td>
|
||||
<td style="padding-left: 10px;"># Tests</td>
|
||||
<td style="padding-left: 10px;">Total</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i=1;
|
||||
$totalPrice = 0;
|
||||
@endphp
|
||||
@foreach($v['data'] as $row)
|
||||
<tr>
|
||||
<td class="text-center">{{$i++}}</td>
|
||||
<td class="text-center">{{$row['register_date']}}</td>
|
||||
<td class="text-center">{{$row['sample_number']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['patient']}}</td>
|
||||
<td class="text-center px-2">{{$row['gender']}}</td>
|
||||
<td style="padding-left: 5px;">{{$row['age']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_tests']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_price']}}</td>
|
||||
</tr>
|
||||
@php
|
||||
$totalPrice+=$row['total_price'];
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr><td colspan="8" style="padding-left:20px">Exchange Rate : 1 USD = {{$labSettings->exchange_rate}}</td></tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" colspan="4" class="border-0">{{__('TOTAL')}} </td>
|
||||
<td style="text-align: right;" class="bg-light" colspan="2"><b style="float: left"> ($):</b> {{number_format(($totalPrice),2)}} </td>
|
||||
<td style="text-align: right;" colspan="2" class="bg-light"><b style="float: left"> (Riel):</b> {{number_format(($totalPrice * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="4">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light" colspan="2"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($labSettings->is_hide_comission_percentage/100)),2)}} </td>
|
||||
<td style="text-align: right;" colspan="2" class="bg-light"><b style="float: left"> (Riel):</b> {{number_format((($totalPrice*($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="4">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light" colspan="2"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($ownBenefitRate/100)),2)}} </td>
|
||||
<td style="text-align: right;" colspan="2" class="bg-light"><b style="float: left"> (Riel):</b> {{number_format((($totalPrice*($ownBenefitRate/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
{{-- <td style="text-align: right;" class="text-right border-0" colspan="7">{{__('Balance')}} :</td>--}}
|
||||
{{-- <td style="text-align: right;" class="text-right bg-light">$ {{number_format(($totalPrice - ($totalPrice*0.5)) ,2)}}</td>--}}
|
||||
{{-- </tr>--}}
|
||||
|
||||
{{-- <tr>--}}
|
||||
{{-- <td style="text-align: right;" class="text-right border-0" colspan="7">{{__('Balance')}} :</td>--}}
|
||||
{{-- <td style="text-align: right;" class="text-right bg-light">៛ {{number_format((($totalPrice - ($totalPrice*0.5)) * $labSettings->exchange_rate),2)}}</td>--}}
|
||||
{{-- </tr>--}}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@endforeach
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm"></td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Reported By')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">........................ <br>
|
||||
{{date('d-m-Y H:i')}}<br>
|
||||
<!--@if(!empty(Auth::user()->signature))-->
|
||||
<!-- <img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">-->
|
||||
<!--@else-->
|
||||
<!-- <br>-->
|
||||
<!--@endif-->
|
||||
<!--<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
<!-- Modal Add Test Result -->
|
||||
<div class="modal fade modal-primary" id="modal-add-test-result" >
|
||||
<div class="modal-dialog modal-dialog-scrollable m-auto modal-xxl">
|
||||
<div class="modal-content vh-100__" style="height:calc(100vh - 80px)" role="document">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('sample.add_result_title')}}</h6>
|
||||
<span class="pl-4 text-muted text-uppercase">{{__('sample.form_sample_number')}}: <b class="pl-1 sample-number text-info">-</b></span>
|
||||
<span class="pl-3 text-muted text-uppercase">{{__('sample.form_patient_name')}}: <b class="pl-1 patient-name text-info">-</b></span>
|
||||
<span class="pl-4 text-muted text-uppercase">{{__('sample.form_patient_code')}}: <b class="pl-1 patient-code text-info">-</b></span>
|
||||
<span class="pl-3 text-muted text-uppercase">{{__('sample.physician_name')}}: <b class="pl-1 sample-source text-info">-</b></span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
<form id="form-add-test-result" method="post" action="{{url('sample/add-test-result')}}" onkeydown="return (event.key != 'Enter' || (event.target.matches('textarea')));" class="mb-5">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="sample_id" id="sample-id" value="0" />
|
||||
<div class="form-vertical table-responsive">
|
||||
<div class="row_">
|
||||
<table class="table table-striped table-bordered border">
|
||||
<thead>
|
||||
<tr class="bg-success text-white result-item">
|
||||
<th class="py-2">{{__('sample.add_result_test')}}
|
||||
<input type="hidden" id="result-0" class="T0" value="{{$agedy}}">
|
||||
<input type="hidden" id="result-00" class="T-00" value="{{($sample->patient->gender==1 ? 1 : 0.742)}}">
|
||||
</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('sample.add_result_result')}}</th>
|
||||
<th width="5%" class="py-2 text-center">{{__('sample.add_result_unit_sign')}}</th>
|
||||
<th width="6%" class="py-2 text-center">{{__('sample.add_result_ref_range')}}</th>
|
||||
<th width="10%" class="py-2 text-center">{{__('sample.add_result_test_date')}}</th>
|
||||
<th width="10%" class="py-2 text-center">{{__('sample.add_result_performed_by')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('comment.table_name')}}</th>
|
||||
<th width="3%" class="py-2">{{__('sample.add_result_hide')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="test-item-result">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" id="btn-add-test-result" style="display: none"></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row footer_fixed">
|
||||
<div class="col-sm-12 " >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12 text-right pr-4">
|
||||
|
||||
<button type="button" class="btn btn-secondary float-right rounded-25 ml-2 mr-5" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
|
||||
<button type="button" class="btn btn-inverse-warning ml-5 rounded-25 float-left" id="edit-test" value="edit-test"><i class="fa fa-edit"></i>
|
||||
{{__('sample.add_result_btn_edit_test')}}</button>
|
||||
|
||||
|
||||
<div class="input-group float-right mx-2" style="width: 370px !important;">
|
||||
<select class="rounded-right-0 rounded-top-left-25 rounded-bottom-left-25" id="previous_sample" name="previous_sample" style="width: 140px; border: 1px solid #e9e9e9; padding-left: 10px; font-size:12.5px">
|
||||
<option value="">{{__('sample.previous_result')}}</option>
|
||||
@foreach($previous_samples as $previous_sample)
|
||||
<option value="{{$previous_sample->id}}">{{date('d-m-Y', strtotime($previous_sample->admission_date)) . ' - ' . $previous_sample->sample_number}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_result']))
|
||||
<button type="button" class="btn btn-inverse-info btnAddTestResult rounded-left-0 rounded-top-right-25 rounded-bottom-right-25" value="save-result-preview"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.add_result_btn_save_preview')}}</span></button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_result','update_result']))
|
||||
<button type="button" class="btn btn-info rounded-25 mx-2 float-right btnAddTestResult" id="add-test-result" value="save-result"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.add_result_btn_save')}}</span></button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
<!-- Modal Add Test Result -->
|
||||
<div class="modal fade modal-primary" id="modal-add-test-result" >
|
||||
<div class="modal-dialog modal-dialog-scrollable m-auto modal-xxl">
|
||||
<div class="modal-content vh-100__" style="height:calc(100vh - 80px)" role="document">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title"><i class="mdi mdi-format-list-bulleted-type"></i> {{__('sample.add_result_title')}}</h6>
|
||||
<span class="pl-4 text-muted">{{__('sample.form_patient_code')}}: <b class="pl-1 patient-code text-info">-</b></span>
|
||||
<span class="pl-3 text-muted">{{__('sample.form_patient_name')}}: <b class="pl-1 patient-name text-info">-</b></span>
|
||||
<span class="pl-3 text-muted">{{__('sample.form_sample_number')}}: <b class="pl-1 sample-number text-info">-</b></span>
|
||||
<span class="pl-3 text-muted">{{__('sample.form_sample_source')}}: <b class="pl-1 sample-source text-info">-</b></span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
<form id="form-add-test-result-bio-lab" method="post" action="{{url('sample/add-test-result')}}" onkeydown="return (event.key != 'Enter' || (event.target.matches('textarea')));" class="mb-5">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="sample_id" id="sample-id" value="0" />
|
||||
<div class="form-vertical table-responsive">
|
||||
<div class="row_">
|
||||
<table class="table table-striped table-bordered border">
|
||||
<thead>
|
||||
<tr class="bg-success text-white result-item">
|
||||
<th class="py-2">{{__('sample.add_result_test')}}
|
||||
<input type="hidden" id="result-0" class="T0" value="{{$agedy}}">
|
||||
<input type="hidden" id="result-00" class="T-00" value="{{($sample->patient->gender==1 ? 1 : 0.742)}}">
|
||||
</th>
|
||||
<th width="60%" class="py-2 text-center">{{__('sample.add_result_result')}}</th>
|
||||
<th width="3%" class="py-2">{{__('sample.add_result_hide')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="test-item-result-bio-lab">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" id="btn-add-test-result-bio-lab" style="display: none"></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row footer_fixed">
|
||||
<div class="col-sm-12 " >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12 text-right pr-4">
|
||||
|
||||
<button type="button" class="btn btn-inverse-warning ml-5 float-left" id="edit-test" value="edit-test"><i class="fa fa-edit"></i>
|
||||
{{__('sample.add_result_btn_edit_test')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_result','update_result']))
|
||||
<button type="button" class="btn btn-info mr-2 btnAddTestResult" id="add-test-result" value="save-result"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.add_result_btn_save')}}</span></button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_result']))
|
||||
<button type="button" class="btn btn-inverse-info mr-2 btnAddTestResult" value="save-result-preview"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.add_result_btn_save_preview')}}</span></button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-light mr-5" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
370
resources/views/modal/financial_report_print.blade.php
Normal file
370
resources/views/modal/financial_report_print.blade.php
Normal file
@@ -0,0 +1,370 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1-dt', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1-dt">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 29.7cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
#print_preview_modal .modal-dialog.A4-portrait {
|
||||
width: 29.7cm !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
<p style="line-height: 10px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 10px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;text-decoration: underline;">{{__('Laboratory Financial Report')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@if(!empty($financialReport))
|
||||
@if(date('d/m/Y',strtotime($_GET['start_date']))==date('d/m/Y',strtotime($_GET['end_date'])))
|
||||
<p style="text-align: center">{{__('Date:') . date('d-M-Y',strtotime($_GET['start_date']))}}</p>
|
||||
@else
|
||||
<p style="text-align: center">{{__('From Date:') . date('d-M-Y',strtotime($_GET['start_date'])) . ' To Date: '.date('d-M-Y',strtotime($_GET['end_date']))}}</p>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 9pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td width="30px" style="padding-left: 1px; text-align:center;">No.</td>
|
||||
<td width="50px" style="padding-left: 1px; text-align:center;">Invoice Date</td>
|
||||
<td width="80px" style="padding-left: 1px; text-align:center;">Sample No</td>
|
||||
<td width="100px" style="padding-left: 1px; text-align:center;">Patient Name</td>
|
||||
<td width="100px" style="padding-left: 1px; text-align:center;">Physician</td>
|
||||
<td style="padding-left: 5px; text-align:center;">Test Name</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Total</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Discount</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Net Amount</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Cash Pay</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Bank Pay</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Owe</td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i=1;
|
||||
$totalPrice = 0;
|
||||
$total = 0;
|
||||
$total_discount = 0;
|
||||
$total_paid = 0;
|
||||
$total_bank_paid = 0;
|
||||
$total_owe = 0;
|
||||
@endphp
|
||||
@foreach($financialReport as $row)
|
||||
<tr>
|
||||
<td style="text-align:center;">{{$i}}</td>
|
||||
<td style="text-align:center;">{{date('d/m/y',strtotime($row['date']))}}</td>
|
||||
<td style="padding-left: 1px">{{$row['sample_number']}}</td>
|
||||
<td style="padding-left: 1px">{{$row['patient']}}</td>
|
||||
<td style="padding-left: 1px">{{$row['physician']}}</td>
|
||||
<td style="padding-left: 1px">{{$row['test_name']}}</td>
|
||||
<td style="padding-right: 1px; text-align: right">{{$row['total_amount']}}</td>
|
||||
<td style="padding-right: 1px; text-align: right">{{$row['total_discount']}}</td>
|
||||
<td style="padding-right: 1px; text-align: right">{{$row['total_net_amount']}}</td>
|
||||
<td style="padding-right: 1px; text-align: right">{{$row['total_paid']}}</td>
|
||||
<td style="padding-right: 1px; text-align: right">{{$row['total_bank_paid']}}</td>
|
||||
<td style="padding-right: 1px; text-align: right">{{$row['total_owe']}}</td>
|
||||
</tr>
|
||||
@php
|
||||
$totalPrice+=$row['total_net_amount'];
|
||||
$total += $row['total_amount'];
|
||||
$total_discount += $row['total_discount'];
|
||||
$total_paid += $row['total_paid'];
|
||||
$total_bank_paid += $row['total_bank_paid'];
|
||||
$total_owe += $row['total_owe'];
|
||||
$i++;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr><td colspan="12" style="padding-left:20px">Exchange Rate : 1 USD = {{$labSettings->exchange_rate}}</td></tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="6">{{__('TOTAL')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_discount * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($totalPrice * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_paid * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_bank_paid * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_owe * $labSettings->exchange_rate))}}</td>
|
||||
|
||||
</tr>
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="6">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total * ($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_discount * ($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalPrice * ($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_paid * ($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_bank_paid * 0.4) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_owe * ($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="6">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_discount * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalPrice * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_paid * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_bank_paid * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_owe * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- @endforeach --}}
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm"></td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Reported By')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">........................ <br>
|
||||
{{date('d-M-Y H:i')}}<br>
|
||||
<!--@if(!empty(Auth::user()->signature))-->
|
||||
<!-- <img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">-->
|
||||
<!--@else-->
|
||||
<!-- <br>-->
|
||||
<!--@endif-->
|
||||
<!--<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
318
resources/views/modal/inventory_onhand_print.blade.php
Normal file
318
resources/views/modal/inventory_onhand_print.blade.php
Normal file
@@ -0,0 +1,318 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{$report_data['report_name']}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@if(!empty($report_data['report_data']) && $report_data['report_id']==1)
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Item Group</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">On hand</th>
|
||||
<th class="p-1">Last Stock In</th>
|
||||
<th class="p-1">Last Stock Out</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1">{{$v->item_group}}</td>
|
||||
<td class="p-1">{{$v->item_name}}</td>
|
||||
<td class="p-1 text-center">{{floatval($v->available_quantity)}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_in_date) ? date('d-m-Y',strtotime($v->stock_in_date)) : ''}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_out_date) ? date('d-m-Y',strtotime($v->stock_out_date)) : ''}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($report_data['report_data']) && $report_data['report_id']==2)
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Item Group</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">Stock In</th>
|
||||
<th class="p-1">Stock In Date</th>
|
||||
<th class="p-1">Expire Date</th>
|
||||
<th class="p-1"># Month</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1">{{$v->item_group}}</td>
|
||||
<td class="p-1">{{$v->item_name}}</td>
|
||||
<td class="p-1 text-right">{{$v->stock_in}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_in_date) ? date('d-m-Y',strtotime($v->stock_in_date)) : ''}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->expiry_date) ? date('d-m-Y',strtotime($v->expiry_date)) : ''}}</td>
|
||||
<td class="p-1 text-right">{{$v->months}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm"></td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Reported By')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">........................ <br>
|
||||
{{date('d-m-Y H:i')}}<br>
|
||||
<!--@if(!empty(Auth::user()->signature))-->
|
||||
<!-- <img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">-->
|
||||
<!--@else-->
|
||||
<!-- <br>-->
|
||||
<!--@endif-->
|
||||
<!--<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
196
resources/views/modal/invoice.blade.php
Normal file
196
resources/views/modal/invoice.blade.php
Normal file
@@ -0,0 +1,196 @@
|
||||
|
||||
<!-- Modal Assign Test -->
|
||||
<div class="modal fade modal-primary" id="modal-invoice">
|
||||
|
||||
<style>
|
||||
#modal-invoice .form-group label {
|
||||
line-height: 0.1rem !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="modal-dialog modal-xxl p-5">
|
||||
<div class="modal-content border border-light shadow">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('invoice.form_new_title')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" class="p-2" action="{{route('invoice.save')}}" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-vertical sample-creation-form">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 pl-0">
|
||||
@if($sample)
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.table_patient_name')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control form-control-sm rounded-0 select2_" name="sample_id" id="inv-sample-id" style=" width: 100% !important;">
|
||||
<option value="{{$sample->id}}">{{$sample->sample_number . ' - ' . $sample->patient->name_en}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.table_patient_name')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="sample_id" id="inv-sample-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.form_invoice_date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control form-control-sm rounded-0" name="invoice_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 pr-0">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.physician_name')}} <span class="text-danger"></span></label>
|
||||
<input type="text" value="{{@$sample->physician->name_en}}" class="form-control form-control-sm rounded-0" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row border p-0">
|
||||
<div class="col-sm-7 p-0" style="max-height: 350px; overflow: auto;">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('invoice.form_description')}}</th>
|
||||
<th width="150px" class="py-2 text-right" id="discount-type">{{__('invoice.form_discount')}} {{$labSettings->discount_type == 2 ? ($labSettings->currency==1?'៛':'$') : '(%)'}}</th>
|
||||
<th width="150px" class="py-2 text-right">{{__('invoice.form_net_amount')}}({{$labSettings->currency==1?'៛':'$'}})</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="invoice-item">
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-group py-5 px-3">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('invoice.form_description')}}</label>
|
||||
<textarea class="form-control" name="invoice_note" id="invoice-note" rows="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 p-4 border-left">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="total-amount" class="col-sm-5 col-form-label">{{__('invoice.form_total_amount')}} <span class="text-danger">({{$labSettings->currency==1?'៛':'$'}})</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" step="any" readonly required class="form-control form-control-xxs bg-white form-control-sm rounded-0" name="total" id="total-amount" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="discount-amount" class="col-sm-5 col-form-label">{{__('invoice.form_discount')}} <span class="text-danger">({{$labSettings->discount_type == 2 ? ($labSettings->currency==1?'៛':'$') : '%'}})</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="hidden" name="discount_type" value="{{$labSettings->discount_type}}" id="discount_type" />
|
||||
<input type="number" min="0.00" step="any" required value="0.00" class="form-control form-control-xxs rounded-0" name="discount" id="discount-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="net-amount" class="col-sm-5 col-form-label">{{__('invoice.form_net_amount')}} <span class="text-danger">({{$labSettings->currency==1?'៛':'$'}})</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" step="any" readonly required value="0.00" class="form-control form-control-xxs rounded-0" name="gross_total" id="net-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 bg-light px-0 pt-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.pay_type')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control form-control-xxs select2_ rounded-0 py-0" name="pay_type" id="pay_type" style=" width: 100% !important;">
|
||||
<option value="1">{{__('invoice.cash_paid')}}</option>
|
||||
<option value="2">{{__('invoice.bank_paid')}}</option>
|
||||
<option value="3">{{__('invoice.cash_paid')}} + {{__('invoice.bank_paid')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_amount')}} <small class="text-info">({{__('invoice.cash_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" step="any" required value="0.00" class="form-control form-control-xxs rounded-0" name="deposit" id="paid-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_amount')}} <small class="text-info">({{__('invoice.bank_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" step="any" required value="0.00" class="form-control form-control-xxs rounded-0" name="bank_deposit" id="bank-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_date')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="date" value="{{date('Y-m-d')}}" class="form-control form-control-xxs rounded-0" name="first_paid_date" id="paid-date" placeholder="DD-MM-YYYY">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.bank_name')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="" class="form-control form-control-xxs rounded-0" name="bank_name" id="bank_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.transaction_no')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="" class="form-control form-control-xxs rounded-0" name="transaction_ref" id="transaction_ref">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="owe-amount" class="col-sm-5 col-form-label">{{__('invoice.form_owe_amount')}} ({{$labSettings->currency==1?'៛':'$'}})<span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" step="any" readonly class="form-control bg-white form-control-xxs rounded-0" name="balance" id="owe-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check" style="width: 250px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" {{($labSettings->is_hide_inv_discount==1)? 'checked':''}} name="is_hide_discount" class="form-check-input" id="select-all-lab">
|
||||
{{__('invoice.hide_discount')}}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 pt-4 text-right">
|
||||
<button class="btn btn-inverse-info btn-sm mr-2 rounded-25" name="save_print_invoice" type="submit" value="save_preview_invoice"><i class="mdi mdi-printer"></i> {{__('invoice.form_btn_save_preview')}}</button>
|
||||
<button class="btn btn-info btn-sm rounded-25" type="submit"><i class="mdi mdi-check-all"></i> {{__('invoice.form_btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
59
resources/views/modal/organism_result.blade.php
Normal file
59
resources/views/modal/organism_result.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
<!-- Modal Add Organism Result -->
|
||||
<div class="modal fade modal-primary" id="modal-organism-result" style="z-index: 10000 !important;">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable p-5">
|
||||
<div class="modal-content border border-light shadow">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title"> {{ __('sidebar.organism') }} : <span class="possible-result-test-name text-info"></span></h6><br>
|
||||
<input type="text" id="search-organism" style="width:450px; right: 50px !IMPORTANT; position: absolute;" class="form-control form-control-sm rounded-0" placeholder="{{__('organism.search_placeholder')}}">
|
||||
<button id="close-modal-organism-result" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="form-assign-test" class="mb-5">
|
||||
@csrf
|
||||
<div class="form-vertical">
|
||||
<div class="row" >
|
||||
<div class="col-sm-12" id="modal-organism-result-organism">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th width="50px" class="py-0"></th>
|
||||
<th width="50px" class="py-0"></th>
|
||||
<th class="py-0">{{__('organism.search_placeholder')}}</th>
|
||||
<th class="py-0" width="170px">{{ __('sidebar.quantity') }}</th>
|
||||
<th class="py-0" width="110px">{{__('general.contaminant')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="orgn-result-area">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="col-sm-6" id="modal-organism-result-antibiotic">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th class="py-0">Antibiotic</th>
|
||||
<th width="120px" class="py-0">Disk diffusion</th>
|
||||
<th width="120px" class="py-0">MIC</th>
|
||||
<th width="150px" class="py-0">Sensitive</th>
|
||||
<th width="80px" class="py-0">Invisible</th>
|
||||
</thead>
|
||||
<tbody id="anti-result-area">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>--}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info mr-2 btnAssignTest rounded-25" id="btnAddOrganism" value="save_test_only"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary mr-5 rounded-25" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
461
resources/views/modal/preview_invoice.blade.php
Normal file
461
resources/views/modal/preview_invoice.blade.php
Normal file
@@ -0,0 +1,461 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 5px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changable" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-family: {{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}; font-weight: 700;">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($invoice->invoiceDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
<tr>
|
||||
<td class=" text-center">{{$k+1}}</td>
|
||||
<td>{{$invItem->test_name}}</td>
|
||||
<td class="text-right ">{{$invItem->qty}}</td>
|
||||
<td class="text-right ">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->discount,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total - $invoice->discount) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->total - $invoice->discount) * $labSettings->exchange_rate),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changable" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-family: {{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}; font-weight: 700;">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($invoice->invoiceDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
<tr>
|
||||
<td class=" text-center">{{$k+1}}</td>
|
||||
<td>{{$invItem->test_name}}</td>
|
||||
<td class="text-right ">{{$invItem->qty}}</td>
|
||||
<td class="text-right ">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->discount,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total - $invoice->discount) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->total - $invoice->discount) * $labSettings->exchange_rate),2)}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,499 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
padding: 3px !important;
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changable" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-family: {{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}; font-weight: 700;">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($invoice->invoiceDetail as $k=>$invItem)
|
||||
<?php $total++;?>
|
||||
<tr>
|
||||
<td class=" text-center">{{$k+1}}</td>
|
||||
<td>{{$invItem->test_name}}</td>
|
||||
<td class="text-right ">{{$invItem->qty}}</td>
|
||||
<td class="text-right ">៛ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@for($i=$total; $i<=11; $i++)
|
||||
<tr>
|
||||
<td class=" text-center font-changable" style="padding:0 5px;">{{$i+1}}</td>
|
||||
<td style="padding:0 5px;" class="font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} (៛) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '៛'}}) :</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('Total (៛)')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total - $invoice->discount) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total)/$labSettings->exchange_rate),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changable" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-family: {{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}; font-weight: 700;">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:11pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:11pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:11pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
|
||||
@foreach($invoice->invoiceDetail as $k=>$invItem)
|
||||
|
||||
<tr>
|
||||
<td class=" text-center">{{$k+1}}</td>
|
||||
<td>{{$invItem->test_name}}</td>
|
||||
<td class="text-right ">{{$invItem->qty}}</td>
|
||||
<td class="text-right ">៛ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@for($i=$total; $i<=11; $i++)
|
||||
<tr>
|
||||
<td class=" text-center font-changable" style="padding:0 5px;">{{$i+1}}</td>
|
||||
<td style="padding:0 5px;" class="font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} (៛) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
@if($invoice->is_hide_discount == 0)
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '៛'}}) :</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('Total (៛)')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total - $invoice->discount) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->total - $invoice->discount)/$labSettings->exchange_rate),2)}}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('Total (៛)')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->total)/$labSettings->exchange_rate),2)}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,580 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<li style="display: inline-block;" class="print" title="Print with alternative logo">
|
||||
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i> <b>{{__('Print Alt-Logo')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:10px !important;
|
||||
}
|
||||
|
||||
.font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
padding: 3px !important;
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.table-inv tr td{
|
||||
font-size:11px !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr id="def-logo">
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changeable" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important;">{{$labSettings->phone_number}} </p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dyn-logo" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{$sample->lab_id != 21 ? __('invoice.tittle') : 'Laboratory' }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{$sample->lab_id != 21 ? __('invoice.form_invoice_number') : 'Reference No' }}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {!!$sample->physician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($invoice->invoiceDetail->sortBy('weight') as $k=>$invItem)
|
||||
<?php $total++;?>
|
||||
<tr>
|
||||
<td class=" text-center font-changable" style="padding:0 5px;">{{$k+1}}</td>
|
||||
<td style="padding:0 5px;" class="font-changable">{{$invItem->test_name}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable">{{$invItem->qty}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@for($i=$total; $i<=11; $i++)
|
||||
<tr>
|
||||
<td class=" text-center font-changable" style="padding:0 5px;">{{$i+1}}</td>
|
||||
<td style="padding:0 5px;" class="font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '$'}}):</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->gross_total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
|
||||
<td class="text-left border-0" colspan="2">
|
||||
<span style="padding-left: {{ $sample->lab_id != 21 ? '70px' : '45px' }} !important;">
|
||||
{{ $sample->lab_id != 21 ? __('invoice.received_by') : 'Lab. Tech' }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr id="def-logo-2">
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changeable" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important;">{{$labSettings->phone_number}}</p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dyn-logo-2" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{$sample->lab_id != 21 ? __('invoice.tittle') : 'Laboratory' }}</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{$sample->lab_id != 21 ? __('invoice.form_invoice_number') : 'Reference No' }}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {!!$sample->physician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
|
||||
@foreach($invoice->invoiceDetail->sortBy('weight') as $k=>$invItem)
|
||||
|
||||
<tr>
|
||||
<td class=" text-center font-changable">{{$k+1}}</td>
|
||||
<td class="font-changable">{{$invItem->test_name}}</td>
|
||||
<td class="text-right font-changable">{{$invItem->qty}}</td>
|
||||
<td class="text-right font-changable">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@for($i=$total; $i<=11; $i++)
|
||||
<tr>
|
||||
<td class=" text-center font-changable" style="padding:0 5px;">{{$i+1}}</td>
|
||||
<td style="padding:0 5px;" class="font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
@if($invoice->is_hide_discount == 0)
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '$'}}):</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->gross_total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
|
||||
<td class="text-left border-0" colspan="2">
|
||||
<span style="padding-left: {{ $sample->lab_id != 21 ? '70px' : '45px' }} !important;">
|
||||
{{ $sample->lab_id != 21 ? __('invoice.received_by') : 'Lab. Tech' }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function changeLogoAndPrint(){
|
||||
$('#dyn-logo, #def-logo').toggle();
|
||||
$('#dyn-logo-2, #def-logo-2').toggle();
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
@endif
|
||||
</script>
|
||||
@@ -0,0 +1,444 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:10px !important;
|
||||
}
|
||||
|
||||
.font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
padding: 3px !important;
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.table-inv tr td{
|
||||
font-size:11px !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changeable" style="line-height: 20px !important; font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important; font-size: 8pt;">{{$labSettings->phone_number}} </p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody height=100%>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border=0>
|
||||
<?php $total = 0;?>
|
||||
@foreach($invoice->invoiceDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
@endforeach
|
||||
|
||||
<tr style="height:70px"><td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td class="text-center" style="font-size: 12pt; font-weight: bold;">Laboratory Analysis Fee - សេវាវិភាគមន្ទីរពិសោធន៍</td>
|
||||
<td style="font-size: 14pt; font-weight: bold;">US Dollar: {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="font-size: 14pt; font-weight: bold;">Khmer Riel: {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),0)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr style="height:80px">
|
||||
<td class="text-center" colspan="2" style="font-size:16pt; font-weight: bold;">{{$invoice->invoice_note}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable" style="height:150px">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
</tr>
|
||||
<tr class="font-changable" style="height:70px">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if(!empty($sample->physician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-changeable" style="line-height: 20px !important; font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important; font-size: 8pt;">{{$labSettings->phone_number}} </p>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border=0>
|
||||
<?php $total = 0;?>
|
||||
@foreach($invoice->invoiceDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
@endforeach
|
||||
|
||||
<tr style="height:70px"><td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td class="text-center" style="font-size: 12pt; font-weight: bold;">Laboratory Analysis Fee - សេវាវិភាគមន្ទីរពិសោធន៍</td>
|
||||
<td style="font-size: 16pt; font-weight: bold;">US Dollar: {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="font-size: 16pt; font-weight: bold;">Khmer Riel: {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),0)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable" style="height:80px">
|
||||
<td class="text-center " colspan="2" style="font-size: 16pt; font-weight: bold;"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable" style="height:150px">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))}}</span></td>
|
||||
</tr>
|
||||
<tr class="font-changable" style="height:70px">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,591 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0);" onclick="$('.btn-print-invoice-a4').click()"><i class="fa fa-print"></i> <b>{{__('invoice.print')}} A4</b></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:10px !important;
|
||||
}
|
||||
|
||||
.font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
line-height: 0.7rem !important;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
/*bottom: .25rem;*/
|
||||
bottom: -0.6rem !important;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
padding: 3px !important;
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
.border-1{
|
||||
border: 1px solid #ffffff !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.table-inv tr td{
|
||||
font-size:11px !important;
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
|
||||
<?php
|
||||
|
||||
$grouped = [];
|
||||
|
||||
foreach($invoice->invoiceDetail->sortBy('weight') as $r=>$d)
|
||||
{
|
||||
$departmentId = $d->testSample->sample->department->name_en;
|
||||
$sampleTypeId = $d->testSample->sample->name_en;
|
||||
|
||||
if (!isset($grouped[$departmentId])) {
|
||||
$grouped[$departmentId] = [];
|
||||
}
|
||||
if (!isset($grouped[$departmentId][$sampleTypeId])) {
|
||||
$grouped[$departmentId][$sampleTypeId] = [];
|
||||
}
|
||||
|
||||
// Add the item to the appropriate group
|
||||
$grouped[$departmentId][$sampleTypeId][] = $d->toArray();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 12pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<font style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</font><br>
|
||||
<font class="font-changeable" style="line-height: 20px !important;font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </font>
|
||||
<br><font style="line-height: 9px !important;font-size: 8pt;">{{$labSettings->phone_number}}<br>{{$labSettings->email}}</font>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<!--<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>-->
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($grouped as $k=>$testSample)
|
||||
@foreach($testSample as $l=>$ts)
|
||||
<tr>
|
||||
<td style="padding:0 5px; font-weight:bold; font-size:13px !important;" colspan="3" class="font-changable border-1">{{$l}}</td>
|
||||
</tr>
|
||||
@foreach($ts as $r=>$v)
|
||||
<?php $total++;?>
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><p class="value-pair line-height"></p><span style="background:#fff; position: relative;">{{$v['test_name']}}</span></td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1">{{(int)$v['qty']}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1">{{$v['unit_price']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
@for($i=$total; $i<=19; $i++)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><i style="position: absolute;"> </td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable" style="border-bottom: 1pt solid black" >
|
||||
<td class="text-left" colspan="3" style="border-left: 0px; border-right:0px;"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" height="20px"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))." ".date('H:i:s')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '$'}}):</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->gross_total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<font style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</font><br>
|
||||
<font class="font-changeable" style="line-height: 20px !important;font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </font>
|
||||
<br><font style="line-height: 9px !important;font-size: 8pt;">{{$labSettings->phone_number}}<br>{{$labSettings->email}}</font>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->physician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<!--<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>-->
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
@foreach($grouped as $k=>$testSample)
|
||||
@foreach($testSample as $l=>$ts)
|
||||
<tr>
|
||||
<td style="padding:0 5px; font-weight:bold; font-size:13px !important;" colspan="3" class="font-changable border-1">{{$l}}</td>
|
||||
</tr>
|
||||
@foreach($ts as $r=>$v)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><p class="value-pair line-height"></p><span style="background:#fff; position: relative;">{{$v['test_name']}}</span></td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1">{{(int)$v['qty']}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1">{{$v['unit_price']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
@for($i=$total; $i<=19; $i++)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><i style="position: absolute;"> </td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="3" style="border-left: 0px; border-right:0px;"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" height="20px"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))." ".date('H:i:s')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
@if($invoice->is_hide_discount == 0)
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '$'}}):</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->gross_total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,408 @@
|
||||
<div class="modal fade" id="print_invoice_modal_a4" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-a4', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-a4">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:10px !important;
|
||||
}
|
||||
|
||||
#print_invoice_modal_a4 .font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
#print_invoice_modal_a4 table td, #print_invoice_modal_a4 table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
#print_invoice_modal_a4 page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
/*width: 297mm;*/
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
#print_invoice_modal_a4 table th, #print_invoice_modal_a4 table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
#print_invoice_modal_a4 table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
#print_invoice_modal_a4 table.patient-info td, #print_invoice_modal_a4 table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
#print_invoice_modal_a4 .text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
#print_invoice_modal_a4 .text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#print_invoice_modal_a4 table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
#print_invoice_modal_a4 @page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
#print_invoice_modal_a4 @media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
#print_invoice_modal_a4 @page {
|
||||
size: A4 portrait;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
#print_invoice_modal_a4 @page {
|
||||
size: 297mm 210mm portrait;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
#print_invoice_modal_a4 @page {
|
||||
size: 16.5in 11.7in portrait;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
#print_invoice_modal_a4 tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#print_invoice_modal_a4 #footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
#print_invoice_modal_a4 .table-inv th, #print_invoice_modal_a4 .table-inv td {
|
||||
padding: 3px !important;
|
||||
}
|
||||
}
|
||||
#print_invoice_modal_a4 .table-inv th, #print_invoice_modal_a4 .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
.border-1{
|
||||
border: 1px solid #ffffff !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
#print_invoice_modal_a4 .table-inv tr td{
|
||||
font-size:11px !important;
|
||||
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
line-height: 0.7rem !important;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
/*bottom: .25rem;*/
|
||||
bottom: -0.6rem !important;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 21cm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$grouped = [];
|
||||
|
||||
foreach($invoice->invoiceDetail->sortBy('weight') as $r=>$d)
|
||||
{
|
||||
|
||||
$departmentId = $d->testSample->sample->department->name_en;
|
||||
$sampleTypeId = $d->testSample->sample->name_en;
|
||||
|
||||
if (!isset($grouped[$departmentId])) {
|
||||
$grouped[$departmentId] = [];
|
||||
}
|
||||
if (!isset($grouped[$departmentId][$sampleTypeId])) {
|
||||
$grouped[$departmentId][$sampleTypeId] = [];
|
||||
}
|
||||
|
||||
// Add the item to the appropriate group
|
||||
$grouped[$departmentId][$sampleTypeId][] = $d->toArray();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div style="width: 100%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if((!empty($sample->physician->logo)) && ($sample->lab_id!=22))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 12pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<font style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</font><br>
|
||||
<font class="font-changeable" style="line-height: 20px !important;font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </font>
|
||||
<br><font style="line-height: 9px !important;font-size: 8pt;">{{$labSettings->phone_number}}<br>{{$labSettings->email}}</font>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('invoice.tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$sample->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('sample.physician_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {!!$sample->physician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<!--<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>-->
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="17%" class="text-center" style="width:120px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="17%" class="text-center" style="width:115px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($grouped as $k=>$testSample)
|
||||
@foreach($testSample as $l=>$ts)
|
||||
<tr>
|
||||
<td style="padding:0 5px; font-weight:bold; font-size:13px !important;" colspan="3" class="font-changable border-1">{{$l}}</td>
|
||||
</tr>
|
||||
@foreach($ts as $r=>$v)
|
||||
<?php $total++;?>
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><p class="value-pair line-height"></p><span style="background:#fff; position: relative;">{{$v['test_name']}}</span></td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1">{{(int)$v['qty']}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1">{{$v['unit_price']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
@for($i=$total; $i<=19; $i++)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><i style="position: absolute;"> </td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable" style="border-bottom: 1pt solid black" >
|
||||
<td class="text-left" colspan="3" style="border-left: 0px; border-right:0px;"><span style="padding-left: 10px !important;">{{$invoice->invoice_note}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" height="20px"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($invoice->invoice_date))." ".date('H:i:s')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($):</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} ({{$labSettings->discount_type==1? '%' : '$'}}):</td>
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}}:</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->gross_total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}}:</td>
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
427
resources/views/modal/preview_result.blade.php
Normal file
427
resources/views/modal/preview_result.blade.php
Normal file
@@ -0,0 +1,427 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder();':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*tbody .sample-result {
|
||||
page-break-inside: avoid;
|
||||
|
||||
}*/
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#result-area thead {display: table-header-group !important;}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
|
||||
.patient-info, #footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" id="result-area" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" alt="Logo" style="width: 100%">
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-top text-center">
|
||||
<div class="{{(App::isLocale('en') ? '' : 'KhmerMoulLight')}}" style="font-size: 13.5pt; text-transform: uppercase; color: #0000ff; font-weight: bold;">{{__('sample.print_title')}}</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; padding-top:1px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b style="color: #0000ff;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; padding-bottom:1px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:1px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; padding-top:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b style="color: #0000ff;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-bottom:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="20%" style="padding-left:0.7cm; padding-bottom:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:center; color: #0000ff; border-top:1px solid #000 !important; padding-top:6px;">
|
||||
<p style="line-height: 10px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 10px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
@@ -0,0 +1,713 @@
|
||||
<div class="{{(request()->segment(1)!='shared' ? 'modal':'')}} fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
@if(request()->segment(1)!='shared')
|
||||
<div class="print-preview-header">
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
@if(!empty($labSettings->alternative_logo) && 1==2)
|
||||
<li style="display: inline-block;" class="print" title="Print with alternative logo">
|
||||
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i> <b>{{__('Print Alt-Logo')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->patient->telegramChatId) && $labSettings->telegrambot==1 && 1==2)
|
||||
<li style="display: inline-block;" class="print_" title="Share this result through patient's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result_patient" target_receiver="patient"><i class="fa fa-send"></i> <b>{{__('Send to Patient')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->sample_source->telegramChatId) && $labSettings->telegrambot==1 && 1==2)
|
||||
<li style="display: inline-block;" class="print_" title="Share this result through clinician's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result_clinician" target_receiver="clinician"><i class="fa fa-send"></i> <b>{{__('Send to Clinician')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
<li style=" position: absolute; top: 0; right: 50px;">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_sample']))
|
||||
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
{{-- @if(!empty($lineHeight))--}}
|
||||
{{-- p{--}}
|
||||
{{-- line-height: 0 !important;--}}
|
||||
{{-- }--}}
|
||||
{{-- ._department-sample-info tr--}}
|
||||
{{-- ,.line-height_{--}}
|
||||
{{-- line-height: {{$lineHeight}} !important;--}}
|
||||
{{-- }--}}
|
||||
{{-- @endif--}}
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'label_header_font';
|
||||
}
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
|
||||
}
|
||||
.patient-info tr td{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:15px !important;
|
||||
}
|
||||
.header-label-title-color{
|
||||
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
|
||||
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
|
||||
}
|
||||
|
||||
.header-label-font{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.result-font, .name{
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
}
|
||||
|
||||
._department-sample-info tr td{
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 0cm 1cm 1cm 1cm;
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0cm;
|
||||
@bottom-right {
|
||||
content: "{{__('general.page')}}" counter(page);
|
||||
font-size: 13px;
|
||||
margin-top: -35px !important;
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
padding-right: 0cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
/*border: 1px solid black;*/
|
||||
/*border-collapse: collapse;*/
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.patient-info{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
|
||||
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
|
||||
}
|
||||
|
||||
#footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-changable-base-on-localize{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr id="def-logo">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="dyn-logo" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center" style="padding-top:0" valign="top">
|
||||
|
||||
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==3)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_requester')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==4)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==5)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_requester')}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==6)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="/*height: 240px;*/ height: 100px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"><td colspan="3"> <br></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
|
||||
<td style="width: 6.3cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm; font-size:15px">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
|
||||
<tr class="result-footer-signature" id="def-signature">
|
||||
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
|
||||
<span style="line-height: 10px !important; font-size:12px">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} <br>
|
||||
{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function printTest() {
|
||||
@if($sample->is_printed==0)
|
||||
printRecorder()
|
||||
@endif
|
||||
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
function changeLogoAndPrint(){
|
||||
$('#dyn-logo, #def-logo').toggle();
|
||||
$('#dyn-signature, #def-signature').toggle();
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
document.getElementById("doPrinting__").addEventListener("click", printTest)
|
||||
|
||||
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,543 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
{{--src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontName) ? 'times_new_roman.ttf':$fontName))}}');--}}
|
||||
{{--display:swap;--}}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'label_header_font';
|
||||
{{--src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontNameHeader) ? 'times_new_roman.ttf':$fontNameHeader))}}');--}}
|
||||
{{--display:swap;--}}
|
||||
}
|
||||
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
|
||||
}
|
||||
.header-label-title-color{
|
||||
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
|
||||
}
|
||||
|
||||
.header-label-font{
|
||||
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
|
||||
}
|
||||
|
||||
.result-font, .name{
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
}
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
/*font-family: 'result_font';*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-weight: bold;
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 0cm 1cm 1cm 1cm;
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
/*border-spacing: 2px !important;*/
|
||||
/*border-collapse: separate !important;*/
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
/*@page:first {*/
|
||||
/* margin-top: 0.5cm !important;*/
|
||||
/*}*/
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
padding-right: 0cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
/*margin-top: 500px !important;*/
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
/*border: 1px solid black;*/
|
||||
/*border-collapse: collapse;*/
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
|
||||
.patient-info{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
|
||||
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
|
||||
}
|
||||
|
||||
#footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" style="max-height:130px !important;" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center" style="padding-top:0" valign="top">
|
||||
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{@$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==3)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="result-page-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="result-page-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@else
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 150px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"><td colspan="3"> <br></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
|
||||
<td style="width: 6.3cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i', strtotime($sample->collected_date))}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
|
||||
<span style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </span><br>
|
||||
<span style="line-height: 20px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function printTest() {
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html",
|
||||
onPrintDialogClose: printJobComplete
|
||||
});
|
||||
|
||||
// setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
function printJobComplete() {
|
||||
}
|
||||
|
||||
document.getElementById("doPrinting__").addEventListener("click", printTest);
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,597 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print" title="Change Result Logo">
|
||||
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-picture-o"></i> <b>{{__('Pick Logo')}}</b></a>
|
||||
</li>
|
||||
<li style=" position: absolute; top: 0; right: 50px;">
|
||||
|
||||
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontName) ? 'times_new_roman.ttf':$fontName))}}');*/
|
||||
/*display:swap;*/
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'label_header_font';
|
||||
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontNameHeader) ? 'times_new_roman.ttf':$fontNameHeader))}}'); */
|
||||
/*display:swap;*/
|
||||
}
|
||||
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
|
||||
}
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:15px !important;
|
||||
}
|
||||
.header-label-title-color{
|
||||
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
|
||||
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
|
||||
}
|
||||
|
||||
.header-label-font{
|
||||
/*font-family: 'label_header_font';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.result-font, .name{
|
||||
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
|
||||
}
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
/*font-family: 'result_font';*/
|
||||
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-weight: bold;
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 0cm 1cm 1cm 1cm;
|
||||
/*font-family: 'result_font';*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
/*border-spacing: 2px !important;*/
|
||||
/*border-collapse: separate !important;*/
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
/*@page:first {*/
|
||||
/* margin-top: 0.5cm !important;*/
|
||||
/*}*/
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
padding-right: 0cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
/*margin-top: 500px !important;*/
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
/*border: 1px solid black;*/
|
||||
/*border-collapse: collapse;*/
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.patient-info{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
|
||||
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
|
||||
}
|
||||
|
||||
#footer{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-changable-base-on-localize{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr id="def-logo">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="dyn-logo" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center" style="padding-top:0" valign="top">
|
||||
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==3)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"><td colspan="3"> <br></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
|
||||
<td style="width: 6.3cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
|
||||
<span style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </span><br>
|
||||
<span style="line-height: 20px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function printTest() {
|
||||
|
||||
@if($sample->is_printed==0)
|
||||
printRecorder()
|
||||
@endif
|
||||
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
function changeLogoAndPrint(){
|
||||
$('#dyn-logo, #def-logo').toggle();
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("doPrinting__").addEventListener("click", printTest);
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,758 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<li style="display: inline-block;" class="print" title="Print with alternative logo">
|
||||
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i> <b>{{__('Print Alt-Logo')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->patient->telegramChatId) && Auth::id()==1)
|
||||
<li style="display: inline-block;" class="print_" title="Share results through patient's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result"><i class="fa fa-send"></i> <b>{{__('Share Results')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
<li style=" position: absolute; top: 0; right: 50px;">
|
||||
|
||||
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
@if(!empty($lineHeight))
|
||||
p{
|
||||
line-height 0 !important;
|
||||
}
|
||||
._department-sample-info tr
|
||||
,.line-height_{
|
||||
line-height: {{$lineHeight}} !important;
|
||||
}
|
||||
@endif
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontName) ? 'times_new_roman.ttf':$fontName))}}');*/
|
||||
/*display:swap;*/
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'label_header_font';
|
||||
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontNameHeader) ? 'times_new_roman.ttf':$fontNameHeader))}}'); */
|
||||
/*display:swap;*/
|
||||
}
|
||||
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
|
||||
}
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:15px !important;
|
||||
}
|
||||
.header-label-title-color{
|
||||
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
|
||||
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
|
||||
}
|
||||
|
||||
.header-label-font{
|
||||
/*font-family: 'label_header_font';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.result-font, .name{
|
||||
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
|
||||
}
|
||||
|
||||
._department-sample-info tr td{
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '12pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
/*font-family: 'result_font';*/
|
||||
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-weight: bold;
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 0cm 1cm 1cm 1cm;
|
||||
/*font-family: 'result_font';*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
/*border-spacing: 2px !important;*/
|
||||
/*border-collapse: separate !important;*/
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
padding-right: 0cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@if(Auth::id()==1)
|
||||
|
||||
#footer .page{
|
||||
counter-increment:listCounter;
|
||||
}
|
||||
|
||||
#footer .page:after{
|
||||
|
||||
content: counter(listCounter);
|
||||
}
|
||||
@endif
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
/*border: 1px solid black;*/
|
||||
/*border-collapse: collapse;*/
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.patient-info{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
|
||||
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
|
||||
}
|
||||
|
||||
#footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-changable-base-on-localize{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr id="def-logo">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="dyn-logo" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
</th>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="KhmerMoulLight_" style="font-size: 13.5pt; text-transform: uppercase; color: #0000ff; font-weight: bold;">{{__('sample.print_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==3)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==4)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==5)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==6)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 11pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 6.3cm">
|
||||
</td>
|
||||
<td style="width: 6.3cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 6.3cm">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature" id="def-signature">
|
||||
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="result-footer-signature" id="dyn-signature" style="display:none;">
|
||||
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}} .
|
||||
<br>
|
||||
@if(!empty($labSettings->alter_verify_sign))
|
||||
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_verify_sign)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} .<br>
|
||||
@if(!empty($labSettings->alter_labtech_sign))
|
||||
<!--<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">-->
|
||||
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
|
||||
@if($sample->lab_id!=22)
|
||||
<span style="line-height: 10px !important; font-size:12px">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} <br>
|
||||
{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function printTest() {
|
||||
@if($sample->is_printed==0)
|
||||
printRecorder()
|
||||
@endif
|
||||
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
function changeLogoAndPrint(){
|
||||
$('#dyn-logo, #def-logo').toggle();
|
||||
$('#dyn-signature, #def-signature').toggle();
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
document.getElementById("doPrinting__").addEventListener("click", printTest)
|
||||
|
||||
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,445 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 0.5cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 0.8cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
*/
|
||||
/*tbody .sample-result {
|
||||
page-break-inside: avoid;
|
||||
|
||||
}*/
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
/*margin-top: 500px !important;*/
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
|
||||
.patient-info, #footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%" style="font-size:11.5pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="KhmerMoulLight_" style="font-size: 13.5pt; text-transform: uppercase; color: #0000ff; font-weight: bold;">{{__('sample.print_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:1px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style="color: #0000ff; margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:1px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style="color: #0000ff; margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-bottom:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td width="25%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b style="color: #0000ff;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td width="25%" style="padding-top:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
|
||||
<td width="25%" style="font-size:17px !important; padding-bottom:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Date Issue')}} : {{date('d-M-Y')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">
|
||||
@if(!empty(Auth::user()->signature))
|
||||
<img id="signature-preview" style="width: 240px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
@@ -0,0 +1,357 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 11.5pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*tbody .sample-result {
|
||||
page-break-inside: avoid;
|
||||
|
||||
}*/
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:11.5pt !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:11.5pt !important;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%" style="font-size:11.5pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
<table width="100%" border="0" class="patient-info_">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%" colspan="2" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date Receive')}}: <span style="color: #0a0302;">{{date('d-M-Y H:i',strtotime($sample->collected_date))}}</span></td>
|
||||
<td width="50%" colspan="2" style="font-size:11.5pt !important; text-align: right; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patho N#')}}: <span style="color: #0a0302;">{{$sample->sample_number}}</span></td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:1px; font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Physician')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
<td width="20%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Telephone')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_gender')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Email')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: #N/A</td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Other/Info')}}</td>
|
||||
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: #N/A</td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Date Issue')}} : {{date('d-M-Y')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">
|
||||
@if(!empty(Auth::user()->signature))
|
||||
<img id="signature-preview" style="width: 240px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
@@ -0,0 +1,801 @@
|
||||
<div class="{{(request()->segment(1)!='shared' ? 'modal':'')}} fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
|
||||
@if(request()->segment(1)!='shared')
|
||||
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<li style="display: inline-block;" class="print" title="Print with alternative logo">
|
||||
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i> <b>{{__('Print Alt-Logo')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->patient->telegramChatId) && $labSettings->telegrambot==1)
|
||||
<li style="display: inline-block;" class="print_" title="Share this result through patient's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result_patient" target_receiver="patient"><i class="fa fa-send"></i> <b>{{__('Send to Patient')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->sample_source->telegramChatId) && $labSettings->telegrambot==1)
|
||||
<li style="display: inline-block;" class="print_" title="Share this result through clinician's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result_clinician" target_receiver="clinician"><i class="fa fa-send"></i> <b>{{__('Send to Clinician')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
<li style=" position: absolute; top: 0; right: 50px;">
|
||||
|
||||
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
@if(!empty($lineHeight))
|
||||
p{
|
||||
line-height 0 !important;
|
||||
}
|
||||
._department-sample-info tr
|
||||
,.line-height_{
|
||||
line-height: {{$lineHeight}} !important;
|
||||
}
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'label_header_font';
|
||||
}
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
|
||||
}
|
||||
.patient-info tr td{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:15px !important;
|
||||
}
|
||||
.header-label-title-color{
|
||||
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
|
||||
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
|
||||
}
|
||||
|
||||
.header-label-font{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.result-font, .name{
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
}
|
||||
|
||||
._department-sample-info tr td{
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 0cm 1cm 1cm 1cm;
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 0px !important;
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1.5px solid #1100ff;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
/*content: '';*/
|
||||
content: none;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: none;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0cm;
|
||||
@bottom-left {
|
||||
content: content
|
||||
}
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
padding-right: 0cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@if(Auth::id()==1)
|
||||
|
||||
#footer .page{
|
||||
counter-increment:listCounter;
|
||||
}
|
||||
|
||||
#footer .page:after{
|
||||
|
||||
content: counter(listCounter);
|
||||
}
|
||||
@endif
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
._department-sample-info tr td{
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
/*border: 1px solid black;*/
|
||||
/*border-collapse: collapse;*/
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.patient-info{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
|
||||
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
|
||||
}
|
||||
|
||||
#footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'result_font' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-changable-base-on-localize{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
@if(request()->segment(1)!='shared')
|
||||
<tr id="def-logo">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="98%" height="110px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}?time={{time()}}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:110px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}?time={{time()}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:110px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
@else
|
||||
<tr id="def-logo">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}?time={{time()}}" />
|
||||
@else
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
@endif
|
||||
<tr id="dyn-logo" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="98%" height="110px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="padding-bottom: 10px !important;">
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="15%" style="padding-left:0cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="15%" style="line-height:17px; font-weight:bold;">{{__('sample.form_patient_agesex')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} ({{\App\Helpers\Helpers::getGenderfull($sample->patient->gender)}})</td>
|
||||
<td class="header-label-title-color" width="15%" style="padding-left:0cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="15%" style="line-height:17px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="15%" style="padding-left:0cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="15%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="15%" style="padding-left:0cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==3)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==4)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==5)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==6)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#1100ff" class="text-top text-center" style="padding-top:0" valign="top">
|
||||
|
||||
<div style="color:white; font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="/*height: 240px;*/ height: 150px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"><td colspan="3"> <br></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 6.2cm"></td>
|
||||
<td style="width: 6.3cm"></td>
|
||||
<td class="text-center text-no-wrap result-font" style="width: 7.0cm; font-size:15px; padding-top:0px !important;">
|
||||
{{__('sample.report_date')}} :{{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
|
||||
<tr class="result-footer-signature" id="def-signature">
|
||||
<td class="text-center text-no-wrap result-font" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 150px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap result-font" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 150px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
<img style="width: 150px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
|
||||
<!--
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p> -->
|
||||
@endif
|
||||
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="result-footer-signature" id="dyn-signature" style="display:none;">
|
||||
<td class="text-center text-no-wrap result-font" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}} .
|
||||
<br>
|
||||
@if(!empty($labSettings->alter_verify_sign))
|
||||
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_verify_sign)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap result-font" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} .<br>
|
||||
@if(!empty($labSettings->alter_labtech_sign))
|
||||
<!--<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">-->
|
||||
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr id="def-footer" >
|
||||
@if(request()->segment(1)!='shared')
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; /*border-top:1px solid #000 !important;*/ padding-top:5px; letter-spacing: -0.5px !important;">
|
||||
@if(!empty($samplePhysician->footer))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->footer) }}?time={{time()}}" />
|
||||
@endif
|
||||
</td>
|
||||
@else
|
||||
<td colspan="3" class="result-page-color" style="text-align:center; /*border-top:1px solid #000 !important;*/ padding-top:5px; letter-spacing: -0.5px !important;">
|
||||
@if(!empty($samplePhysician->footer))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->footer) }}?time={{time()}}" />
|
||||
@else
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/default_footer/'.$labSettings->footer) }}" />
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<tr id="dyn-footer" style="display:none;">
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; /*border-top:1px solid #000 !important;*/ padding-top:5px; letter-spacing: -0.5px !important;">
|
||||
@if(!empty($labSettings->alternative_footer))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_footer/'.$labSettings->alternative_footer) }}" />
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function printTest() {
|
||||
@if($sample->is_printed==0)
|
||||
printRecorder()
|
||||
@endif
|
||||
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
function changeLogoAndPrint(){
|
||||
$('#dyn-logo, #def-logo').toggle();
|
||||
$('#dyn-footer, #def-footer').toggle();
|
||||
|
||||
$('#dyn-signature, #def-signature').toggle();
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("doPrinting__").addEventListener("click", printTest)
|
||||
|
||||
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
@endif
|
||||
</script>
|
||||
@@ -0,0 +1,764 @@
|
||||
<div class="{{(request()->segment(1)!='shared' ? 'modal':'')}} fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
@if(request()->segment(1)!='shared')
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<li style="display: inline-block;" class="print" title="Print with alternative logo">
|
||||
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i> <b>{{__('Print Alt-Logo')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->patient->telegramChatId) && $labSettings->shareable_lab_result==1)
|
||||
<li style="display: inline-block;" class="print_" title="Share this result through patient's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result_patient" target_receiver="patient"><i class="fa fa-send"></i> <b>{{__('Send to Patient')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(!empty($sample->sample_source->telegramChatId) && $labSettings->shareable_lab_result==1)
|
||||
<li style="display: inline-block;" class="print_" title="Share this result through clinician's telegram">
|
||||
<a href="javascript:void(0)" id="send_lab_result_clinician" target_receiver="clinician"><i class="fa fa-send"></i> <b>{{__('Send to Clinician')}}</b></a>
|
||||
</li>
|
||||
@endif
|
||||
<li style=" position: absolute; top: 0; right: 50px;">
|
||||
|
||||
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
display:swap;
|
||||
}
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
@if(!empty($lineHeight))
|
||||
p{
|
||||
line-height 0 !important;
|
||||
}
|
||||
._department-sample-info tr
|
||||
,.line-height_{
|
||||
line-height: {{$lineHeight}} !important;
|
||||
}
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'label_header_font';
|
||||
}
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#000' : $resultColor}};
|
||||
}
|
||||
.patient-info tr td{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:15px !important;
|
||||
}
|
||||
.header-label-title-color{
|
||||
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
|
||||
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
|
||||
}
|
||||
|
||||
.header-label-font{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.result-font, .name{
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
}
|
||||
|
||||
._department-sample-info tr td{
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 0cm 1cm 1cm 1cm;
|
||||
/*font-family: 'result_font';*/
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
/*border-spacing: 2px !important;*/
|
||||
/*border-collapse: separate !important;*/
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0cm;
|
||||
@bottom-left {
|
||||
content: content
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
padding-right: 0cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@if(Auth::id()==1)
|
||||
|
||||
#footer .page{
|
||||
counter-increment:listCounter;
|
||||
}
|
||||
|
||||
#footer .page:after{
|
||||
|
||||
content: counter(listCounter);
|
||||
}
|
||||
@endif
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
/*border: 1px solid black;*/
|
||||
/*border-collapse: collapse;*/
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
}
|
||||
|
||||
.patient-info{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
|
||||
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
|
||||
}
|
||||
|
||||
#footer{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-changable-base-on-localize{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr id="def-logo">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="dyn-logo" style="display:none;">
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center" style="padding-top:0" valign="top">
|
||||
|
||||
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if($labSettings->result_header_id==1)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==2)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==3)
|
||||
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==4)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==5)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
|
||||
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@elseif($labSettings->result_header_id==6)
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
|
||||
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
|
||||
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="/*height: 240px;*/ height: 100px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"><td colspan="3"> <br></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
|
||||
<td style="width: 6.3cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 6.7cm; font-size:15px">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
|
||||
<tr class="result-footer-signature" id="def-signature">
|
||||
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}}
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} <br>
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="result-footer-signature" id="dyn-signature" style="display:none;">
|
||||
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
|
||||
{{__('sample.verify_by')}} .
|
||||
<br>
|
||||
@if(!empty($labSettings->alter_verify_sign))
|
||||
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_verify_sign)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center text-no-wrap">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap" style="font-size:15px">
|
||||
{{__('sample.lab_technician')}} .<br>
|
||||
@if(!empty($labSettings->alter_labtech_sign))
|
||||
<!--<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">-->
|
||||
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
|
||||
@else
|
||||
<br>
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
@endif
|
||||
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
|
||||
@if($sample->lab_id!=22)
|
||||
<span style="line-height: 10px !important; font-size:12px">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} <br>
|
||||
{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function printTest() {
|
||||
@if($sample->is_printed==0)
|
||||
printRecorder()
|
||||
@endif
|
||||
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
function changeLogoAndPrint(){
|
||||
$('#dyn-logo, #def-logo').toggle();
|
||||
$('#dyn-signature, #def-signature').toggle();
|
||||
printJS({
|
||||
printable: "presult-1",
|
||||
type: "html"
|
||||
});
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
document.getElementById("doPrinting__").addEventListener("click", printTest)
|
||||
|
||||
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,451 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 11.5pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:10pt !important;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.tbl-interpret tbody td{
|
||||
border: 1px dashed #555 !important;
|
||||
font-size: 10pt !important;
|
||||
border-spacing: 0px !important;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:10.5pt !important;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
|
||||
.tbl-interpret tbody td{
|
||||
border: 1px dashed #555 !important;
|
||||
font-size: 10pt !important;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px !important;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%" style="font-size: 11.5pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
<table width="100%" border="0" class="patient-info_">
|
||||
<tbody>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:1px; font-size:12pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Name')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Reception date')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->requested_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <span style="margin-left:10px;">{{__('sample.form_patient_gender')}} : </span><span style="margin-left:10px;">{{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</span></td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Report date')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->received_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->sample_source->name_en}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic REF')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Doctor')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$samplePhysician->name_en}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patient\'s contact')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->patient->phone_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('PATH ID')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->sample_number}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Remark')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sample-result_" id="sample-result-print_">
|
||||
<tr class="sample-type">
|
||||
<td>
|
||||
<table width="100%" border="0" class="_department-sample-info">
|
||||
<thead>
|
||||
<tr style="background: #eee;">
|
||||
<td colspan="5" style="text-align: center; font-weight: bold; color: #0000ff !important;">PAP SMEAR REPORT</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td width="25%" class="pl-0" style="padding-left: 0px;"><b class="sourceserifpro-bold">Type of Sample:</b></td>
|
||||
<td width="75%" ><span id="tchk-1433" style="font-size: 20px ">☐</span> Conventional smear</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="padding-left: 12.5px;"></td>
|
||||
<td><span id="tchk-1434" style="font-size: 20px ">☐</span> Liquid-based cytology (LBC)</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td class="pl-0" style="padding-left: 0px;"><b class="sourceserifpro-bold">PAP smear quality:</b></td>
|
||||
<td><span id="tchk-1436" style="font-size: 20px ">☐</span> Satisfactory of evaluation</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td style="padding-left: 12.5px;"></td>
|
||||
<td><span id="tchk-1437" style="font-size: 20px ">☐</span> Not satisfactory for evaluation (bloody smear smashing cellular details)</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td style="padding-left: 12.5px;"></td>
|
||||
<td><span id="tchk-1438" style="font-size: 20px ">☐</span> PAP smear rejected, not analyzed</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" class="pl-0" style="padding-left: 0px;"><b class="sourceserifpro-bold">Conclusion:</b></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" class="pl-2" style="padding-left: 12.5px;">I. Negative for intraepithelial lesion or malignancy</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 35.5px;"><span id="tchk-1440" style="font-size: 20px ">☐</span> Normal</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 35.5px;"><span id="tchk-1441" style="font-size: 20px ">☐</span> Begin cellular modification:</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<table width="100%" border="0" class="_department-sample-info">
|
||||
<tr>
|
||||
<td width="50%" style="padding-left: 80px;"><span id="tchk-1442" style="font-size: 20px ">☐</span> Infection:</td>
|
||||
<td width="50%"><span id="tchk-1449" style="font-size: 20px ">☐</span> Reactive changes:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 110px"><span id="tchk-1443" style="font-size: 20px ">☐</span> Trichomonas Vaginalis</td>
|
||||
<td style="padding-left: 30px"><span id="tchk-1450" style="font-size: 20px ">☐</span> Inflammation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 110px"><span id="tchk-1444" style="font-size: 20px ">☐</span> Mycosis</td>
|
||||
<td style="padding-left: 30px"><span id="tchk-1451" style="font-size: 20px ">☐</span> Atrophy</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 110px"><span id="tchk-1446" style="font-size: 20px ">☐</span> Herpes</td>
|
||||
<td style="padding-left: 30px"><span id="tchk-1452" style="font-size: 20px ">☐</span> Radiation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 110px"><span id="tchk-1447" style="font-size: 20px ">☐</span> Actinomyces</td>
|
||||
<td style="padding-left: 30px"><span id="tchk-1453" style="font-size: 20px ">☐</span> IUD associated changes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 110px"><span id="tchk-1448" style="font-size: 20px ">☐</span> Bacterial vaginosis</td>
|
||||
<td><span id="tchk-191" style="font-size: 20px ">☐</span> Others</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" class="pl-2" style="padding-left: 12.5px;">II. Epithelial abnormalities</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 35.5px;">1. Squamous cell abnormalities</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1456" style="font-size: 20px ">☐</span> ASC-US : Atypical Squamous Cells of Undetermined Significance.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1457" style="font-size: 20px ">☐</span> ASC-H : Atypical Squamous Cells - cannot exclude HSIL</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1458" style="font-size: 20px ">☐</span> LSIL : Low grade squamous intraepithelial lesion (condyloma - HPV - CIN 1).</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1459" style="font-size: 20px ">☐</span> HSIL : High grade squamous intraepithelial lesion (moderate or severe dysplasia encompassing carcinoma in situ, CIN 2, CIN 3)</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 110px;"><span id="tchk-1460" style="font-size: 20px ">☐</span> Supeious for invasion</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1461" style="font-size: 20px ">☐</span> Squamous cell carcinoma (SCC)</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 35.5px;">2. Glandular cells</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1463" style="font-size: 20px ">☐</span> AGUS : atypical glandular cells, not otherwise specified.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" style="padding-left: 60px;">
|
||||
<span id="tchk-1464" style="font-size: 20px ">☐</span> Adenocarcinoma (specify the origin of the cells):
|
||||
<span id="tchk-1465" style="font-size: 20px ">☐</span> Endocervical
|
||||
<span id="tchk-1466" style="font-size: 20px ">☐</span> Endometrial
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
|
||||
|
||||
<table id="footer" width="100%" border="0" style="margin-top:5px !important;">
|
||||
<tr class="result-footer-signature">
|
||||
|
||||
<td class="text-no-wrap" style="width:60vh !important; text-align:center;">
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,348 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*tbody .sample-result {
|
||||
page-break-inside: avoid;
|
||||
|
||||
}*/
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
<table width="100%" border="0" class="patient-info_">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%" colspan="2" style="font-size:16px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date Receive')}}: <span style="color: #0a0302;">{{date('d-M-Y H:i',strtotime($sample->collected_date))}}</span></td>
|
||||
<td width="50%" colspan="2" style="font-size:16px !important; text-align: right; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patho N#')}}: <span style="color: #0a0302;">{{$sample->sample_number}}</span></td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:1px; font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Physician')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
|
||||
<td width="20%" style="font-size:16px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Telephone')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_gender')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Email')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: #N/A</td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Other/Info')}}</td>
|
||||
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: #N/A</td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Date Issue')}} : {{date('d-M-Y')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">
|
||||
@if(!empty(Auth::user()->signature))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
@@ -0,0 +1,356 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*tbody .sample-result {
|
||||
page-break-inside: avoid;
|
||||
|
||||
}*/
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:12pt !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:12pt !important;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
<table width="100%" border="0" class="patient-info_">
|
||||
<tbody>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:1px; font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Nom')}} : </td>
|
||||
<td width="35%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="font-size:16px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date de réception')}} : </td>
|
||||
<td width="20%" style="font-size:16px !important; padding-top:1px; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->requested_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}} : </td>
|
||||
<td width="35%" style="font-size:16px !important; line-height:20px;" align="left">{{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <span style="margin-left:10px;">{{__('sample.form_patient_gender')}} : </span><span style="margin-left:10px;">{{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</span></td>
|
||||
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date du rapport')}} : </td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->received_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinique')}} : </td>
|
||||
<td width="35%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->sample_source->name_en}}</td>
|
||||
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinique REF')}} : </td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Docteur')}} : </td>
|
||||
<td width="35%" style="font-size:16px !important; line-height:20px;" align="left">{{$samplePhysician->name_en}}</td>
|
||||
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Contacte du patient')}} : </td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left">{{$sample->patient->phone_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('PATH ID')}} : </td>
|
||||
<td width="35%" style="font-size:16px !important; line-height:20px;" align="left">{{$sample->sample_number}}</td>
|
||||
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Remarques')}} : </td>
|
||||
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left"></td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 240px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:5px !important; display:none;">
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-no-wrap" style="width:60vh !important; text-align:center;" valign="bottom">
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-no-wrap" style="width:60vh !important; text-align:center;">
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
@@ -0,0 +1,392 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="approve" reverify="1">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
|
||||
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i> <b> {{__('sample.btn_approve')}} </b></a>
|
||||
@endif
|
||||
</li>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 11.5pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*tbody .sample-result {
|
||||
page-break-inside: avoid;
|
||||
|
||||
}*/
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:11.5pt !important;
|
||||
}
|
||||
|
||||
.tbl-interpret tbody td{
|
||||
border: 1px dashed #555 !important;
|
||||
font-size: 10pt !important;
|
||||
border-spacing: 0px !important;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
font-family:"Verdana" !important;
|
||||
font-size:11.5pt !important;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
|
||||
width:390px !important;
|
||||
}*/
|
||||
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.abnormal{
|
||||
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
|
||||
color: {{$labSettings->abnormal_text_color}} !important;
|
||||
}
|
||||
|
||||
.tbl-interpret tbody td{
|
||||
border: 1px dashed #555 !important;
|
||||
font-size: 10pt !important;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px !important;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%" style="font-size: 11.5pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
<table width="100%" border="0" class="patient-info_">
|
||||
<tbody>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="padding-bottom:1px; font-size:12pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Name')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Reception date')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->requested_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <span style="margin-left:10px;">{{__('sample.form_patient_gender')}} : </span><span style="margin-left:10px;">{{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</span></td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Report date')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->received_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->sample_source->name_en}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic REF')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Doctor')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$samplePhysician->name_en}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patient\'s contact')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->patient->phone_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('PATH ID')}} : </td>
|
||||
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->sample_number}}</td>
|
||||
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Remark')}} : </td>
|
||||
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
|
||||
</tr>
|
||||
<tr style="height: 5px !important;">
|
||||
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sample-result" id="sample-result-print">
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
|
||||
<table class="tbl-interpret" width="100%" border="0" style="border-spacing: 0px !important; border-collapse: collapse !important;">
|
||||
<thead>
|
||||
<tr><th colspan="2" class="text-no-wrap">Interpretation</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="35%">RESULTS</td>
|
||||
<td width="65%">REMARKS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Positive</td>
|
||||
<td>Sample provided contains HPV DNA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Indeterminate</td>
|
||||
<td>Presence of inhibitors in the sample</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Negative</td>
|
||||
<td>Sample provided does not contain HPV DNA or number of viral DNA copies are below the detection limit of the assay</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="font-size:11.5pt;">
|
||||
<b>Note</b><br>
|
||||
<p>1. High risk Human papilloma viruses detected are 16, 18, 31, 33, 35, 39, 45, 51, 52, 56, 58 & 59. The low risk genotypes detected
|
||||
are 6 and 11.</p>
|
||||
<p>2. All Indeterminate results should be retested.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<table id="footer" width="100%" border="0" style="margin-top:5px !important;">
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-no-wrap" style="width:60vh !important; text-align:center;" valign="bottom">
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
|
||||
@else
|
||||
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-no-wrap" style="width:60vh !important; text-align:center;">
|
||||
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
|
||||
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
|
||||
@else
|
||||
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
480
resources/views/modal/preview_vaccination_invoice.blade.php
Normal file
480
resources/views/modal/preview_vaccination_invoice.blade.php
Normal file
@@ -0,0 +1,480 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:10px !important;
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-header{
|
||||
font-family: "{{(App::isLocale('en') ? 'Times New Roman': 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.font-changeable{
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.table-inv tr td{
|
||||
font-size:11px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-header" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important; font-size:9pt !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('vaccination.invoice_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:9pt !important;" width="30%">: {{$vaccinations->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('Date')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($vaccinations->patient->dob, $vaccinations->vaccination_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($vaccinations->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('Next Visit')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{date('d-m-Y',strtotime($vaccinations->next_visit_date))}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="8%" class="text-center" style="width:90px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($vaccinations->vaccinationDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
<tr>
|
||||
<td class=" text-center">{{$k+1}}</td>
|
||||
<td class="font-changable" style="font-size:12px !important;">{{@$invItem->vaccineItem->medicine->name}}</td>
|
||||
<td class="text-right ">{{$invItem->qty}}</td>
|
||||
<td class="text-right ">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;"></span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} (%) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->discount,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->gross_total ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($vaccinations->gross_total) * ($vaccinations->exchange_rate <=0 ? $labSettings->exchange_rate : $vaccinations->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</p>
|
||||
<p class="font-header" style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 9px !important; font-size:9pt !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('vaccination.invoice_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:9pt !important;" width="30%">: {{$vaccinations->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('Date')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($vaccinations->patient->dob, $vaccinations->vaccination_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($vaccinations->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('Next Visit')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{date('d-m-Y',strtotime($vaccinations->next_visit_date))}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="0%" class="text-center" style="width:90px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($vaccinations->vaccinationDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
<tr>
|
||||
<td class=" text-center">{{$k+1}}</td>
|
||||
<td class="font-changable" style="font-size:12px !important;">{{@$invItem->vaccineItem->medicine->name}}</td>
|
||||
<td class="text-right ">{{$invItem->qty}}</td>
|
||||
<td class="text-right ">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left " colspan="4"><span style="padding-left: 10px !important;"></span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} (%) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->discount,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->gross_total ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($vaccinations->gross_total) * ($vaccinations->exchange_rate <=0 ? $labSettings->exchange_rate : $vaccinations->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
540
resources/views/modal/preview_vaccination_invoice_.blade.php
Normal file
540
resources/views/modal/preview_vaccination_invoice_.blade.php
Normal file
@@ -0,0 +1,540 @@
|
||||
<div class="modal fade" id="print_invoice_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
<!--<li style="display: inline-block;" class="print">-->
|
||||
<!-- <a href="javascript:void(0);" onclick="$('.btn-print-invoice-a4').click()"><i class="fa fa-print"></i> <b>{{__('invoice.print')}} A4</b></a>-->
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait">
|
||||
<div class="psample-result active" id="presult-1">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
|
||||
@endphp
|
||||
|
||||
.patient-info tr td{
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
font-size:10px !important;
|
||||
}
|
||||
|
||||
.font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
font-display: swap;
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
/*width: 21cm;*/
|
||||
width: 297mm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1mm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-size: 8pt;
|
||||
line-height: 10px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
line-height: 0.7rem !important;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
/*bottom: .25rem;*/
|
||||
bottom: -0.6rem !important;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
@page {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 210mm 297mm landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
@page {
|
||||
size: 11.7in 16.5in landscape;
|
||||
margin: 0.5cm 0.5cm 0;
|
||||
padding: 0;
|
||||
}
|
||||
tbody.sample-result {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
padding: 3px !important;
|
||||
}
|
||||
}
|
||||
#print_invoice_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
.border-1{
|
||||
border: 1px solid #ffffff !important;
|
||||
}
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
.table-inv tr td{
|
||||
font-size:11px !important;
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
|
||||
|
||||
<div style="width: 49%; display: inline-block; clear: both; /*border-right: 1px dashed #eee;*/ vertical-align: top; margin-right:1% !important">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 12pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<font style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</font><br>
|
||||
<font class="font-changeable" style="line-height: 20px !important;font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </font>
|
||||
<br><font style="line-height: 9px !important;font-size: 8pt;">{{$labSettings->phone_number}}<br>{{$labSettings->email}}</font>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('vaccination.invoice_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:9pt !important;" width="30%">: {{$vaccinations->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('Date')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($vaccinations->patient->dob, $vaccinations->vaccination_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($vaccinations->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('Next Visit')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{date('d-m-Y',strtotime($vaccinations->next_visit_date))}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<!--<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>-->
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($vaccinations->vaccinationDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><p class="value-pair line-height"></p><span style="background:#fff; position: relative;">{{@$invItem->vaccineItem->medicine->name}}</span></td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1">{{$invItem->qty}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@for($i=$total; $i<=19; $i++)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><i style="position: absolute;"> </td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable" style="border-bottom: 1pt solid black" >
|
||||
<td class="text-left" colspan="3" style="border-left: 0px; border-right:0px;"><span style="padding-left: 10px !important;"></span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} (%) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->discount,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->gross_total ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($vaccinations->gross_total) * ($vaccinations->exchange_rate <=0 ? $labSettings->exchange_rate : $vaccinations->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 49%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 10pt; font-weight: bold;" class="KhmerMoulLight ">{{$labSettings->name_kh}}</p>
|
||||
<font style="line-height: 13px !important; font-size: 9pt; font-weight: bold;" class="text-uppercase ">{{$labSettings->name_en}}</font><br>
|
||||
<font class="font-changeable" style="line-height: 20px !important;font-size: 8pt;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </font>
|
||||
<br><font style="line-height: 9px !important;font-size: 8pt;">{{$labSettings->phone_number}}<br>{{$labSettings->email}}</font>
|
||||
</td>
|
||||
<td style="width:80px; vertical-align: bottom;" >
|
||||
<div class="visible-print text-center">
|
||||
@if($labSettings->shareable_lab_result==1)
|
||||
{!! QrCode::size(60)->generate(url('/shared/lab-result/'.$sample_id)); !!}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{__('vaccination.invoice_title')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="p-0">
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('invoice.form_invoice_number')}}</td>
|
||||
<td class="text-left" style="font-size:9pt !important;" width="30%">: {{$vaccinations->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('Date')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('invoice.table_patient_name')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->name_en}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.form_age')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-no-wrap text-left">
|
||||
: {{\App\Helpers\Helpers::getAge($vaccinations->patient->dob, $vaccinations->vaccination_date)}}, {{__('sample.form_patient_gender')}}: {{\App\Helpers\Helpers::getGender($vaccinations->patient->gender)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('patient.table_phon')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{$vaccinations->patient->phone_number}} </td>
|
||||
<td style="font-size:10pt !important;" class="text-left text-no-wrap">{{__('Next Visit')}}</td>
|
||||
<td style="font-size:10pt !important;" class="text-left ">: {{date('d-m-Y',strtotime($vaccinations->next_visit_date))}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height: 20px;"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="p-0">
|
||||
<table width="100%" class="table-inv" style="border-collapse: collapse; !important; font-size:10pt !important;">
|
||||
<tbody>
|
||||
<tr class="bg-light font-changable">
|
||||
<!--<td width="8%" class="text-center">{{__('invoice.table_no')}}</td>-->
|
||||
<td class="text-center">{{__('invoice.form_description')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
<?php $total = 0;?>
|
||||
@foreach($vaccinations->vaccinationDetail as $k=>$invItem)
|
||||
<?php $total+= $invItem->unit_price;?>
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><p class="value-pair line-height"></p><span style="background:#fff; position: relative;">{{@$invItem->vaccineItem->medicine->name}}</span></td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1">{{$invItem->qty}}</td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@for($i=$total; $i<=19; $i++)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><i style="position: absolute;"> </td>
|
||||
<td style="padding:0 5px;" class="text-center font-changable border-1"></td>
|
||||
<td style="padding:0 5px;" class="text-right font-changable border-1"></td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr class="font-changable" style="border-bottom: 1pt solid black" >
|
||||
<td class="text-left" colspan="3" style="border-left: 0px; border-right:0px;"><span style="padding-left: 10px !important;"></span></td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 30px !important;">{{__('invoice.table_invoice_date')}}: {{date('d-m-Y',strtotime($vaccinations->vaccination_date))}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_discount')}} (%) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->discount,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format($vaccinations->gross_total ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format((($vaccinations->gross_total) * ($vaccinations->exchange_rate <=0 ? $labSettings->exchange_rate : $vaccinations->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Comment -->
|
||||
</tbody>
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="padding: 0 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 3cm">
|
||||
</td>
|
||||
<td style="width: 4cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 4cm; padding-left: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top: 15px; !important;"> </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" style="padding: 0 10px !important;">
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
129
resources/views/modal/repayment.blade.php
Normal file
129
resources/views/modal/repayment.blade.php
Normal file
@@ -0,0 +1,129 @@
|
||||
<!-- Modal Repayment -->
|
||||
<div class="modal fade modal-primary" id="modal-repayment">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('invoice.repayment')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="repayment-form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="repayment-data-id" value="0" />
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="total-amount" class="col-sm-5 col-form-label">{{__('invoice.table_invoice_code')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control form-control-xxs select2 rounded-0 py-0" name="invoice_id" id="repayment-invoice-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($oweInvoices as $invoice)
|
||||
<option value="{{$invoice->id}}"> {{$invoice->sample->patient->name_en . ' ' .$invoice->invoice_code}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="net-amount" class="col-sm-5 col-form-label">{{__('invoice.table_total_cost')}} <span class="text-danger">({{$labSettings->currency==1?'៛':'$'}})</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" max="99999999" step="any" required value="" class="form-control form-control-xxs rounded-0" name="amount_to_pay" id="amount_to_pay" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="discount-amount" class="col-sm-5 col-form-label">{{__('invoice.form_discount')}} <span class="text-danger">({{$labSettings->discount_type == 2 ? ($labSettings->currency==1?'៛':'$') : '%'}})</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="hidden" name="discount_type" value="{{$labSettings->discount_type}}" id="discount_type" />
|
||||
<input type="number" min="0.00" max="99999999" step="any" required value="" class="form-control form-control-xxs rounded-0" name="discount" id="discount-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="discount-amount" class="col-sm-5 col-form-label">{{__('invoice.form_net_amount')}} <span class="text-danger"></span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" max="99999999" step="any" required value="" class="form-control form-control-xxs rounded-0" name="amount_after_discount" id="amount_after_discount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 bg-light px-0 pt-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.pay_type')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control form-control-xxs select2_ rounded-0 py-0" name="payment_method" id="payment_method" style=" width: 100% !important;">
|
||||
<option value="1" >{{__('invoice.cash_paid')}}</option>
|
||||
<option value="2" >{{__('invoice.bank_paid')}}</option>
|
||||
<option value="3" >{{__('invoice.cash_paid')}} + {{__('invoice.bank_paid')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.cash_paid')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" max="99999999" step="any" required value="0.00" class="form-control form-control-xxs rounded-0" name="cash_repayment_amount" id="cash_repayment_amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.bank_paid')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" max="99999999" step="any" required value="0.00" class="form-control form-control-xxs rounded-0" name="bank_repayment_amount" id="bank_repayment_amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_date')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="date" value="{{date('Y-m-d')}}" class="form-control form-control-xxs rounded-0" name="repayment_date" id="repayment_date" placeholder="DD-MM-YYYY">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.bank_name')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="" class="form-control form-control-xxs rounded-0" name="bank_name" id="bank_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.transaction_no')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="" class="form-control form-control-xxs rounded-0" name="transaction_ref" id="transaction_ref">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.exchange_rate')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" min="0.00" max="99999999" step="any" required value="{{$labSettings->exchange_rate}}" class="form-control form-control-xxs rounded-0" name="exchange_rate" id="exchange_rate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_repayment', 'update_repayment']))
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSaveRepayment"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
43
resources/views/modal/sample_label_print.blade.php
Normal file
43
resources/views/modal/sample_label_print.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="modal fade" id="print_sample_label_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('sample-sticker', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog" style="width: 1.90in !important;">
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.80, maximum-scale=2, minimum-scale=.80, user-scalable=no">
|
||||
|
||||
<page size="sticker" id="sample-sticker">
|
||||
<div class="label">
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
@media print {
|
||||
.label{
|
||||
width: 1.90in; height: .80in; background:#fff; outline: 1px dotted #999; text-align: center;
|
||||
}
|
||||
|
||||
}
|
||||
.label{
|
||||
width: 1.90in; height: .80in; background:#fff; outline: 1px dotted #999; text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div style="text-align: center; padding: 0 5px;">
|
||||
<p style="padding: 0; margin: 0; font-size:13px;">{{$sample->patient->name_en . ' '.(\App\Helpers\Helpers::getAge($sample->patient->dob, date('Y-m-d'))). ($sample->patient->gender == 1 ? ' M' : ' F')}} <br> <b style="font-size:17px !important;"> {{str_replace('S-'.$labSettings->short_name.'-', '', $sample->sample_number)}} </b></p>
|
||||
{!! DNS1D::getBarcodeHTML(str_replace('S-'.$labSettings->short_name.'-', '', $sample->sample_number), 'C128',1.40,30) !!}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
68
resources/views/modal/sample_result.blade.php
Normal file
68
resources/views/modal/sample_result.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
|
||||
<!-- Modal Add Test Result -->
|
||||
<div class="modal fade modal-primary" id="modal-add-test-result" >
|
||||
<div class="modal-dialog modal-dialog-scrollable m-auto modal-xxl">
|
||||
<div class="modal-content vh-100__" style="height:calc(100vh - 80px)" role="document">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title"><i class="mdi mdi-format-list-bulleted-type"></i> {{__('sample.add_result_title')}}</h6>
|
||||
<span class="pl-4 text-muted">{{__('sample.form_patient_code')}}: <b class="pl-1 patient-code text-info">-</b></span>
|
||||
<span class="pl-3 text-muted">{{__('sample.form_patient_name')}}: <b class="pl-1 patient-name text-info">-</b></span>
|
||||
<span class="pl-3 text-muted">{{__('sample.form_sample_number')}}: <b class="pl-1 sample-number text-info">-</b></span>
|
||||
<span class="pl-3 text-muted">{{__('sample.form_sample_source')}}: <b class="pl-1 sample-source text-info">-</b></span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
<form id="form-add-test-result" method="post" action="{{url('sample/add-test-result')}}" onkeydown="return (event.key != 'Enter' || (event.target.matches('textarea')));" class="mb-5">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="sample_id" id="sample-id" value="0" />
|
||||
<div class="form-vertical table-responsive">
|
||||
<div class="row_">
|
||||
<table class="table table-striped table-bordered border">
|
||||
<thead>
|
||||
<tr class="bg-success text-white result-item">
|
||||
<th class="py-2">{{__('sample.add_result_test')}}
|
||||
<input type="hidden" id="result-0" class="T0" value="{{$agedy}}">
|
||||
<input type="hidden" id="result-00" class="T-00" value="{{($sample->patient->gender==1 ? 1 : 0.742)}}">
|
||||
</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('sample.add_result_result')}}</th>
|
||||
<th width="5%" class="py-2 text-center">{{__('sample.add_result_unit_sign')}}</th>
|
||||
<th width="6%" class="py-2 text-center">{{__('sample.add_result_ref_range')}}</th>
|
||||
<th width="10%" class="py-2 text-center">{{__('sample.add_result_test_date')}}</th>
|
||||
<th width="10%" class="py-2 text-center">{{__('sample.add_result_performed_by')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('comment.table_name')}}</th>
|
||||
<th width="3%" class="py-2">{{__('sample.add_result_hide')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="test-item-result">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" id="btn-add-test-result" style="display: none"></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row footer_fixed">
|
||||
<div class="col-sm-12 " >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12 text-right pr-4">
|
||||
|
||||
<button type="button" class="btn btn-inverse-warning ml-5 float-left" id="edit-test" value="edit-test"><i class="fa fa-edit"></i>
|
||||
{{__('sample.add_result_btn_edit_test')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_result','update_result']))
|
||||
<button type="button" class="btn btn-info mr-2 btnAddTestResult" id="add-test-result" value="save-result"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.add_result_btn_save')}}</span></button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_result']))
|
||||
<button type="button" class="btn btn-inverse-info mr-2 btnAddTestResult" value="save-result-preview"><i class="fa fa-floppy-o"></i> <span class="save">{{__('sample.add_result_btn_save_preview')}}</span></button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-light mr-5" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
303
resources/views/modal/stock_in_print.blade.php
Normal file
303
resources/views/modal/stock_in_print.blade.php
Normal file
@@ -0,0 +1,303 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 29.7cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
#print_preview_modal .modal-dialog.A4-portrait {
|
||||
width: 29.7cm !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{$report_data['report_name']}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Received Date</th>
|
||||
<th class="p-1">Supplier</th>
|
||||
<th class="p-1">Group Item</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">Expiry Date</th>
|
||||
<th class="p-1">Unit Price</th>
|
||||
<th class="p-1">Quantity</th>
|
||||
<th class="p-1">Total cost</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@php
|
||||
$total = 0;
|
||||
@endphp
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1 text-center">{{!empty($v->received_date) ? date('d-m-Y',strtotime($v->received_date)) : ''}}</td>
|
||||
<td class="p-1">{{$v->supplier}}</td>
|
||||
<td class="p-1">{{$v->med_group}}</td>
|
||||
<td class="p-1">{{$v->medicine}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->expiry_date) ? date('d-m-Y',strtotime($v->expiry_date)) : ''}}</td>
|
||||
<td class="p-1">{{$v->unit_price}}</td>
|
||||
<td class="p-1">{{$v->quantity}}</td>
|
||||
<td class="p-1 text-center">{{$v->unit_price*$v->quantity}}</td>
|
||||
|
||||
</tr>
|
||||
@php
|
||||
$total += $v->unit_price*$v->quantity;
|
||||
@endphp
|
||||
@endforeach
|
||||
<tr><td class="p-1 text-center" colspan="7">Total</td><td class="p-1 text-center">{{$total}}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm"></td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Reported By')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">........................ <br>
|
||||
{{date('d-m-Y H:i')}}<br>
|
||||
<!--@if(!empty(Auth::user()->signature))-->
|
||||
<!-- <img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">-->
|
||||
<!--@else-->
|
||||
<!-- <br>-->
|
||||
<!--@endif-->
|
||||
<!--<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
312
resources/views/modal/stock_out_print.blade.php
Normal file
312
resources/views/modal/stock_out_print.blade.php
Normal file
@@ -0,0 +1,312 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 29.7cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
#print_preview_modal .table tbody td{
|
||||
white-space: break-spaces !important;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal_detail .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
#print_preview_modal .modal-dialog.A4-portrait {
|
||||
width: 29.7cm !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{$report_data['report_name']}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1" style="width: 100px !important;">Issue Date</th>
|
||||
<th class="p-1" style="width: 170px !important;">Group Item</th>
|
||||
<th class="p-1" style="width: 200px !important;">Item Name</th>
|
||||
<th class="p-1" style="width: 100px !important;">Unit</th>
|
||||
<th class="p-1">Price</th>
|
||||
<th class="p-1">Qty</th>
|
||||
<th class="p-1">Total Cost</th>
|
||||
<th class="p-1">In stock</th>
|
||||
<!--<th class="p-1">Expired Date</th>-->
|
||||
<th class="p-1">Taken by</th>
|
||||
<th class="p-1">Taken on</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@php
|
||||
$total = 0;
|
||||
$totalInstock = 0;
|
||||
@endphp
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1 text-center" style="width: 100px !important;">{{!empty($v->issue_date) ? date('d-m-Y',strtotime($v->issue_date)) : ''}}</td>
|
||||
<td class="p-1" style="width: 170px !important;">{{$v->med_group}}</td>
|
||||
<td class="p-1" style="width: 200px !important;">{{$v->medicine}}</td>
|
||||
<td class="p-1">{{$v->unit}}</td>
|
||||
<td class="p-1">{{$v->unit_price}}</td>
|
||||
<td class="p-1">{{$v->quantity}}</td>
|
||||
<td class="p-1">{{number_format($v->total_expense,2)}}</td>
|
||||
<td class="p-1">{{$v->available_quantity}}</td>
|
||||
<!--<td class="p-1">{{$v->expiry_date}}</td>-->
|
||||
<td class="p-1 text-center">{{$v->name}}</td>
|
||||
<td class="p-1 text-center">{{$v->created_at}}</td>
|
||||
</tr>
|
||||
@php
|
||||
$total += $v->unit_price*$v->quantity;
|
||||
@endphp
|
||||
@endforeach
|
||||
<tr><td class="p-1 text-center" colspan="6">Total</td><td class="p-1 text-center">{{$total}}</td><td></td><td></td><td></td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm"></td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('Reported By')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
|
||||
</td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap">........................ <br>
|
||||
{{date('d-m-Y H:i')}}<br>
|
||||
<!--@if(!empty(Auth::user()->signature))-->
|
||||
<!-- <img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">-->
|
||||
<!--@else-->
|
||||
<!-- <br>-->
|
||||
<!--@endif-->
|
||||
<!--<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
357
resources/views/modal/summary_report_print.blade.php
Normal file
357
resources/views/modal/summary_report_print.blade.php
Normal file
@@ -0,0 +1,357 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<div class="presult-pagination d-none">
|
||||
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
|
||||
<span class="page-count">1</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
.tacteng {
|
||||
font-family: Tacteng !important;
|
||||
}
|
||||
.sourceserifpro-bold {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
}
|
||||
/*body {
|
||||
background: rgb(204, 204, 204);
|
||||
}*/
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 13pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0.1cm !important;
|
||||
padding-right: 1cm !important;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#print_preview_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#print_preview_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.bg-light{
|
||||
background: #e8e8e8 !important;
|
||||
}
|
||||
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
<input type="hidden" name="patient_sample_id" id="patient_sample_id" value="4353911">
|
||||
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
@if(!empty($samplePhysician->logo))
|
||||
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
|
||||
@else
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 15pt; font-weight: 700; text-decoration: underline">{{__('report.summary_rpt_tittle')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<b>{{__('report.summary_report_section_by_sample_source')}}</b>
|
||||
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important;">
|
||||
<thead>
|
||||
|
||||
<tr class="bg-light">
|
||||
<td style="padding-left: 10px; font-weight:bold;">{{__('report.summary_clinic_name')}}</td>
|
||||
<td style="width:3cm; padding-left: 10px; font-weight:bold;">{{__('report.summary_male_patient')}}</td>
|
||||
<td style="width:4cm; padding-left: 10px; font-weight:bold;">{{__('report.summary_female_patient')}}</td>
|
||||
<td style="width:3cm; padding-left: 10px; font-weight:bold;">{{__('report.summary_total_patient')}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['sample_source_data'] as $j=>$l)
|
||||
<tr>
|
||||
<td style="padding-left: 10px">{{$l['clinic_name']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$l['total_male_patient']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$l['total_female_patient']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$l['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<b>{{__('report.summary_report_section_by_test')}}</b>
|
||||
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important;">
|
||||
<thead>
|
||||
|
||||
<tr class="bg-light">
|
||||
<td style="padding-left: 10px; font-weight:bold;">{{__('report.summary_rpt_test_type')}}</td>
|
||||
<td style="padding-left: 10px; font-weight:bold; width:3cm;">{{__('report.summary_male_patient')}}</td>
|
||||
<td style="padding-left: 10px; font-weight:bold; width:4cm;">{{__('report.summary_female_patient')}}</td>
|
||||
<td style="padding-left: 10px; font-weight:bold; width:3cm;">{{__('report.summary_total_patient')}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $k=>$val)
|
||||
@if(!is_array($val))
|
||||
<tr class="bg-white">
|
||||
<td style="border:1px solid #000; padding-left: 10px" colspan="4"><b>{{$val}}</b></td>
|
||||
</tr>
|
||||
@else
|
||||
@foreach($val as $v)
|
||||
<tr>
|
||||
<td style="padding-left: 10px"><span style="margin-left:15px !important;">{{$v['group_result']}}</span></td>
|
||||
<td style="text-align: right; padding-right: 10px;">{{$v['total_male_patient']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px;">{{$v['total_female_patient']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px;">{{$v['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<b>{{__('report.summary_report_section_by_category')}}</b>
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important;">
|
||||
<thead>
|
||||
|
||||
<tr class="bg-light">
|
||||
<td style="padding-left: 10px; font-weight:bold;">{{__('report.summary_category_name')}}</td>
|
||||
<td style="width:3cm; padding-left: 10px; font-weight:bold;">{{__('report.summary_male_patient')}}</td>
|
||||
<td style="width:4cm; padding-left: 10px; font-weight:bold;">{{__('report.summary_female_patient')}}</td>
|
||||
<td style="width:3cm; padding-left: 10px; font-weight:bold;">{{__('report.summary_total_patient')}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$total_male = 0;
|
||||
$total_female = 0;
|
||||
$total_patient = 0;
|
||||
?>
|
||||
@foreach($report_data['test_category_data'] as $raw=>$v)
|
||||
<?php
|
||||
$total_male += $v['total_male_patient'];
|
||||
$total_female += $v['total_female_patient'];
|
||||
$total_patient += $v['total_patient'];
|
||||
?>
|
||||
<tr>
|
||||
<td style="padding-left: 10px">{{$v['category']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$v['total_male_patient']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$v['total_female_patient']}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$v['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr class="bg-light">
|
||||
<td class="pl-4">{{__('report.total')}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$total_male}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$total_female}}</td>
|
||||
<td style="text-align: right; padding-right: 10px">{{$total_patient}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="footer_" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
|
||||
</tr>
|
||||
<tr class="result-footer-signature">
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap"></td>
|
||||
<td class="text-center text-no-wrap" valign="bottom">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
50
resources/views/modal/test_sample_formula.blade.php
Normal file
50
resources/views/modal/test_sample_formula.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
<!-- Modal Add Organism Result -->
|
||||
<div class="modal fade modal-primary" id="modal-test-sample-formula">
|
||||
<div class="modal-dialog modal-xl p-5">
|
||||
<div class="modal-content border border-light shadow">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title"><i class="mdi mdi-format-list-bulleted-type"></i> {{__('test_sample.form_formula')}} </h6>
|
||||
<button id="close-modal-test-sample-formula" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_department')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" name="department_id" id="test-sample-formula-department-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($departments as $department)
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_sample_type')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" name="sample_type_id" id="test-sample-formula-sample-type-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.form_test_name')}} </label>
|
||||
<select class="form-control rounded-0 select2" name="test_sample_id" id="test-sample-formula-heading-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info mr-2 btnAssignTest" id="btnAdd2Formula"><i class="mdi mdi-code-brackets"></i> <span class="save">{{__('Add to Formula')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light mr-5" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
306
resources/views/modal/vaccination_print.blade.php
Normal file
306
resources/views/modal/vaccination_print.blade.php
Normal file
@@ -0,0 +1,306 @@
|
||||
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
|
||||
<div class="print-preview-header">
|
||||
<ul>
|
||||
<li style="display: inline-block;" class="print">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('sample.btn_print')}}</b></a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xl A4-portrait"><div class="psample-result active" id="presult-1">
|
||||
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
|
||||
}
|
||||
.KhmerMoulLight {
|
||||
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
|
||||
}
|
||||
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
margin-left: 0.5cm !important;
|
||||
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
|
||||
padding: 1cm;
|
||||
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
|
||||
font-size: 12pt;
|
||||
line-height: 23px;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
page[size="A4"], th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page[size="A4"] table {
|
||||
border-spacing: 2px !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.patient-info, table.department-sample-info {
|
||||
border: 1px solid #7a7a7a;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
}
|
||||
table.patient-info td, table.patient-info th {
|
||||
vertical-align: top;
|
||||
}
|
||||
table.department-sample-info {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
table.test-result {
|
||||
font-family: 'SourceSerifPro-Regular', 'serif';
|
||||
}
|
||||
table.test-result tr th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
|
||||
padding-right: .2cm;
|
||||
}
|
||||
table.test-result tr:first-child + tr td {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.value-pair:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: .25rem;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
p.value-pair .name {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
p.value-pair .value {
|
||||
background: white;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.out-of-range {
|
||||
font-family: 'SourceSerifPro-Bold', 'serif';
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.text-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.test-result {
|
||||
line-height: 16px;
|
||||
}
|
||||
#footer {
|
||||
line-height: 17px;
|
||||
}
|
||||
#footer .laboratory-address td {
|
||||
border-top: 1px solid black;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
margin-left: 0.5cm !important;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body .sample-result .sample-type{
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin-top: 500px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#footer .result-footer-signature td {
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
table .tname{
|
||||
|
||||
width:360px !important;
|
||||
}
|
||||
|
||||
#print_vaccine_modal .table-inv th, .table-inv td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
</style>
|
||||
<page size="A4">
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:100%" class="text-center">
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:120px; vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="KhmerMoulLight_" style="font-size: 12.5pt; color: #242424; font-weight: bold;">{{__('VACCINATION HISTORY')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr style="border-bottom: 1px solid #ddd;">
|
||||
<td colspan="2" style="font-size:17px !important; padding-top:7px; line-height:25px; color: #000; font-weight:bold;">Patient Name: LENG Ratha</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:7px; font-size:17px !important; line-height:25px; color: #000; font-weight:bold;">Age 30 , Sex Male</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">Tel : 9098484959</td>
|
||||
</tr>
|
||||
<tr><td colspan="4" style="border-top: 1px solid #ddd;"></td></tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:7px; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">: {{@$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:7px; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">: {{@$sample->sample_number}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="height: 10px;"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<!-- Note -->
|
||||
</table>
|
||||
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
|
||||
<tbody>
|
||||
<tr style="height:40px !important;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:center; color: #0000ff; border-top:1px solid #000 !important; padding-top:6px;">
|
||||
<p style="line-height: 10px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 10px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
272
resources/views/my_profiles.blade.php
Normal file
272
resources/views/my_profiles.blade.php
Normal file
@@ -0,0 +1,272 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:250px;
|
||||
padding:20px;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:{{''==''?'none':'block'}};
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-bold"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('general.profile')}}</h4>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- Profile Information -->
|
||||
<div class="col-md-12 px-4">
|
||||
<div class="card shadow-none">
|
||||
|
||||
<div class="card-body pb-0">
|
||||
<x-alert />
|
||||
|
||||
<!-- Avatar -->
|
||||
<div class="mb-3">
|
||||
<img src="{{ auth()->user()->avatar
|
||||
? asset('storage/avatars/'.auth()->user()->avatar)
|
||||
: 'https://ui-avatars.com/api/?name='.urlencode(auth()->user()->name) }}"
|
||||
class="rounded-circle"
|
||||
width="100"
|
||||
height="100">
|
||||
</div>
|
||||
<!-- Name -->
|
||||
<h6 class="mb-1">{{ auth()->user()->name }}</h6>
|
||||
<!-- Extra Info -->
|
||||
<div class="text-start">
|
||||
<p>
|
||||
{{__('general.user_name')}} :
|
||||
<strong>{{ auth()->user()->email }}</strong>
|
||||
</p>
|
||||
<p>
|
||||
{{__('general.user_role')}} :
|
||||
<strong>{{ auth()->user()->role->name_en }}</strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Upload Signature -->
|
||||
<div class="col-md-6 p-0">
|
||||
<div class="card shadow-none ml-4 mt-4 p-4 border" style="height: 45vh;">
|
||||
<h6>{{__('general.upload_signature')}}</h6>
|
||||
<div class="card-body">
|
||||
|
||||
<form method="POST"
|
||||
action="{{ url('user/profile/signature/upload') }}"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
|
||||
<div class="mb-3">
|
||||
|
||||
<label>{{__('general.signature_image')}}</label>
|
||||
|
||||
<input type="file"
|
||||
class="form-control"
|
||||
name="signature">
|
||||
|
||||
</div>
|
||||
|
||||
@if(auth()->user()->signature)
|
||||
<div class="mb-3">
|
||||
<label>{{__('general.current_signature')}}</label><br>
|
||||
|
||||
<img src="{{ asset('storage/images/signature/'.auth()->user()->signature) }}"
|
||||
width="200">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<button class="btn btn-md btn-inverse-info rounded-25">
|
||||
<i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span>
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Change Password -->
|
||||
<div class="col-md-6 p-0">
|
||||
<div class="card shadow-none m-4 p-4 border" style="height: 45vh;">
|
||||
<h6>{{__('general.change_password')}}</h6>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<form method="POST" action="{{ route('profile.change_password') }}">
|
||||
@csrf
|
||||
|
||||
<div class="mb-3">
|
||||
<label>{{__('general.current_password')}}</label>
|
||||
<div class="input-group">
|
||||
<input type="password"
|
||||
id="current_password"
|
||||
name="current_password"
|
||||
class="form-control rounded-right-0">
|
||||
|
||||
<button class="btn btn-secondary rounded-left-0 btn-sm px-3"
|
||||
type="button"
|
||||
onclick="togglePassword('current_password')">
|
||||
<i class="mdi mdi-looks"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>{{__('general.new_password')}}</label>
|
||||
<div class="input-group">
|
||||
<input type="password"
|
||||
id="new_password"
|
||||
name="new_password"
|
||||
class="form-control rounded-right-0">
|
||||
|
||||
<button class="btn btn-secondary rounded-left-0 btn-sm px-3"
|
||||
type="button"
|
||||
onclick="togglePassword('new_password')">
|
||||
<i class="mdi mdi-looks"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>{{__('general.confirm_password')}}</label>
|
||||
<div class="input-group">
|
||||
<input type="password"
|
||||
id="new_password_confirmation"
|
||||
name="new_password_confirmation"
|
||||
class="form-control rounded-right-0">
|
||||
|
||||
<button class="btn btn-sm btn-secondary rounded-left-0 px-3"
|
||||
type="button"
|
||||
onclick="togglePassword('new_password_confirmation')">
|
||||
<i class="mdi mdi-looks"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-md btn-inverse-info rounded-25">
|
||||
<i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span>
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
|
||||
$("#btnViewLabData").on('click',function(e){
|
||||
e.preventDefault();
|
||||
data_id = $('#data-id').val();
|
||||
let url = "{{url('laboratory/get-data')}}/"+$('#source-lab').val();
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"get",
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
let data = (res.data)
|
||||
data.map(item =>{
|
||||
console.log(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function togglePassword(id){
|
||||
|
||||
let input = document.getElementById(id);
|
||||
|
||||
if(input.type === "password"){
|
||||
input.type = "text";
|
||||
}else{
|
||||
input.type = "password";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
45
resources/views/need_restock.blade.php
Normal file
45
resources/views/need_restock.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Need Restock</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
238
resources/views/new_patient.blade.php
Normal file
238
resources/views/new_patient.blade.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> Patient Register</h4><hr class="my-3">
|
||||
<div class="col-12">
|
||||
<form class="form">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6">
|
||||
<div class="form-group row my-2">
|
||||
<label for="patient_name" class="col-sm-12 col-md-3 col-form-label">Patient-Code<code> *</code></label>
|
||||
<div class="col-12 col-sm-12 col-md-9">
|
||||
<input id="patient_name" class="form-control" name="patient_name" type="text" placeholder="Patient code" required="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="patient_name" class="col-sm-12 col-md-3 col-form-label">Patient-Name<code> *</code></label>
|
||||
<div class="col-12 col-sm-12 col-md-9">
|
||||
<input id="patient_name" class="form-control" name="patient_name" type="text" placeholder="Patient name" required="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-sm-12 col-md-3 col-form-label">Dob <b>or</b> Age<code> *</code></label>
|
||||
<div class="col-12 col-sm-12 col-md-9">
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<input class="form-control" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input type="number" id="age" name="age" placeholder="Age" value="" class="form-control" autocomplete="off">
|
||||
<div class="input-group-append">
|
||||
<select class="form-control" name="age_from_unit" id="age-from-unit">
|
||||
<option value="1">Day</option>
|
||||
<option value="30">Month</option>
|
||||
<option value="365">Year</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="Gender" class="col-md-3 col-form-label">Gender<code> *</code></label>
|
||||
<div class="col-md-9 row pl-4" style="padding-top:7px;">
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="1" value="1"> Male
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> Female
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> Other
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="Gender" class="col-md-3 col-form-label">Marital Status<code> *</code></label>
|
||||
<div class="col-md-9 row pl-4" style="padding-top:7px;">
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="1" value="1"> Single
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="2" value="2"> Married
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="3" value="3"> Other
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 pb-4">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Phone Number<code> *</code></label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" placeholder="099 999 999" name="phone" required="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Province<code></code></label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">District<code></code></label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Commune</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Village</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 float-right">
|
||||
<button type="submit" class="btn btn-info"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
$('#province-id').change(function () {
|
||||
$.ajax({
|
||||
url:"{{url('districts/json')}}/"+$(this).val(),
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
$('#district-id').html('');
|
||||
response.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.name_en;
|
||||
$('#district-id').append(patientOption);
|
||||
})
|
||||
$('#district-id').append('<option selected></option>');
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
$('#district-id').change(function () {
|
||||
$.ajax({
|
||||
url:"{{url('communes/json')}}/"+$(this).val(),
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
$('#commune-id').html('');
|
||||
response.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.name_en;
|
||||
$('#commune-id').append(patientOption);
|
||||
})
|
||||
$('#commune-id').append('<option selected></option>');
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
$('#commune-id').change(function () {
|
||||
$.ajax({
|
||||
url:"{{url('villages/json')}}/"+$(this).val(),
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
$('#village-id').html('');
|
||||
response.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.name_en;
|
||||
$('#village-id').append(patientOption);
|
||||
})
|
||||
$('#village-id').append('<option selected></option>');
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
204
resources/views/new_patient_bk.blade.php
Normal file
204
resources/views/new_patient_bk.blade.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link rel="stylesheet" href="{{ asset('assets/vendors/select2/select2.min.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> Patient Register</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="patient_name" class="col-sm-5 col-form-label">Patient Name</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="patient_name" placeholder="Patient name">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="patient_id" class="col-sm-5 col-form-label">Patient ID</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="patient_id" placeholder="Patient ID">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="phonenumer" class="col-sm-5 col-form-label">Phone number</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="patient_id" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="gender" class="col-sm-5 col-form-label">Gender</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="exampleFormControlSelect3">
|
||||
<option>Select</option>
|
||||
<option>Female</option>
|
||||
<option>Male</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Request Date:</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="request_date" placeholder="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Address</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="exampleFormControlSelect3">
|
||||
<option>Phnom Penh</option>
|
||||
<option>Takeo</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Sample Information</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="gender" class="col-sm-5 col-form-label">Requester Name</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="requester_name">
|
||||
<option>Dr. A</option>
|
||||
<option>Dr. B</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Lab ID</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="lab_id" placeholder="Sample number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Request Date/Time</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="request_date_time" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="received_date_time" class="col-sm-5 col-form-label">Receive Date/Time</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="received_date_time" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="sample_source" class="col-sm-5 col-form-label">Sample Source</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_source">
|
||||
<option>ODP</option>
|
||||
<option>ICU</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="diagnosis" class="col-sm-5 col-form-label">Diagnosis</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="diagnosis">
|
||||
<option>A1</option>
|
||||
<option>None</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" class="form-check-input" checked="">
|
||||
Urgent
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="sample_condition" class="col-sm-5 col-form-label">Sample condition</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_condition">
|
||||
<option>Good</option>
|
||||
<option>Acceptable</option>
|
||||
<option>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="diagnosis" class="col-sm-5 col-form-label">Rejection </label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="rejected_reason">
|
||||
<option>Reason 1</option>
|
||||
<option>Reason 2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button type="button" class="btn btn-info btn-icon-text btn-lg btn-block">
|
||||
<i class="typcn typcn-document btn-icon-prepend"></i>
|
||||
Assign Test
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger btn-icon-text btn-lg btn-block">
|
||||
<i class="typcn typcn-document btn-icon-prepend"></i>
|
||||
Add Result
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-icon-text btn-lg btn-block">
|
||||
<i class="typcn typcn-warning btn-icon-prepend"></i>
|
||||
Delete Sample
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<!-- plugin js for this page -->
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/typeahead.js/typeahead.bundle.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.js')}}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#datetimepicker').datetimepicker();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
45
resources/views/new_payment.blade.php
Normal file
45
resources/views/new_payment.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>New payment</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
432
resources/views/new_sample.blade.php
Normal file
432
resources/views/new_sample.blade.php
Normal file
@@ -0,0 +1,432 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/search_test.css')}}" >
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card min-vh-70">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sample.form_add_title')}}</h4>
|
||||
|
||||
<form method="post" class="p-2" action="#" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-vertical mb-4">
|
||||
<div class="col-lg-12 pt-2 border-bottom">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_patient')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2 rounded-right-0" name="patient_id" id="patient-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($patients as $patient)
|
||||
<option {{$patient_id == $patient->id ? 'selected':''}} value="{{$patient->id}}">{{($patient->patient_uuid . ' - ' . $patient->name_en) . ((!empty($patient->phone_number) ? ' - '.$patient->phone_number: ''))}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
{{-- <button class="btn btn-sm btn-inverse-secondary px-3" id="searchPatientAddForm" type="button"><i class="fa fa-search"></i> {{__('general.btn_search')}} </button>--}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button class="btn btn-inverse-success waves-effect rounded-25 px-3 ml-3" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient" data-backdrop="static"><i class="typcn typcn-plus"></i>
|
||||
{{__('patient.form_add_title')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-vertical sample-creation-form border p-4" style="{{!empty($patient_id) ? 'display: block' : 'display: none'}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_sample_number')}} <span class="text-danger">{{$labSettings->sample_number == 1 ? '' : '*'}}</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-0" {{$labSettings->sample_number == 1 ? ' disabled readonly ' : ''}} name="sample_number" id="sample-number" placeholder="Sample No">
|
||||
<div class="input-group-append">
|
||||
{{--<button class="btn btn-sm btn-info px-3 shadow-none rounded-0" title="Auto generate patient code" type="button" onclick="generate_uuid('S','#sample-number')"><i class="mdi mdi-autorenew"></i> </button>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_sample_source')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2 rounded-0" name="sample_source_id" id="sample-source-id" style="width: 100%">
|
||||
<option></option>
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
<option {{$sampleSource->is_default==1? 'selected':''}} value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_requester')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2 rounded-0" name="physician_id" id="physician-id" style="width: 100%">
|
||||
<option></option>
|
||||
@foreach($physicians as $physician)
|
||||
<option {{$physician->is_default==1? 'selected':''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_collected_date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control" name="collected_date" id="collected-date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_received_date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control" name="received_date" id="received-date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_admission_date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control" name="admission_date" id="admission-date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_diagnisis')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="diagnosis" id="diagnosis" placeholder="Diagnosis">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample.form_sample_condition')}} </label>
|
||||
<div class="input-group">
|
||||
<select class="form-control rounded-0" name="sample_condition" id="sample-condition">
|
||||
<option selected value="2">{{__('sample.form_sample_condition')}}</option>
|
||||
<option value="1">{{__('sample.condition_good')}}</option>
|
||||
<option value="0">{{__('sample.condition_reject')}}</option>
|
||||
<option value="2">{{__('sample.condition_acceptable')}}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1 " style="flex: 1 !important;">
|
||||
<label for="lab-name-en">{{__('sample.form_reject_reason')}} <span class="text-danger text-small"></span></label>
|
||||
<div class="input-group">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2 rounded-right-0" style="width: 100%" disabled name="reject_comment_id" id="reject-comment-id">
|
||||
<option></option>
|
||||
@foreach($rejectComments as $rejectComment)
|
||||
<option value="{{$rejectComment->id}}">{{$rejectComment->reject_comment}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-white px-3" type="button" onclick="addRejectComment('reject-comment-id')"><i class="typcn typcn-plus"></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-sm-12 m-0">
|
||||
<div class="form-check pl-2">
|
||||
<label class="form-check-label font-14">
|
||||
<input type="checkbox" name="is_urgent" id="is-urgent" class="form-check-input">
|
||||
{{__('sample.form_is_urgent')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-sm-12 pt-4 text-right">
|
||||
<button type="button" data-toggle="modal" class="d-none" id="show-modal-assign-test" data-target="#modal-assign-test" data-backdrop="static"></button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<button class="btn btn-info rounded-25" type="button" id="saveSample"><i class="mdi mdi-check-all"></i> {{__('sample.form_btn_save_assign_test')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Patient -->
|
||||
<div class="modal fade modal-primary" id="modal-patient">
|
||||
<div class="modal-dialog show modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('patient.form_add_title')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="patient-code">{{__('patient.form_code')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {{$labSettings->patient_code == 1 ? ' disabled readonly ' : ''}} name="patient_code" id="patient-code" placeholder="{{__('patient.form_code')}}">
|
||||
<div class="input-group-append">
|
||||
{{--<button class="btn btn-sm btn-info px-3 shadow-none rounded-0" title="Auto generate patient code" type="button" onclick="generate_uuid('P','#patient-code')"><i class="mdi mdi-autorenew"></i> </button>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="patient_name" id="patient-name" placeholder="{{__('patient.form_name')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.form_dob')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append mr-3" style="flex: 5 !important;">
|
||||
<input class="form-control datepicker" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input class="form-control" name="year" onkeypress="return isNumber(event);" maxlength="2" type="text" id="year" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_year')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="month" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_month')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="day" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_day')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="1" value="1">
|
||||
{{__('patient.form_sex_male')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> {{__('patient.form_sex_other')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_phone')}}</label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="{{__('patient.form_phone')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_khid')}}</label>
|
||||
<input type="text" class="form-control" name="khid_number" id="khid-number" placeholder="{{__('patient.form_khid')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_house')}}</label>
|
||||
<input type="text" class="form-control" name="house_number" id="house-number" placeholder="{{__('patient.form_house')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_street')}}</label>
|
||||
<input type="text" class="form-control" name="street_number" id="street-number" placeholder="{{__('patient.form_street')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_province')}} </label>
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_district')}}</label>
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_commune')}}</label>
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_village')}}</label>
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button type="button" class="btn btn-info rounded-25" id="savePatient"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.assign_test')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<script>
|
||||
|
||||
var sample_id = 0;
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment-precise-range.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#patient-id').select2({
|
||||
tags: false,
|
||||
allowClear: true,
|
||||
ajax: {
|
||||
url: '{{url('patient/live-search')}}',
|
||||
dataType: 'json',
|
||||
delay: 10
|
||||
}
|
||||
});
|
||||
|
||||
function redirectPrintLabel(){
|
||||
var suid = parseInt($('#modal-assign-test').find("input[name=sample_id]").val());
|
||||
if(suid > 0){
|
||||
$('#save-assign-test').click();
|
||||
setTimeout(function() {
|
||||
window.location = sample_base_url + '/edit/'+suid+'?print-label'
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
function redirectMakeInvoice(){
|
||||
var suid = parseInt($('#modal-assign-test').find("input[name=sample_id]").val());
|
||||
if(suid > 0){
|
||||
$('#save-assign-test').click();
|
||||
setTimeout(function() {
|
||||
window.location = sample_base_url + '/edit/'+suid+'?add-invoice'
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function calculateAge(dob, current_date) {
|
||||
dob = moment(dob);
|
||||
current_date = current_date ? moment(current_date) : moment(new Date('{{date('m/d/Y')}}'));
|
||||
return moment.preciseDiff(dob, current_date, true)
|
||||
}
|
||||
|
||||
var $patient_info_form = $("#modal-patient");
|
||||
$patient_info_form.find("#dob").on("change", function() {
|
||||
var dob_split = $(this).val().split("-")
|
||||
var dob = new Date(dob_split[1]+'-'+dob_split[0]+'-'+dob_split[2]);
|
||||
|
||||
if (dob) {
|
||||
//current_date = moment();
|
||||
var age = calculateAge(dob);
|
||||
$patient_info_form.find("#year").val(age.years);
|
||||
$patient_info_form.find("#month").val(age.months);
|
||||
var days = age.days === 0 && age.months === 0 && age.years === 0 ? 1 : age.days;
|
||||
$patient_info_form.find("#day").val(days);
|
||||
}
|
||||
});
|
||||
|
||||
$patient_info_form.on("keyup change", "#year, #month, #day", function (evt) {
|
||||
var years = $patient_info_form.find("#year").val() || 0;
|
||||
var months = $patient_info_form.find("#month").val() || 0;
|
||||
var days = $patient_info_form.find("#day").val() || 0;
|
||||
var dob = moment(new Date('{{date('m/d/Y')}}'));
|
||||
dob.subtract(days, 'days');
|
||||
dob.subtract(months, 'months');
|
||||
dob.subtract(years, 'years');
|
||||
var dob_split = dob.toDate().toLocaleDateString().split("/")
|
||||
var dob = dob_split[1].padStart(2,"0")+'-'+dob_split[0].padStart(2,"0")+'-'+dob_split[2];
|
||||
$patient_info_form.find("#dob").val(dob);
|
||||
});
|
||||
|
||||
$('#sample-number').blur(function(){
|
||||
var inputId = $(this).val()
|
||||
generate_sample_number_plus_manul('S',inputId,'#sample-number')
|
||||
});
|
||||
|
||||
function generate_sample_number_plus_manul (classPrefix, manualInputValue, targetDisplayElementId) {
|
||||
$.ajax({
|
||||
url: get_refs_base_url+"/uuidv2.generate/json/"+manualInputValue,
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
if(response.success) $(''+targetDisplayElementId).val(classPrefix+'-'+response.data.uuid);
|
||||
else alertify.error("Can't generate uuid.")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/sample.js?'.time())}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/assign_test.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/search_test.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user