Updates to 03-2025

This commit is contained in:
Kevin Adametz 2025-04-01 10:36:47 +02:00
parent bfa3bb1df4
commit 9ae662f63e
243 changed files with 12580 additions and 12018 deletions

View file

@ -0,0 +1,109 @@
<!-- Info -->
<div class="card-body pb-1">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.start_date') }}</div>
{{ $user_abo->start_date }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.next_date') }}</div>
<strong>{{ $user_abo->next_date }}</strong>
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.abo_delivery_day') }}</div>
<strong>{{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}</strong>
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.last_date') }}</div>
{{ $user_abo->last_date }}
</div>
</div>
</div>
<hr class="m-0">
<div class="card-body pb-1">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.status') }} / {{ __('tables.active') }}</div>
{!! $user_abo->getStatusFormated() !!} &nbsp;{!! get_active_badge($user_abo->active) !!}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.abo_delivery') }}</div>
{{ $user_abo->getCountOrders() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.payment') }}</div>
{{ $user_abo->getPaymentType() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.amount') }}</div>
<span class="text-nowrap" id="value-amount">{{ $user_abo->getFormattedAmount() }}</span>
</div>
</div>
</div>
<hr class="m-0">
@if($isAdmin)
<div class="card-body pb-1">
<div class="row">
<div class="col-md-3 mb-3">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $user_abo->id }}"
data-action="abo_update_settings"
data-view="admin"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
</div>
<div class="col-md-6 mb-3">
@if(isset($user_abo->shopping_user) && $user_abo->shopping_user->member_id > 0)
<div class="text-muted small">{{ __('tables.adviser') }}</div>
{!! '<a href="'.route('admin_lead_edit', [$user_abo->shopping_user->member_id]).'">'.$user_abo->shopping_user->member->getFullName().'</a>' !!}
@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('tables.is_for') }}</div>
{!! $user_abo->getIsForFormated() !!}
@if($user_abo->is_for === 'me')
<a class="btn btn-xs btn-secondary" href="{{ route('admin_lead_edit', $user_abo->user_id) }}"><i class="fa fa-edit"></i></a>
@endif
@if($user_abo->is_for === 'ot')
<a class="btn btn-xs btn-secondary" href="{{ route('admin_customer_edit', $user_abo->shopping_user->id) }}"><i class="fa fa-edit"></i></a>
@endif
</div>
</div>
</div>
@else
<div class="card-body pb-1">
<div class="row">
<div class="col-md-6 mb-3">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $user_abo->id }}"
data-action="abo_update_settings"
data-view="{{ $view }}"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
</div>
<div class="col-md-3 mb-3">
{!! $user_abo->getIsForFormated() !!}
@if($user_abo->is_for === 'me')
<a class="btn btn-xs btn-secondary" href="{{ route('user_edit') }}"><i class="fa fa-edit"></i></a>
@endif
@if($user_abo->is_for === 'ot')
<a class="btn btn-xs btn-secondary" href="{{ route('user_customer_edit', $user_abo->shopping_user->id) }}"><i class="fa fa-edit"></i></a>
@endif
</div>
</div>
</div>
@endif

View file

