| No |
Tanggal Registrasi |
Rekam Medis |
Nama Pasien |
Nomor Ponsel |
Alamat |
Obat |
Jumlah |
Total |
@php $total = 0 @endphp
@forelse ($patients as $pharmacy)
@php
$count = (int) count(json_decode($pharmacy->drug,1));
$count == 0 ? $count = 1 : $count = $count;
$array = json_decode($pharmacy->drug,1);
@endphp
| {{ $loop->iteration }} |
{{ optional($pharmacy->date)->format('d/m/Y') ?? '-' }} |
{{ $pharmacy->patient->medical_record_number ?? '-' }} |
{{ $pharmacy->patient->name ?? '-' }} |
{{ $pharmacy->patient->phone_number ?? '-' }} |
{{ $pharmacy->patient->address ?? '-' }} |
@if(isset($array[0]))
@if(optional($array[0])['type'] == 'racikan')
{{$array[0]['racikan']}} |
- |
@else
{{ optional($pharmacy->getDrug($array[0]['obat']))->name ?? '-'}} |
{{ $array[0]['jumlah'] ?? '-'}} |
@endif
@endif
{{ money_format_idr($pharmacy->total_payment ?? '0') }} |
@php $total += (int) $pharmacy->total_payment @endphp
@foreach ($array as $item)
@if(!$loop->first)
@if(optional($item)['type'] == 'racikan')
| {{$item['racikan']}} |
- |
@else
| {{ optional($pharmacy->getDrug($item['obat']))->name ?? '-'}} |
{{ $item['jumlah'] ?? '-'}} |
@endif
@endif
@endforeach
@empty
@endforelse
|
Total :
|
{{ money_format_idr($total) }}
|