101 lines
4.8 KiB
PHP
101 lines
4.8 KiB
PHP
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<h5 class="card-header">
|
|
Finanzen / Rechnungen
|
|
</h5>
|
|
<div class="card-body p-0">
|
|
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_invoices']) !!}
|
|
|
|
<div class="form-row align-items-center px-4 pb-2 pt-3">
|
|
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
|
|
<input class="form-control on_keyup_invoice" name="invoice_filter_name" type="text" value="{{session('invoice_filter_name')}}" placeholder="Name">
|
|
</div>
|
|
|
|
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
|
<select class="custom-select on_change_invoice" name="invoice_filter_month">
|
|
@foreach($filter_months as $key=>$value)
|
|
<option value="{{$key}}" @if(session('invoice_filter_month') == $key) selected @endif>{{$value}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
|
<select class="custom-select on_change_invoice" name="invoice_filter_year">
|
|
@foreach($filter_years as $key=>$value)
|
|
<option value="{{$value}}" @if(session('invoice_filter_year') == $value) selected @endif>{{$value}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{!! Form::close() !!}
|
|
|
|
<div class="card-datatable table-responsive pt-0">
|
|
<table class="datatables-style table table-striped table-bordered" id="datatable-invoice">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>{{__('Re.Nr.')}}</th>
|
|
<th>{{__('Rechnung')}}</th>
|
|
<th>{{__('Betrag') }}</th>
|
|
<th>{{__('Status')}}</th>
|
|
<th>{{__('Vorname')}}</th>
|
|
<th>{{__('Nachname') }}</th>
|
|
<th>{{__('E-Mail') }}</th>
|
|
<th>{{__('Datum') }}</th>
|
|
<th>{{__('Art')}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$( document ).ready(function() {
|
|
var oTable = $('#datatable-invoice').DataTable({
|
|
"processing": true,
|
|
"serverSide": true,
|
|
"stateSave": true,
|
|
"searching": false,
|
|
ajax: {
|
|
url: '{!! route('admin_payments_invoice_datatable') !!}',
|
|
data: function(d) {
|
|
d.invoice_filter_name = $('input[name=invoice_filter_name]').val();
|
|
d.invoice_filter_month = $('select[name=invoice_filter_month]').val();
|
|
d.invoice_filter_year = $('select[name=invoice_filter_year]').val();
|
|
}
|
|
},
|
|
"order": [[0, "desc" ]],
|
|
"columns": [
|
|
{ data: 'id', searchable: false },
|
|
{ data: 'full_number', name: 'full_number' },
|
|
{ data: 'invoice', name: 'invoice', orderable: false, searchable: false },
|
|
{ data: 'total_shipping', name: 'total_shipping' },
|
|
{ data: 'txaction', name: 'txaction', searchable: false },
|
|
{ data: 'shopping_order.shopping_user.billing_firstname', name: 'shopping_order.shopping_user.billing_firstname', orderable: false },
|
|
{ data: 'shopping_order.shopping_user.billing_lastname', name: 'shopping_order.shopping_user.billing_lastname', orderable: false },
|
|
{ data: 'shopping_order.shopping_user.billing_email', name: 'shopping_order.shopping_user.billing_email', orderable: false },
|
|
{ data: 'created_at', name: 'created_at' },
|
|
{ data: 'status', name: 'status', searchable: false },
|
|
],
|
|
"bLengthChange": false,
|
|
"iDisplayLength": 100,
|
|
"language": {
|
|
"url": "/js/German.json"
|
|
}
|
|
});
|
|
$('select.on_change_invoice').on('change', function(){
|
|
oTable.draw();
|
|
});
|
|
|
|
$('input.on_keyup_invoice').on('keyup', function(){
|
|
oTable.draw();
|
|
});
|
|
});
|
|
/*$('#filter_sales_year').on('change', function(){
|
|
$('#form_filter_payment_invoices').submit();
|
|
});*/
|
|
</script>
|
|
@endsection
|