@ -0,0 +1,109 @@
<div class="card-body">
<h5 class="font-weight-semibold">
{{ __('navigation.abo') }} {{ __('tables.executions') }}
</h5>
<style>
table.table-product,
table.table-product tr td,
table.table-product tr th {
border: none;
}
table.table-product tr.border-top td {
border-top: 1px solid #b8b8b9;
}
table.table-product tr.border-bottom td,
table.table-product tr.border-bottom th {
border-bottom: 1px solid #b8b8b9;
}
</style>
<div class="table-responsive">
<table class="table table-product m-0" style="min-width:550px;">
<tbody>
<tr>
<th>#</th>
<th>{{__('tables.date')}}</th>
<th>{{__('tables.amount')}}</th>
<th>{{__('tables.payment')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('tables.shipping')}}</th>
<th>{{__('tables.art')}}</th>
<th>{{__('tables.invoice')}}</th>
<th>{{__('tables.firstname')}}</th>
<th>{{__('tables.lastname')}}</th>
<th>{{__('tables.email')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('tables.rf_no')}}</th>
</tr>
@if($user_abo->user_abo_orders)
@foreach($user_abo->user_abo_orders()->orderBy('id', 'desc')->get() as $user_abo_order)
@if($user_abo_order->shopping_order)
<tr class="border-top">
<td>
@if($isAdmin)
@if($user_abo->is_for === 'me')
{!! '<a href="' . route('admin_sales_users_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-primary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@if($user_abo->is_for === 'ot')
{!! '<a href="' . route('admin_sales_customers_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-secondary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@else
@if($user_abo->is_for === 'me')
{!! '<a href="' . route('user_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-primary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@if($user_abo->is_for === 'ot')
{!! '<a href="' . route('user_shop_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-secondary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@endif
</td>
<td>
{!! $user_abo_order->shopping_order->created_at->format("d.m.Y H:i") !!}
</td>
<td>
<span class="no-line-break">{!! $user_abo_order->shopping_order->getFormattedTotalShipping() !!} </span>
</td>
<td>
{!! $user_abo_order->shopping_order->getLastShoppingPayment('getPaymentType'); !!}
</td>
<td>
{!! \App\Services\Payment::getShoppingOrderBadge($user_abo_order->shopping_order) !!}
</td>
<td>
{!! '<span class="badge badge-pill badge-'.$user_abo_order->shopping_order->getShippedColor().'">'.$user_abo_order->shopping_order->getShippedType().'</span>' !!}
</td>
<td>
{!! '<span class="badge badge-pill badge-'.$user_abo_order->shopping_order->getPaymentForColor().'">'.$user_abo_order->shopping_order->getPaymentForType().'</span>' !!}
</td>
<td>
@if($user_abo_order->shopping_order->isInvoice())
{!! '<span class="no-line-break"><a href="'.route('storage_file', [$user_abo_order->shopping_order->id, 'invoice', 'download']).'" class="btn btn-primary btn-xs"><i class="fa fa-download"></i></a>
<a href="'.route('storage_file', [$user_abo_order->shopping_order->id, 'invoice', 'stream']).'" target="_blank" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a></span>' !!}
@endif
</td>
<td>
{{ $user_abo_order->shopping_order->shopping_user->shipping_firstname }}
</td>
<td>
{{ $user_abo_order->shopping_order->shopping_user->shipping_lastname }}
</td>
<td>
{{ $user_abo_order->shopping_order->shopping_user->shipping_email }}
</td>
<td>
{!! $user_abo_order->getStatusFormated()!!}
</td>
<td>
{{ $user_abo_order->shopping_order->getLastShoppingPayment('reference') }}
</td>
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
</div>
</div>

View file

@ -0,0 +1,123 @@
<style>
table.table-product,
table.table-product tr td,
table.table-product tr th {
border: none;
}
table.table-product tr.border-top td {
border-top: 1px solid #b8b8b9;
}
table.table-product tr.border-bottom td,
table.table-product tr.border-bottom th {
border-bottom: 1px solid #b8b8b9;
}
.table-small {
font-size: 0.9em;
width: auto;
}
.table-small td {
padding: 0.225rem 1rem 0.225rem 0;
}
.btn-md-extra {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
line-height: 1.5;
border-radius: 0.25rem;
}
.md-btn-extra {
width: calc(1.7rem + 2px) !important;
line-height: 1.5rem;
}
.form-control.input-extra {
padding: 0.28rem 0.6rem;
font-size: 0.8rem;
font-weight: 500;
min-height: calc(1.8rem + 2px);
height: calc(1.8rem + 2px);
width: 44px;
}
.input-group-min-w {
min-width: 102px;
}
.img-extra {
min-width:55px;
max-height: 120px;
}
.table td.border-top {
border: none;
border-top: 1px solid #ccccdb;
}
.table td {
border: none;
}
.table th {
border: none;
border-bottom: 1px solid #c3c3d2;
}
@media (max-width: 767px) {
.default-style:not([dir=rtl]) div.card-datatable table.dataTable thead th:first-child,
.default-style:not([dir=rtl]) div.card-datatable table.dataTable tbody td:first-child,
.default-style:not([dir=rtl]) div.card-datatable table.dataTable tfoot th:first-child {
padding-left: 0.6rem !important;
}
.img-extra {
min-width:35px;
max-height: 160px;
}
}
.table .foot-small td {
padding: 0.225rem 0.625rem;
}
.table .text-body {
font-size: 0.9em;
}
.table .options a.auto-delete-product {
font-size: 0.7em;
font-weight: bold;
text-transform: uppercase;
}
.table .min-width-80 {
min-width: 160px;
}
.bg-warning-light {
background-color: rgba(255, 217, 80, 0.6) !important;
}
.small {
font-size: 90%;
}
.table tfoot td {
padding: 0.225rem;
}
</style>
<div class="card-body">
<h5 class=" font-weight-semibold mb-2">
{{ __('abo.abo_order_hl') }}
</h5>
<p>{{ __('abo.abo_order_info') }}</p>
<hr>
@include('user.abo.vat_info')
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $user_abo->id }}"
data-action="abo-add-product"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> {{ __('abo.add_product') }}</button>
<div class="" id="insert_show_products_order" data-cart-order-id="{{ $user_abo->id }}">
@include('admin.abo._order_abo_show')
</div>
</div>

View file

@ -0,0 +1,93 @@
@if(isset($error_message) && $error_message)
<div class="alert alert-danger mt-2" id="insert_show_error_message">{{ $error_message }}</div>
@endif
<div class="table-responsive">
<table class="table table-product m-0" style="min-width:550px;">
<thead> <tr>
<th>#</th>
<th>{{__('order.article')}}</th>
<th>{{__('tables.quantity')}}</th>
<th class="text-right"> {{ __('tables.price') }}</th>
</tr>
</thead>
<tbody>
@if($user_abo->user_abo_items)
@foreach($user_abo->user_abo_items as $abo_item)
@if(!$abo_item->comp)
<tr>
<td>
@if(count($abo_item->product->images))
<img class="img-fluid img-extra" alt="" src="{{ route('product_image', [$abo_item->product->images->first()->slug]) }}">
@endif
</td>
<td class="min-width-80">
<strong>{{ $abo_item->product->getLang('name') }}</strong>
&nbsp; {!! get_abo_type_badge_by_product($abo_item->product) !!}
<div class="text-body">
<div>{{ __('order.content') }}: {{ $abo_item->product->contents }}</div>
<div>{{ __('order.art_no') }}: {{ $abo_item->product->number }}</div>
</div>
<div class="options">
<a href="#" class="auto-delete-product remove_item_form_cart product-tooltip" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}"><i class="fa fa-times"></i> {{ __('order.article_remove') }}</a>
</div>
</td>
<td>
<div class="no-line-break input-group-min-w">
<div class="input-group d-inline-flex w-auto">
<span class="input-group-prepend">
<button type="button" class="btn btn-secondary icon-btn md-btn-extra remove-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}">-</button>
</span>
<input type="text" class="form-control text-center input-extra table-input-event-onchange" name="product_qty_{{$abo_item->id}}" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}" value="{{$abo_item->qty}}">
<span class="input-group-append">
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}">+</button>
</span>
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-top px-3 py-2" style="width: 100px;">
<div class="no-line-break"> {{ $abo_item->getFormattedTotalPrice() }} &euro;</div>
</td>
</tr>
@endif
@endforeach
@endif
</tbody>
<tfoot>
<tr>
<td colspan="4"><hr></td>
</tr>
<tr>
<td colspan="3" class="text-right small"><strong>{{ __('order.subtotal') }}:</strong></td>
<td class="text-right small">{{ Yard::instance('shopping')->subtotal() }} </td>
</tr>
<tr>
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('Delivery country') }}:</strong></td>
<td class="text-right small no-border-top">{{ Yard::instance('shopping')->getShippingCountryName() }}</td>
</tr>
<tr>
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.shipping_costs') }}:</strong></td>
<td class="text-right small no-border-top">{{ Yard::instance('shopping')->shipping() }} </td>
</tr>
@if(Yard::instance('shopping')->getUserTaxFree())
<tr>
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.sum_net') }}:</strong></td>
<td class="text-right small no-border-top">{{ Yard::instance('shopping')->subtotalWithShipping() }} </td>
</tr>
@else
<tr>
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.total_without_VAT') }}:</strong></td>
<td class="text-right small no-border-top">{{ Yard::instance('shopping')->subtotalWithShipping() }} </td>
</tr>
<tr>
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.plus_VAT') }}:</strong></td>
<td class="text-right small no-border-top">{{ Yard::instance('shopping')->taxWithShipping() }} </td>
</tr>
@endif
<tr>
<td colspan="3" class="text-right"><strong>{{ __('order.total_sum') }}:</strong></td>
<td class="text-right">{{ Yard::instance('shopping')->totalWithShipping() }} </td>
</tr>
</tfoot>
</table>
</div>

View file

@ -0,0 +1,61 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('admin_abos')}}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
{{ __('navigation.abo') }} <span class="text-muted">{{ '#'.$user_abo->payone_userid }}</span>
</h4>
@if(Session::has('alert-error'))
<div class="col-sm-12">
<div class="alert alert-danger p-2 mt-2">
<ul>
<li>{{ Session::get('alert-error') }}</li>
</ul>
</div>
</div>
@endif
<div class="card">
@include('admin.abo._detail')
</div>
<div class="card mt-3">
@include('admin.customer._customer_detail', ['shopping_user' => $customer_detail])
</div>
{!! Form::open(['url' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!}
<input type="hidden" name="is_for" value="{{ $user_abo->is_for }}">
<div class="card mt-3">
@include('admin.abo._order_abo')
</div>
@if($comp_products && Yard::instance('shopping')->getNumComp() > 0)
<div id="holder_html_view_comp_product">
@include('user.order.comp_product')
</div>
@endif
{{ Form::close() }}
<div class="card mt-3">
@include('admin.abo._executions')
</div>
<a href="{{route('admin_abos')}}" class="btn btn-sm btn-default mt-2 float-right">{{ __('back') }}</a>
@endsection
@section('scripts')
<script src="{{ asset('/js/iq-modal-cart.js') }}?v=1{{ get_file_last_time('/js/iq-modal-cart.js') }}"></script>
<script type="application/javascript">
var iqModalCart = IqModalCart.init();
$( document ).ready(function() {
});
</script>
@endsection

View file

@ -0,0 +1,118 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Abos') }}
</h4>
<div class="card">
{{--
<div class="card-header">
<div class="form-row align-items-center">
<div class="col-sm-4 mb-2">
<label class="form-label" for="filter_user_shop_id">Filter zugewiesener Berater</label>
<select class="selectpicker" data-style="btn-default" name="filter_member_id" id="filter_member_id" data-live-search="true">
<option value="">Filter aus</option>
@foreach($filter_members as $member)
<option value="{{$member->id}}" @if(get_user_attr('filter_member_id') == $member->id) selected @endif>{{$member->first_name}} {{$member->last_name}} | {{$member->email}}</option>
@endforeach
</select>
</div>
<div class="col-10 col-sm-3 mb-2">
<label class="form-label" for="filter_status">Filter Status</label>
<select class="custom-select" name="filter_status" id="filter_status">
<option value="">Filter aus</option>
@foreach(\App\Services\AboHelper::getTransStatusFilterText() as $id=>$name)
<option value="{{$id}}" @if(get_user_attr('filter_status') == $id) selected @endif>{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-2 col-sm-1 mb-2 mt-4">
<a href="{{ route('admin_sales_customers') }}?reset=filter" data-toggle="tooltip" data-placement="top" title="Reset Filter" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="fa fa-sync"></span>
</a>
</div>
</div>
</div>
--}}
<div class="card-datatable table-responsive">
<table class="datatable-abos table table-striped table-bordered" id="datatable-abos">
<thead>
<tr>
<th>#</th>
<th>{{__('tables.start_date')}}</th>
<th>{{__('tables.next_date')}}</th>
<th>{{__('tables.abo_delivery_day')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('tables.active')}}</th>
<th>{{__('tables.is_for')}}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('tables.exc')}}</th>
<th>{{__('tables.amount')}}</th>
<th>{{__('tables.payment')}}</th>
<th>{{__('tables.adviser')}}</th>
<th>{{__('PayOneID')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-abos').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'admin_abos_datatable') !!}',
data: function(d) {
d.filter_member_id = $('select[name=filter_member_id]').val();
d.filter_user_shop_id = $('select[name=filter_user_shop_id]').val();
d.filter_status = $('select[name=filter_status]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'start_date', name: 'start_date', searchable: false },
{ data: 'next_date', name: 'next_date', searchable: false },
{ data: 'abo_interval', name: 'abo_interval', searchable: false },
{ data: 'status', name: 'status', searchable: false },
{ data: 'active', name: 'active', searchable: false },
{ data: 'is_for', name: 'is_for', searchable: false },
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'shopping_user.billing_email', name: 'shopping_user.billing_email' },
{ data: 'count', name: 'count', searchable: false },
{ data: 'amount', name: 'amount', searchable: false },
{ data: 'payment', name: 'payment', searchable: false, orderable: false },
{ data: 'member', name: 'member', searchable: false, orderable: false },
{ data: 'payone_userid', name: 'payone_userid', searchable: true },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/datatables-{{ \App::getLocale() }}.json"
}
});
$('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_user_shop_id').on('change', function(){
oTable.draw();
});
$('#filter_txaction').on('change', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -0,0 +1,88 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('abo.abo_settings') }} <span class="text-muted">{{ '#'.$user_abo->payone_userid }}</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">
<input type="hidden" name="view" value="{{$data['view']}}">
@if($data['view'] !== 'admin' && ($user_abo->user_id != \Auth::user()->id && $user_abo->member_id != \Auth::user()->id))
<div class="alert alert-danger">
Unauthorized action. Is not my abo
</div>
@else
<div class="form-row">
<div class="col-sm-6">
<label for="abo_interval" class="form-label">{{ __('tables.abo_delivery_day') }}*</label>
<select class="custom-select" name="abo_interval" id="abo_interval" required>
{!! HTMLHelper::getAboDeliveryOptions($user_abo->abo_interval) !!}
</select>
</div>
<div class="col-sm-12 mt-1">
<i class="text-muted">{{ __('abo.abo_copy_abo_interval') }}</i>
</div>
</div>
<hr>
{{-- <div class="form-row">
<div class="col-sm-6">
<label for="next_date" class="form-label">{{ __('tables.next_date') }} ({{ $user_abo->next_date }})</label>
{!! Form::text('next_date', $user_abo->next_date, ['class'=>'form-control datepicker-base']) !!}
</div>
<div class="form-group col-sm-12 mt-1">
<i class="text-muted">{{ __('abo.abo_copy_next_date') }}</i>
</div>
</div>
<hr>
--}}
<div class="form-row">
<div class="col-sm-12">
<label class="switcher switcher-primary">
<input type="checkbox" class="switcher-input" name="abo_is_active" value="true" @if($user_abo->active) checked @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">{{ __('abo.abo_is_active') }}</span>
</label>
</div>
<div class="col-sm-12 mt-1">
<i class="text-muted">{{ __('abo.abo_copy_active') }}</i>
</div>
</div>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
<button type="submit" class="btn btn-primary">{{__('speichern')}}</button>
</div>
{!! Form::close() !!}
<script type="text/javascript">
$( document ).ready(function() {
$('.datepicker-base').datepicker({
orientation: 'auto right',
calendarWeeks: true,
todayBtn: 'linked',
//daysOfWeekDisabled: '1',
todayHighlight: true,
multidate: false,
daysOfWeekHighlighted: '0,6',
autoclose: true,
format: 'dd.mm.yyyy',
language: '{{ \App::getLocale() }}',
clearBtn: true,
}).on('clearDate', function(e) {
$('.datepicker-base').datepicker('update', '{{ $user_abo->next_date }}');
});
});
</script>

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">{!! implode(' / ', $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

