74 lines
3.7 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')
<span><a href="{{ route('import.create', ['banking', 'transactions']) }}" class="btn btn-white btn-sm header-button-top"><span class="fa fa-upload "></span> &nbsp;{{ trans('import.import') }}</a></span>
<span><a href="{{ route('transactions.export', request()->input()) }}" class="btn btn-white btn-sm header-button-top"><span class="fa fa-download"></span> &nbsp;{{ trans('general.export') }}</a></span>
@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([
'url' => 'banking/transactions',
'role' => 'form',
'method' => 'GET',
'class' => 'mb-0'
]) !!}
<div class="row">
<div class="col-12 card-header-search">
<span class="table-text hidden-lg">{{ trans('general.search') }}:</span>
<akaunting-search></akaunting-search>
</div>
</div>
{!! Form::close() !!}
2017-09-14 22:21:00 +03:00
</div>
2019-11-16 10:21:14 +03:00
<div class="table-responsive">
<table class="table table-flush">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-sm-2 col-md-2 hidden-sm">@sortablelink('paid_at', trans('general.date'))</th>
<th class="col-xs-4 col-sm-3 col-md-2">@sortablelink('account.name', trans_choice('general.accounts', 1))</th>
<th class="col-xs-4 col-sm-3 col-md-2">@sortablelink('type', trans_choice('general.types', 1))</th>
<th class="col-sm-2 col-md-2 hidden-sm">@sortablelink('category.name', trans_choice('general.categories', 1))</th>
<th class="col-md-2 hidden-md">@sortablelink('description', trans('general.description'))</th>
<th class="col-xs-4 col-sm-2 col-md-2 text-right">@sortablelink('amount', trans('general.amount'))</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)
<tr class="row align-items-center border-top-1">
<td class="col-sm-2 col-md-2 hidden-sm">@date($item->paid_at)</td>
<td class="col-xs-4 col-sm-3 col-md-2">{{ $item->account->name }}</td>
<td class="col-xs-4 col-sm-3 col-md-2">{{ trans_choice('general.' . Str::plural($item->type), 1) }}</td>
<td class="col-sm-2 col-md-2 hidden-sm">{{ $item->category->name }}</td>
<td class="col-md-2 hidden-md">{{ $item->description }}</td>
2019-12-03 10:07:52 +05:30
@if(!is_null($item->bill_id))
@else
<td class="col-xs-4 col-sm-2 col-md-2 text-right">
<a href="{{ route('bills.show', $item->bill_id) }}">
@money($item->amount, $item->currency_code, true)
</a>
</td>
@endif
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">
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
</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