resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Patient Category Invoices - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
body{
/*font-size: 1.2em;*/
}
/*thead, tfoot { display: table-row-group }*/
thead {
display: table-header-group;
}
tfoot {
display: table-row-group;
}
tr {
page-break-inside: avoid;
}
</style>
</head>
<body>
<div class="container-fluid">
@include('layouts.header_pdf_print')
<h5 class="heading" style="text-align: center;">
<strong>Invoice Number: #{{ $invoice_number }}</strong><br><br>
<strong>{{ __('finance.invoice_for') }} {{ get_name($patient_category, 'id', 'name', 'patient_categories') }} {{ individual_of_invoice($invoice_number) ?? "" }}</strong>
</h5>
<table class="table table-light table-sm table-borderless">
<thead class="thead-light">
@if ((count($invoices)==1) && ($invoices[0]->patient_id==0) && ($invoices[0]->episode_id==0))
<tr>
<th>{{ __('invoices.date') }}</th>
<th colspan="4">{{ __('invoices.description') }}</th>
<th>{{ __('invoices.amount') }}</th>
</tr>
@else
<tr>
<th>{{ __('invoices.date') }}</th>
<th>{{ __('invoices.patient_number') }}</th>
<th>{{ __('invoices.claim_number') }}</th>
<th>{{ __('invoices.patient_name') }}</th>
<th>{{ __('invoices.amount') }}</th>
<th>{{ __('invoices.reason') }}</th>
</tr>
@endif
@php
$sum_total = 0;
@endphp
</thead>
<tbody>
<tr>
<td colspan="5"></td>
</tr>
@if ((count($invoices)==1) && ($invoices[0]->patient_id==0) && ($invoices[0]->episode_id==0))
{{-- this is more likely a journal so fetch journal details --}}
@php
$journal_number = substr($invoices[0]->items_ids, 10); //now remove the substring "Journal - "
$patient_category_id = $invoices[0]->patient_category;
$journal_details = \Streamline\Models\Journal::where('journal_number', $journal_number)->first();
@endphp
@if ($journal_details)
@php
$journal_name_ids_array = explode(",",$journal_details->name_ids);
$index_of_patient_category = array_search($patient_category_id, $journal_name_ids_array);
$journal_descriptions_array = explode(",",$journal_details->descriptions);
$sum_total += $invoices[0]->patient_amount;
@endphp
<tr>
<td class="text-center">{{ streamline_date($journal_details->journal_date) }}</td>
<td colspan="4">{{ $journal_descriptions_array[$index_of_patient_category] }}</td>
<td>{{ ugandan_shillings($invoices[0]->patient_amount) }}</td>
</tr>
@endif
@else
@foreach($invoices as $item)
<tr>
<td>{{ streamline_date($item->transaction_date) }}</td>
<td>{{ get_name($item->patient_id, 'id', 'number', 'patients') }}</td>
<td>{{ ($item->episode_id != 0) ? ((get_claim_number($item->episode_id)) ? get_claim_number($item->episode_id) : $item->receipt_number) : "" }}</td>
<td>{{ get_full_name($item->patient_id, 'id', 'first_name', 'last_name', 'patients') }}</td>
<td>
@php
$sum_total += intval($item->sum);
echo ugandan_shillings(intval($item->sum));
@endphp
</td>
<td>
{{ get_clinic_name($item->episode_id) }}
</td>
</tr>
@endforeach
@endif
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th><b>{{ __('invoices.total') }}</b></th>
<th>{{ ugandan_shillings($sum_total) }}</th>
<th></th>
</tr>
</tfoot>
</table>
@if ($invoice_with_payment_amount_paid > 0)
<br>
<div class="col-12">
<table class="table">
<tbody>
<tr>
<th>
<strong>Amount paid:</strong>
</th>
<td>
{{ ugandan_shillings_with_decimals($invoice_with_payment_amount_paid) }}
</td>
</tr>
<tr>
<th>
<strong>Balance:</strong>
</th>
<td>
{{ ugandan_shillings_with_decimals($invoice_with_payment_balance) }}
</td>
</tr>
</tbody>
</table>
</div>
@endif
<br>
<span><p><strong>{{ __('invoices.served_by') }} : {{ $served_by }}</strong></p></span>
<p><strong>{{ __('invoices.sign') }}</strong>..................................................................................................................</p>
<div class="clearfix"></div>
<hr>
</div>
</body>
</html>