@ -47,6 +47,10 @@
<div class="text-muted small">{{ __('Phone') }}</div>
{{ $shopping_user->billing_phone }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('E-Mail') }}</div>
@if($shopping_user->faker_mail) "-" @else {{ $shopping_user->billing_email }} @endif
</div>
</div>
</div>
<hr class="m-0">

View file

@ -90,8 +90,8 @@
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('customer.about_shop') }} </div>
@if($shopping_user->shopping_order)
@if($shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop())
@if($shopping_user->shopping_order && $shopping_user->shopping_order->user_shop)
@if($shopping_user->shopping_order->user_shop->user && $shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop())
<a href="{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}</span>
@ -195,7 +195,6 @@
<img src="{{ route('product_image', [$image->slug]) }}" class="d-block ui-w-80 mr-4" alt>
@endif
@endif
<div class="media-body">
<a href="{{route('admin_product_edit', [$shopping_order_item->product->id])}}" class="d-block">{{ $shopping_order_item->product->getLang('name') }}
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
@ -289,4 +288,54 @@
</div>
</div>
@endif
<div class="card-body">
<h6 class="small font-weight-semibold">
{{ __('tables.previous_orders') }}
</h6>
<div class="table-responsive">
<table class="table table-striped table-bordered m-0" style="min-width:550px;">
<tbody>
<tr>
<th>#</th>
<th>{{__('tables.date')}}</th>
<th>{{__('tables.amount')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('tables.shipping')}}</th>
<th>{{__('tables.art')}}</th>
</tr>
@if($shopping_user->shopping_order)
@forelse($shopping_user->getAllOrdersByMember() as $shopping_order)
<tr>
<td>
<a href="{{ route('user_shop_order_detail', $shopping_order->id) }}"
class="btn icon-btn btn-sm btn-primary">
<span class="fa fa-edit"></span>
</a>
</td>
<td>{{ $shopping_order->created_at->format('d.m.Y') }}</td>
<td>
<span class="no-line-break">
{{ $shopping_order->getFormattedTotalShipping() }}
</span>
</td>
<td>{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!}</td>
<td>
<span class="badge badge-pill badge-{{ $shopping_order->getShippedColor() }}">
{{ $shopping_order->getShippedType() }}
</span>
</td>
<td>{!! \App\Services\Payment::getPaymentForBadge($shopping_order) !!}</td>
</tr>
@empty
<tr>
<td colspan="6" class="text-center">{{ __('order.no_orders_found') }}</td>
</tr>
@endforelse
@endif
</tbody>
</table>
</div>
</div>
<hr class="m-0">
</div>

