Updates to 03-2025

This commit is contained in:
Kevin Adametz 2025-04-01 10:39:21 +02:00
parent 6167273a48
commit 9b54eb0512
348 changed files with 34535 additions and 5774 deletions

View file

@ -1,7 +1,7 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<div class="card mb-5">
<h6 class="card-header">
{{__('Attribute')}}
</h6>
@ -12,56 +12,118 @@
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Description')}}</th>
<th>{{__('Translate') }}</th>
<th>{{__('Wert') }}</th>
<th>{{__('Type') }}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
@foreach($attributes as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-attribute"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-trans_name="{{ json_encode($value->trans_name) }}"
data-value="{{ $value->value }}"
data-attribute_type_id="{{ $value->attribute_type_id }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->getTranNames() }}</td>
<td>{{ $value->value }}</td>
<td>{{ $value->attribute_type->name }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-danger" href="{{ route('admin_product_attribute_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
<td><a class="text-danger" href="{{ route('admin_product_attribute_delete', ['attr', $value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-attribute"
data-id="new"
data-pos=""
data-name=""
data-value=""
data-attribute_type_id=""
data-parent_id=""
data-active="1">
{{__('Neues Attribute erstellen')}}</button>
</div>
</div>
</div>
<div class="card">
<h6 class="card-header">
{{__('Attribute')}} {{__('Types')}} <br>
<span class="text-muted font-weight-normal">
Neue Attribute Typen müssen müssen je nach Funktion und Anforderungen einprogrammiert werden
</span>
</h6>
<div class="card-subtitle "> <p><em></em></p></div>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Description')}}</th>
<th>{{__('Beschreibung')}}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($attribute_types as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-attribute-type"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-description="{{ $value->description }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->description }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-danger" href="{{ route('admin_product_attribute_delete', ['type', $value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-attribute-type"
data-id="new"
data-pos=""
data-name=""
data-description=""
data-parent_id=""
data-active="1"
>{{__('Neues Attribute erstellen')}}</button>
>{{__('Neuen Attribute Type erstellen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal fade" id="modals-attribute">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_product_attribute_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<input type="hidden" name="id">
<input type="hidden" name="action" value="attribute">
<div class="modal-header">
<h5 class="modal-title"> {{__('Attribute')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
@ -70,12 +132,25 @@
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<div class="form-group col-12">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
<div class="form-group col-12">
<label for="value" class="form-label">{{__('Wert')}} (für die technische Verarbeitung)</label>
<input type="text" class="form-control" name="value" placeholder="werden mit # getrennt">
</div>
<div class="form-group col-12">
<label for="attribute_type_id" class="form-label">{{__('Attribute Type')}}</label>
<select class="selectpicker" name="attribute_type_id" id="attribute_type_id" data-style="btn-light" data-live-search="true" required>
{!! HTMLHelper::getAttributeTypes() !!}
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
@ -108,37 +183,89 @@
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-attribute-type">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_product_attribute_store') }}" method="post">
@csrf
<input type="hidden" name="id">
<input type="hidden" name="action" value="attribute-type">
<div class="modal-header">
<h5 class="modal-title"> {{__('Attribute')}} {{__('Type')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col-12">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
<div class="form-group col-12">
<label for="description" class="form-label">{{__('Beschreibung')}}</label>
<input type="text" class="form-control" name="description" placeholder="">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
$(document).ready(function() {
$('#modals-attribute').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='value']").val(button.data('value'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body select[name='parent_id']").val(button.data('parent_id'));
$('.selectpicker').selectpicker('refresh');
if(button.data('attribute_type_id')){
$(this).find(".modal-body select[name='attribute_type_id']").val(button.data('attribute_type_id'));
$('.selectpicker').selectpicker('refresh');
}
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$.each(button.data('trans_name'), function (i, item) {
});
$('#modals-attribute-type').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='description']").val(button.data('description'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
// $(this).find(".modal-body select[name='parent_id']").val(button.data('parent_id'));
// $('.selectpicker').selectpicker('refresh');
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
/*$.each(button.data('trans_name'), function (i, item) {
var name = '#trans_'+i;
$(name).val(item);
});
});*/
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"order": [[ 1, "asc" ]],
"language": {
"url": "/js/German.json"
}

View file

@ -14,7 +14,7 @@
<th>{{__('Kategorie')}}</th>
{{--<th>{{__('Kategorie')}}</th>--}}
<th>{{__('Headline')}}</th>
<th>{{__('Headline')}}</th>
<th>{{__('Anzahl')}}</th>
<th>{{__('Produkte')}}</th>
<th>{{__('sichbar')}}</th>
{{-- <th>__('Translate') </th>--}}
@ -35,7 +35,7 @@
{{-- <td>@if($value->parent) {{ $value->name }} @else - @endif</td>--}}
<td>{{ $value->headline }}</td>
<td>{{ $value->product_categories->count() }}</td>
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
<td>{!! $value->getShowOnTypes('<br>') !!}</td>
{{-- <td>{{ $value->getTranNames() }}</td> --}}
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>

View file

@ -41,7 +41,7 @@
@else
&nbsp; | &nbsp;<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
@endif
&nbsp; | &nbsp;<span class="small">{!! implode($product_category->product->getShowOnTypes(), ' / ') !!}</span>
&nbsp; | &nbsp;<span class="small">{!! $product_category->product->getShowOnTypes(' / ') !!}</span>
&nbsp; | &nbsp;<a href="{{ route('admin_product_edit', [$product_category->product->id]) }}" class="btn btn-xs btn-secondary"><i class="fa fa-eye"></i></a>
@else
-

View file

@ -50,6 +50,38 @@
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
Lieferland
</h5>
<div class="card-body">
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('eu_country', 1, $country->eu_country, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Reverse Charge Verfahren (Berater aus diesen Ländern (EU-Ausland) können mit ihrer UST-ID steuerfrei kaufen) </span>
</label>
<p class="small">Hinweis: Die UST-ID muss erst im Kundenkonto des VP verifiziert werden, im Land des VP muss das Reverse Charge Verfahren aktiviert sein. </p>
</div>
<div class="form-group col-sm-12">
<label class="form-label">EU-Land - / Drittland (UST)</label>
<div class="custom-controls-stacked">
<label class="custom-control custom-radio">
{!! Form::radio('supply_country', 0, !$country->supply_country, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">EU-Land (innerhalb dieser Länder wird die UST berechnet, Ausnahme Reverse Charge Verfahren )</span>
</label>
<label class="custom-control custom-radio">
{!! Form::radio('supply_country', 1, $country->supply_country, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Drittland (innerhalb dieser Länder wird <strong>keine</strong> UST berechnert, bsp. Schweiz,)</span>
</label>
</div>
<p class="small">Hinweis: Drittland, die Bestellung ist UST-frei solange die Bestellung in ein Drittland geliefert wird. Wird aus einem Drittland in ein EU-Land geliefert, wird die UST berechnet.
Reverse Charge Verfahren kann nur in einem EU-Land angewendet werden, wenn es auch in das selbe Land gesendet wird. Ausnahme DE -> DE.
</p>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
Anzeige und Währung
@ -59,35 +91,41 @@
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('switch', 1, $country->switch, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Land als Auswahl auf der Webseite anzeigen (Länderwechsel)</span>
<span class="custom-control-label">Länderwechsel | Land als Auswahl auf den Shopseiten anzeigen</span>
</label>
<p class="small">Hinweis: Die hier aktivierten Länder werden auf den Shopseiten zum Länderwächsel angezeigt, allerdings müssen auch die Versandkosten angelegt sein.</p>
</div>
{{--
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('switch', 1, $country->switch, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Eigenes Lieferland ()</span>
{!! Form::checkbox('translate', 1, $country->translate, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Sprachwechsel | Land als Auswahl auf den Shopseiten und im Salescenter anzeigen</span>
</label>
<p class="small">Hinweis: Die hier aktivierten Länder werden auf den Shopseiten und im Salescenter zum Sprachwechsel angezeigt, allerdings muss auch die Übersetzung mit dem Länderkürzel ({{ strtolower($country->code) }}) angelegt sein.</p>
</div>
--}}
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('own_eur', 1, $country->own_eur, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Land hat eigenen EURO Preis</span>
</label>
<p class="small">Hinweis: Hier kann bei den Produkten der EURO-Preis überschrieben werden, in diesem Land gelten dann höhere oder niedrigere Preise</p>
</div>
<div class="col-12">
<hr class="mt-0">
</div>
<div class="form-group col-sm-6">
<div class="form-group col-sm-12">
<label class="form-label">Eigene Währung</label>
<label class="custom-control custom-checkbox">
{!! Form::checkbox('currency', 1, $country->currency, ['class'=>'custom-control-input', 'id'=>'currency']) !!}
<span class="custom-control-label">Land hat eigene Währung<br>(Währung wird nur zuzsätzlich zum EUR angezeigt, bezahlt wird in EUR)</span>
<span class="custom-control-label">Land hat eigene Währung</span>
</label>
<p class="small">Hinweis: Währung wird nur zuzsätzlich zum EUR angezeigt, wenn für das jeweilige Land bestellt wird, bezahlt wird in EUR</p>
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="currency_unit">Abkürzung der Währung</label>
{{ Form::text('currency_unit', $country->currency_unit, array('placeholder'=>__('CHF'), 'class'=>'form-control', 'id'=>'currency_unit')) }}
</div>
</div>
<div id="show_currency_calc" style="display: @if($country->currency) block @else none @endif">
<div class="form-row">
@ -95,6 +133,10 @@
<hr class="mt-0" >
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="currency_unit">Abkürzung der Währung</label>
{{ Form::text('currency_unit', $country->currency_unit, array('placeholder'=>__('CHF'), 'class'=>'form-control', 'id'=>'currency_unit')) }}
</div>
{{-- <div class="form-group col-sm-6">
<label class="form-label">Umrechnungsfaktor zum EUR {{$country->currency_calc}}</label>
<div class="custom-controls-stacked">
<label class="custom-control custom-radio">
@ -106,17 +148,18 @@
<span class="custom-control-label">berechnet den Preis automatisch</span>
</label>
</div>
</div>
<p class="small">Hinweis: Ist für die Einstellungen bei den Produktenpreisen.</p>
</div>--}}
<div class="form-group col-sm-6">
<label class="form-label" for="currency_faktor">Faktor Währungen zum Euro (z.B. 1 Euro zu 1,07 CHF)</label>
{{ Form::text('currency_faktor', formatNumber($country->currency_faktor, 4), array('placeholder'=>__('1,07'), 'class'=>'form-control', 'id'=>'currency_faktor')) }}
</div>
<p class="small">Hinweis: Der Preis berechnet sich automatisch nach dem Faktor.</p>
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{trans('register.required_fields')}}

View file

@ -15,6 +15,8 @@
<th>{{__('Code')}}</th>
<th>{{__('Phone')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Reverse Charge')}}</th>
<th>{{__('Drittland') }}</th>
<th>{{__('Länderwechsel')}}</th>
<th>{{__('e. Preis')}}</th>
<th>{{__('e. Währung')}}</th>
@ -33,6 +35,8 @@
<td>{{ $value->code }}</td>
<td>{{ $value->phone }}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<td data-sort="{{ $value->eu_country }}">{!! get_active_badge($value->eu_country) !!}</td>
<td data-sort="{{ $value->supply_country }}">{!! get_active_badge($value->supply_country) !!}</td>
<td data-sort="{{ $value->switch }}">{!! get_active_badge($value->switch) !!}</td>
<td data-sort="{{ $value->own_eur }}">{!! get_active_badge($value->own_eur) !!}</td>
<td data-sort="{{ $value->currency }}">{!! get_active_badge($value->currency) !!} {{$value->currency_unit}}</td>
@ -61,14 +65,13 @@
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 0, "asc" ]],
"language": {
"url": "/js/German.json"
"url": "/js/datatables-{{ \App::getLocale() }}.json"
}
});
});

View file

@ -0,0 +1,114 @@
@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> &nbsp;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

View file

@ -40,14 +40,56 @@
@include('user.user_form')
@endif
<div class="text-left mt-3">
<div class="text-left mt-3 mb-4">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@if($user->id)
@include('admin.lead.m_white_label')
@endif
<!-- Modal template -->
<div class="modal fade" id="modal-user-vat-validation">
<div class="modal-dialog">
{!! Form::open(['url' => route('admin_lead_store'), 'class' => 'modal-content']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
<div class="modal-header">
<h5 class="modal-title">{{ __('account.new_vat_validate') }}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col-12">
<p>{{ __('account.reverse_charge_copy_1') }}</p>
<p>{{ __('account.reverse_charge_note_1') }}</p>
</div>
<div class="form-group col-sm-12 {{ $errors->has('reverse_charge') ? 'has-error' : '' }}">
<label class="form-label" for="tax_identification_number">{{ __('account.VAT_ID_number') }} *</label>
{{ Form::text('tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('account.VAT_ID_number'), 'class'=>'form-control', 'id'=>'tax_identification_number', 'required'=>true)) }}
@if ($errors->has('reverse_charge'))
<span class="help-block">
<strong>{{ $errors->first('reverse_charge') }}</strong>
</span>
@endif
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="action" value="reverse_charge_validate">{{ __('account.btn_vat_validate') }}n</button>
</div>
{!! Form::close() !!}
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-edit-m-data">
<div class="modal-dialog">
@ -61,7 +103,7 @@
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Passwort eingeben')}}</label>
<input type="text" class="form-control" name="edit_m_data_key" placeholder="gseele">
<input type="text" class="form-control" name="edit_m_data_key" placeholder="gseele" value="gseele">
</div>
</div>
</div>

View file

@ -1,77 +1,106 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Vertriebspartner') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
{{-- <div class="ml-4">
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a>
</div>--}}
<table class="datatables-leads table table-striped table-bordered">
<div class="card-header">
{!! Form::open(['url' => route('admin_lead_download'), 'class' => '']) !!}
<div class="form-row align-items-center">
<div class="col-sm-5 col-md-5">
<label class="form-label" for="filter_user_shop_id">Art Vertriebspartner</label>
<select class="custom-select on_change_select_filter" name="filter_lead_type_id">
<option value="all">Alle Vertriebspartner</option>
{!! HTMLHelper::getLeadTypeOptions(session('filter_lead_type_id'), false) !!}
</select>
</div>
<div class="col-sm-4 col-md-4">
</div>
<div class="col-sm-3 col-md-3 text-right">
<button type="submit" name="action" value="export" class="btn btn-sm btn-primary mt-2"><i
class="ion ion-md-download"></i> &nbsp;Export als xls</button>
</div>
</div>
{!! Form::close() !!}
</div>
<div class="card-datatable table-responsive">
<table class="table table-striped table-bordered" id="datatables-leads">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Firma')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('Level')}}</th>
<th>{{__('Mitglied')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('Umsatz')}}</th>
<th>{{__('Sales')}}</th>
<th>{{__('verifiziert')}}</th>
<th>{{__('freigegeben')}}</th>
<th>{{__('Einv.')}}</th>
</tr>
<tr>
<th>#</th>
<th>{{ __('E-Mail') }}</th>
<th>{{ __('Firma') }}</th>
<th>{{ __('Vorname') }}</th>
<th>{{ __('Nachname') }}</th>
<th>{{ __('Level') }}</th>
<th>{{ __('Art') }}</th>
<th>{{ __('Mitglied') }}</th>
<th>{{ __('bis') }}</th>
<th>{{ __('Umsatz') }}</th>
<th>{{ __('Sales') }}</th>
<th>{{ __('verifiziert') }}</th>
<th>{{ __('freigegeben') }}</th>
<th>{{ __('Einv.') }}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
{{-- <div class="mt-4 ml-4">
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a>
</div> --}}
</div>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
<script>
$(document).ready(function() {
$('.datatables-leads').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('admin_leads_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [
{data: 'id', searchable: false},
{ data: 'email', name: 'email' },
{ data: 'company', name: 'account.company' },
{ data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'account.last_name' },
{ data: 'user_level', name: 'user_level' },
{ data: 'payment_account', name: 'payment_account' },
{ data: 'payment_account_date', name: 'payment_account_date' },
{ data: 'turnover', name: 'turnover' },
{ data: 'sales_total', name: 'sales_total' },
{ data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' },
{ data: 'agreement', name: 'agreement' },
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
var oTable = $('#datatables-leads').DataTable({
"processing": true,
"serverSide": true,
"stateSave": true,
ajax: {
url: '{!! route('admin_leads_datatable') !!}',
data: function(d) {
d.filter_lead_type_id = $('select[name=filter_lead_type_id]').val();
}
},
"order": [
[0, "desc"]
],
"columns": [{ data: 'id', searchable: false
},
{ data: 'email', name: 'email' },
{ data: 'company', name: 'account.company' },
{ data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'account.last_name' },
{ data: 'user_level', name: 'user_level' },
{ data: 'lead_type', name: 'lead_type' },
{ data: 'payment_account', name: 'payment_account' },
{ data: 'payment_account_date', name: 'payment_account_date' },
{ data: 'turnover', name: 'turnover' },
{ data: 'sales_total', name: 'sales_total' },
{ data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' },
{ data: 'agreement', name: 'agreement' },
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
$('select.on_change_select_filter').on('change', function(){
oTable.draw();
});
$('input.on_keyup_input_filter').on('keyup', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -9,29 +9,37 @@
</div>
</div>
@endif
<div class="card-body">
<div class="float-right">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-edit-m-data">
<span class="far fa-edit"></span> Vertriebspartner Daten bearbeiten
</button>
</div>
<div class="card-body m-0 p-0">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>{{ __('Name') }}</th>
<th>{{ __('Account ID') }}</th>
<th>{{ __('Rolle') }}</th>
<th>{{ __('Sponsor') }}</th>
<th style="width: 33%">{{ __('Name') }}</th>
<th style="width: 66%">{{ __('Account ID') }}</th>
</tr>
<tr>
<td>{{ \App\Services\HTMLHelper::getSalutationLang($user->account->m_salutation) }} {{ $user->account->m_first_name }} {{ $user->account->m_last_name }}</td>
<td>{{ $user->account->m_account }}</td>
</tr>
</tbody>
</table>
<table class="table card-table m-0">
<tbody>
<tr>
<th style="width: 33%">{{ __('Art Vertriebspartner') }}</th>
<th style="width: 33%">{{ __('Rolle') }}</th>
<th style="width: 33%">{{ __('Sponsor') }}</th>
</tr>
<tr>
<td>@if($user->lead_type) {{ $user->lead_type->name }} @else Standard @endif</td>
<td>@if($user->user_level){{ $user->user_level->name }}@endif</td>
<td>@if($user->m_sponsor){{ $user->getMUserSponsor() }}@endif</td>
</tr>
</tbody>
</table>
@if($user->account->m_notes)
<table class="table card-table m-0">
<tbody>
<tr>
@ -42,6 +50,7 @@
</tr>
</tbody>
</table>
@endif
</div>
</div>

View file

@ -1,26 +1,13 @@
<input type="hidden" name="m_data_edit" value="TSOK">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-4">
<label for="m_account" class="form-label">{{ __('Account ID') }} (unique)</label>
<span class="badge badge-secondary float-right">Nächste freie ID: {{$next_account_id}}</span>
<div class="form-group col-md-2">
<label for="m_account" class="form-label mb-1">ID <span class="badge badge-secondary">Nächste freie: {{$next_account_id}}</span></label>
{{ Form::text('m_account', $user->account->m_account, array('placeholder'=>__('Account ID'), 'class'=>'form-control', 'id'=>'m_account')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Rolle') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_level" id="m_level">
{!! HTMLHelper::getUserLevelOptions($user->m_level, false) !!}
</select>
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Sponsor') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_sponsor" id="m_sponsor" data-live-search="true">
{!! HTMLHelper::getMembersOptions($user->m_sponsor, true) !!}
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2">
<label class="form-label">{{ __('Salutation') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_salutation" id="m_salutation">
@ -28,15 +15,37 @@
</select>
</div>
<div class="form-group col-md-5">
<div class="form-group col-md-4">
<label class="form-label" for="first_name">{{ __('First name') }}</label>
{{ Form::text('m_first_name', $user->account->m_first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'m_first_name')) }}
</div>
<div class="form-group col-md-5">
<div class="form-group col-md-4">
<label class="form-label" for="last_name">{{ __('Last name') }}</label>
{{ Form::text('m_last_name', $user->account->m_last_name, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'m_last_name')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="lead_type_id">{{ __('Art Vertriebspartner') }}</label>
<select class="selectpicker" data-style="btn-light" name="lead_type_id" id="lead_type_id">
{!! HTMLHelper::getLeadTypeOptions($user->lead_type_id, false) !!}
</select>
</div>
<div class="form-group col-md-4">
<label class="form-label" for="m_level">{{ __('Rolle') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_level" id="m_level">
{!! HTMLHelper::getUserLevelOptions($user->m_level, false) !!}
</select>
</div>
<div class="form-group col-md-4">
<label class="form-label" for="m_sponsor">{{ __('Sponsor') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_sponsor" id="m_sponsor" data-live-search="true">
{!! HTMLHelper::getMembersOptions($user->m_sponsor, true) !!}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="m_notes">{{ __('weitere Daten') }}</label>
{{ Form::textarea('m_notes', $user->account->m_notes , array('placeholder'=>__('weitere Daten'), 'class'=>'form-control', 'id'=>'m_notes', 'rows'=>4)) }}

View file

@ -1,221 +1,240 @@
<div class="card mb-4">
<h5 class="card-header">
<a href="#" class="@if($show !== 'check_lead' || !$m_data_load) collapsed @endif" data-toggle="collapse" data-target="#collapseMRegister" aria-expanded="@if($show !== 'check_lead' || !$m_data_load) false @else true @endif" aria-controls="collapseMRegister">
<i class="fa fa-caret-expand"></i> {{__('Vertriebspartner Status') }}
</a>
</h5>
<div class="collapse @if($show === 'check_lead' || $m_data_load) show @endif" id="collapseMRegister">
@if($m_data_load)
@include('admin.lead.m_data_form_edit')
@endif
@if(!$m_data_load)
@include('admin.lead.m_data_form')
@endif
<div class="card-body mb-2 pb-1">
<div class="row">
<div class="col-sm-6">
@if($user->payment_account )
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Vertriebspartner-Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Vertriebspartner-Account inaktiv')}}</strong></p>
@endif
@if($user->active == 1)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Daten vollständig, freigeschaltet')}}</strong>: {{ $user->getActiveDateFormat() }}</p>
{{--
@if($user->files->count())
@foreach($user->files()->whereIdentifier('contract')->get() as $file)
<a class="btn btn-secondary" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank">Vertriebspartnervertrag.pdf</a>
@endforeach
@endif
--}}
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Daten nicht vollständigt, inaktiv')}}</strong></p>
@endif
</div>
<div class="col-sm-6">
@if($user->account_id)
@if($user->agreement)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Einverständniserklärung')}}</strong>: {{ $user->getAgreementFormat() }}
</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Einverständniserklärung')}}</strong> {{ __('nicht akzeptiert') }}</p>
@endif
@if($user->account->data_protection)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Privacy policy approved')}}</strong>: {{ $user->account->getDataProtectionFormat() }}
</p>
@endif
@endif
@if($user->confirmed == 1)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('E-Mail verified')}}</strong>: {{ $user->getConfirmationDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('E-Mail not verified')}}</strong></p>
<a class="btn btn-warning btn-sm" href="{{route('admin_lead_new_mail_verified', $user->id)}}">Neue E-Mail für die Registrierung zusenden</a>
@endif
</div>
<div class="col-sm-12">
@if(!$user->active)
<hr>
@if($user->release_account)
<strong>Registrierung abgeschlossen {{ $user->getReleaseAccountFormat() }}</strong>
<a href="{{route('admin_lead_released', ['completed', $user->id])}}" class="btn btn-success" onclick="return confirm('Alle Daten vollständig und Vertriebspartner freischalten?');">Die Daten sind vollständigt => Vertriebspartner freischalten</a>
<button type="button" class="btn btn-sm btn-danger float-right" data-toggle="modal" data-target="#modals-register-m-data">
Vertriebspartner eine E-Mail senden => Daten nicht vollständigt
<h5 class="card-header">
<div class="row">
<div class="col-12">
Vertriebspartner
@if(!$m_data_load)
<div class="float-right">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-edit-m-data">
<span class="far fa-edit"></span> Vertriebspartner Daten bearbeiten
</button>
@else
<strong><span class="text-danger">Vertriebspartner muss Registrierung noch abschließen</span></strong>
</div>
@endif
@endif
@if($user->wizard !== 100)
<hr>
<div class="row">
<div class="col-sm-6">
<h5>Registrierungsprozess</h5>
@if($user->wizard === 0)
<strong>Vertrag zustimmen</strong>
@endif
@if($user->wizard === 1)
<strong>Daten anpassen</strong>
@endif
@if($user->wizard === 2)
<strong>Ausweis hochladen</strong>
@endif
@if($user->wizard === 3)
<strong>Gewerbeschein hochladen</strong>
@endif
@if($user->wizard === 4)
<strong>Paket Auswählen</strong>
@endif
@if($user->wizard === 5)
<strong>Wartet auf Überprüfung</strong><br>
<a href="{{route('admin_lead_released', ['reset_switch', $user->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich zurücksetzen?');">Vertriebspartner zurücksetzen / Paket auswählen</a>
@endif
@if($user->wizard === 20)
<strong>Registrierung abschließen / Paket Zahlung</strong><br>
<a href="{{route('admin_lead_released', ['reset_switch', $user->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich zurücksetzen?');">Vertriebspartner zurücksetzen / Paket auswählen</a>
@endif
</div>
<div class="col-sm-6">
@if($user->active && $user->wizard < 20)
<h5>Account ist aktiv</h5>
<a href="{{route('admin_lead_released', ['unlock', $user->id])}}" class="btn btn-warning btn-sm" onclick="return confirm('Alle Daten vollständig und Vertriebspartner freischalten?');">Vertriebspartner erneut freischalten</a>
@endif
</div>
</div>
@endif
</div>
</div>
<hr>
</div>
@if($user->files->count())
<div class="card-body mb-4 pb-1">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Ausweisdaten</th>
<th>Name</th>
<th>Größe</th>
<th class="text-right">löschen</th>
</tr>
@foreach($user->files()->whereIdentifier('id_card')->get() as $file)
<tr>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">
@if(strtolower($file->ext ) === 'pdf')
<object data="{{ route('storage_file', [$file->id, 'user']) }}" type="application/pdf" width="160"></object>
@else
<img src="{{ route('storage_file', [$file->id, 'user']) }}" alt="" width="160">
@endif
</a>
</td>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">{{ $file->original_name }}</a></td>
<td>{{ $file->formatBytes() }}</td>
<td class="text-right">
<a href="{{ route('admin_lead_delete_file', [$user->id, $file->id, 'upload']) }}" class="btn btn-sm" onclick="return confirm('Datei wirklich löschen?');">
<span class="ion ion-md-trash text-danger"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<hr>
@if($user->account_id)
</h5>
@if($m_data_load)
@include('admin.lead.m_data_form_edit')
@endif
@if(!$m_data_load)
@include('admin.lead.m_data_form')
@endif
<div class="card mb-4" style="border: none;">
<h5 class="card-header">
{{-- <a href="#" class="@if($show !== 'check_lead' || !$m_data_load) collapsed @endif" data-toggle="collapse" data-target="#collapseMRegister" aria-expanded="@if($show !== 'check_lead' || !$m_data_load) false @else true @endif" aria-controls="collapseMRegister"> --}}
<a href="#" class="collapsed" data-toggle="collapse" data-target="#collapseMRegister" aria-expanded="false" aria-controls="collapseMRegister">
<i class="fa fa-caret-expand"></i> {{__('Vertriebspartner Infos') }}
</a>
</h5>
{{-- <div class="collapse @if($show === 'check_lead' || $m_data_load) show @endif" id="collapseMRegister"> --}}
<div class="collapse" id="collapseMRegister">
<div class="card-body mb-2 pb-1 no-border">
<div class="row">
<div class="col-sm-6">
@if($user->account->getNotice('business_license') === 'later')
<div class="row">
<div class="col-12">
<div class="bg-warning rounded py-2 px-3">
{{__('register.business_license_later')}}
@if($user->payment_account )
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Vertriebspartner-Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Vertriebspartner-Account inaktiv')}}</strong></p>
@endif
@if($user->active == 1)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Daten vollständig, freigeschaltet')}}</strong>: {{ $user->getActiveDateFormat() }}</p>
{{--
@if($user->files->count())
@foreach($user->files()->whereIdentifier('contract')->get() as $file)
<a class="btn btn-secondary" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank">Vertriebspartnervertrag.pdf</a>
@endforeach
@endif
--}}
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Daten nicht vollständigt, inaktiv')}}</strong></p>
@endif
</div>
<div class="col-sm-6">
@if($user->account_id)
@if($user->agreement)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Einverständniserklärung')}}</strong>: {{ $user->getAgreementFormat() }}
</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Einverständniserklärung')}}</strong> {{ __('nicht akzeptiert') }}</p>
@endif
@if($user->account->data_protection)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Privacy policy approved')}}</strong>: {{ $user->account->getDataProtectionFormat() }}
</p>
@endif
@endif
@if($user->confirmed == 1)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('E-Mail verified')}}</strong>: {{ $user->getConfirmationDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('E-Mail not verified')}}</strong></p>
<a class="btn btn-warning btn-sm" href="{{route('admin_lead_new_mail_verified', $user->id)}}">Neue E-Mail für die Registrierung zusenden</a>
@endif
</div>
<div class="col-sm-12">
@if(!$user->active)
<hr>
@if($user->release_account)
<strong>Registrierung abgeschlossen {{ $user->getReleaseAccountFormat() }}</strong>
<a href="{{route('admin_lead_released', ['completed', $user->id])}}" class="btn btn-success" onclick="return confirm('Alle Daten vollständig und Vertriebspartner freischalten?');">Die Daten sind vollständigt => Vertriebspartner freischalten</a>
<button type="button" class="btn btn-sm btn-danger float-right" data-toggle="modal" data-target="#modals-register-m-data">
Vertriebspartner eine E-Mail senden => Daten nicht vollständigt
</button>
@else
<strong><span class="text-danger">Vertriebspartner muss Registrierung noch abschließen</span></strong>
@endif
@endif
@if($user->wizard !== 100)
<hr>
<div class="row">
<div class="col-sm-6">
<h5>Registrierungsprozess</h5>
@if($user->wizard === 0)
<strong>Vertrag zustimmen</strong>
@endif
@if($user->wizard === 1)
<strong>Daten anpassen</strong>
@endif
@if($user->wizard === 2)
<strong>Ausweis hochladen</strong>
@endif
@if($user->wizard === 3)
<strong>Gewerbeschein hochladen</strong>
@endif
@if($user->wizard === 4)
<strong>Paket Auswählen</strong>
@endif
@if($user->wizard === 5)
<strong>Wartet auf Überprüfung</strong><br>
<a href="{{route('admin_lead_released', ['reset_switch', $user->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich zurücksetzen?');">Vertriebspartner zurücksetzen / Paket auswählen</a>
@endif
@if($user->wizard === 20)
<strong>Registrierung abschließen / Paket Zahlung</strong><br>
<a href="{{route('admin_lead_released', ['reset_switch', $user->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich zurücksetzen?');">Vertriebspartner zurücksetzen / Paket auswählen</a>
@endif
</div>
<div class="col-sm-6">
@if($user->active && $user->wizard < 20)
<h5>Account ist aktiv</h5>
<a href="{{route('admin_lead_released', ['unlock', $user->id])}}" class="btn btn-warning btn-sm" onclick="return confirm('Alle Daten vollständig und Vertriebspartner freischalten?');">Vertriebspartner erneut freischalten</a>
@endif
</div>
</div>
@endif
</div>
</div>
<hr>
</div>
@if($user->files->count())
<div class="card-body mb-4 pb-1">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Ausweisdaten</th>
<th>Name</th>
<th>Größe</th>
<th class="text-right">löschen</th>
</tr>
@foreach($user->files()->whereIdentifier('id_card')->get() as $file)
<tr>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">
@if(strtolower($file->ext ) === 'pdf')
<object data="{{ route('storage_file', [$file->id, 'user']) }}" type="application/pdf" width="160"></object>
@else
<img src="{{ route('storage_file', [$file->id, 'user']) }}" alt="" width="160">
@endif
</a>
</td>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">{{ $file->original_name }}</a></td>
<td>{{ $file->formatBytes() }}</td>
<td class="text-right">
<a href="{{ route('admin_lead_delete_file', [$user->id, $file->id, 'upload']) }}" class="btn btn-sm" onclick="return confirm('Datei wirklich löschen?');">
<span class="ion ion-md-trash text-danger"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<hr>
@if($user->account_id)
@if($user->account->getNotice('business_license') === 'later')
<div class="row">
<div class="col-12">
<div class="bg-warning rounded py-2 px-3">
{{__('register.business_license_later')}}
</div>
</div>
</div>
@endif
@if($user->account->getNotice('business_license') === 'non')
<div class="row">
<div class="col-12">
<div class="bg-warning rounded py-2 px-3">
<div class="font-weight-semibold mb-1">{{__('register.business_license_non')}}</div>
<em>{{$user->account->getNotice('business_license_reason')}}</em>
</div>
</div>
</div>
@endif
@endif
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Gewerbenachweis</th>
<th>Name</th>
<th>Größe</th>
<th class="text-right">löschen</th>
</tr>
@foreach($user->files()->whereIdentifier('business_license')->get() as $file)
<tr>
<td>
<a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">
@if(strtolower($file->ext ) == 'pdf')
<object data="{{ route('storage_file', [$file->id, 'user']) }}" type="application/pdf" width="160"></object>
@else
<img src="{{ route('storage_file', [$file->id, 'user']) }}" alt="" width="160">
@endif
</a>
</td>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">{{ $file->original_name }}</a></td>
<td>{{ $file->formatBytes() }}</td>
<td class="text-right">
<a href="{{ route('admin_lead_delete_file', [$user->id, $file->id, 'upload']) }}" class="btn btn-sm" onclick="return confirm('Datei wirklich löschen?');">
<span class="ion ion-md-trash text-danger"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@if($user->account->getNotice('business_license') === 'non')
<div class="row">
<div class="col-12">
<div class="bg-warning rounded py-2 px-3">
<div class="font-weight-semibold mb-1">{{__('register.business_license_non')}}</div>
<em>{{$user->account->getNotice('business_license_reason')}}</em>
</div>
</div>
</div>
@endif
@endif
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Gewerbenachweis</th>
<th>Name</th>
<th>Größe</th>
<th class="text-right">löschen</th>
</tr>
@foreach($user->files()->whereIdentifier('business_license')->get() as $file)
<tr>
<td>
<a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">
@if(strtolower($file->ext ) == 'pdf')
<object data="{{ route('storage_file', [$file->id, 'user']) }}" type="application/pdf" width="160"></object>
@else
<img src="{{ route('storage_file', [$file->id, 'user']) }}" alt="" width="160">
@endif
</a>
</td>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">{{ $file->original_name }}</a></td>
<td>{{ $file->formatBytes() }}</td>
<td class="text-right">
<a href="{{ route('admin_lead_delete_file', [$user->id, $file->id, 'upload']) }}" class="btn btn-sm" onclick="return confirm('Datei wirklich löschen?');">
<span class="ion ion-md-trash text-danger"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
@endif
</div>
</div>
</div>

View file

@ -0,0 +1,165 @@
@if($m_data_error)
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
<li>{{ $m_data_error }}</li>
</ul>
</div>
</div>
</div>
@endif
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-md-12">
{{ __('White-Label') }}
</div>
</div>
</h5>
<div class="card-body">
{!! Form::open(['url' => route('admin_lead_update')."?show=".$show, 'class' => 'form-horizontal', 'id'=>'white-label-form']) !!}
<input type="hidden" name="user_id" value="{{$user->id}}">
<div class="form-row">
<div class="form-group col-md-12">
<label class="form-label" for="whitelabel_products">Produkte für White-Label hinzufügen</label>
<select class="selectpicker" name="whitelabel_products[]" id="whitelabel_products" data-style="btn-light" data-live-search="true" multiple>
{!! HTMLHelper::getProductsWhiteLabelOptions([], $user->whitelabel_products()->pluck('product_id')->toArray(), 1) !!}
</select>
<p class="badge">Hier werden alle Produkte angzeigt, die unter Produkte als White-Label markiert sind.</p>
<div>
<button type="submit" name="action" value="add_whitelabel_products" class="btn btn-sm btn-submit">Produkte hinzufügen</button>&nbsp;
</div>
</div>
</div>
@foreach($user->whitelabel_products as $wlp)
@if($wlp->product)
<div class="card shadow-none bg-transparent mb-2 p-4" style="border-color:rgba(24, 28, 33, 0.2) !important">
<div class="form-row">
<div class="col-md-12">
<div class="float-right">
<a href="{{ route('admin_lead_remove', ['remove_whitelabel_product', $user->id, $wlp->id]) }}?show={{ $show }}" class="btn btn-sm btn-danger mt-2 mb-2" onclick="return confirm('Produkt wirklich entfernen?');">Produkt entfernen</a>
</div>
<h4>{{ $wlp->product->getWhiteLableName() }}</h4>
</div>
@foreach($wlp->whitelabel_images as $wlp_image)
<div class="col-md-12">
<hr>
</div>
<div class="col-md-3 col-lg-2">
<img class="img-fluid" alt="" style="max-height: 200px" src="{{ route('product_image', [$wlp_image->slug]) }}">
</div>
<div class="col-md-9 col-lg-10">
<label class="form-label" for="image_wl_attributes_{{ $wlp_image->id }}">für {{ __('Varianten') }}</label>
<select class="selectpicker" name="image_wl_attributes[{{ $wlp_image->id }}][]" id="image_wl_attributes_{{ $wlp_image->id }}" data-style="btn-light" data-live-search="true" multiple>
{!! HTMLHelper::getProductAttributesOptions($wlp->product->attribute_variants, $wlp_image->attributes, false, 1) !!}
</select>
<a href="{{ route('admin_lead_remove', ['remove_whitelabel_label', $user->id, $wlp->id, $wlp_image->id]) }}?show={{ $show }}" class="btn btn-sm btn-danger mt-2 mb-2" onclick="return confirm('Etikett wirklich löschen?');">Etikett löschen</a>
</div>
@endforeach
<div class="form-group col-md-12">
<hr>
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-upload-white-label"
data-id="{{ $wlp->id }}">{{__('White Label VP Etikett hochladen')}}</button>
</div>
</div>
</div>
@endif
@endforeach
<div class="form-group">
<button type="submit" name="action" value="update_whitelabel_products" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-upload-white-label">
<div class="modal-dialog">
<div class="modal-content">
@csrf
<input type="hidden" name="id">
<input type="hidden" name="action" value="upload-white-label">
<style>
/* Dropzone */
.dropzone {
min-height: 230px;
border: 2px dashed rgba(0, 0, 0, 0.3);
background: white;
border-radius: 6px;
}
.dropzone .dz-message {
font-size: 28px;
}
</style>
<div class="modal-header">
<h5 class="modal-title">Upload Etikett White-Label Produkt</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="card-body">
<form method="POST" action="{{ route('admin_lead_update') }}?show={{ $show }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<input type="hidden" name="id" value="">
<input type="hidden" name="user_id" value="{{$user->id}}">
<input type="hidden" name="upload_type" value="uwllogo">
<input type="hidden" name="action" value="upload_white_label_image">
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
data-fetcher="fetch.php"
data-size="600,600"
data-min-size="200,200"
data-max-file-size="10"
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
data-button-confirm-label="bestätigen"
data-button-cancel-label="abbrechen"
data-button-confirm-title="bestätigen"
data-button-cancel-title="abbrechen"
data-button-rotate-title="drehen"
data-ratio="1:1">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">Bild speichern</button>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
</div>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-upload-white-label').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
});
});
</script>

View file

@ -0,0 +1,58 @@
@if($m_data_error)
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
<li>{{ $m_data_error }}</li>
</ul>
</div>
</div>
</div>
@endif
<div class="card-body m-0 p-0">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th style="width: 33%">{{ __('Name') }}</th>
<th style="width: 66%">{{ __('Account ID') }}</th>
</tr>
<tr>
<td>{{ \App\Services\HTMLHelper::getSalutationLang($user->account->m_salutation) }} {{ $user->account->m_first_name }} {{ $user->account->m_last_name }}</td>
<td>{{ $user->account->m_account }}</td>
</tr>
</tbody>
</table>
<table class="table card-table m-0">
<tbody>
<tr>
<th style="width: 33%">{{ __('Art Vertriebspartner') }}</th>
<th style="width: 33%">{{ __('Rolle') }}</th>
<th style="width: 33%">{{ __('Sponsor') }}</th>
</tr>
<tr>
<td>@if($user->lead_type) {{ $user->lead_type->name }} @else Standard @endif</td>
<td>@if($user->user_level){{ $user->user_level->name }}@endif</td>
<td>@if($user->m_sponsor){{ $user->getMUserSponsor() }}@endif</td>
</tr>
</tbody>
</table>
@if($user->account->m_notes)
<table class="table card-table m-0">
<tbody>
<tr>
<th>{{ __('weitere Daten') }}</th>
</tr>
<tr>
<td>{{$user->account->m_notes}}</td>
</tr>
</tbody>
</table>
@endif
</div>
</div>

View file

@ -0,0 +1,108 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Arten Vertriebspartner')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Status')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-name="{{ $value->name }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->name }}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-pos=""
data-name=""
data-short=""
data-max_price=""
data-show_on="[]"
data-default="1"
data-active="1"
>{{__('Neue Art Vertriebspartner hinzufügen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_lead_types_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">Art Vertriebspartner</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$('.selectpicker').selectpicker('refresh');
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -79,7 +79,7 @@
@if(isset($current->member->account->city)){{$current->member->account->city}} @endif <br>
{{$current->member->account->zipcode}} {{$current->member->account->city}}<br>
@if($current->member->shop)
@if($current->member->isActive() && $current->member->isActiveShop())
@if($current->member->isActive())
<a href="{{$current->member->shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$current->member->shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$current->member->shop->getSubdomain(false)}}</span>
@ -102,7 +102,7 @@
{{$current->shopping_order->user_shop->user->getFullName()}}<br>
{{$current->shopping_order->user_shop->user->account->zipcode}} {{$current->shopping_order->user_shop->user->account->city}}<br>
@if($current->shopping_order->user_shop)
@if($current->shopping_order->user_shop->user->isActive() && $current->shopping_order->user_shop->user->isActiveShop())
@if($current->shopping_order->user_shop->user->isActive())
<a href="{{$current->shopping_order->user_shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$current->shopping_order->user_shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$current->shopping_order->user_shop->getSubdomain(false)}}</span>
@ -189,7 +189,7 @@
{{$possible->member->getFullName()}}<br>
{{$possible->member->account->zipcode}} {{$possible->member->account->city}}<br>
@if($possible->member->shop)
@if($possible->member->isActive() && $possible->member->isActiveShop())
@if($possible->member->isActive())
<a href="{{$possible->member->shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$possible->member->shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$possible->member->shop->getSubdomain(false)}}</span>

View file

@ -0,0 +1,37 @@
<div class="td-entry-table-margin">
{!! $entry->badge !!}
@if($entry->link)
<a href="{{ $entry->link }}">
@else
<span>
@endif
{!! $entry->name !!} /
@if($entry->reference)
{!! $entry->reference !!} /
@endif
@if($entry->total)
({!! $entry->total !!})
@endif
@if($entry->date)
{!! $entry->date !!} /
@endif
@if(isset($entry->price_formatted))
<strong>{!! $entry->price_formatted !!} </strong>
@endif
@if($entry->link)
</a>
@else
</span>
@endif
@if(isset($entry->delete))
&nbsp; {!! $entry->delete !!}
@endif
</div>

View file

@ -0,0 +1,37 @@
<div class="td-entry-table-margin">
{!! $entry->badge !!}
@if($entry->link)
<a href="{{ $entry->link }}">
@else
<span>
@endif
{!! $entry->name !!} /
@if($entry->reference)
{!! $entry->reference !!} /
@endif
@if($entry->total)
({!! $entry->total !!})
@endif
@if($entry->date)
{!! $entry->date !!} /
@endif
@if(isset($entry->price_formatted))
<strong>{!! $entry->price_formatted !!} </strong>
@endif
@if($entry->link)
</a>
@else
</span>
@endif
@if(isset($entry->delete))
&nbsp; {!! $entry->delete !!}
@endif
</div>

View file

@ -0,0 +1,37 @@
<div class="td-entry-table-margin">
{!! $entry->badge !!}
@if($entry->link)
<a href="{{ $entry->link }}">
@else
<span>
@endif
{!! $entry->name !!} /
@if($entry->reference)
{!! $entry->reference !!} /
@endif
@if($entry->total)
({!! $entry->total !!})
@endif
@if($entry->date)
{!! $entry->date !!} /
@endif
@if(isset($entry->price_formatted))
<strong>{!! $entry->price_formatted !!} </strong>
@endif
@if($entry->link)
</a>
@else
</span>
@endif
@if(isset($entry->delete))
&nbsp; {!! $entry->delete !!}
@endif
</div>

View file

@ -46,77 +46,21 @@
</tr>
</thead>
<tbody>
@foreach ($ShoppingOrderMargins as $ShoppingOrderMargin)
@foreach ($users_credits as $user_credit)
<tr>
<td>{{ $ShoppingOrderMargin->first_name }}</td>
<td>{{ $ShoppingOrderMargin->last_name }}</td>
<td>{{ $ShoppingOrderMargin->email }}</td>
<td>{!! \App\Services\UserMarign::getMontlyPartnerCommissionOpenByID($ShoppingOrderMargin->user_id, null, true, true) !!} &euro;</td>
<td>{{ $user_credit->first_name }}</td>
<td>{{ $user_credit->last_name }}</td>
<td>{{ $user_credit->email }}</td>
<td>{{ formatNumber($user_credit->total) }} </td>
<td>
@foreach (\App\Services\UserMarign::getOrderFromPartnerCommissionByID($ShoppingOrderMargin->user_id) as $order)
@if($order->shopping_order)
<div class="td-entry-table-margin"><a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
{{$order->shopping_order->shopping_user->billing_firstname }}
{{$order->shopping_order->shopping_user->billing_lastname }}
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
/ {{ $order->shopping_order->getFormattedTotalWithoutCredit()."" }}
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
</a>
</div>
@endif
@endforeach
@foreach (\App\Services\UserMarign::getUserCreditMarginByID($ShoppingOrderMargin->user_id) as $creditMaring)
<div class="td-entry-table-margin">
<i class="fa fa-plus-circle text-secondary"></i>
{!! nl2br($creditMaring->message) !!}
/ {{ $creditMaring->created_at->format("d.m.Y") }}
@if($deleteTime = $creditMaring->deleteTime())
/ <span class="no-line-break">
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$creditMaring->id, 'user_credit_margin']) }}" onclick="return confirm('Wirklich löschen?');">
<i class="ion ion-ios-trash"></i>
</a> noch {{ $deleteTime }} min.
</span>
@endif
</div>
@endforeach
@foreach($user_credit->items as $entry)
@include('admin.payment.credit.credits-entry', ['entry' => $entry])
@endforeach
</td>
<td>
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-credit"
data-userid="{{ $ShoppingOrderMargin->user_id }}"
data-email="{{ $ShoppingOrderMargin->email }}"
data-back="{{url()->current()}}"
data-action="create_credit">
<span class="far fa-file-invoice-dollar"></span> <strong>Gutschrift erstellen</strong>
</button>
</td>
</tr>
@endforeach
@foreach ($onlyUserCreditMargins as $user_id => $onlyUserCreditMargin)
<tr>
<td>{{ $onlyUserCreditMargin['first_name'] }}</td>
<td>{{ $onlyUserCreditMargin['last_name'] }}</td>
<td>{{ $onlyUserCreditMargin['email'] }}</td>
<td>{!! formatNumber($onlyUserCreditMargin['sum']) !!} &euro;</td>
<td>
@foreach ($onlyUserCreditMargin['entries'] as $key => $creditMaring)
<div class="td-entry-table-margin">
<i class="fa fa-plus-circle text-secondary"></i>
{!! nl2br($creditMaring->message) !!}
/ {{ $creditMaring->created_at->format("d.m.Y") }}
@if($deleteTime = $creditMaring->deleteTime())
/ <span class="no-line-break">
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$creditMaring->id, 'user_credit_margin']) }}" onclick="return confirm('Wirklich löschen?');">
<i class="ion ion-ios-trash"></i>
</a> noch {{ $deleteTime }} min.
</span>
@endif
</div>
@endforeach
</td>
<td>
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-credit"
data-userid="{{ $onlyUserCreditMargin['user_id'] }}"
data-email="{{ $onlyUserCreditMargin['email'] }}"
data-userid="{{ $user_credit->user_id }}"
data-email="{{ $user_credit->email }}"
data-back="{{url()->current()}}"
data-action="create_credit">
<span class="far fa-file-invoice-dollar"></span> <strong>Gutschrift erstellen</strong>
@ -148,29 +92,21 @@
</tr>
</thead>
<tbody>
@foreach ($ShoppingOrderMarginPendings as $ShoppingOrderMarginPending)
@foreach ($users_credits_pending as $user_credit_pending)
<tr>
<td>{{ $ShoppingOrderMarginPending->first_name }}</td>
<td>{{ $ShoppingOrderMarginPending->last_name }}</td>
<td>{{ $ShoppingOrderMarginPending->email }}</td>
<td>{!! \App\Services\UserMarign::getMontlyPartnerCommissionPendingByID($ShoppingOrderMarginPending->user_id, null, true) !!} &euro;</td>
<td>
@foreach (\App\Services\UserMarign::getOrderFromPartnerCommissionPendingByID($ShoppingOrderMarginPending->user_id) as $order)
@if($order->shopping_order)
<div class="td-entry-table-margin"><a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
{{$order->shopping_order->shopping_user->billing_firstname }}
{{$order->shopping_order->shopping_user->billing_lastname }}
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
/ {{$order->shopping_order->getFormattedTotalWithoutCredit()."" }}
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
</a>
</div>
@endif
@endforeach
</td>
</tr>
@endforeach
<td>{{ $user_credit_pending->first_name }}</td>
<td>{{ $user_credit_pending->last_name }}</td>
<td>{{ $user_credit_pending->email }}</td>
<td>{{ formatNumber($user_credit_pending->total) }} </td>
<td>
@foreach($user_credit_pending->items as $entry)
@include('admin.payment.credit.credits-entry', ['entry' => $entry])
@endforeach
</td>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@ -255,48 +191,49 @@
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-credit').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'admin_payments_credit_datatable') !!}',
data: function(d) {
d.filter_sales_year = $('select[name=filter_sales_year]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'credit_number', name: 'credit_number' },
{ data: 'credit', name: 'credit', orderable: false, searchable: false },
{ data: 'user.account.first_name', name: 'user.account.first_name', orderable: false },
{ data: 'user.account.last_name', name: 'user.account.last_name', orderable: false },
{ data: 'user.email', name: 'user.email', orderable: 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();
});
$(document).ready(function() {
// DataTable-Konfiguration in separate Datei auslagern
const dataTableConfig = {
processing: true,
serverSide: true,
ajax: {
url: '{!! route("admin_payments_credit_datatable") !!}',
data: d => ({
...d,
filter_sales_year: $('select[name=filter_sales_year]').val()
})
},
order: [[0, "desc"]],
columns: [
{ data: 'id', searchable: false },
{ data: 'credit_number', name: 'credit_number' },
{ data: 'credit', name: 'credit', orderable: false, searchable: false },
{ data: 'user.account.first_name', name: 'user.account.first_name', orderable: false },
{ data: 'user.account.last_name', name: 'user.account.last_name', orderable: false },
{ data: 'user.email', name: 'user.email', orderable: false },
{ data: 'total', name: 'total' },
{ data: 'date', name: 'date' },
{ data: 'status', name: 'status', searchable: false },
{ data: 'user_margins', name: 'user_margins', orderable: false },
],
lengthChange: false,
pageLength: 100,
language: {
url: "/js/German.json"
}
};
$( document ).ready(function() {
$('#modals-credit').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if(event.relatedTarget){
$(this).find(".modal-content input[name='userid']").val(button.data('userid'));
$(this).find(".modal-body #set_credit_send_mail").html(button.data('email'));
}
});
const creditTable = $('#datatable-credit').DataTable(dataTableConfig);
// Event Handlers
$('#filter_sales_year').on('change', () => creditTable.draw());
$('#modals-credit').on('show.bs.modal', function(event) {
const button = $(event.relatedTarget);
if (button) {
$(this).find("input[name='userid']").val(button.data('userid'));
$(this).find("#set_credit_send_mail").html(button.data('email'));
}
});
});
</script>

View file

@ -0,0 +1,380 @@
@extends('layouts.layout-2')
@section('content')
<style>
.td-entry-table-margin {
padding-bottom: 6px;
border-bottom: 1px solid rgb(221, 221, 221);
margin-bottom: 6px;
}
</style>
<div class="card">
<h6 class="card-header">
Zahlungen / offene Gutschriften
<div class="float-right">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
data-id="new"
data-action="add-user-credit"
data-back="{{url()->current()}}"
data-route="{{ route('modal_load') }}"><span class="far fa-plus-circle"></span> Gutschrift hinzufügen
</button>
</div>
</h6>
@if(isset($add_credit_error) && $add_credit_error)
<div class="col-sm-12">
<div class="alert alert-danger p-2 mt-2">
<ul>
<li>{{ $add_credit_error }}</li>
</ul>
</div>
</div>
@endif
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname') }}</th>
<th>{{__('E-Mail') }}</th>
<th>{{__('Betrag') }}</th>
<th>{{__('aus Bestellung / Gutschrift')}}</th>
<th>{{__('#')}}</th>
</tr>
</thead>
<tbody>
@foreach ($ShoppingOrderMargins as $ShoppingOrderMargin)
<tr>
<td>{{ $ShoppingOrderMargin->first_name }}</td>
<td>{{ $ShoppingOrderMargin->last_name }}</td>
<td>{{ $ShoppingOrderMargin->email }}</td>
<td>{!! \App\Services\UserMarign::getMontlyPartnerCommissionOpenByID($ShoppingOrderMargin->user_id, null, true, true) !!} &euro;</td>
<td>
@foreach (\App\Services\UserMarign::getOrderFromPartnerCommissionByID($ShoppingOrderMargin->user_id) as $order)
@if($order->shopping_order)
<div class="td-entry-table-margin">
{!! \App\Services\Payment::getPaymentForTypeBadge($order->shopping_order) !!}
@if($order->shopping_order->payment_for === 7 || $order->shopping_order->payment_for === 8)
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
@else
<a href="{{ route('admin_sales_users_detail', [$order->shopping_order->id]) }}">
@endif
{{$order->shopping_order->shopping_user->billing_firstname }}
{{$order->shopping_order->shopping_user->billing_lastname }}
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
({{ $order->shopping_order->getFormattedTotalWithoutCredit()."" }})
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
@if($order->shopping_order->shopping_order_margin->net_partner_commission)
/ <strong>{{ $order->shopping_order->shopping_order_margin->getFormattedNetPartnerCommission() }}</strong>
@endif
</a>
</div>
@endif
@endforeach
@foreach (\App\Services\UserMarign::getUserCreditMarginByID($ShoppingOrderMargin->user_id) as $creditMaring)
<div class="td-entry-table-margin">
<i class="fa fa-plus-circle text-secondary"></i>
{!! nl2br($creditMaring->message) !!}
/ {{ $creditMaring->created_at->format("d.m.Y") }}
/ <strong>{!! formatNumber($creditMaring->credit) !!} &euro;</strong>
@if($deleteTime = $creditMaring->deleteTime())
/ <span class="no-line-break">
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$creditMaring->id, 'user_credit_margin']) }}" onclick="return confirm('Wirklich löschen?');">
<i class="ion ion-ios-trash"></i>
</a> noch {{ $deleteTime }} min.
</span>
@endif
</div>
@endforeach
</td>
<td>
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-credit"
data-userid="{{ $ShoppingOrderMargin->user_id }}"
data-email="{{ $ShoppingOrderMargin->email }}"
data-back="{{url()->current()}}"
data-action="create_credit">
<span class="far fa-file-invoice-dollar"></span> <strong>Gutschrift erstellen</strong>
</button>
</td>
</tr>
@endforeach
@foreach ($onlyUserCreditMargins as $user_id => $onlyUserCreditMargin)
<tr>
<td>{{ $onlyUserCreditMargin['first_name'] }}</td>
<td>{{ $onlyUserCreditMargin['last_name'] }}</td>
<td>{{ $onlyUserCreditMargin['email'] }}</td>
<td>{!! formatNumber($onlyUserCreditMargin['sum']) !!} &euro;</td>
<td>
@foreach ($onlyUserCreditMargin['entries'] as $key => $creditMaring)
<div class="td-entry-table-margin">
<i class="fa fa-plus-circle text-secondary"></i>
{!! nl2br($creditMaring->message) !!}
/ {{ $creditMaring->created_at->format("d.m.Y") }}
/ <strong>{!! formatNumber($onlyUserCreditMargin['credit']) !!} &euro;</strong>
@if($deleteTime = $creditMaring->deleteTime())
/ <span class="no-line-break">
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$creditMaring->id, 'user_credit_margin']) }}" onclick="return confirm('Wirklich löschen?');">
<i class="ion ion-ios-trash"></i>
</a> noch {{ $deleteTime }} min.
</span>
@endif
</div>
@endforeach
</td>
<td>
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-credit"
data-userid="{{ $onlyUserCreditMargin['user_id'] }}"
data-email="{{ $onlyUserCreditMargin['email'] }}"
data-back="{{url()->current()}}"
data-action="create_credit">
<span class="far fa-file-invoice-dollar"></span> <strong>Gutschrift erstellen</strong>
</button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="card mt-3">
<h6 class="card-header">
Zahlungen / offene Gutschriften pending
</h6>
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname') }}</th>
<th>{{__('E-Mail') }}</th>
<th>{{__('Betrag') }}</th>
<th>{{__('aus Bestellung')}}</th>
</tr>
</thead>
<tbody>
@foreach ($ShoppingOrderMarginPendings as $ShoppingOrderMarginPending)
<tr>
<td>{{ $ShoppingOrderMarginPending->first_name }}</td>
<td>{{ $ShoppingOrderMarginPending->last_name }}</td>
<td>{{ $ShoppingOrderMarginPending->email }}</td>
<td>{!! \App\Services\UserMarign::getMontlyPartnerCommissionPendingByID($ShoppingOrderMarginPending->user_id, null, true) !!} &euro;</td>
<td>
@foreach (\App\Services\UserMarign::getOrderFromPartnerCommissionPendingByID($ShoppingOrderMarginPending->user_id) as $order)
@if($order->shopping_order)
<div class="td-entry-table-margin">
{!! \App\Services\Payment::getPaymentForTypeBadge($order->shopping_order) !!}
@if($order->shopping_order->payment_for === 7 || $order->shopping_order->payment_for === 8)
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
@else
<a href="{{ route('admin_sales_users_detail', [$order->shopping_order->id]) }}">
@endif
{{$order->shopping_order->shopping_user->billing_firstname }}
{{$order->shopping_order->shopping_user->billing_lastname }}
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
({{$order->shopping_order->getFormattedTotalWithoutCredit()."" }})
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
@if($order->shopping_order->shopping_order_margin->net_partner_commission)
/ <strong>{{ $order->shopping_order->shopping_order_margin->getFormattedNetPartnerCommission() }}</strong>
@endif
</a>
</div>
@endif
@endforeach
@foreach (\App\Services\UserMarign::getOrderFromShopPendingByID($ShoppingOrderMarginPending->user_id) as $order)
@if($order->shopping_order)
<div class="td-entry-table-margin">
{!! \App\Services\Payment::getPaymentForTypeBadge($order->shopping_order) !!}
@if($order->shopping_order->payment_for === 7 || $order->shopping_order->payment_for === 8)
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
@else
<a href="{{ route('admin_sales_users_detail', [$order->shopping_order->id]) }}">
@endif
{{$order->shopping_order->shopping_user->billing_firstname }}
{{$order->shopping_order->shopping_user->billing_lastname }}
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
({{$order->shopping_order->getFormattedTotalWithoutCredit()."" }})
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
@if($order->shopping_order->shopping_order_margin->net_partner_commission)
/ <strong>{{ $order->shopping_order->shopping_order_margin->getFormattedNetPartnerCommission() }}</strong>
@endif
</a>
</div>
@endif
@endforeach
</td>
</tr>
@endforeach
@foreach ($onlyShoppingOrderMargins as $user_id => $onlyUserCreditMargin)
<tr>
<td>{{ $onlyUserCreditMargin['first_name'] }}</td>
<td>{{ $onlyUserCreditMargin['last_name'] }}</td>
<td>{{ $onlyUserCreditMargin['email'] }}</td>
<td>{!! formatNumber($onlyUserCreditMargin['sum']) !!} &euro;</td>
<td>
@foreach ($onlyUserCreditMargin['entries'] as $key => $order)
<div class="td-entry-table-margin">
{!! \App\Services\Payment::getPaymentForTypeBadge($order->shopping_order) !!}
@if($order->shopping_order->payment_for === 7 || $order->shopping_order->payment_for === 8)
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
@else
<a href="{{ route('admin_sales_users_detail', [$order->shopping_order->id]) }}">
@endif
{{$order->shopping_order->shopping_user->billing_firstname }}
{{$order->shopping_order->shopping_user->billing_lastname }}
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
({{$order->shopping_order->getFormattedTotalWithoutCredit()."" }})
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
@if($order->shopping_order->shopping_order_margin->net_partner_commission)
/ <strong>{{ $order->shopping_order->shopping_order_margin->getFormattedNetDiscount() }}</strong>
@endif
</a>
</div>
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="card mt-3">
<h6 class="card-header">
Zahlungen / erstellte Gutschriften
</h6>
<div class="col-sm-6 mb-0 mt-2">
{!! Form::open(['url' => route('admin_payments_credit'), 'class' => 'form-horizontal', 'id'=>'form_filter_sales_year']) !!}
<label class="form-label" for="filter_sales_year">Filter Jahr</label>
<select class="custom-select" name="filter_sales_year" id="filter_sales_year">
@foreach($years as $year)
<option value="{{$year}}" @if($active_year == $year) selected @endif>{{$year}}</option>
@endforeach
</select>
{!! Form::close() !!}
</div>
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered" id="datatable-credit">
<thead>
<tr>
<th>ID</th>
<th>{{__('G.Nr.')}}</th>
<th>{{__('Gutschrift')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname') }}</th>
<th>{{__('E-Mail') }}</th>
<th>{{__('Betrag') }}</th>
<th>{{__('Datum') }}</th>
<th>{{__('Zahlung')}}</th>
<th>{{__('aus Bestellung / Gutschrift')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="modal fade" id="modals-credit">
<div class="modal-dialog">
<form class="modal-content form-prevent-multiple-submits" action="{{ route('admin_payments_credit_create') }}" method="post">
@csrf
<input type="hidden" name="userid" value="">
<input type="hidden" name="action" value="create_credit">
<input type="hidden" name="back" value="{{url()->current()}}">
<div class="modal-header">
<h5 class="modal-title">{{__('Gutschrift')}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-group col-sm-12">
{{ Form::select('credit_option', ['create'=>'Gutschrift erstellen'], false, array('data-live-search'=>'false', 'class'=>'selectpicker')) }}
</div>
<div class="form-group col-sm-12">
<label class="form-label" for="credit_date">{{ __('Gutschriftsdatum') }}</label>
{!! Form::text('credit_date', \Carbon::now()->format("d.m.Y"), ['class'=>'form-control datepicker-base']) !!}
</div>
<div class="form-group col-sm-12">
<label class="form-label" for="credit_number">{{ __('Gutschriftsnummer') }}</label>
{!! Form::text('credit_number', App\Services\Credit::getCreditNumber(), ['class'=>'form-control', 'disabled']) !!}
<em> nächste Gutschriftsnummer <a href="{{ route('admin_settings') }}"><i class="fa fa-edit"></i></a></em>
</div>
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('credit_send_mail', 1, true, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Gutschrift an <span id="set_credit_send_mail">mail</span></span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary button-prevent-multiple-submits"><i class="spinner fa fa-spinner fa-spin"></i> {{ __('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-credit').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'admin_payments_credit_datatable') !!}',
data: function(d) {
d.filter_sales_year = $('select[name=filter_sales_year]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'credit_number', name: 'credit_number' },
{ data: 'credit', name: 'credit', orderable: false, searchable: false },
{ data: 'user.account.first_name', name: 'user.account.first_name', orderable: false },
{ data: 'user.account.last_name', name: 'user.account.last_name', orderable: false },
{ data: 'user.email', name: 'user.email', orderable: 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();
});
$( document ).ready(function() {
$('#modals-credit').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if(event.relatedTarget){
$(this).find(".modal-content input[name='userid']").val(button.data('userid'));
$(this).find(".modal-body #set_credit_send_mail").html(button.data('email'));
}
});
});
});
</script>
@endsection

View file

@ -35,7 +35,7 @@
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }} ({{ $value->short }})</td>
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
<td>{!! $value->getShowOnTypes('<br>') !!}</td>
<td data-sort="{{ $value->default }}">{!! get_active_badge($value->default) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
</tr>

View file

@ -36,8 +36,9 @@
</div>
{!! Form::close() !!}
@include('admin.product.images')
@include('admin.product.upload_whitelabel')
@endsection

View file

@ -61,19 +61,19 @@
{!! Form::checkbox('max_buy', 1, $product->max_buy, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Maximaler Kauf für einen Berater für dieses Produkt</span>
</label>
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="max_buy_num">{{ __('Anzahl maximaler Kauf pro Berater') }}</label>
{{ Form::text('max_buy_num', $product->max_buy_num, array('placeholder'=>__('in Stück'), 'class'=>'form-control', 'id'=>'max_buy_num')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<hr>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
@ -133,8 +133,10 @@
{!! Form::checkbox('amount_commission', 1, $product->amount_commission, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Betrag zum Staffelumsatz addieren</span>
</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('exclude_stats_sales', 1, $product->exclude_stats_sales, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Produkt beim der Auswertung Absatzmengen ausschließen</span>
</label>
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="value_commission">{{ __('Einzelrabatt in %') }}</label>
@ -145,6 +147,13 @@
{{ Form::text('partner_commission', $product->getFormattedPartnerCommission(), array('placeholder'=>__('Vertriebspartner Einzelrabatt in %'), 'class'=>'form-control', 'id'=>'partner_commission')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<hr>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
@ -201,7 +210,6 @@
<div class="form-group col-sm-4 col-md-3">
<label class="form-label">Preis VK in {{ $country->currency_unit }}</label>
{{ Form::text('c_currency['.$country->id.']', formatNumber($product->getRealPrice($country) * $country->currency_faktor), array('class'=>'form-control', 'readonly')) }}
</div>
@else
{{--
@ -236,13 +244,73 @@
@endforeach
<em class="float-right text-muted small">für die Einstellung von landesspezifischen Preisen müssen diese unter
<a href="{{route('admin_countries')}}">Länder</a> -> Land aktiviert werden.</em>
<div class="form-group">
<hr>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('White-Label') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-12">
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('whitelabel', 1, $product->whitelabel, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">White-Label Produkt</span>
</label>
</div>
<div class="form-group col-md-6">
<label class="form-label" for="whitelabel_name">{{ __('White-Label Bezeichnung') }}</label>
{{ Form::text('whitelabel_name', $product->whitelabel_name, array('placeholder'=>__('Bezeichnung'), 'class'=>'form-control', 'id'=>'whitelabel_name')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="whitelabel_variants">Mögliche Varianten (<a href="{{ route('admin_product_attributes') }}">Anlage unter Attribute</a>)</label>
<select class="selectpicker" name="whitelabel_variants[]" id="whitelabel_variants" data-style="btn-light" data-live-search="true" multiple>
{!! HTMLHelper::getAttributesOptions($product->attribute_variants()->pluck('attribute_id')->toArray(), false, 1) !!}
</select>
<div class="mt-2">
<em>Die nur die möglichen Varianten die ausgewählt sind, können einzelnen VP und Etiketten zugeordnet werden.</em>
</div>
</div>
</div>
<div class="form-row">
@foreach($product->whitelabel_images as $image)
<div class="col-md-12">
<hr>
</div>
<div class="col-md-3 col-lg-2">
<img class="img-fluid" alt="" style="max-height: 200px" src="{{ route('product_image', [$image->slug]) }}">
</div>
<div class="col-md-9 col-lg-10">
<label class="form-label" for="image_wl_attributes_{{ $image->id }}">für {{ __('Varianten') }}</label>
<select class="selectpicker" name="image_wl_attributes[{{ $image->id }}][]" id="image_wl_attributes_{{ $image->id }}" data-style="btn-light" data-live-search="true" multiple>
{!! HTMLHelper::getProductAttributesOptions($product->attribute_variants, $image->attributes, false, 1) !!}
</select>
<a href="{{ route('admin_product_image_delete', [$image->id, $product->id]) }}" class="btn btn-sm btn-danger mt-2 mb-2" onclick="return confirm('Etikett wirklich löschen?');">Etikett löschen</a>
</div>
@endforeach
<div class="form-group col-md-12">
<hr>
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-upload-white-label"
data-id="new">{{__('White Label Default Etikett hochladen')}}</button>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
{{ __('Details') }}
</h5>
<div class="card-body">
<div class="form-row">
@ -274,6 +342,7 @@
{{ Form::text('icons', $product->icons, array('placeholder'=>__('icons'), 'class'=>'form-control', 'id'=>'icons')) }}
</div>
{{--
<div class="form-group col-sm-4">
<label class="form-label" for="title">{{ __('Attribute') }}</label>
<select class="selectpicker" name="attributes[]" id="attributes" data-style="btn-light"
@ -281,6 +350,7 @@
{!! HTMLHelper::getAttributesOptions($product->attributes()->pluck('attribute_id')->toArray()) !!}
</select>
</div>
--}}
</div>
<div class="form-group">
@ -295,12 +365,20 @@
<label class="form-label" for="ingredients">{{ __('Hinweise') }}</label>
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
</div>
<div class="form-row">
<div class="form-group col-md-12">
<hr>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
{{ __('Inhaltsstoffe') }}
</h5>
<div class="card-body">
<div class="card-datatable table-responsive pt-0">
@ -333,10 +411,15 @@
</select>
<a class="btn btn-default btn-xs mt-2" href="{{route('admin_product_ingredients')}}">Inhaltsstoffe anlegen</a>
</div>
<div class="form-group col-sm-2">
<button type="submit" class="btn btn-submit mt-0 mt-sm-4">{{ __('save') }}</button>&nbsp;
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<hr>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
@if(Auth::user()->isSySAdmin())
@ -365,6 +448,13 @@
{{ Form::text('wp_number', $product->wp_number, array('placeholder'=>__('WP Number'), 'class'=>'form-control', 'id'=>'wp_number')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<hr>
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
@endif

View file

@ -50,6 +50,8 @@
<form method="POST" action="{{ route('admin_product_image_upload') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<input type="hidden" name="product_id" value="{{$product->id}}">
<input type="hidden" name="upload_type" value="product">
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'

View file

@ -26,9 +26,12 @@
<th>{{__('Grundpreis')}}</th>
<th>{{__('Gewicht')}}</th>
<th>{{__('sichbar')}}</th>
<th><div data-toggle="tooltip" title data-original-title="White Label">{{__('WL')}}</div></th>
<th><div data-toggle="tooltip" title data-original-title="Kompensationsprodukt">{{__('KP')}}</div></th>
<th><div data-toggle="tooltip" title data-original-title="Maximaler Kauf pro Berater">{{__('MK')}}</div></th>
<th><div data-toggle="tooltip" title data-original-title="Einzelrabatt">{{__('ER')}}</div></th>
<th><div data-toggle="tooltip" title data-original-title="Auswertung Absatzmengen ausschließen ">{{__('AA')}}</div></th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
@ -59,10 +62,12 @@
<td>{{ $value->getUnitType() }}</td>
<td>{{ $value->getBasePriceFormatted() }}</td>
<td>{{ $value->weight }}</td>
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
<td>{!! $value->getShowOnTypes('<br>') !!}</td>
<td data-sort="{{ $value->whitelabel }}">{!! get_active_badge($value->whitelabel, $value->whitelabel_name) !!}</td>
<td data-sort="{{ $value->shipping_addon }}">{!! get_active_badge($value->shipping_addon) !!}</td>
<td data-sort="{{ $value->max_buy }}">{!! get_active_badge($value->max_buy) !!}</td>
<td data-sort="{{ $value->single_commission }}">{!! get_active_badge($value->single_commission) !!}</td>
<td data-sort="{{ $value->exclude_stats_sales }}">{!! get_active_badge($value->exclude_stats_sales) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<td><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a> &nbsp;
<a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>

View file

@ -0,0 +1,68 @@
<!-- Modal template -->
<div class="modal fade" id="modals-upload-white-label">
<div class="modal-dialog">
<div class="modal-content">
@csrf
<input type="hidden" name="id">
<input type="hidden" name="action" value="attribute">
<style>
/* Dropzone */
.dropzone {
min-height: 230px;
border: 2px dashed rgba(0, 0, 0, 0.3);
background: white;
border-radius: 6px;
}
.dropzone .dz-message {
font-size: 28px;
}
</style>
<div class="modal-header">
<h5 class="modal-title">Upload Etikett White-Label Produkt</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="card-body">
<form method="POST" action="{{ route('admin_product_image_upload') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<input type="hidden" name="product_id" value="{{$product->id}}">
<input type="hidden" name="upload_type" value="wllogo">
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
data-fetcher="fetch.php"
data-size="600,600"
data-min-size="200,200"
data-max-file-size="10"
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
data-button-confirm-label="bestätigen"
data-button-cancel-label="abbrechen"
data-button-confirm-title="bestätigen"
data-button-cancel-title="abbrechen"
data-button-rotate-title="drehen"
data-ratio="1:1">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">Bild speichern</button>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
</div>
</div>
</div>
</div>

View file

@ -3,13 +3,14 @@
<!-- Status -->
<div class="card-body">
<div class="row">
<div class="col-md-4 mb-1">
<div class="col-md-3 mb-1">
<strong class="mr-2">Status:</strong>
<span class="text-big">
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order); !!}
</span>
{!! \App\Services\Payment::getPaymentForTypeBadge($shopping_order) !!}
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!}
</span>
</div>
<div class="col-md-4 mb-1">
<div class="col-md-3 mb-1">
<strong class="mr-2">Versand:</strong>
@if($isAdmin)
<button type="button" class="btn btn-sm btn-{{$shopping_order->getShippedColor()}}" data-toggle="modal" data-target="#modals-shipped"
@ -25,18 +26,18 @@
</span>
@endif
</div>
<div class="col-md-4 mb-1">
<div class="col-md-3 mb-1">
<strong class="mr-2">Rechnung:</strong>
@if($isAdmin)
@if(App\Services\Invoice::isInvoice($shopping_order))
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'download']) }}" class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'stream']) }}" target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
@if(false && Auth::user()->isSySAdmin())
<button type="button" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#modals-invoice"
@if(Auth::user()->isSuperAdmin())
<button type="button" class="btn btn-sm btn-danger" title="Rechnung überschreiben" data-toggle="modal" data-target="#modals-invoice"
data-id="{{ $shopping_order->id }}"
data-back="{{url()->current()}}"
data-action="create_invoice">
<span class="far fa-file-invoice"></span> <strong>Rechnung überschreiben</strong>
<span class="far fa-file-invoice"></span></strong>
</button>
@endif
@else
@ -57,6 +58,22 @@
@endif
@endif
</div>
<div class="col-md-3 mb-1">
@if ($isAdmin)
<strong class="mr-2">Lieferschein:</strong>
@if (App\Services\Invoice::isDelivery($shopping_order))
<a href="{{ route('storage_file', [$shopping_order->id, 'delivery', 'download']) }}"
class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
<a href="{{ route('storage_file', [$shopping_order->id, 'delivery', 'stream']) }}"
target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice_delivery', 'download']) }}"
class="btn btn-dark btn-sm"><i class="fa fa-file-download"></i><i class="fa fa-file-download"></i></a>
@endif
@endif
</div>
</div>
</div>
@ -504,6 +521,45 @@
</div>
</div>
<hr class="m-0">
@if($shopping_order->shopping_order_margin)
<div class="card-body">
<h6 class="small font-weight-semibold">
Provisionen / Handelspanne
</h6>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Einzelrabatt </div>
{{ number_format( $shopping_order->shopping_order_margin->getRestoreContent('commission')->single_value_commission, 2, ",", ".") }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Staffelrabatt</div>
@foreach ($shopping_order->shopping_order_margin->getRestoreContent('items') as $item)
ab {{ $item->price_from }} / {{ $item->trading_margin }}% :
{{ number_format($item->value_margin , 2, ",", ".") }} *<br>
@endforeach
</div>
@if($isAdmin)
<div class="col-md-3 mb-3">
<div class="text-muted small">Provisionen Vertriebspartner<br> @if($shopping_order->member){{ $shopping_order->member->getFullName(false) }} @endif</div>
{{$shopping_order->shopping_order_margin->getFormattedNetDiscount()}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Provisionen Sponsor<br> @if($shopping_order->member && $shopping_order->member->user_sponsor) {{ $shopping_order->member->user_sponsor->getFullName(false) }} @endif </div>
@if($shopping_order->shopping_order_margin->net_partner_commission)
{{ $shopping_order->shopping_order_margin->getFormattedNetPartnerCommission() }}
@endif
</div>
@endif
</div>
</div>
<hr class="m-0">
@endif
@if($shopping_order->txaction === 'extern')
<div class="card-body">
@if($shopping_order->wp_invoice_path)
@ -669,7 +725,7 @@
</div>
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('invoice_send_mail', 1, true, ['class'=>'custom-control-input']) !!}
{!! Form::checkbox('invoice_send_mail', 1, false, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Rechnung an {{ $shopping_order->shopping_user->billing_email }}</span>
</label>
</div>

View file

@ -66,6 +66,13 @@
{{ Form::text('settings[pending_partner_commissions_in_days][val]', \App\Models\Setting::getContentBySlug('pending_partner_commissions_in_days'), array('class'=>'form-control')) }}
{{ Form::hidden('settings[pending_partner_commissions_in_days][type]', 'int') }}
</div>
<div class="form-group col-sm-12">
<label class="form-label">{{ __('Pending in Tagen nach Versand für die Shop Provision') }}*</label>
{{ Form::text('settings[pending_order_margins_in_days][val]', \App\Models\Setting::getContentBySlug('pending_order_margins_in_days'), array('class'=>'form-control')) }}
{{ Form::hidden('settings[pending_order_margins_in_days][type]', 'int') }}
</div>
</div>
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
</div>
@ -102,7 +109,7 @@
<div class="card mb-2">
<div class="card-body">
<h4>Promotion</h4>
<h4>Promotion / Shop</h4>
<div class="form-row">
<div class="form-group col-sm-12">
<div class="form-group col-sm-12">

View file

@ -0,0 +1,146 @@
@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_stats_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> &nbsp;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>
<div class="form-row align-items-center px-0 pb-2 pt-0">
<div class="col-12 col-sm-6 col-md-4 col-lg-4 mb-1">
<select class="selectpicker" name="product_sales_vol_filter_products[]" id="product_sales_vol_filter_products" data-style="btn-light" data-live-search="true" multiple>
<option value="0" selected>Produkte ausschließen</option>
@foreach($filter_products as $key=>$value)
<option value="{{$key}}" @if(in_array($key, session('product_sales_vol_filter_products'))) selected @endif>{{$value}}</option>
@endforeach
</select> <br>
<em class="">Die Produktliste erst nach der Filtern von Monat und Jahr aktualisieren</em>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mt-1 mb-3">
<button type="submit" name="action" value="filter" class="btn btn-md btn-primary mb-4"><i class="ion ion-md-refresh"></i> &nbsp;Filtern</button>
</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>
<th>{{__('tables.total')}} netto </th>
<th>Vorjahr {{__('tables.quantity')}}</th>
<th>Vorjahr {{__('tables.total')}} netto </th>
<th>{{__('Einzelrabatt')}}</th>
<th>{{__('Einzelrabatt %')}}</th>
<th>{{__('VP Einzelrabatt in %')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<br>
<div class="alert alert-info m-2">
Bei "Gesamter Umsatz", "Gesamte Rabatte", "Gesamt netto", sind die ausgeschlossenen Produkte einberechnet, da Rabatte auf Warenkorb-Ebene verrechnet werden und nicht auf Produkt-Ebene.
</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_stats_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: 'qty', name: 'qty', orderable: true, searchable: false },
{ data: 'total', name: 'total', orderable: true, searchable: false },
{ data: 'pre_qty', name: 'pre_qty', orderable: true, searchable: false },
{ data: 'pre_total', name: 'pre_total', orderable: true, searchable: false },
{ data: 'single_commission', name: 'single_commission', orderable: true, searchable: false },
{ data: 'value_commission', name: 'value_commission', orderable: true, searchable: false },
{ data: 'partner_commission', name: 'partner_commission', 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

View file

@ -18,10 +18,12 @@
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Zugang')}}</th>
<th>{{__('Rolle')}}</th>
<th>{{__('verified')}} (seit)</th>
<th>{{__('active')}} (seit)</th>
<th>{{__('Account')}} (bis)</th>
<th>{{__('Zahlungsarten')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Test Modus')}}</th>
<th>{{__('login')}}</th>
<th>{{__('delete')}}</th>
@ -406,10 +408,12 @@
{ data: 'last_name', name: 'account.last_name' },
{ data: 'email', name: 'email' },
{ data: 'admin', name: 'admin' },
{ data: 'role', name: 'role' },
{ data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' },
{ data: 'account', name: 'account' },
{ data: 'my_payment_methods', name: 'my_payment_methods' },
{ data: 'country', name: 'country' },
{ data: 'test_mode', name: 'test_mode' },
{ data: 'action_login', orderable: false, searchable: false},
{ data: 'action_delete', orderable: false, searchable: false},