@extends('layouts.portal') @section('title', __('Balances')) @push('styles') @include('accounting.journal._styles') @endpush @section('content')
@include('partials.portal-header')

{{ __(['payable' => 'Accounts payable', 'salary' => 'Salaries payable', 'receivable' => 'Customer receivables'][$filters['category']]) }}

@include('accounting.balances._nav') @include('payroll._messages') @if($accounts->isEmpty())
{{ __('Configure balance accounts before using this screen.') }}
@endif

{{ __('Current outstanding balances. Date and document filters restrict original entries, not the payment cutoff date. Negative amounts are unapplied credits.') }}

1) open @endif> {{ __('Advanced filters') }}
@foreach(['date_from' => 'Posting date from', 'date_to' => 'Posting date to', 'due_from' => 'Due date from', 'due_to' => 'Due date to'] as $key => $label)
@endforeach
{{ __('Clear') }}
{{ __('Only checked people are printed or exported. Selection resets when changing pages or filters.') }}
@foreach($filters as $key => $value) @if(is_array($value)) @foreach($value as $item)@endforeach @continue @endif @endforeach

{{ __('Select people on this page to pay or collect their matching balances. Review the document allocation on the next screen.') }}

@forelse($people as $person) @empty@endforelse
{{ __('Person') }}{{ __('Balance') }}
{{ $person->first_name }} {{ $person->last_name }}{{ number_format((float) $person->balance, 2) }} {{ __('View documents') }} {{ __('View account statement') }}
{{ __('No matching balances.') }}

{{ __('Payments require a positive balance for every selected person.') }}

{{ $people->links() }}
@if($detail !== null)

{{ __('Documents and journal lines') }}

@foreach($detail as $item) @endforeach
{{ __('Date') }}{{ __('Due date') }}{{ __('Account') }}{{ __('Document') }}{{ __('Journal entry') }}{{ __('Description') }}{{ __('Balance') }}
{{ $item->entry_date }}{{ $item->due_date }}{{ $item->code }} - {{ $item->account_name }}{{ $item->document_number }} {{ $item->entry_year }}-{{ $item->entry_number }}{{ $item->description }}{{ number_format((float) $item->balance, 2) }}
{{ $detail->links() }}
@endif
@endsection @push('scripts') @endpush