72 lines
3.6 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans_choice('general.transactions', 2))
2019-11-16 10:21:14 +03:00
@section('new_button')
2020-10-22 18:58:58 +03:00
@can('create-sales-revenues')
<a href="{{ route('revenues.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_income') }}</a>
@endcan
@can('create-purchases-payments')
<a href="{{ route('payments.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_expense') }}</a>
@endcan
<a href="{{ route('import.create', ['banking', 'transactions']) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
<a href="{{ route('transactions.export', request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
2019-11-16 10:21:14 +03:00
@endsection
2017-09-14 22:21:00 +03:00
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
<div class="card-header border-bottom-0">
{!! Form::open([
2020-02-21 15:09:43 +03:00
'method' => 'GET',
2020-01-21 18:13:29 +03:00
'route' => 'transactions.index',
2019-11-16 10:21:14 +03:00
'role' => 'form',
'class' => 'mb-0'
]) !!}
2020-11-06 01:48:49 +03:00
<x-search-string model="App\Models\Banking\Transaction" />
2019-11-16 10:21:14 +03:00
{!! Form::close() !!}
2017-09-14 22:21:00 +03:00
</div>
2019-11-16 10:21:14 +03:00
<div class="table-responsive">
2020-01-21 16:02:01 +03:00
<table class="table table-flush table-hover">
2019-11-16 10:21:14 +03:00
<thead class="thead-light">
<tr class="row table-head-line">
2019-12-16 17:03:53 +03:00
<th class="col-sm-2 col-md-2 d-none d-sm-block">@sortablelink('paid_at', trans('general.date'))</th>
2020-09-03 10:42:53 +03:00
<th class="col-xs-4 col-sm-2 col-md-2 text-right">@sortablelink('amount', trans('general.amount'))</th>
2019-11-16 10:21:14 +03:00
<th class="col-xs-4 col-sm-3 col-md-2">@sortablelink('type', trans_choice('general.types', 1))</th>
2019-12-16 17:03:53 +03:00
<th class="col-sm-2 col-md-2 d-none d-sm-block">@sortablelink('category.name', trans_choice('general.categories', 1))</th>
2020-09-03 10:42:53 +03:00
<th class="col-xs-4 col-sm-3 col-md-2">@sortablelink('account.name', trans_choice('general.accounts', 1))</th>
2019-12-16 17:03:53 +03:00
<th class="col-md-2 d-none d-md-block">@sortablelink('description', trans('general.description'))</th>
2017-09-14 22:21:00 +03:00
</tr>
</thead>
2019-11-16 10:21:14 +03:00
2017-09-14 22:21:00 +03:00
<tbody>
2019-11-16 10:21:14 +03:00
@foreach($transactions as $item)
2020-02-09 16:06:06 +03:00
<tr class="row align-items-center border-top-1 tr-py">
2020-09-03 10:42:53 +03:00
<td class="col-sm-2 col-md-2 d-none d-sm-block">
<a href="{{ route($item->route_name, $item->route_id) }}">
@date($item->paid_at)
</a>
</td>
<td class="col-xs-4 col-sm-2 col-md-2 text-right">@money($item->amount, $item->currency_code, true)</td>
2020-08-26 15:14:16 +03:00
<td class="col-xs-4 col-sm-3 col-md-2">{{ $item->type_title }}</td>
2019-12-16 17:03:53 +03:00
<td class="col-sm-2 col-md-2 d-none d-sm-block">{{ $item->category->name }}</td>
2020-09-03 10:42:53 +03:00
<td class="col-xs-4 col-sm-3 col-md-2">{{ $item->account->name }}</td>
<td class="col-md-2 d-none d-md-block long-texts">{{ $item->description }}</td>
2019-11-16 10:21:14 +03:00
</tr>
@endforeach
2017-09-14 22:21:00 +03:00
</tbody>
</table>
</div>
2019-11-16 10:21:14 +03:00
<div class="card-footer table-action">
<div class="row">
2019-12-24 17:53:18 +03:00
@include('partials.admin.pagination', ['items' => $transactions])
2019-11-16 10:21:14 +03:00
</div>
</div>
2017-09-14 22:21:00 +03:00
</div>
@endsection
2019-11-16 10:21:14 +03:00
@push('scripts_start')
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
2018-11-02 11:32:42 +03:00
@endpush