{{-- Every change to the employee's salary, newest first. --}} @use('App\Models\Payment') @php $currency = $employee->currency(); @endphp

{{ __('Salary history') }}

{{ __('Each time the monthly salary was set or changed.') }}

@isset($editUrl) {{ __('Change salary') }} @endisset
@if ($employee->salaryChanges->isEmpty())

@if ($employee->salary !== null) {{ __('Current salary :amount. No changes recorded yet.', ['amount' => Payment::formatMoney($employee->salary, $currency)]) }} @else {{ __('No salary has been set yet. Set it when editing the employee.') }} @endif

@else
    @foreach ($employee->salaryChanges as $change)
  1. {{ Payment::formatMoney($change->amount, $currency) }} @if ($change->previous_amount !== null) {{ __('was :amount', ['amount' => Payment::formatMoney($change->previous_amount, $currency)]) }} @if ((float) $change->amount > (float) $change->previous_amount) ▲ @elseif ((float) $change->amount < (float) $change->previous_amount) ▼ @endif @endif
    {{ __('from :month', ['month' => $change->effective_from->format('F Y')]) }}
    {{ $change->changer ? __('Set by :name', ['name' => $change->changer->name]) : __('Set by the system') }} · {{ $change->created_at->format('d M Y') }} @if ($change->note) · {{ $change->note }} @endif
  2. @endforeach
@endif