#53, #52, #51 change Points

This commit is contained in:
Kevin Adametz 2022-07-21 10:37:34 +02:00
parent 582ca8299d
commit 263cf93a1e
41 changed files with 812 additions and 288 deletions

View file

@ -0,0 +1,83 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Points / Umsatz') }}
<span class="font-weight-light">zuweisen/ändern</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'] }}">
<div class="form-row">
<div class="form-group col">
<label for="change_member_key" class="form-label">{{ __('Passwort eingeben') }}*</label>
<input type="text" class="form-control" name="change_member_key" id="change_member_key"
placeholder="mivita" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="change_member_id" class="form-label">{{ __('Berater zuweisen') }}*</label>
<select class="selectpicker" name="change_member_id" id="change_member_id" data-style="btn-light"
data-live-search="true" required>
{!! HTMLHelper::getMembersOptions($value->member_id, true) !!}
</select>
<p class="text-muted">Es werden nur aktive Berater mit aktiven Accounts angezeigt.</p>
</div>
</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Datum</th>
<th>Points</th>
<th>Umsatz netto</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@if($value->user_sales_volume)
<tr>
<td>{{ $value->user_sales_volume->date }}</td>
<td>{{ $value->user_sales_volume->points }}</td>
<td>{{ formatNumber($value->user_sales_volume->total_net) }} &euro;</td>
<td>{{ $value->user_sales_volume->getStatusType() }}</td>
</tr>
@if($value->user_sales_volume->message)
<tr>
<td colspan="4">{{ $value->user_sales_volume->message }}</td>
</tr>
@endif
@endif
</tbody>
</table>
</div>
@if($value->user_sales_volume->isCurrentMonthYear())
<label class="custom-control custom-checkbox">
{!! Form::checkbox('change_points', 1, 0, ['class' => 'custom-control-input', 'id' => 'change_points', 'required'=>true]) !!}
<span class="custom-control-label">Points / Umsatz einen neuen Berater zuweisen</span>
</label>
@else
Points können nicht mehr verschoben werden.
@endif
<hr>
<i>Points können nur innerhalb des akutellen Monats verschoben werden, da sonst die monatliche Auswertung schon berechnet ist.
Danach können Points für den akutellen Monat manuell gutgeschrieben werden.</i><br>
<a class="btn btn-sm btn-default mt-2" href="{{ route('admin_business_points') }}">Business -> Points gutschreiben</a>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary">{{ __('übernehmen') }}</button>
</div>
{!! Form::close() !!}
<script type="text/javascript">
$(document).ready(function() {
});
</script>

View file

@ -11,18 +11,20 @@
<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" data-id="{{ $shopping_order->id }}"
data-shipped="{{ $shopping_order->shipped }}" data-back="{{ url()->current() }}"
data-action="store_shipped">
<span class="far fa-edit"></span> <strong>{{ $shopping_order->getShippedType() }}</strong>
</button>
@else
<span class="text-big">
<span
class="badge badge-pill badge-{{ $shopping_order->getShippedColor() }}">{{ $shopping_order->getShippedType() }}</span>
</span>
@if($shopping_order->payment_for !== 8)
@if ($isAdmin)
<button type="button" class="btn btn-sm btn-{{ $shopping_order->getShippedColor() }}"
data-toggle="modal" data-target="#modals-shipped" data-id="{{ $shopping_order->id }}"
data-shipped="{{ $shopping_order->shipped }}" data-back="{{ url()->current() }}"
data-action="store_shipped">
<span class="far fa-edit"></span> <strong>{{ $shopping_order->getShippedType() }}</strong>
</button>
@else
<span class="text-big">
<span
class="badge badge-pill badge-{{ $shopping_order->getShippedColor() }}">{{ $shopping_order->getShippedType() }}</span>
</span>
@endif
@endif
</div>
<div class="col-md-3 mb-1">
@ -59,7 +61,7 @@
target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
@endif
@endif
@if ($shopping_order->txaction === 'extern' && $shopping_order->wp_invoice_path)
@if (($shopping_order->txaction === 'extern' || $shopping_order->txaction === 'extern_paid') && $shopping_order->wp_invoice_path)
<a href="{{ $shopping_order->wp_invoice_path }}" class="btn btn-secondary btn-sm"><i
class="fa fa-external-link-alt"></i> <i class="fa fa-download"></i></a>
@endif
@ -99,12 +101,30 @@
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Points gesamt</div>
{{ $shopping_order->points }}
{{ $shopping_order->points }}
</div>
</div>
</div>
<hr class="m-0">
<div class="card-body pb-1">
<div class="row">
<div class="col-md-12 mb-3">
<div class="text-muted small">Punkte / Umsatz zugewiesen</div>
@if($shopping_order->user_sales_volume && $shopping_order->user_sales_volume->user)
{{ $shopping_order->user_sales_volume->user->getFullName() }}
@endif
@if ($isAdmin)
<button type="button" class="btn btn-xs btn-outline-secondary" data-toggle="modal"
data-target="#modals-load-content" data-id="{{ $shopping_order->id }}"
data-action="shopping-order-change-points" data-view="{{ $isView }}"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
@endif
</div>
</div>
</div>
<hr class="m-0">
<!-- / Info -->
@if ($isAdmin)
<!-- Member -->
@ -343,7 +363,7 @@
<hr>
@endif
@if ($shopping_order->shopping_user->is_from === 'collection')
<h5>Berater Sammelbestellung</h5>
<h5>Berater Sammelrechnung</h5>
<hr>
@endif
</h6>

