Files

100 lines
4.8 KiB
PHP
Executable File

@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('payment_items.payment_items') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payment_items.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payment_items.finance_home') }}</a></li>
<li class="active"><i class="fa fa-eye"></i> {{ __('payment_items.payment_items') }}</li>
</ol>
</div>
</div>
@include('expenses::payment_items.menu')
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
<p class="text-muted m-b-30">{{ __('payment_items.export_data_to_csv_excel') }}</p>
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('payment_items.name') }}</th>
<th>{{ __('payment_items.unit_cost') }}</th>
<th>{{ __('payment_items.expense_account') }}</th>
@can('Payments-edit-payment-item')
<th>{{ __('payment_items.edit') }}</th>
@endcan
@can('Payments-delete-payment-item')
<th>{{ __('payment_items.delete') }}</th>
@endcan
</tr>
</thead>
<tbody>
@if(count($payment_items)>0)
@foreach($payment_items as $item)
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->name }}</td>
<td>{{ ugandan_shillings($item->unit_cost) }}</td>
<td>{{ get_name($item->account_id,'id', 'name', 'chart_of_accounts') }}</td>
@can('Payments-edit-payment-item')
<td>
<a href="/payment_items/{{ $item->id }}/edit/" class="btn btn-info"><i class="fa fa-pencil"></i> {{ __('payment_items.edit') }}</a>
</td>
@endcan
@can('Payments-delete-payment-item')
<td>
{{ Form::model($item->id ,['method' => 'DELETE', 'route' => ['payment_items.destroy', $item->id]]) }}
<button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> {{ __('payment_items.delete') }}</button>
{{ Form::close() }}
</td>
@endcan
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush