@extends('admin.layouts.app')
@section('title','Salary & Incentive')
@section('content')
<div class="page-head"><div><h1 class="page-title">Salary & Incentive</h1><div class="page-subtitle">Salary payment, commission and incentive tracking</div></div></div>
<form method="POST" class="card panel-tight grid-4">@csrf<div><label>Staff</label><select name="staff_id">@foreach($staffs as $staff)<option value="{{ $staff->id }}">{{ $staff->name }}</option>@endforeach</select></div><div><label>Month</label><input name="payment_month" placeholder="2026-03"></div><div><label>Gross Salary</label><input type="number" step="0.01" name="gross_salary"></div><div><label>Commission</label><input type="number" step="0.01" name="commission_amount"></div><div><label>Incentive</label><input type="number" step="0.01" name="incentive_amount"></div><div><label>Deduction</label><input type="number" step="0.01" name="deduction_amount"></div><div><label>Net Salary</label><input type="number" step="0.01" name="net_salary"></div><div><label>Paid Date</label><input type="date" name="paid_date" value="{{ date('Y-m-d') }}"></div><div><label>Method</label><input name="payment_method" value="Cash"></div><div style="grid-column: span 3"><label>Notes</label><input name="notes"></div><div class="form-actions" style="grid-column:1/-1"><button class="btn primary">Save Salary Payment</button></div></form><div class="card panel-tight table-wrap"><table class="table"><thead><tr><th>Month</th><th>Staff ID</th><th>Gross</th><th>Net</th><th>Paid</th></tr></thead><tbody>@forelse($payments as $payment)<tr><td>{{ $payment->payment_month }}</td><td>{{ $payment->staff_id }}</td><td>{{ $payment->gross_salary }}</td><td>{{ $payment->net_salary }}</td><td>{{ $payment->paid_date }}</td></tr>@empty<tr><td colspan="5">No payments found.</td></tr>@endforelse</tbody></table>{{ $payments->links() }}</div>
@endsection