View file

@ -21,8 +21,6 @@
<th>{{ __('City') }}</th>
<th>{{ __('Country') }}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
@ -43,7 +41,7 @@
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
d.isfor = "{{ $data['isfor'] }}";
d.isfor = "{{ $data['isfor'] }}";
}
},
"order": [[0, "desc" ]],
@ -58,8 +56,6 @@
{ data: 'billing_city', name: 'billing_city' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{data: 'status', name: 'status', searchable: false, orderable: false },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
@ -75,6 +71,5 @@
});
</script>
</div>
</div>
</div>

View file

@ -90,6 +90,78 @@
</div>
<hr>
@endif
{{-- Eigene Marge --}}
@if (isset($collection->own_order[$date]))
@php($order = $collection->own_order[$date])
@if (isset($cbot))
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>
<strong>{{ __('team.own') }} {{ __('tables.margin') }} </strong>
</td>
<td>
<span class="badge badge-info"
style="font-size: 1em;"><strong>
{{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }}
&euro;</strong></span>
&nbsp;
({{ __('team.net_turnover') }}:
{{ formatNumber($cbot->business_user->sales_volume_total) }} &euro; /
{{ $cbot->business_user->margin }} %)
<br>
<em>{{ __('team.consultant_margin_info') }}</em>
</td>
</tr>
</tbody>
</table>
</div>
@endif
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>{{ __('tables.date') }}</th>
<th>{{ __('tables.net_sales') }}</th>
<th>{{ __('tables.margin') }} %</th>
<th>{{ __('tables.margin') }} &euro;</th>
<th>{{ __('tables.order') }}</th>
</tr>
</thead>
<tbody>
@foreach ($order->user_sales_volumes as $user_sales_volume)
<tr>
<td>{{ $user_sales_volume->date }}</td>
<td>{{ formatNumber($user_sales_volume->total_net) }} &euro;</td>
<td>{{ $cbot->business_user->margin }} %</td>
<td>{{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} &euro;</td>
<td>
{{ $user_sales_volume->shopping_order_id }}
@if ($user_sales_volume->shopping_order)
<br><span
class="small">{{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}</span>
@endif
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr style="background-color: #28c3d7; color:#fff;">
<td class="text-left"><b>{{ __('tables.total') }}<b></td>
<td>{{ formatNumber($order->credit_total_net) }} &euro;</td>
<td>&nbsp;</td>
<td><strong>{{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} &euro;</strong></td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
<hr>
@endif
{{-- Provision Shop --}}
@if (isset($collection->commission_shop[$date]))
@php($cs = $collection->commission_shop[$date])
@if (isset($cbot))
@ -159,8 +231,8 @@
</tbody>
<tfoot>
<tr>
<td class="text-right"> {{ __('tables.total') }} </td>
<tr style="background-color: #b5c49b;">
<td class="text-left"><b>{{ __('tables.total') }}</b></td>
<td>{{ formatNumber($cs->user_sales_volumes_total->month_shop_total_net) }} &euro;</td>
<td>&nbsp;</td>
<td><strong>{{ formatNumber($cbot->business_user->commission_shop_sales) }} &euro;</strong></td>
@ -173,78 +245,9 @@
@endif
@if (isset($collection->own_order[$date]))
@php($order = $collection->own_order[$date])
@if (isset($cbot))
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>
<strong>{{ __('team.own') }} {{ __('tables.margin') }} </strong>
</td>
<td>
<span class="badge badge-primary"
style="font-size: 1em;"><strong>
{{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }}
&euro;</strong></span>
&nbsp;
({{ __('team.net_turnover') }}:
{{ formatNumber($cbot->business_user->sales_volume_total) }} &euro; /
{{ $cbot->business_user->margin }} %)
<br>
<em>{{ __('team.consultant_margin_info') }}</em>
</td>
</tr>
</tbody>
</table>
</div>
@endif
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>{{ __('tables.date') }}</th>
<th>{{ __('tables.net_sales') }}</th>
<th>{{ __('tables.margin') }} %</th>
<th>{{ __('tables.margin') }} &euro;</th>
<th>{{ __('tables.order') }}</th>
</tr>
</thead>
<tbody>
@foreach ($order->user_sales_volumes as $user_sales_volume)
<tr>
<td>{{ $user_sales_volume->date }}</td>
<td>{{ formatNumber($user_sales_volume->total_net) }} &euro;</td>
<td>{{ $cbot->business_user->margin }} %</td>
<td>{{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} &euro;</td>
<td>
{{ $user_sales_volume->shopping_order_id }}
@if ($user_sales_volume->shopping_order)
<br><span
class="small">{{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}</span>
@endif
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td class="text-right"> {{ __('tables.total') }} </td>
<td>{{ formatNumber($order->credit_total_net) }} &euro;</td>
<td>&nbsp;</td>
<td><strong>{{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} &euro;</strong></td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
<hr>
@endif
{{-- Points Registration
@if (isset($collection->commission_registration[$date]))
@php($cr = $collection->commission_registration[$date])
<div class="card-header">
@ -288,8 +291,10 @@
<hr>
@endif
--}}
@if (isset($cbot))
@if (isset($cbot))
{{-- Payline Points / Provision / Wachstumsbonus
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
@ -317,6 +322,9 @@
</tbody>
</table>
</div>
--}}
{{-- Payline Points / Provision / Wachstumsbonus
<hr>
<div class="card-header">
<table class="table user-view-table m-0">
@ -364,6 +372,9 @@
</tbody>
</table>
</div>
--}}
{{-- Table Payline Points / Provision / Wachstumsbonus
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
@ -404,7 +415,32 @@
</tfoot>
</table>
</div>
<hr>
<hr>
--}}
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
@if($cbot->business_user->version == 2)
<tr>
<td><strong>{{ __('team.commission_payline') }}:</strong></td>
<td>
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_pp_total) }} &euro;</strong></span>
</td>
</tr>
<tr>
<td><strong>{{ __('team.commission_WB') }}:</strong></td>
<td>
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_growth_total) }} &euro;</strong></span>
</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">

