@php $baseSalary = (float) ($salary->base_salary ?? 0); $allowance = (float) ($salary->allowance ?? 0); $overtime = (float) ($salary->overtime ?? 0); $bonus = (float) ($salary->bonus ?? 0); $deduction = (float) ($salary->deduction ?? 0); $grossIncome = $baseSalary + $allowance + $overtime + $bonus; $takeHomePay = $grossIncome - $deduction; $shopName = $settings['company_name'] ?? 'POSGRAF'; $shopAddress = $settings['company_address'] ?? ''; $shopPhone = $settings['company_phone'] ?? ''; $shopLogo = $settings['company_logo'] ?? ($shopLogo ?? null); @endphp
@if($shopLogo ?? false) Logo Perusahaan @endif

{{ $shopName }}

SLIP GAJI
@if($shopAddress)
{{ $shopAddress }}
@endif @if($shopPhone)
Telp: {{ $shopPhone }}
@endif
{{ $salary->employee->employee_id ?? 'EMPLOYEE' }}
Periode: {{ $salary->period_label }}
{{ $salary->status === 'paid' ? 'LUNAS / DIBAYAR' : 'DRAFT' }}
Nama {{ $salary->employee->name ?? '-' }}
Jabatan {{ $salary->employee->position ?? '-' }}
Tanggal {{ !empty($salary->paid_at) ? \Carbon\Carbon::parse($salary->paid_at)->format('d/m/Y H:i') : now()->format('d/m/Y H:i') }}
RINCIAN PENDAPATAN
Gaji Pokok
Komponen utama Rp {{ number_format($baseSalary, 0, ',', '.') }}
@if($allowance > 0)
Tunjangan / Pendapatan Tambahan
Termasuk tunjangan jabatan, kehadiran, makan, transport, BPJS perusahaan, dan tunjangan lainnya
Total tunjangan Rp {{ number_format($allowance, 0, ',', '.') }}
@endif @if($overtime > 0)
Lembur
Tambahan lembur Rp {{ number_format($overtime, 0, ',', '.') }}
@endif @if($bonus > 0)
Bonus / Insentif
Termasuk bonus performa dan bonus lainnya
Total bonus Rp {{ number_format($bonus, 0, ',', '.') }}
@endif
RINCIAN POTONGAN
@if($deduction > 0)
Potongan
Termasuk keterlambatan, absen, kasbon, dan potongan lainnya
Total potongan Rp {{ number_format($deduction, 0, ',', '.') }}
@else
Potongan
Tidak ada potongan Rp 0
@endif
Pendapatan Kotor Rp {{ number_format($grossIncome, 0, ',', '.') }}
Total Potongan Rp {{ number_format($deduction, 0, ',', '.') }}
GAJI DITERIMA Rp {{ number_format($takeHomePay, 0, ',', '.') }}
@if($salary->status === 'paid') @endif @if($salary->status === 'paid' || !empty($salary->payment_notes))
Pembayaran:
Sumber: {{ ($salary->payment_source ?? null) === 'bank' ? 'Kas Bank' : (($salary->payment_source ?? null) === 'cash' ? 'Kas Tunai' : '-') }}
Metode: {{ ($salary->payment_method ?? null) === 'cash' ? 'Cash' : (($salary->payment_method ?? null) ? 'Transfer' : '-') }} @if(!empty($salary->payment_notes))
Catatan: {{ $salary->payment_notes }} @endif
@endif @if(!empty($salary->notes))
Catatan Payroll:
{{ $salary->notes }}
@endif
Diterima,
{{ $salary->employee->name ?? 'Karyawan' }}
Mengetahui,
HRD / Finance