@extends('layouts.admin') @section('title', trans('general.title.edit', ['type' => trans_choice('general.reconciliations', 1)])) @section('content')

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

{!! Form::model($reconciliation, [ 'method' => 'PATCH', 'url' => ['banking/reconciliations', $reconciliation->id], 'role' => 'form', 'id' => 'form-reconciliations', 'class' => 'form-loading-button' ]) !!} {{ 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', $reconciliation->closing_balance, ['id' => 'closing_balance']) }} {{ Form::hidden('started_at', $reconciliation->started_at) }} {{ Form::hidden('ended_at', $reconciliation->ended_at) }} {{ Form::hidden('reconcile', $reconciliation->reconcile, ['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($reconciliation->closing_balance, $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('scripts') @endpush