@extends('layouts.app') @section('content') @php $selectedEmployee = $employees->firstWhere('id', old('employee_id', $salary->employee_id)); $baseSalaryValue = (int) old( 'base_salary', (int) round($selectedEmployee->base_salary ?? $salary->base_salary ?? 0) ); $uiPositionAllowance = (int) old('ui_position_allowance', 0); $uiAttendanceAllowance = (int) old('ui_attendance_allowance', 0); $uiMealAllowance = (int) old('ui_meal_allowance', 0); $uiTransportAllowance = (int) old('ui_transport_allowance', 0); $uiBpjsAllowance = (int) old('ui_bpjs_allowance', 0); $usedBreakdownAllowance = $uiPositionAllowance + $uiAttendanceAllowance + $uiMealAllowance + $uiTransportAllowance + $uiBpjsAllowance; $uiOtherAllowance = (int) old( 'ui_other_allowance', max(0, (int) round(($salary->allowance ?? 0) - $usedBreakdownAllowance)) ); $uiOvertimeAmount = (int) old('ui_overtime_amount', (int) round($salary->overtime ?? 0)); $uiPerformanceBonus = (int) old('ui_performance_bonus', 0); $uiOtherBonus = (int) old( 'ui_other_bonus', max(0, (int) round(($salary->bonus ?? 0) - $uiPerformanceBonus)) ); $uiLateDeduction = (int) old('ui_late_deduction', 0); $uiAbsentDeduction = (int) old('ui_absent_deduction', 0); $uiAdvanceDeduction = (int) old('ui_advance_deduction', 0); $usedBreakdownDeduction = $uiLateDeduction + $uiAbsentDeduction + $uiAdvanceDeduction; $uiOtherDeduction = (int) old( 'ui_other_deduction', max(0, (int) round(($salary->deduction ?? 0) - $usedBreakdownDeduction)) ); $employeeSalaryMap = $employees->mapWithKeys(function ($employee) { return [ $employee->id => [ 'base_salary' => (int) round($employee->base_salary ?? 0), ] ]; }); @endphp @if($salary->exists && $salary->status === 'paid')
Gaji ini sudah dibayar. Edit nominal sebaiknya dihindari agar tetap sinkron dengan kas dan buku besar.
@endif @if(session('error'))
{{ session('error') }}
@endif

{{ $salary->exists ? 'Payroll Editor' : 'Smart Payroll Form' }}

Form ini memakai breakdown payroll yang lebih umum dipakai di perusahaan dan otomatis menghitung total akhir.

Gaji pokok dari master karyawan BPJS masuk pendapatan Hitung realtime
Pendapatan Kotor
Total Potongan
Take Home Pay
@csrf @if($salary->exists) @method('PUT') @endif

Informasi Dasar

Identitas karyawan dan periode payroll.

@error('employee_id')

{{ $message }}

@enderror

Pendapatan

Komponen utama gaji yang diterima karyawan.

Rp

Gaji pokok otomatis diambil dari data master karyawan.

@error('base_salary')

{{ $message }}

@enderror
Rp
Rp
Rp
Rp
Rp
Rp
Total Tunjangan
Dijumlahkan otomatis ke field allowance

Lembur & Bonus

Komponen tambahan berdasarkan performa dan jam kerja.

Rp
Rp
Rp

Potongan

Potongan umum yang sering dipakai di payroll perusahaan.

Rp
Rp
Rp
Rp

Catatan

AI Payroll Summary

Preview gaji bersih secara realtime.

Gaji Pokok
Total Tunjangan
Lembur
Total Bonus
Pendapatan Kotor
Total Potongan
Take Home Pay
Komponen yang umum dipakai
Gaji Pokok Tunjangan Jabatan Kehadiran Makan Transport BPJS Lembur Bonus Kasbon
Batal
@endsection