@extends('layouts.admin') @section('title', trans('general.title.new', ['type' => trans_choice('general.reconciliations', 1)])) @section('content')
{!! Form::open(['url' => 'banking/reconciliations/create', 'role' => 'form', 'method' => 'GET']) !!}
{{ Form::textGroup('started_at', trans('reconciliations.start_date'), 'calendar',['id' => 'started_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '', 'autocomplete' => 'off'], request('started_at'), 'col-md-3') }} {{ Form::textGroup('ended_at', trans('reconciliations.end_date'), 'calendar',['id' => 'ended_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '', 'autocomplete' => 'off'], request('started_at'), 'col-md-3') }} {{ Form::textGroup('closing_balance', trans('reconciliations.closing_balance'), 'money', ['required' => 'required', 'autofocus' => 'autofocus'], '0', 'col-md-2') }} {{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, request('account_id', setting('general.default_account')), ['required' => 'required'], 'col-md-2') }}
{!! Form::button('  ' . trans('reconciliations.list_transactions'), ['type' => 'submit', 'class' => 'btn btn-success']) !!}
{!! Form::close() !!}

{{ trans_choice('general.transactions', 2) }}

{!! Form::open(['url' => 'banking/reconciliations', 'role' => 'form', 'class' => 'form-loading-button', 'id' => 'form-reconciliations']) !!} {{ Form::hidden('account_id', $account->id) }} {{ Form::hidden('currency_code', $currency->code, ['id' => 'currency_code']) }} {{ Form::hidden('opening_balance', $opening_balance, ['id' => 'opening_balance']) }} {{ Form::hidden('closing_balance', request('closing_balance', '0'), ['id' => 'closing_balance']) }} {{ Form::hidden('started_at', request('started_at')) }} {{ Form::hidden('ended_at', request('ended_at')) }} {{ Form::hidden('reconcile', '0', ['id' => 'hidden-reconcile']) }}
@foreach($transactions as $item) @if (($item->model == 'App\Models\Income\InvoicePayment') || ($item->model == 'App\Models\Income\Revenue')) @else @endif @endforeach
{{ trans('general.date') }} {{ trans('general.description') }} {{ trans_choice('general.contacts', 1) }} {{ trans('reconciliations.deposit') }} {{ trans('reconciliations.withdrawal') }} {{ trans('general.clear') }}
{{ Date::parse($item->paid_at)->format($date_format) }} {{ $item->description }} @if (!empty($item->contact)) {{ $item->contact->name }} @else {{ trans('general.na') }}@endif@money($item->amount, $item->currency_code, true)    @money($item->amount, $item->currency_code, true){{ Form::checkbox('transactions['. $item->id . '_'. $item->model . ']', $item->amount, $item->reconciled) }}
@if ($transactions->count())
{{ trans('reconciliations.closing_balance') }}: @money(request('closing_balance', '0'), $account->currency_code, true)
{{ trans('reconciliations.cleared_amount') }}: @money('0', $account->currency_code, true)
{{ trans('general.difference') }}: @money('0', $account->currency_code, true)
@endif
{!! Form::close() !!}
@endsection @push('js') @if (language()->getShortCode() != 'en') @endif @endpush @push('css') @endpush @push('scripts') @endpush