2017-09-14 22:21:00 +03:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
@section('title', trans_choice('general.transactions', 2))
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<!-- Default box -->
|
|
|
|
<div class="box box-success">
|
2017-10-13 18:41:17 +03:00
|
|
|
<div class="box-header with-border">
|
2017-09-14 22:21:00 +03:00
|
|
|
{!! Form::open(['url' => 'banking/transactions', 'role' => 'form', 'method' => 'GET']) !!}
|
2018-11-02 11:32:42 +03:00
|
|
|
<div id="items" class="pull-left box-filter">
|
2017-10-13 18:41:17 +03:00
|
|
|
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
2018-10-04 16:16:55 +03:00
|
|
|
{!! Form::dateRange('date', trans('general.date'), 'calendar', []) !!}
|
2018-11-02 11:32:42 +03:00
|
|
|
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
|
|
|
{!! Form::select('type', $types, request('type'), ['class' => 'form-control input-filter input-sm']) !!}
|
|
|
|
{!! Form::select('categories[]', $categories, request('categories'), ['id' => 'filter-categories', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
2017-09-14 22:21:00 +03:00
|
|
|
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
|
|
|
</div>
|
|
|
|
<div class="pull-right">
|
2017-10-13 18:41:17 +03:00
|
|
|
<span class="title-filter hidden-xs">{{ trans('general.show') }}:</span>
|
2017-09-14 22:21:00 +03:00
|
|
|
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
|
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
|
|
|
<!-- /.box-header -->
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="table table-responsive">
|
2017-10-13 18:41:17 +03:00
|
|
|
<table class="table table-striped table-hover" id="tbl-transactions">
|
2017-09-14 22:21:00 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-10-13 18:41:17 +03:00
|
|
|
<th class="col-md-2">@sortablelink('paid_at', trans('general.date'))</th>
|
2017-12-26 11:56:43 +03:00
|
|
|
<th class="col-md-2">@sortablelink('account_name', trans('accounts.account_name'))</th>
|
2017-10-13 18:41:17 +03:00
|
|
|
<th class="col-md-2">@sortablelink('type', trans_choice('general.types', 1))</th>
|
2017-12-26 11:56:43 +03:00
|
|
|
<th class="col-md-2">@sortablelink('category_name', trans_choice('general.categories', 1))</th>
|
2017-10-13 18:41:17 +03:00
|
|
|
<th class="col-md-2">@sortablelink('description', trans('general.description'))</th>
|
2018-03-30 17:46:50 +03:00
|
|
|
<th class="col-md-2 text-right amount-space">@sortablelink('amount', trans('general.amount'))</th>
|
2017-09-14 22:21:00 +03:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($transactions as $item)
|
|
|
|
<tr>
|
|
|
|
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
|
|
|
<td>{{ $item->account_name }}</td>
|
|
|
|
<td>{{ $item->type }}</td>
|
|
|
|
<td>{{ $item->category_name }}</td>
|
|
|
|
<td>{{ $item->description }}</td>
|
2018-03-30 17:46:50 +03:00
|
|
|
<td class="text-right amount-space">@money($item->amount, $item->currency_code, true)</td>
|
2017-09-14 22:21:00 +03:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.box-body -->
|
|
|
|
|
|
|
|
<div class="box-footer">
|
|
|
|
</div>
|
|
|
|
<!-- /.box-footer -->
|
|
|
|
</div>
|
|
|
|
<!-- /.box -->
|
|
|
|
@endsection
|
2018-10-04 16:16:55 +03:00
|
|
|
|
|
|
|
@push('js')
|
|
|
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/daterangepicker/moment.js') }}"></script>
|
|
|
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
|
|
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
|
|
|
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
|
|
|
@endpush
|
|
|
|
|
|
|
|
@push('css')
|
|
|
|
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/daterangepicker/daterangepicker.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
|
|
|
@endpush
|
2018-11-02 11:32:42 +03:00
|
|
|
|
|
|
|
@push('scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#filter-accounts").select2({
|
|
|
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#filter-categories").select2({
|
|
|
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endpush
|