Files
streamline-emr/docker/statistics/Modules/Expenses/Resources/views/payments/receipt.blade.php
T
2025-03-31 03:46:05 +03:00

136 lines
6.1 KiB
PHP
Executable File

@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<style type="text/css">
#divToPrint{
font-size: 13px;
color: #7c7c7c;
}
#receipt_table{
font-size: 1em;
font-weight: normal;
font-family: monospace
}
#receipt_table th{
border: 1px solid #dddddd;
}
#receipt_table td{
border: 1px solid #dddddd;
}
.receipt-label{
margin-top: 10px;
padding: 10px;
}
.receipt-title{
font-weight: bolder;
text-decoration: underline;
display: block; font-family:
monospace
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('payments.services_receipt') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payments.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payments.finance_home') }}</a></li>
<li class="active"><i class="fa fa-credit-card"></i> {{ __('payments.payments_voucher') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="white-box">
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('payments.print') }}</button></div>
<div class="row" id="divToPrint">
<div class="col-sm-3"></div>
<div class="col-sm-6" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
<span class="receipt-label"><b>{{ __('patient_finance.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.cashier') }}:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.receipt_number') }}: </b> {{ $receipt_number }}</span><br>
<span class="receipt-label"><b>REF</b> : {{ $patient->first_name }} {{ $patient->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.patient_category') }} :</b> {{ get_name($patient->category_id, "id", "name", "patient_categories") }}</span>
</p>
<div>
<table class="table" id="receipt_table">
<thead>
<th style="width: 60%"><b>{{ __('patient_finance.description') }}</b></th>
<th style="width: 20%"><b>{{ __('patient_finance.price') }}</b></th>
</thead>
<tbody>
@for($i = 0; $i < count($service_ids_array); $i++)
<tr>
<td>{{ get_name($service_ids_array[$i], "id", "name", "services") }}</td>
<td>{{ ugandan_shillings($service_prices_array[$i]) }}</td>
</tr>
@endfor
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td><b>{{ __('patient_finance.total_to_pay') }}</b></td>
<td><b>{{ ugandan_shillings($total_amount_pay) }}</b></td>
</tr>
@if($discounts_applied > 0)
<tr>
<td><b>{{ __('payments.discounts_applied') }}</b></td>
<td><b>{{ ugandan_shillings($discounts_applied) }}</b></td>
</tr>
@endif
<tr>
<td><b>{{ __('payments.patient_to_pay') }}</b></td>
<td><b>{{ ugandan_shillings($patient_to_pay) }}</b></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-3">
</div>
<i style="font-size: 0.8em; margin-left: 50%;">&copy; Stre@mline</i>
</div>
</div>
</div>
</div>
@endsection
@push('styles')
<script type="text/javascript">
function print_receipt() {
let myDiv = document.getElementById('divToPrint');
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
newWindow.document.write("<html><body " +
"class='' " +
" onload='window.print()'>" +
myDiv.innerHTML +
"</body></html>");
newWindow.document.close();
return false;
}
</script>
@endpush