feat: initialize Dr-Panel project with patient file number support

This commit is contained in:
SajjadMahmoody
2026-05-06 02:18:23 +03:30
parent f8f174690a
commit 8b84d1780f
460 changed files with 113960 additions and 1 deletions
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* {
font-family: 'tahoma', sans-serif;
}
body {
font-size: 12px;
direction: rtl;
margin: 0;
padding: 0;
color: #333;
}
h1 {
font-size: 16px;
text-align: center;
margin-bottom: 4px;
color: #1e40af;
font-weight: bold;
}
.subtitle {
text-align: center;
color: #6b7280;
font-size: 10px;
margin-bottom: 14px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 8px;
}
th {
background-color: #1e40af;
color: #ffffff;
padding: 7px 8px;
text-align: right;
font-size: 11px;
font-weight: bold;
border: 1px solid #1e3a8a;
}
th.col-num {
text-align: center;
width: 30px;
}
td {
padding: 6px 8px;
border: 1px solid #e5e7eb;
font-size: 11px;
text-align: right;
}
td.col-num {
text-align: center;
}
tr:nth-child(even) td {
background-color: #f9fafb;
}
.footer {
margin-top: 14px;
text-align: center;
font-size: 9px;
color: #9ca3af;
}
</style>
</head>
<body>
<h1>{{ __('navigation.doctors.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('doctors.fields.first_name') }}</th>
<th>{{ __('doctors.fields.last_name') }}</th>
<th>{{ __('doctors.fields.speciality') }}</th>
<th>{{ __('doctors.fields.license_id') }}</th>
<th>{{ __('doctors.fields.created_at') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $doctor)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $doctor->first_name }}</td>
<td>{{ $doctor->last_name }}</td>
<td>{{ $doctor->speciality }}</td>
<td>{{ $doctor->license_id }}</td>
<td>{{ $doctor->created_at
? \Morilog\Jalali\Jalalian::fromCarbon(\Carbon\Carbon::parse($doctor->getRawOriginal('created_at')))->format('Y/m/d')
: '' }}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.doctors.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,99 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* {
font-family: 'tahoma', sans-serif;
}
body {
font-size: 12px;
direction: rtl;
margin: 0;
padding: 0;
color: #333;
}
h1 {
font-size: 16px;
text-align: center;
margin-bottom: 4px;
color: #1e40af;
font-weight: bold;
}
.subtitle {
text-align: center;
color: #6b7280;
font-size: 10px;
margin-bottom: 14px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 8px;
}
th {
background-color: #1e40af;
color: #ffffff;
padding: 7px 8px;
text-align: right;
font-size: 11px;
font-weight: bold;
border: 1px solid #1e3a8a;
}
th.col-num {
text-align: center;
width: 30px;
}
td {
padding: 6px 8px;
border: 1px solid #e5e7eb;
font-size: 11px;
text-align: right;
}
td.col-num {
text-align: center;
}
tr:nth-child(even) td {
background-color: #f9fafb;
}
.footer {
margin-top: 14px;
text-align: center;
font-size: 9px;
color: #9ca3af;
}
</style>
</head>
<body>
<h1>{{ __('navigation.osurg_initials.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('osurg_initials.fields.init_parameter') }}</th>
<th>{{ __('osurg_initials.fields.init_value') }}</th>
<th>{{ __('osurg_initials.fields.created_at') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $record)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $record->init_parameter }}</td>
<td>{{ $record->init_value ?? '—' }}</td>
<td>{{ $record->created_at
? \Morilog\Jalali\Jalalian::fromCarbon(\Carbon\Carbon::parse($record->getRawOriginal('created_at')))->format('Y/m/d')
: '' }}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.osurg_initials.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 12px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 7px 8px; text-align: right; font-size: 11px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 30px; }
td { padding: 6px 8px; border: 1px solid #e5e7eb; font-size: 11px; text-align: right; }
td.col-num, td.col-center { text-align: center; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.patient_illness.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('patient_illness.fields.illness') }}</th>
<th style="width:60px; text-align:center;">{{ __('patient_illness.fields.row_no') }}</th>
<th style="width:60px; text-align:center;">{{ __('patient_illness.fields.priority') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->illness }}</td>
<td class="col-center">{{ $item->row_no }}</td>
<td class="col-center">{{ $item->priority }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.patient_illness.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 12px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 7px 8px; text-align: right; font-size: 11px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 30px; }
td { padding: 6px 8px; border: 1px solid #e5e7eb; font-size: 11px; text-align: right; }
td.col-num { text-align: center; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.patients.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('patients.fields.full_name') }}</th>
<th>{{ __('patients.fields.icno') }}</th>
<th>{{ __('patients.fields.gender') }}</th>
<th>{{ __('patients.fields.hand_phone') }}</th>
<th>{{ __('patients.fields.insurance') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->full_name }}</td>
<td>{{ $item->icno }}</td>
<td>{{ $item->gender ?? '-' }}</td>
<td>{{ $item->hand_phone ?? '-' }}</td>
<td>{{ $item->insurance ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.patients.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 12px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 7px 8px; text-align: right; font-size: 11px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 30px; }
td { padding: 6px 8px; border: 1px solid #e5e7eb; font-size: 11px; text-align: right; }
td.col-num { text-align: center; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.payment_types.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('payment_types.fields.payment_type') }}</th>
<th>{{ __('payment_types.fields.account_no') }}</th>
<th>{{ __('payment_types.fields.pos_no') }}</th>
<th>{{ __('payment_types.fields.description') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->payment_type }}</td>
<td>{{ $item->account_no ?? '-' }}</td>
<td>{{ $item->pos_no ?? '-' }}</td>
<td>{{ $item->description ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.payment_types.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 12px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 7px 8px; text-align: right; font-size: 11px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 30px; }
td { padding: 6px 8px; border: 1px solid #e5e7eb; font-size: 11px; text-align: right; }
td.col-num { text-align: center; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.prescriptions.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('prescriptions.fields.patient') }}</th>
<th>{{ __('prescriptions.fields.doctor') }}</th>
<th>{{ __('prescriptions.fields.issue_date') }}</th>
<th>{{ __('prescriptions.fields.content') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->patientRecord?->full_name ?? '-' }}</td>
<td>{{ $item->doctor ?? '-' }}</td>
<td>{{ $item->issue_date ?? '-' }}</td>
<td>{{ strip_tags($item->content ?? '-') }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.prescriptions.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
+101
View File
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* {
font-family: 'tahoma', sans-serif;
}
body {
font-size: 12px;
direction: rtl;
margin: 0;
padding: 0;
color: #333;
}
h1 {
font-size: 16px;
text-align: center;
margin-bottom: 4px;
color: #1e40af;
font-weight: bold;
}
.subtitle {
text-align: center;
color: #6b7280;
font-size: 10px;
margin-bottom: 14px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 8px;
}
th {
background-color: #1e40af;
color: #ffffff;
padding: 7px 8px;
text-align: right;
font-size: 11px;
font-weight: bold;
border: 1px solid #1e3a8a;
}
th.col-num {
text-align: center;
width: 30px;
}
td {
padding: 6px 8px;
border: 1px solid #e5e7eb;
font-size: 11px;
text-align: right;
}
td.col-num {
text-align: center;
}
tr:nth-child(even) td {
background-color: #f9fafb;
}
.footer {
margin-top: 14px;
text-align: center;
font-size: 9px;
color: #9ca3af;
}
</style>
</head>
<body>
<h1>{{ __('navigation.roles.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('filament-shield::filament-shield.column.name') }}</th>
<th>{{ __('filament-shield::filament-shield.column.guard_name') }}</th>
<th>{{ __('filament-shield::filament-shield.column.permissions') }}</th>
<th>{{ __('filament-shield::filament-shield.column.updated_at') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $role)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $role->name }}</td>
<td>{{ $role->guard_name }}</td>
<td style="text-align:center;">{{ $role->permissions()->count() }}</td>
<td>{{ $role->updated_at
? \Morilog\Jalali\Jalalian::fromCarbon($role->updated_at)->format('Y/m/d')
: '' }}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.roles.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 12px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 7px 8px; text-align: right; font-size: 11px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 30px; }
td { padding: 6px 8px; border: 1px solid #e5e7eb; font-size: 11px; text-align: right; }
td.col-num { text-align: center; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.surgery_centers.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('surgery_centers.fields.name') }}</th>
<th>{{ __('surgery_centers.fields.phone') }}</th>
<th>{{ __('surgery_centers.fields.contact_person') }}</th>
<th>{{ __('surgery_centers.fields.address') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->name }}</td>
<td>{{ $item->phone ?: '-' }}</td>
<td>{{ $item->contact_person ?? '-' }}</td>
<td>{{ $item->address ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.surgery_centers.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 12px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 7px 8px; text-align: right; font-size: 11px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 30px; }
td { padding: 6px 8px; border: 1px solid #e5e7eb; font-size: 11px; text-align: right; }
td.col-num { text-align: center; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.treatments.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('treatments.fields.treatment_name') }}</th>
<th>{{ __('treatments.fields.treatment_type') }}</th>
<th>{{ __('treatments.fields.treatment_cost') }}</th>
<th>{{ __('treatments.fields.descriptions') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->treatment_name }}</td>
<td>{{ $item->treatment_type ?? '-' }}</td>
<td>{{ $item->treatment_cost !== null ? number_format($item->treatment_cost) : '-' }}</td>
<td>{{ $item->descriptions ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.treatments.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
+101
View File
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* {
font-family: 'tahoma', sans-serif;
}
body {
font-size: 12px;
direction: rtl;
margin: 0;
padding: 0;
color: #333;
}
h1 {
font-size: 16px;
text-align: center;
margin-bottom: 4px;
color: #1e40af;
font-weight: bold;
}
.subtitle {
text-align: center;
color: #6b7280;
font-size: 10px;
margin-bottom: 14px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 8px;
}
th {
background-color: #1e40af;
color: #ffffff;
padding: 7px 8px;
text-align: right;
font-size: 11px;
font-weight: bold;
border: 1px solid #1e3a8a;
}
th.col-num {
text-align: center;
width: 30px;
}
td {
padding: 6px 8px;
border: 1px solid #e5e7eb;
font-size: 11px;
text-align: right;
}
td.col-num {
text-align: center;
}
tr:nth-child(even) td {
background-color: #f9fafb;
}
.footer {
margin-top: 14px;
text-align: center;
font-size: 9px;
color: #9ca3af;
}
</style>
</head>
<body>
<h1>{{ __('navigation.users.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('users.fields.name') }}</th>
<th>{{ __('users.fields.username') }}</th>
<th>{{ __('users.fields.roles') }}</th>
<th>{{ __('users.fields.created_at') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $user)
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $user->name }}</td>
<td>{{ $user->username }}</td>
<td>{{ $user->roles->pluck('name')->join('، ') }}</td>
<td>{{ $user->getRawOriginal('created_at')
? \Morilog\Jalali\Jalalian::fromCarbon(\Carbon\Carbon::parse($user->getRawOriginal('created_at')))->format('Y/m/d H:i')
: '' }}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.users.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
<meta charset="UTF-8">
<style>
* { font-family: 'tahoma', sans-serif; }
body { font-size: 11px; direction: rtl; margin: 0; padding: 0; color: #333; }
h1 { font-size: 16px; text-align: center; margin-bottom: 4px; color: #1e40af; font-weight: bold; }
.subtitle { text-align: center; color: #6b7280; font-size: 10px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { background-color: #1e40af; color: #ffffff; padding: 6px 6px; text-align: right; font-size: 10px; font-weight: bold; border: 1px solid #1e3a8a; }
th.col-num { text-align: center; width: 25px; }
td { padding: 5px 6px; border: 1px solid #e5e7eb; font-size: 10px; text-align: right; }
td.col-num { text-align: center; }
td.col-money { text-align: left; direction: ltr; }
td.remained { color: #dc2626; font-weight: bold; }
td.paid-full { color: #16a34a; }
tr:nth-child(even) td { background-color: #f9fafb; }
.footer { margin-top: 14px; text-align: center; font-size: 9px; color: #9ca3af; }
</style>
</head>
<body>
<h1>{{ __('navigation.visits.title') }}</h1>
<div class="subtitle">{{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d') }}</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th>{{ __('visits.fields.visit_date') }}</th>
<th>{{ __('visits.fields.patient') }}</th>
<th>{{ __('visits.fields.doctor') }}</th>
<th>{{ __('visits.fields.treatment') }}</th>
<th>{{ __('visits.fields.treatment_cost') }}</th>
<th>{{ __('visits.fields.paid_amount') }}</th>
<th>{{ __('visits.fields.remained_amount') }}</th>
<th>{{ __('visits.fields.payment_type') }}</th>
</tr>
</thead>
<tbody>
@foreach ($records as $index => $item)
@php $remained = (int)($item->treatment_cost ?? 0) - (int)($item->paid_amount ?? 0); @endphp
<tr>
<td class="col-num">{{ $index + 1 }}</td>
<td>{{ $item->visit_date ?? '-' }}</td>
<td>{{ $item->patientRecord?->full_name ?? '-' }}</td>
<td>{{ $item->doctorRecord?->full_name ?? '-' }}</td>
<td>{{ $item->treatmentRecord ? ($item->treatmentRecord->treatment_name ?: $item->treatmentRecord->treatment_type) : '-' }}</td>
<td class="col-money">{{ $item->treatment_cost !== null ? number_format((int)$item->treatment_cost) : '-' }}</td>
<td class="col-money">{{ $item->paid_amount !== null ? number_format((int)$item->paid_amount) : '-' }}</td>
<td class="col-money {{ $remained > 0 ? 'remained' : 'paid-full' }}">{{ number_format($remained) }}</td>
<td>{{ $item->paymentTypeRecord?->payment_type ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
{{ __('navigation.visits.title') }} &mdash; {{ \Morilog\Jalali\Jalalian::now()->format('Y/m/d H:i') }}
</div>
</body>
</html>