114 lines
4.6 KiB
PHP
Executable file
114 lines
4.6 KiB
PHP
Executable file
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
|
|
@if ($errors->any())
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="card">
|
|
<h5 class="card-header">
|
|
{{ __('navigation.products') }} {{ __('navigation.sales_volumes') }}
|
|
</h5>
|
|
<div class="card-body">
|
|
{!! Form::open(['url' => route('admin_evaluation_sales_volumes_download'), 'class' => '']) !!}
|
|
{!! Form::hidden('key', 'value') !!}
|
|
<button type="submit" name="action" value="export" class="btn btn-md btn-primary mb-2"><i class="ion ion-md-download"></i> Export als xls</button>
|
|
<hr>
|
|
<div class="form-row align-items-center px-0 pb-2 pt-0">
|
|
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
|
<select class="custom-select on_change_select_filter" name="product_sales_vol_filter_month">
|
|
@foreach($filter_months as $key=>$value)
|
|
<option value="{{$key}}" @if(session('product_sales_vol_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_select_filter" name="product_sales_vol_filter_year">
|
|
@foreach($filter_years as $key=>$value)
|
|
<option value="{{$value}}" @if(session('product_sales_vol_filter_year') == $value) selected @endif>{{$value}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{!! Form::close() !!}
|
|
|
|
<div class="card">
|
|
<div class="card-datatable table-responsive">
|
|
<table class="table table-striped table-bordered" id="datatable-sales-volume">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>{{__('#') }}</th>
|
|
<th>{{__('tables.product')}}</th>
|
|
<th>{{__('tables.article_no')}}</th>
|
|
<th>{{__('tables.quantity')}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
$( document ).ready(function() {
|
|
|
|
|
|
var oTable = $('#datatable-sales-volume').DataTable({
|
|
"processing": true,
|
|
"serverSide": true,
|
|
"stateSave": true,
|
|
"searching": false,
|
|
ajax: {
|
|
url: '{!! route('admin_evaluation_sales_volumes_datatable') !!}',
|
|
data: function(d) {
|
|
d.product_sales_vol_filter_month = $('select[name=product_sales_vol_filter_month]').val();
|
|
d.product_sales_vol_filter_year = $('select[name=product_sales_vol_filter_year]').val();
|
|
}
|
|
},
|
|
"order": [[0, "asc" ]],
|
|
"columns": [
|
|
{ data: 'id', orderable: true, searchable: false },
|
|
{ data: 'name', name: 'name', orderable: true, searchable: false },
|
|
{ data: 'number', name: 'number', orderable: true, searchable: false },
|
|
{ data: 'value', name: 'value', orderable: true, searchable: false },
|
|
|
|
],
|
|
"bLengthChange": false,
|
|
"iDisplayLength": 100,
|
|
"language": {
|
|
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
|
}
|
|
});
|
|
|
|
$('select.on_change_select_filter').on('change', function(){
|
|
oTable.draw();
|
|
});
|
|
|
|
$('input.on_keyup_input_filter').on('keyup', function(){
|
|
oTable.draw();
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
</script>
|
|
@endsection
|