View file

@ -121,7 +121,7 @@
</table>
</div>
<h5 class="mt-4">Sammelbestellung behinhaltet folgende Kundenbestellungen</h5>
<h5 class="mt-4">Sammelrechnung behinhaltet folgende Kundenbestellungen</h5>
<div class="card-datatable table-responsive pt-0">
<table class="table table-striped table-bordered">

View file

@ -172,13 +172,16 @@
@if($shopping_order->shopping_user->is_from === 'extern')
<b>{{__('email.checkout_mail_order_for_extern')}}</b>
@endif
@if($shopping_order->shopping_user->is_from === 'collection')
<b>Berater Sammelrechnung</b><br>
@endif
</td>
</tr>
<tr>
<td>
@if($shopping_order->shopping_user->is_from === 'homeparty')
@include('emails.homeparty_detail')
@elseif($shopping_order->shopping_collect_order)
@elseif($shopping_order->shopping_user->is_from === 'collection' && $shopping_order->shopping_collect_order)
@include('emails.collection_detail')
@else
@include('emails.shopping_order_detail')

View file

@ -215,14 +215,20 @@
<b>{{ __('navigation.my_homeparty') }} / {{ $shopping_order->homeparty->name }} - {{ $shopping_order->homeparty->date }}</b><br>
<b>{{__('email.checkout_mail_hl1')}}</b>
@endif
@if($shopping_order->shopping_user->is_from === 'extern')
<b>{{__('email.checkout_mail_order_for_extern')}}</b>
@endif
@if($shopping_order->shopping_user->is_from === 'collection')
<b>Berater Sammelrechnung</b><br>
@endif
</td>
</tr>
<tr>
<td>
@if($shopping_order->shopping_user->is_from === 'homeparty')
@include('emails.homeparty_detail')
@elseif($shopping_order->shopping_collect_order)
@include('emails.collection_detail')
@elseif($shopping_order->shopping_user->is_from === 'collection' && $shopping_order->shopping_collect_order)
@include('emails.collection_detail')
@else
@include('emails.shopping_order_detail')
@endif

View file

@ -144,6 +144,7 @@
<div>{{ __('navigation.payments') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('admin/payments/invoice') ? ' active' : '' }}">
<a href="{{ route('admin_payments_invoice') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropleft-circle"></i><div>{{ __('navigation.invoice') }}</div></a>
</li>
@ -165,6 +166,9 @@
<li class="sidenav-item{{ Request::is('admin/business/structure', 'admin/business/structure/*') ? ' active' : '' }}">
<a href="{{ route('admin_business_structure') }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-md-funnel rotate-180" style="text-align: right"></i><div>{{ __('navigation.structure') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/business/points') ? ' active' : '' }}">
<a href="{{ route('admin_business_points') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropup-circle"></i><div>{{ __('navigation.points') }}</div></a>
</li>
</ul>
</li>

View file

@ -59,7 +59,7 @@
</style>
<div id="invoice_journal_box">
<h4>Sammelbestellung behinhaltet folgende Kundenbestellungen</h4>
<h4>Sammelrechnung behinhaltet folgende Kundenbestellungen</h4>
@if($shopping_order->shopping_collect_order)
@foreach($shopping_order->shopping_collect_order->orders as $order)
@php($order = $shopping_order->shopping_collect_order->initShoppingOrder($order))

View file

@ -3,7 +3,7 @@
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('user_orders')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Bestellung Kunde') }} <span class="text-muted">#{{$shopping_order->id}}</span>
{{ __('Bestellung Berater') }} <span class="text-muted">#{{$shopping_order->id}}</span>
</h4>
@include('admin.sales._detail')
<a href="{{route('user_orders')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>

View file

@ -15,7 +15,7 @@
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('Externe Bestellungen') }} | bestellen</div>
<div>{{ __('Externe Bestellungen') }} | Sammelrechnung</div>
<a href="{{route('user_shop_api_orders')}}" class="btn btn-sm btn-default float-right">zurück</a>
</h4>

