@extends('layouts.portal') @section('title', $payroll->exists ? __('Edit payroll') : __('Create payroll')) @push('styles') @include('accounting.journal._styles') @endpush @section('content')
@unless($embedded) @include('partials.portal-header') @endunless

{{ $payroll->exists ? __('Edit payroll').' PAY-'.$payroll->id : __('Create payroll') }}

@unless($embedded){{ __('Back to list') }}@endunless
@include('payroll._messages')

{{ __('Saving immediately posts accounting. Credit uses each concept payable override or Salaries payable by default. Other methods use the selected cash or bank account for all lines.') }}

{{ __('An employee may have multiple lines with different concepts. Each employee and concept combination must be unique.') }}

@if($payroll->exists)

{{ __('Journal entry') }} {{ $payroll->journalEntry->display_number }}

{{ __('Edits keep the same journal ID and numbering year. Closed periods and payment applications prevent changes.') }}

@endif @if($concepts->isEmpty() || $methods->isEmpty() || $employees->isEmpty())
{{ __('Configure active employees, payroll service concepts and payroll payment methods before saving.') }}
@endif
@csrf @if($payroll->exists) @method('PUT') @endif
@foreach(old('lines', $payroll->exists ? $payroll->lines->map->only(['employee_person_id', 'service_concept_id', 'amount'])->all() : [['service_concept_id' => $globalDefault]]) as $index => $line) @include('payroll._line', ['index' => $index, 'line' => $line]) @endforeach
{{ __('Employee') }}{{ __('Employee service concept') }}{{ __('Salary classification') }}{{ __('Amount') }}
{{ __('Total') }}: 0.00
@endsection @push('scripts') @include('payroll._form-script') @endpush