{{-- Header --}} {{-- Header --}}

Catat Keuangan

Input pemasukan & pengeluaran operasional

@if (session()->has('success'))
{{ session('success') }}
@endif
{{-- Form Section --}}
{{-- Tabs --}}
@if($mode === 'single') {{-- EXISTING SINGLE INPUT FORM --}} {{-- Type Switcher --}}
{{-- Amount --}}
Rp
@error('amount') {{ $message }} @enderror
{{-- Category & Date --}}
@error('category') {{ $message }} @enderror
@error('transactionDate') {{ $message }} @enderror
{{-- Description --}}
@error('description') {{ $message }} @enderror
{{-- Proof File --}}
@if($proofFile) {{-- Preview --}}
@endif
@error('proofFile') {{ $message }} @enderror
Uploading...
{{-- Submit Button (Single) --}}
@else {{-- RECAP FORM --}}
{{-- Header Info --}}

Modal / Saldo Awal

Rp {{ number_format($startCash, 0, ',', '.') }}

{{-- LEFT COLUMN: INPUTS --}}
{{-- Daily Expense Input --}}
Rp
@error('dailyExpense') {{ $message }} @enderror

Gabungkan semua pengeluaran (bensin, makan, pulsa, dll)

{{-- Petty Cash Input --}}
Rp
@error('dailyCashOnHand') {{ $message }} @enderror
{{-- Notes --}}
{{-- RIGHT COLUMN: PREVIEW & UPLOAD --}}
{{-- Auto Calculation Preview --}}

Simulasi Perhitungan

Saldo Awal Rp {{ number_format($startCash, 0, ',', '.') }}
(-) Pengeluaran {{ $dailyExpense ? 'Rp ' . $dailyExpense : '-' }}
(=) Saldo Seharusnya Rp {{ number_format($startCash - (float) str_replace('.', '', $dailyExpense ?? 0), 0, ',', '.') }}
Uang Fisik (Laci) {{ $dailyCashOnHand ? 'Rp ' . $dailyCashOnHand : '-' }}
@php $calcIncome = $this->calculatedIncome; @endphp

Hasil Perhitungan Sistem:

@if($calcIncome > 0)

Omset / Pemasukan: Rp {{ number_format($calcIncome, 0, ',', '.') }}

@elseif($calcIncome < 0)

Selisih Kurang (Minus): Rp {{ number_format(abs($calcIncome), 0, ',', '.') }}

@else

Balance (0)

@endif
{{-- Proof Upload (Recap) --}}
@if($proofFile)
@endif
@error('proofFile') {{ $message }} @enderror
Uploading...
{{-- Submit Button (Recap) --}}
@endif
{{-- Sidebar --}}
{{-- Petty Cash --}}

Saldo Kas Kecil (Petty Cash)

Rp {{ number_format($this->pettyCash, 0, ',', '.') }}

Untuk operasional harian

{{-- Recent Transactions --}}
{{-- Modal Preview Bukti --}} @push('scripts') @endpush