{{--
KLINIK MUSTIKA SANGSAKA KALIORANG
Jl. Ery Soeparjan, Desa Bukit Makmur, Kec. Kaliorang, Kab. Kutai Timur 75617, Kalimantan Timur
Telpon: 08575168765 | Email: mustikasangsakaklinik@gmail.com
--}} {{--
INVOICE MCU {{ $company->name }}
--}}

Informasi Perusahaan:

Nama: {{ $company->name }}
@if ($company->address)
Alamat: {{ $company->address }}
@endif @if ($company->phone)
Telepon: {{ $company->phone }}
@endif @if ($company->email)
Email: {{ $company->email }}
@endif @if ($company->pic_name)
PIC: {{ $company->pic_name }}
@endif

Periode MCU:

Dari: {{ \App\Helpers\DateHelper::formatDate($startDate) }}
Sampai: {{ \App\Helpers\DateHelper::formatDate($endDate) }}
Total Pasien: {{ $invoices->sum('total_patients') }}
@php // Collect all items from all invoices and sort by date $allItems = collect(); foreach ($invoices as $invoice) { $allItems = $allItems->merge($invoice->items->where('excluded_from_invoice', false)); } // Sort by MCU date $allItems = $allItems->sortBy('mcu_date'); $rowNumber = 1; @endphp @foreach ($allItems as $item) @php // Ambil nama paket dari appointment jika tersedia, jika tidak gunakan dari invoice item $displayPackageName = $item->appointment && $item->appointment->mcuPackage ? $item->appointment->mcuPackage->name : $item->mcu_package_name; @endphp @endforeach
No Nama Pasien NIK Jenis Kelamin No. Rekam Medis Tanggal MCU Paket MCU Harga
{{ $rowNumber++ }} {{ mb_strtoupper($item->display_patient_name) }} {{ $item->patient_nik ?? '-' }} @if ($item->patient_gender === 'female') Perempuan @else Laki-laki @endif {{ $item->medical_record_number ?? '-' }} {{ \App\Helpers\DateHelper::formatShort($item->mcu_date) }} {{ $displayPackageName }}
Rp {{ number_format($item->package_price, 0, ',', '.') }}
Rp {{ number_format($item->package_price, 0, ',', '.') }}
Jumlah Pasien: {{ $invoices->sum('total_patients') }} orang
Subtotal: Rp {{ number_format($invoices->sum('total_amount'), 0, ',', '.') }}
TOTAL: Rp {{ number_format($invoices->sum('total_amount'), 0, ',', '.') }}

Mengetahui,

Direktur

@php $signaturePath = public_path('assets/images/ttd/dr.said.jpg'); $signatureImageData = null; if (file_exists($signaturePath)) { try { $signatureImageData = base64_encode(file_get_contents($signaturePath)); } catch (Exception $e) { $signatureImageData = null; } } @endphp @if ($signatureImageData) Tanda Tangan dr. Said @endif
dr. Said. M. Bin. Smith. MAP
Direktur

Informasi Pembayaran:

Bank: Bank BNI Cabang Bontang
No. Rekening: 0461060204
Atas Nama: Mustika Sangsaka Medika

Catatan: Mohon transfer sesuai dengan nominal yang tertera dan sertakan nomor invoice pada keterangan transfer.

{{-- --}}