View file

@ -14,7 +14,7 @@
<th>{{__('Name')}}</th>
<th>{{__('sichtbar') }}</th>
<th>{{__('Standard')}}</th>
<th>{{__('Abo')}}</th>
<th>{{__('abo.abo')}}</th>
<th>{{__('tables.status')}}</th>
</tr>
</thead>
@ -36,7 +36,7 @@
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }} ({{ $value->short }})</td>
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
<td>{!! implode('<br>', $value->getShowOnTypes()) !!}</td>
<td data-sort="{{ $value->default }}">{!! get_active_badge($value->default) !!}</td>
<td data-sort="{{ $value->is_abo }}">{!! get_active_badge($value->is_abo) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>

View file

@ -63,7 +63,7 @@
<td>{{ $value->getUnitType() }}</td>
<td>{{ $value->getBasePriceFormatted() }}</td>
<td>{{ $value->weight }}</td>
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
<td>{!! implode('<br>', $value->getShowOnTypes()) !!}</td>
<td data-sort="{{ $value->shipping_addon }}">{!! get_active_badge($value->shipping_addon) !!}</td>
<td data-sort="{{ $value->no_commission }}">{!! get_active_badge($value->no_commission) !!}</td>
<td data-sort="{{ $value->no_free_shipping }}">{!! get_active_badge($value->no_free_shipping) !!}</td>

View file

@ -18,13 +18,13 @@
</td>
<td class="text-right">
{{$shop_item['points_total']}}
{{ number_format($shop_item['points_total'], 0) }}
</td>
<td class="text-right">
{{ formatNumber($shop_item['user_price_net']) }} &euro;
</td>
<td class="text-right">
{{$shop_item['qty']}}
{{ number_format($shop_item['qty'], 0) }}
</td>
<td class="text-right">
@ -72,12 +72,12 @@
{{ __('order.sums') }}
</td>
<td class="text-right" colspan="1">
<strong>{{ $shopping_order->shopping_collect_order->points }} <strong>
<strong>{{ number_format($shopping_order->shopping_collect_order->points, 0) }} <strong>
</td>
<td class="text-right">
</td>
<td class="text-right">
<strong>{{ $shopping_order->shopping_collect_order->qty_total }}</strong>
<strong>{{ number_format($shopping_order->shopping_collect_order->qty_total, 0) }}</strong>
</td>
<td class="text-right">
<strong>{{ formatNumber($shopping_order->shopping_collect_order->price_total_net) }} &euro;</strong>

View file

@ -25,12 +25,19 @@
@endif
<div class="media-body">
<a href="{{route('admin_product_edit', [$shopping_order_item->product->id])}}" class="d-block">{{ $shopping_order_item->product->getLang('name') }}
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
<a href="{{route('admin_product_edit', [$shopping_order_item->product->id])}}" class="d-block"><strong>{{ $shopping_order_item->product->getLang('name') }} </strong>
@if($shopping_order->is_abo)
&nbsp; {!! get_abo_type_badge_by_product($shopping_order_item->product) !!}
@endif
</a>
<small>
<span class="text-muted">{{ __('order.content') }}: </span> {{ $shopping_order_item->product->contents }}<br>
<span class="text-muted">{{ __('order.weight') }}: </span> {{ $shopping_order_item->product->weight }} g<br>
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->points }}
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->points }}<br>
<span class="text-muted">{{ __('order.number') }}: </span> {{ $shopping_order_item->product->number }}
</small>
</div>
@endif

View file

@ -43,7 +43,6 @@
</a>
</div>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="datatable-customers table table-striped table-bordered" id="datatable-customers">

View file

@ -21,7 +21,7 @@
<label class="custom-control custom-checkbox mt-3">
{!! Form::checkbox('settings[is_comp_me_abo][val]', 1, \App\Models\Setting::getContentBySlug('is_comp_me_abo'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Kompensationprodukt für Berater bei Abo - regelmäßige Lieferungn</span>
<span class="custom-control-label">Kompensationprodukt für Berater bei Abo - regelmäßige Lieferungen</span>
</label>
{{ Form::hidden('settings[is_comp_me_abo][type]', 'bool') }}
</div>