Employee salary advances with approval workflow and automatic repayment tracking
Wage advances allow employees to request early payment of their salary. The system tracks the advance amount, repayment installments, and automatically deducts repayments from future payslips.
Wage advances progress through seven possible statuses:
app/Enums/WageAdvanceStatus.phpenum WageAdvanceStatus: string{ case PENDING = 'pending'; case APPROVED = 'approved'; case REJECTED = 'rejected'; case DISBURSED = 'disbursed'; case REPAYING = 'repaying'; case REPAID = 'repaid'; case CANCELLED = 'cancelled';}
Employees can request a wage advance through their portal:
use App\Models\WageAdvance;use App\Enums\WageAdvanceStatus;public function store(CreateWageAdvanceRequest $request){ Gate::authorize('create', WageAdvance::class); $employee = auth()->user(); $shop = $employee->shops()->first(); if (!$shop) { return back()->withErrors(['shop' => 'You must be assigned to a shop to request an advance']); } $advance = WageAdvance::create([ 'user_id' => $employee->id, 'shop_id' => $shop->id, 'tenant_id' => $employee->tenant_id, 'amount_requested' => $request->amount, 'reason' => $request->reason, 'repayment_installments' => $request->installments ?? 1, 'status' => WageAdvanceStatus::PENDING, 'requested_at' => now(), ]); return redirect()->route('wage-advances.show', $advance) ->with('success', 'Wage advance request submitted for approval');}
Many organizations set a maximum advance amount (e.g., 50% of monthly salary) and maximum installments (e.g., 3 months). These should be validated in the Form Request.
Typical validation rules for wage advance requests:
use App\Rules\MaxAdvanceAmount;use App\Rules\NoActiveAdvances;class CreateWageAdvanceRequest extends FormRequest{ public function authorize(): bool { return true; // Authorization in controller via Gate } public function rules(): array { return [ 'amount' => [ 'required', 'numeric', 'min:1000', 'max:500000', new MaxAdvanceAmount(auth()->user()), // Max 50% of salary new NoActiveAdvances(auth()->user()), // No active advances ], 'reason' => 'required|string|max:500', 'installments' => 'nullable|integer|min:1|max:3', ]; }}
Typically limited to 50% of the employee’s monthly salary.
2
One Active Advance
Employees cannot request a new advance while they have an active advance being repaid.
3
Maximum Installments
Usually limited to 3 months to avoid excessive deductions.
4
Minimum Tenure
Some organizations require employees to have worked for a minimum period (e.g., 3 months) before requesting an advance.
Always ensure the repayment amount does not exceed a certain percentage of the employee’s net pay (e.g., 30%). This prevents excessive deductions that leave employees with insufficient take-home pay.