View file

@ -30,9 +30,9 @@
</div>
<div class="col-12 mb-0 mt-1">
<p class="mb-0">
bestellen = Sammelbestellung aufgeben<br>
bezahlen = Sammelrechnung erstellen und zum Checkout<br>
entfernen = Bestellungen werden nach entfernt verschoben, für Stornos etc.<br>
zurücksetzen = Bestellungen werden nur nach offen verschoben, Sammelbestellung werden nicht geändert
zurücksetzen = Bestellungen werden nur nach offen verschoben, Sammelrechnung werden nicht geändert
</p>
</div>
</div>
@ -43,7 +43,7 @@
<thead>
<tr>
<th>#</th>
<th>{{__('Status') }}</th>
<th>{{__('Zahlung') }}</th>
<th>{{__('Versand') }}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>

View file

@ -0,0 +1,63 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ __('Bestellung') }} <span class="text-muted">#{{$shopping_order->id}}</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<h5 class="mt-4">Sammelrechnung behinhaltet folgende Kundenbestellungen</h5>
<div class="card-datatable table-responsive pt-0">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('Nummer') }}</th>
<th>{{__('Versand') }}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('Betrag')}}</th>
</tr>
</thead>
<tbody>
@foreach($shopping_order->shopping_collect_order->orders as $order)
@php($order = $shopping_order->shopping_collect_order->initShoppingOrder($order))
<tr>
<td><button type="button" class="btn icon-btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $order['order_id'] }}"
data-action="shop-user-order-detail"
data-back=""
data-modal="modal-xl"
data-init_from="admin"
data-route="{{ route('modal_load') }}"><span class="far fa-eye"></span></button>
</td>
<td>{{ $order['order_id'] }}</td>
<td>
<span class="badge badge-pill badge-{{ $order['shopping_order']->getShippedColor() }}">{{ $order['shopping_order']->getShippedType() }}</span>
</td>
<td>{{ $order['shopping_order']->shopping_user->billing_firstname }}</td>
<td>{{ $order['shopping_order']->shopping_user->billing_lastname }}</td>
<td>{{ $order['shopping_order']->shopping_user->billing_email }}</td>
<td>{{ $order['shopping_order']->created_at->format("d.m.Y") }}</td>
<td>{{ $order['shopping_order']->getFormattedTotalShipping() }} &euro;</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
<script>
$( document ).ready(function() {
});
</script>
</div>

View file

@ -15,13 +15,14 @@
<thead>
<tr>
<th>#</th>
<th>{{__('Datum')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Versand')}}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Versand')}}</th>
<th>{{__('Rechnung')}}</th>
<th>{{__('Art')}}</th>
@ -39,13 +40,13 @@
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'created_at', name: 'created_at' },
{ data: 'total_shipping', name: 'total_shipping' },
{ data: 'txaction', name: 'txaction' },
{ data: 'shipped', name: 'shipped' },
{ 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: 'created_at', name: 'created_at' },
{ data: 'txaction', name: 'txaction' },
{ data: 'total_shipping', name: 'total_shipping' },
{ data: 'shipped', name: 'shipped' },
{ data: 'invoice', name: 'invoice', orderable: false },
{ data: 'payment_for', name: 'payment_for' },
],

View file

@ -972,7 +972,7 @@
<button type="submit" class="btn btn-primary btn-lg btn-block size-18 btn-text-500 mt-4 faa-parent animated-hover"><i class="fa fa-mail-forward faa-horizontal"></i> Jetzt kaufen</button>
<hr><p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i class="fa fa-lock"></i> Sind alle Deine Angaben vollsätndig ausgefüllt, klicke auf "Jetzt kaufen" und Du wist zu unserem Zahlungsanbieter weitergeleitet, die Verbindung wird ist SSL verschlüsselt.</em></p>
<hr><p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i class="fa fa-lock"></i> Sind alle Deine Angaben vollständig ausgefüllt, klicke auf "Jetzt kaufen" und Du wirst zu unserem Zahlungsanbieter weitergeleitet, die Verbindung ist SSL verschlüsselt.</em></p>
</div>
</div>