API aktiviert / Anpassungen + User Übersicht Gutschriften Umsätze
This commit is contained in:
parent
c02fffd883
commit
a4c76d06fa
27 changed files with 500 additions and 110 deletions
58
resources/views/user/payment/credit.blade.php
Normal file
58
resources/views/user/payment/credit.blade.php
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('navigation.my_account') }} / {{ __('navigation.credit') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-user-credit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{__('G.Nr.')}}</th>
|
||||
<th>{{__('Gutschrift')}}</th>
|
||||
<th>{{__('Betrag') }}</th>
|
||||
<th>{{__('Datum') }}</th>
|
||||
<th>{{__('Zahlung')}}</th>
|
||||
<th>{{__('aus Bestellung / Gutschrift')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
var oTable = $('#datatable-user-credit').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'user_payment_credit_datatable') !!}',
|
||||
data: function(d) {
|
||||
//d.filter_sales_year = $('select[name=filter_sales_year]').val();
|
||||
}
|
||||
},
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'credit_number', name: 'credit_number' },
|
||||
{ data: 'credit', name: 'credit', orderable: false, searchable: false },
|
||||
{ data: 'total', name: 'total' },
|
||||
{ data: 'date', name: 'date' },
|
||||
{ data: 'status', name: 'status', searchable: false },
|
||||
{ data: 'user_margins', name: 'user_margins', orderable: false },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
/*$('#filter_sales_year').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
*/
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-user-pay-credit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 55%">Mitteilung</th>
|
||||
|
|
@ -18,30 +18,39 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($user && $user->user_pay_credits)
|
||||
@foreach($user->user_pay_credits as $user_pay_credit)
|
||||
<tr>
|
||||
@if($user_pay_credit->status === 3)
|
||||
<th scope="row"> {!! nl2br($user_pay_credit->message) !!}</th>
|
||||
@else
|
||||
<th scope="row">{{ trans('payment.'.$user_pay_credit->message) }}
|
||||
@if($user_pay_credit->shopping_order_id)
|
||||
<a class="btn btn-outline-secondary btn-xs" href="{{ route('admin_sales_users_detail', [$user_pay_credit->shopping_order_id]) }}"><i class="ion ion-md-eye"></i></a>
|
||||
@endif
|
||||
</th>
|
||||
@endif
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->credit) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->old_credit_total) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->new_credit_total) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatDate($user_pay_credit->created_at) }}</div></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
var oTable = $('#datatable-user-pay-credit').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'user_payment_paycredit_datatable') !!}',
|
||||
/*data: function(d) {
|
||||
d.filter_user_status = $('select[name=filter_user_status]').val();
|
||||
}*/
|
||||
},
|
||||
"order": [[4, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'message', name: 'message' },
|
||||
{ data: 'credit', name: 'credit' },
|
||||
{ data: 'old_credit_total', name: 'old_credit_total', orderable: false, searchable: false },
|
||||
{ data: 'new_credit_total', name: 'new_credit_total', orderable: false, searchable: false },
|
||||
{ data: 'created_at', name: 'created_at' },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
/*$('#filter_user_status').on('change', function(){
|
||||
oTable.draw();
|
||||
});*/
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
|||
83
resources/views/user/payment/revenue.blade.php
Normal file
83
resources/views/user/payment/revenue.blade.php
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('navigation.my_account') }} / {{ __('navigation.revenue') }}
|
||||
</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 mb-0 mt-2 mb-2">
|
||||
{!! Form::open(['url' => route('user_payment_revenue'), 'class' => 'form-horizontal', 'id'=>'form_filter_year']) !!}
|
||||
<label class="form-label" for="filter_year">Filter Jahr</label>
|
||||
<select class="custom-select" name="filter_year" id="filter_year">
|
||||
@foreach($years as $year)
|
||||
<option value="{{$year}}" @if($active_year == $year) selected @endif>{{$year}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@foreach ($months as $month)
|
||||
|
||||
@php($date = $active_year."-".$month."-01")
|
||||
<div class="card mb-4">
|
||||
<h6 class="card-header py-1 px-3">
|
||||
<div class="card-header-title"> {{ App\Services\HTMLHelper::getMonth($month) }} {{ $active_year }}</div>
|
||||
</h6>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Umsatz gesamt')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPrice($user, $date, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Umsatz Staffelrabatt')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyAmount($user, $date, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Umsatz Zahlung offen')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPriceOpen($user, $date, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
--}}
|
||||
</table>
|
||||
{{--
|
||||
<h6>{{__('Provision')}}</h6>
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Vertriebspartner Provision')}} pending:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPartnerCommissionPending($user, $date, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Vertriebspartner Provision')}} bestätigt:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPartnerCommissionOpen($user, $date, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endforeach
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#filter_year').on('change', function(){
|
||||
$('#form_filter_year').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue