2018-10-27 17:57:40 +03:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
@section('title', trans('general.title.edit', ['type' => trans_choice('general.reconciliations', 1)]))
|
|
|
|
|
|
|
|
@section('content')
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card">
|
|
|
|
{!! Form::model($reconciliation, [
|
|
|
|
'method' => 'PATCH',
|
|
|
|
'url' => ['banking/reconciliations', $reconciliation->id],
|
|
|
|
'role' => 'form',
|
|
|
|
'id' => 'form-reconciliations',
|
|
|
|
'class' => 'form-loading-button mb-0'
|
|
|
|
]) !!}
|
|
|
|
|
|
|
|
<div class="card-header border-0">
|
|
|
|
<h3 class="box-title">{{ trans_choice('general.transactions', 2) }}</h3>
|
|
|
|
</div>
|
2018-10-27 17:57:40 +03:00
|
|
|
|
|
|
|
{{ 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']) }}
|
2019-11-16 10:21:14 +03:00
|
|
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table align-items-center table-flush">
|
|
|
|
<thead class="thead-light">
|
|
|
|
<tr class="row">
|
2019-11-27 11:16:17 +03:00
|
|
|
<th class="col-xs-4 col-sm-3 col-md-2 long-texts">{{ trans('general.date') }}</th>
|
2019-11-16 10:21:14 +03:00
|
|
|
<th class="col-md-2 text-center hidden-md">{{ trans('general.description') }}</th>
|
|
|
|
<th class="col-md-2 col-sm-3 col-md-3 hidden-sm">{{ trans_choice('general.contacts', 1) }}</th>
|
|
|
|
<th class="col-xs-4 col-sm-3 col-md-2 text-right">{{ trans('reconciliations.deposit') }}</th>
|
2019-11-27 11:16:17 +03:00
|
|
|
<th class="col-xs-4 col-sm-3 col-md-2 text-right long-texts">{{ trans('reconciliations.withdrawal') }}</th>
|
2019-11-16 10:21:14 +03:00
|
|
|
<th class="col-md-1 text-right hidden-md">{{ trans('general.clear') }}</th>
|
|
|
|
</tr>
|
2018-10-27 17:57:40 +03:00
|
|
|
</thead>
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2018-10-27 17:57:40 +03:00
|
|
|
<tbody>
|
2019-11-16 10:21:14 +03:00
|
|
|
@foreach($transactions as $item)
|
|
|
|
<tr class="row">
|
2019-11-27 11:16:17 +03:00
|
|
|
<td class="col-xs-4 col-sm-3 col-md-2 long-texts">@date($item->paid_at)</td>
|
2019-11-16 10:21:14 +03:00
|
|
|
<td class="col-md-2 text-center hidden-md">{{ $item->description }}</td>
|
|
|
|
<td class="col-sm-3 col-md-3 hidden-sm">{{ $item->contact->name }}</td>
|
|
|
|
@if ($item->type == 'income')
|
|
|
|
<td class="col-xs-4 col-sm-3 col-md-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
|
|
|
<td class="col-xs-4 col-sm-3 col-md-2 text-right"> </td>
|
|
|
|
@else
|
|
|
|
<td class="col-xs-4 col-sm-3 col-md-2 text-right"> </td>
|
|
|
|
<td class="col-xs-4 col-sm-3 col-md-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
|
|
|
@endif
|
|
|
|
<td class="col-md-1 text-right hidden-md">{{ Form::checkbox('transactions['. $item->id . '_'. $item->type . ']', $item->amount, $item->reconciled) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2018-10-27 17:57:40 +03:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
@if ($transactions->count())
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
2019-11-16 10:21:14 +03:00
|
|
|
<tr class="row">
|
|
|
|
<th class="col-md-9 col-lg-11 text-right hidden-md">{{ trans('reconciliations.closing_balance') }}:</th>
|
|
|
|
<td id="closing-balance" class="col-md-1 text-right">@money($reconciliation->closing_balance, $account->currency_code, true)</td>
|
|
|
|
</tr>
|
|
|
|
<tr class="row">
|
|
|
|
<th class="col-md-9 col-lg-11 text-right hidden-md">{{ trans('reconciliations.cleared_amount') }}:</th>
|
|
|
|
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right hidden-md">@money('0', $account->currency_code, true)</td>
|
|
|
|
</tr>
|
|
|
|
<tr class="row">
|
|
|
|
<th class="col-md-9 col-lg-11 text-right hidden-md">{{ trans('general.difference') }}:</th>
|
|
|
|
<td id="difference" class="col-md-3 col-lg-1 text-right hidden-md">@money('0', $account->currency_code, true)</td>
|
|
|
|
</tr>
|
2018-10-27 17:57:40 +03:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
@endif
|
|
|
|
</div>
|
2019-11-16 10:21:14 +03:00
|
|
|
|
|
|
|
<div class="card-footer">
|
|
|
|
<div class="row float-right">
|
|
|
|
@if ($transactions->count())
|
|
|
|
<a href="{{ route('reconciliations.index') }}" class="btn btn-outline-secondary header-button-top"><span class="fa fa-times"></span> {{ trans('general.cancel') }}</a>
|
|
|
|
{!! Form::button('<span class="fa fa-check"></span> ' . trans('reconciliations.reconcile'), ['type' => 'button', 'id' => 'button-reconcile', 'class' => 'btn btn-info button-submit header-button-top', 'data-loading-text' => trans('general.loading'), 'disabled' => 'disabled']) !!}
|
|
|
|
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'submit', 'class' => 'btn btn-success button-submit header-button-top', 'data-loading-text' => trans('general.loading')]) !!}
|
|
|
|
@else
|
|
|
|
<small>{{ trans('general.no_records') }}</small>
|
|
|
|
@endif
|
2018-10-27 17:57:40 +03:00
|
|
|
</div>
|
2019-11-16 10:21:14 +03:00
|
|
|
</div>
|
2018-10-27 17:57:40 +03:00
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
@push('scripts_start')
|
|
|
|
<script src="{{ asset('public/js/banking/reconciliations.js?v=' . version('short')) }}"></script>
|
2018-10-27 17:57:40 +03:00
|
|
|
@endpush
|