Kundenhoheit
This commit is contained in:
parent
d8b5206031
commit
dc63fa9fb2
52 changed files with 2436 additions and 557 deletions
326
resources/views/admin/customer/_detail.blade.php
Normal file
326
resources/views/admin/customer/_detail.blade.php
Normal file
|
|
@ -0,0 +1,326 @@
|
|||
<div class="card">
|
||||
|
||||
<!-- Info -->
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Datum</div>
|
||||
{{$shopping_user->created_at->format("d.m.Y H:i")}}
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Kundennummer</div>
|
||||
{{$shopping_user->number}}
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">ist Berater</div>
|
||||
@if($shopping_user->auth_user)
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_user->auth_user->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
||||
{{$shopping_user->auth_user->getFullName()}} <span class="text-muted">#{{$shopping_user->auth_user->number}}</span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Info -->
|
||||
|
||||
|
||||
@if($isAdmin)
|
||||
<!-- Member -->
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-8 mb-3">
|
||||
@if(isset($change_member_error) && $change_member_error)
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2">
|
||||
<ul>
|
||||
<li>{{ $change_member_error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="text-muted small">Zugewiesener Berater</div>
|
||||
|
||||
@if($shopping_user->is_like)
|
||||
<button type="button" class="btn btn-xs btn-outline-info" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{$shopping_user->id}}"
|
||||
data-action="shopping-user-is-like-member"
|
||||
data-back="{{route('admin_customer_edit', [$shopping_user->id])}}"
|
||||
data-modal="modal-xl"
|
||||
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Berater zuordnen</button>
|
||||
@else
|
||||
|
||||
@if($shopping_user->member)
|
||||
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_user->member->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
||||
{{$shopping_user->member->getFullName()}} <span class="text-muted">#{{$shopping_user->member->number}}</span>
|
||||
@endif
|
||||
<button type="button" class="btn btn-xs btn-outline-secondary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $shopping_user->id }}"
|
||||
data-action="shopping-user-change-member"
|
||||
data-view="customer"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Über Shop</div>
|
||||
@if($shopping_user->shopping_order)
|
||||
@if($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>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Member -->
|
||||
@endif
|
||||
|
||||
<!-- Billing -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Rechnungsadresse
|
||||
</h6>
|
||||
<div class="row">
|
||||
@if($shopping_user->billing_company)
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="text-muted small">Firma</div>
|
||||
{{ $shopping_user->billing_company }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Anrede</div>
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Vorname</div>
|
||||
{{ $shopping_user->billing_firstname }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Nachname</div>
|
||||
{{ $shopping_user->billing_lastname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Straße</div>
|
||||
{{ $shopping_user->billing_address }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Zusatz</div>
|
||||
{{ $shopping_user->billing_address_2 }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">PLZ</div>
|
||||
{{ $shopping_user->billing_zipcode }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Stadt</div>
|
||||
{{ $shopping_user->billing_city }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">E-Mail</div>
|
||||
{{ $shopping_user->billing_email }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Telefon</div>
|
||||
{{ $shopping_user->billing_phone }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Land</div>
|
||||
{{ $shopping_user->billing_country->getLocated() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Billing -->
|
||||
|
||||
<!-- Shipping -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Lieferadresse
|
||||
</h6>
|
||||
@if($shopping_user->same_as_billing)
|
||||
{{__('email.checkout_mail_same_address')}}
|
||||
@else
|
||||
<div class="row">
|
||||
@if($shopping_user->shipping_company)
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="text-muted small">Firma</div>
|
||||
{{ $shopping_user->shipping_company }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Anrede</div>
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Vorname</div>
|
||||
{{ $shopping_user->shipping_firstname }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Nachname</div>
|
||||
{{ $shopping_user->shipping_lastname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Straße</div>
|
||||
{{ $shopping_user->shipping_address }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Zusatz</div>
|
||||
{{ $shopping_user->shipping_address_2 }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">PLZ</div>
|
||||
{{ $shopping_user->shipping_zipcode }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Stadt</div>
|
||||
{{ $shopping_user->shipping_city }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">E-Mail</div>
|
||||
{{ $shopping_user->shipping_email }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Telefon</div>
|
||||
{{ $shopping_user->shipping_phone }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Land</div>
|
||||
{{ $shopping_user->shipping_country->getLocated() }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Shipping -->
|
||||
|
||||
<!-- Order -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Bestellung
|
||||
</h6>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered m-0" style="min-width:550px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Produkt</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Preis</th>
|
||||
</tr>
|
||||
@if($shopping_user->shopping_order)
|
||||
@foreach($shopping_user->shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td class="px-3 py-2">
|
||||
<div class="media align-items-center">
|
||||
@if($shopping_order_item->product->images)
|
||||
@if($image = $shopping_order_item->product->images->first())
|
||||
<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->name }}
|
||||
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
|
||||
<small>
|
||||
<span class="text-muted">Inhalt: </span> {{ $shopping_order_item->product->contents }}<br>
|
||||
<span class="text-muted">Gewicht: </span> {{ $shopping_order_item->product->weight }} g<br>
|
||||
<span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<!-- Set column width -->
|
||||
<td class="align-middle px-3 py-2" style="width: 66px;">
|
||||
{{ $shopping_order_item->qty }}
|
||||
</td>
|
||||
<!-- Set column width -->
|
||||
<td class="text-right font-weight-semibold align-middle px-3 py-2" style="width: 100px;">
|
||||
{{ $shopping_order_item->getFormattedPrice() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
|
||||
<!-- / Payment -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Zahlung
|
||||
</h6>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width: 60px">#</th>
|
||||
<th>Zahlungsart</th>
|
||||
@if($isAdmin)<th>Referenznummer</th>@endif
|
||||
<th>Gesamt</th>
|
||||
<th>Status</th>
|
||||
<th>Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php($count=0)
|
||||
@if($shopping_user->shopping_order)
|
||||
@foreach($shopping_user->shopping_order->shopping_payments as $shopping_payment)
|
||||
<tr>
|
||||
<th scope="row">{{++$count}}</th>
|
||||
<td>{{$shopping_payment->getPaymentType()}}</td>
|
||||
@if($isAdmin)<td>{{$shopping_payment->reference}}</td>@endif
|
||||
<td>{{$shopping_payment->getPaymentAmount()}}</td>
|
||||
<td>{!! \App\Services\Payment::getShoppingPaymentBadge($shopping_payment) !!}</td>
|
||||
<td>{{$shopping_payment->created_at->format("d.m.Y H:i")}}</td>
|
||||
</tr>
|
||||
@if($isAdmin && $shopping_payment->payment_transactions)
|
||||
@php($ccount=0)
|
||||
<tr>
|
||||
<th scope="row" class="m-0">{{$count}}.{{++$ccount}}</th>
|
||||
<td colspan="5" class="m-0 p-0">
|
||||
<table class="table table-info table-borderless mb-0 small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width: 80px">Request</th>
|
||||
<th style="min-width: 80px">Status</th>
|
||||
<th style="min-width: 200px">TX-Action</th>
|
||||
<th style="min-width: 120px">Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($shopping_payment->payment_transactions as $payment_transaction)
|
||||
<tr>
|
||||
<td>{{$payment_transaction->request}}</td>
|
||||
<td>{{$payment_transaction->status}}</td>
|
||||
<td>{{$payment_transaction->txaction}} {{$payment_transaction->errormessage}}</td>
|
||||
<td>{{$payment_transaction->created_at->format("d.m.Y H:i")}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
12
resources/views/admin/customer/detail.blade.php
Normal file
12
resources/views/admin/customer/detail.blade.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<a href="{{route('admin_customers')}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
{{ __('Kunden Details') }} <span class="text-muted">#{{$shopping_user->id}}</span>
|
||||
</h4>
|
||||
@include('admin.customer._detail')
|
||||
<a href="{{route('admin_customers')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
|
||||
|
||||
@endsection
|
||||
120
resources/views/admin/customer/index.blade.php
Normal file
120
resources/views/admin/customer/index.blade.php
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Kunden') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="form-row align-items-center">
|
||||
{{-- <div class="col-sm-5 mb-2">
|
||||
<label class="form-label" for="filter_user_shop_id">Filter Kunden/Berater</label>
|
||||
<select class="custom-select" name="filter_customer_member" id="filter_customer_member">
|
||||
<option value="">Filter aus</option>
|
||||
<option value="customers" @if(get_user_attr('filter_customer_member') === 'customers') selected @endif>Kunden</option>
|
||||
<option value="members" @if(get_user_attr('filter_customer_member') === 'members') selected @endif>Berater</option>
|
||||
|
||||
</select>
|
||||
</div>--}}
|
||||
<div class="col-sm-10 mb-2">
|
||||
<label class="form-label" for="filter_user_shop_id">Filter zugewiesener Berater</label>
|
||||
<select class="custom-select" name="filter_member_id" id="filter_member_id">
|
||||
<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-2 col-sm-2 mb-2 mt-4">
|
||||
<a href="{{ route('admin_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">
|
||||
<div class="ml-4">
|
||||
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
</div>
|
||||
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('Nummer')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('ist Berater')}}</th>
|
||||
<th>{{__('Anrede')}}</th>
|
||||
<th>{{__('Firma')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
<th>{{__('PLZ')}}</th>
|
||||
<th>{{__('Stadt')}}</th>
|
||||
<th>{{__('Land')}}</th>
|
||||
<th>{{__('Käufe')}}</th>
|
||||
<th>{{__('zugewiesener Berater')}}</th>
|
||||
<th>{{__('Datum')}}</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 Berater erstellen')}}</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
var oTable = $('#datatables-customers').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'admin_customer_datatable') !!}',
|
||||
data: function(d) {
|
||||
d.filter_member_id = $('select[name=filter_member_id]').val();
|
||||
d.filter_customer_member = $('select[name=filter_customer_member]').val();
|
||||
}
|
||||
},
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false},
|
||||
{ data: 'number', name: 'number'},
|
||||
{ data: 'billing_email', name: 'billing_email' },
|
||||
{ data: 'isMember', name: 'isMember' },
|
||||
{ data: 'billing_salutation', name: 'billing_salutation' },
|
||||
{ data: 'billing_company', name: 'billing_company' },
|
||||
{ data: 'billing_firstname', name: 'billing_firstname' },
|
||||
{ data: 'billing_lastname', name: 'billing_lastname' },
|
||||
{ data: 'billing_zipcode', name: 'billing_zipcode' },
|
||||
{ data: 'billing_city', name: 'billing_city' },
|
||||
{ data: 'billing_country_id', name: 'billing_country_id' },
|
||||
{ data: 'orders', name: 'orders' },
|
||||
{ data: 'member_id', name: 'member_id', searchable: false, orderable: false },
|
||||
{ data: 'created_at', name: 'created_at' },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
$('#filter_member_id').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
$('#filter_customer_member').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<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::getSponsorOptions($user->m_sponsor, true) !!}
|
||||
{!! HTMLHelper::getMembersOptions($user->m_sponsor, true) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
214
resources/views/admin/modal/is_like_member.blade.php
Normal file
214
resources/views/admin/modal/is_like_member.blade.php
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
{!! Form::open(['url' => route('admin_sales_customers_detail', [$current->id]), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
|
||||
|
||||
<input type="hidden" name="action" value="{{$data['action']}}">
|
||||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
<input type="hidden" name="back" value="{{$data['back']}}">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
Der Kunde hat ggf. unter einer anderen Email-Adresse bestellt als sonst.
|
||||
<span class="font-weight-light"> Bitte vor der Bearbeitung prüfen und dem richtigen Berater zuordnen.</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p class="font-weight-bold">Die aktuelle Bestellung wurde getätigt von:</p>
|
||||
<div class="bg-light p-3" style="border-radius: 6px">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p class="font-weight-bold">Rechnungsadresse:</p>
|
||||
<p>
|
||||
@if($current->billing_company)
|
||||
Firma: {{ $current->billing_company }}<br>
|
||||
@endif
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($current->billing_salutation) }}
|
||||
{{ $current->billing_firstname }}
|
||||
<strong class="text-match">{{ $current->billing_lastname }}</strong><br>
|
||||
{{ $current->billing_address }}
|
||||
@if($current->billing_address_2)
|
||||
/ {{ $current->billing_address_2 }}<br>
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
<strong class="text-match">{{ $current->billing_zipcode }}</strong>
|
||||
{{ $current->billing_city }}<br>
|
||||
{{ $current->billing_email }}<br>
|
||||
{{ $current->billing_phone }}<br>
|
||||
{{ $current->billing_country->getLocated() }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<p class="font-weight-bold">Lieferadresse:</p>
|
||||
<p>
|
||||
@if($current->same_as_billing)
|
||||
{{__('email.checkout_mail_same_address')}}
|
||||
@else
|
||||
@if($current->shipping_company)
|
||||
Firma: {{ $current->shipping_company }}<br>
|
||||
@endif
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($current->shipping_salutation) }}
|
||||
{{ $current->shipping_firstname }}
|
||||
{{ $current->shipping_lastname }}<br>
|
||||
{{ $current->shipping_address }}
|
||||
@if($current->shipping_address_2)
|
||||
/ {{ $current->shipping_address_2 }}<br>
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
{{ $current->shipping_zipcode }}
|
||||
{{ $current->shipping_city }}<br>
|
||||
{{ $current->shipping_email }}<br>
|
||||
{{ $current->shipping_phone }}<br>
|
||||
{{ $current->shipping_country->getLocated() }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<hr>
|
||||
<p class="font-weight-bold">Bestellt im Shop:</p>
|
||||
<p>
|
||||
@if($current->shopping_order && $current->shopping_order->user_shop)
|
||||
<span class="text-muted">#{{$current->shopping_order->user_shop->user->number}}</span><br>
|
||||
{{$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())
|
||||
<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>
|
||||
@endif
|
||||
@endif
|
||||
<label class="custom-control custom-radio mt-3">
|
||||
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$current->id}}">
|
||||
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Berater <span class="text-muted">#{{$current->shopping_order->user_shop->user->number}}</span> zuordnen</span>
|
||||
</label>
|
||||
@else
|
||||
Keiner Bestellung / Shop zugeordnet
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<p class="font-weight-bold">Ist das vielleicht dieser Kunde?</p>
|
||||
@foreach($possibles as $possible)
|
||||
@if(isset($possible[0]))
|
||||
@php($possible = $possible[0])
|
||||
@endif
|
||||
|
||||
<div class="bg-light p-3 mb-3" style="border-radius: 6px">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p class="font-weight-bold">Rechnungsadresse:</p>
|
||||
<p>
|
||||
@if($possible->billing_company)
|
||||
Firma: {{ $possible->billing_company }}<br>
|
||||
@endif
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($possible->billing_salutation) }}
|
||||
{{ $possible->billing_firstname }}
|
||||
<strong class="text-match">{{ $possible->billing_lastname }}</strong> <span class="text-muted">#{{$possible->number}}</span> <br>
|
||||
{{ $possible->billing_address }}
|
||||
@if($possible->billing_address_2)
|
||||
/ {{ $possible->billing_address_2 }}<br>
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
<strong class="text-match">{{ $possible->billing_zipcode }}</strong>
|
||||
{{ $possible->billing_city }}<br>
|
||||
<strong class="text-danger">{{ $possible->billing_email }}</strong><br>
|
||||
{{ $possible->billing_phone }}<br>
|
||||
{{ $possible->billing_country->getLocated() }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<p class="font-weight-bold">Lieferadresse:</p>
|
||||
<p>
|
||||
@if($possible->same_as_billing)
|
||||
{{__('email.checkout_mail_same_address')}}
|
||||
@else
|
||||
@if($possible->shipping_company)
|
||||
Firma: {{ $possible->shipping_company }}<br>
|
||||
@endif
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($possible->shipping_salutation) }}
|
||||
{{ $possible->shipping_firstname }}
|
||||
{{ $possible->shipping_lastname }}<br>
|
||||
{{ $possible->shipping_address }}
|
||||
@if($possible->shipping_address_2)
|
||||
/ {{ $possible->shipping_address_2 }}<br>
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
{{ $possible->shipping_zipcode }}
|
||||
{{ $possible->shipping_city }}<br>
|
||||
{{ $possible->shipping_email }}<br>
|
||||
{{ $possible->shipping_phone }}<br>
|
||||
{{ $possible->shipping_country->getLocated() }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<hr>
|
||||
<p class="font-weight-bold">Zugeordneter Berater:</p>
|
||||
<p>
|
||||
@if($possible->member_id)
|
||||
<span class="text-muted">#{{$possible->member->number}}</span><br>
|
||||
{{$possible->member->getFullName()}}<br>
|
||||
{{$possible->member->account->zipcode}} {{$possible->member->account->city}}<br>
|
||||
@if($possible->member->shop)
|
||||
@if($possible->member->isActive() && $possible->member->isActiveShop())
|
||||
<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>
|
||||
@endif
|
||||
@else
|
||||
Keinen Shop eingerichtet
|
||||
@endif
|
||||
|
||||
<label class="custom-control custom-radio mt-3">
|
||||
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$possible->id}}">
|
||||
<span class="custom-control-label">Stimmt, das ist der gleiche Kunde, Berater <span class="text-muted">#{{$possible->member->number}}</span> zuordnen</span>
|
||||
</label>
|
||||
@else
|
||||
Keinem Berater zugeordnet
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<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 class="custom-control custom-checkbox mt-3">
|
||||
<input type="checkbox" class="custom-control-input" name="send_member_mail" value="send" checked>
|
||||
<span class="custom-control-label">zugeordneten Berater die Bestellung als E-Mail zusenden</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
73
resources/views/admin/modal/member.blade.php
Normal file
73
resources/views/admin/modal/member.blade.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Berater') }}
|
||||
<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>
|
||||
<input type="hidden" name="customer_set_member_for" value="0">
|
||||
@if($data['view'] === 'sales_customer')
|
||||
@if($value->member_id && $value->shopping_user && $value->shopping_user->number)
|
||||
<div class="custom-controls-stacked">
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="0" type="radio" class="custom-control-input" checked="">
|
||||
<span class="custom-control-label">Nur dieser Bestellung einen neuen Berater zuweisen</span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="1" type="radio" class="custom-control-input">
|
||||
<span class="custom-control-label">Jeder Bestellung vom Kunden #{{$value->shopping_user->number}} einen neuen Berater zuweisen</span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@if($data['view'] === 'customer')
|
||||
@if($value->member_id && $value->number)
|
||||
<div class="custom-controls-stacked">
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="0" type="radio" class="custom-control-input" checked="">
|
||||
<span class="custom-control-label">Nur diesen Kunden Bestellung einen neuen Berater zuweisen</span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="1" type="radio" class="custom-control-input">
|
||||
<span class="custom-control-label">Jeder Bestellung diesen Kunden #{{$value->number}} einen neuen Berater zuweisen</span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</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>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
<h6 class="card-header">
|
||||
{{__('Produkte')}}
|
||||
<label class="custom-control custom-checkbox float-right mb-0">
|
||||
<input type="checkbox" class="custom-control-input show-active-products" name="show_active_products" @if(Auth::user()->getSetting('show_active_products') === "true") checked @endif>
|
||||
<input type="checkbox" class="custom-control-input show-active-products" name="show_active_products" @if(get_user_attr('show_active_products') === "true") checked @endif>
|
||||
<span class="custom-control-label font-style-normal font-weight-normal">nur aktive anzeigen</span>
|
||||
</label>
|
||||
</h6>
|
||||
|
|
|
|||
333
resources/views/admin/sales/_detail.blade.php
Normal file
333
resources/views/admin/sales/_detail.blade.php
Normal file
|
|
@ -0,0 +1,333 @@
|
|||
|
||||
<div class="card">
|
||||
<!-- Status -->
|
||||
<div class="card-body">
|
||||
<strong class="mr-2">Status:</strong>
|
||||
<span class="text-big">
|
||||
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order); !!}
|
||||
</span>
|
||||
<span class="text-muted ml-1">{{$shopping_order->created_at->format("d.m.Y")}}</span>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Status -->
|
||||
|
||||
<!-- Info -->
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Bestelldatum</div>
|
||||
{{$shopping_order->created_at->format("d.m.Y H:i")}}
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Anzahl Artikel</div>
|
||||
{{$shopping_order->getItemsCount()}}
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Preis gesamt</div>
|
||||
{{$shopping_order->getFormattedTotalShipping()}} €
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Info -->
|
||||
|
||||
@if($isAdmin)
|
||||
<!-- Member -->
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-8 mb-3">
|
||||
@if(isset($change_member_error) && $change_member_error)
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2">
|
||||
<ul>
|
||||
<li>{{ $change_member_error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-muted small">Zugewiesener Berater</div>
|
||||
@if($isView === 'sales_user')
|
||||
@if($shopping_order->user_shop)
|
||||
{{$shopping_order->user_shop->title}}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if($isView === 'sales_customer')
|
||||
@if($shopping_order->shopping_user && $shopping_order->shopping_user->is_like)
|
||||
<button type="button" class="btn btn-xs btn-outline-info" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{$shopping_order->shopping_user->id}}"
|
||||
data-action="shopping-user-is-like-member"
|
||||
data-back="{{route('admin_sales_customers_detail', [$shopping_order->id])}}"
|
||||
data-modal="modal-xl"
|
||||
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Berater zuordnen</button>
|
||||
@else
|
||||
@if($shopping_order->member)
|
||||
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_order->member->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
||||
{{$shopping_order->member->getFullName()}} <span class="text-muted">#{{$shopping_order->member->number}}</span>
|
||||
@endif
|
||||
<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-member"
|
||||
data-view="{{$isView}}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="text-muted small">Gekauft im Shop</div>
|
||||
@if($shopping_order->user_shop->user->isActive() && $shopping_order->user_shop->user->isActiveShop())
|
||||
<a href="{{$shopping_order->user_shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$shopping_order->user_shop->getSubdomain(false)}}</a>
|
||||
@else
|
||||
<span class="badge badge-danger" target="_blank">{{$shopping_order->user_shop->getSubdomain(false)}}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Member -->
|
||||
@endif
|
||||
|
||||
<!-- Billing -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Rechnungsadresse
|
||||
</h6>
|
||||
<div class="row">
|
||||
@if($shopping_order->shopping_user->billing_company)
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="text-muted small">Firma</div>
|
||||
{{ $shopping_order->shopping_user->billing_company }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Anrede</div>
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->shopping_user->billing_salutation) }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Vorname</div>
|
||||
{{ $shopping_order->shopping_user->billing_firstname }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Nachname</div>
|
||||
{{ $shopping_order->shopping_user->billing_lastname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Straße</div>
|
||||
{{ $shopping_order->shopping_user->billing_address }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Zusatz</div>
|
||||
{{ $shopping_order->shopping_user->billing_address_2 }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">PLZ</div>
|
||||
{{ $shopping_order->shopping_user->billing_zipcode }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Stadt</div>
|
||||
{{ $shopping_order->shopping_user->billing_city }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">E-Mail</div>
|
||||
{{ $shopping_order->shopping_user->billing_email }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Telefon</div>
|
||||
{{ $shopping_order->shopping_user->billing_phone }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Land</div>
|
||||
{{ $shopping_order->shopping_user->billing_country->getLocated() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Billing -->
|
||||
|
||||
<!-- Shipping -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Lieferadresse
|
||||
</h6>
|
||||
@if($shopping_order->shopping_user->same_as_billing)
|
||||
{{__('email.checkout_mail_same_address')}}
|
||||
@else
|
||||
<div class="row">
|
||||
@if($shopping_order->shopping_user->shipping_company)
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="text-muted small">Firma</div>
|
||||
{{ $shopping_order->shopping_user->shipping_company }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Anrede</div>
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->shopping_user->shipping_salutation) }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Vorname</div>
|
||||
{{ $shopping_order->shopping_user->shipping_firstname }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Nachname</div>
|
||||
{{ $shopping_order->shopping_user->shipping_lastname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Straße</div>
|
||||
{{ $shopping_order->shopping_user->shipping_address }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Zusatz</div>
|
||||
{{ $shopping_order->shopping_user->shipping_address_2 }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">PLZ</div>
|
||||
{{ $shopping_order->shopping_user->shipping_zipcode }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Stadt</div>
|
||||
{{ $shopping_order->shopping_user->shipping_city }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">E-Mail</div>
|
||||
{{ $shopping_order->shopping_user->shipping_email }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Telefon</div>
|
||||
{{ $shopping_order->shopping_user->shipping_phone }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Land</div>
|
||||
{{ $shopping_order->shopping_user->shipping_country->getLocated() }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Shipping -->
|
||||
|
||||
<!-- Items -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Artikel
|
||||
</h6>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered m-0" style="min-width:550px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Produkt</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Preis</th>
|
||||
</tr>
|
||||
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td class="px-3 py-2">
|
||||
<div class="media align-items-center">
|
||||
@if($shopping_order_item->product->images)
|
||||
@if($image = $shopping_order_item->product->images->first())
|
||||
<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->name }}
|
||||
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
|
||||
<small>
|
||||
<span class="text-muted">Inhalt: </span> {{ $shopping_order_item->product->contents }}<br>
|
||||
<span class="text-muted">Gewicht: </span> {{ $shopping_order_item->product->weight }} g<br>
|
||||
<span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<!-- Set column width -->
|
||||
<td class="align-middle px-3 py-2" style="width: 66px;">
|
||||
{{ $shopping_order_item->qty }}
|
||||
</td>
|
||||
<!-- Set column width -->
|
||||
<td class="text-right font-weight-semibold align-middle px-3 py-2" style="width: 100px;">
|
||||
{{ $shopping_order_item->getFormattedPrice() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
|
||||
<!-- / Payment -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Zahlung
|
||||
</h6>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width: 60px">#</th>
|
||||
<th>Zahlungsart</th>
|
||||
@if($isAdmin)<th>Referenznummer</th>@endif
|
||||
<th>Gesamt</th>
|
||||
<th>Status</th>
|
||||
<th>Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php($count=0)
|
||||
@foreach($shopping_order->shopping_payments as $shopping_payment)
|
||||
<tr>
|
||||
<th scope="row">{{++$count}}</th>
|
||||
<td>{{$shopping_payment->getPaymentType()}}</td>
|
||||
@if($isAdmin)<td>{{$shopping_payment->reference}}</td>@endif
|
||||
<td>{{$shopping_payment->getPaymentAmount()}}</td>
|
||||
<td>{!! \App\Services\Payment::getShoppingPaymentBadge($shopping_payment) !!}</td>
|
||||
<td>{{$shopping_payment->created_at->format("d.m.Y H:i")}}</td>
|
||||
</tr>
|
||||
@if($isAdmin && $shopping_payment->payment_transactions)
|
||||
@php($ccount=0)
|
||||
<tr>
|
||||
<th scope="row" class="m-0">{{$count}}.{{++$ccount}}</th>
|
||||
<td colspan="5" class="m-0 p-0">
|
||||
<table class="table table-info table-borderless mb-0 small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width: 80px">Request</th>
|
||||
<th style="min-width: 80px">Status</th>
|
||||
<th style="min-width: 200px">TX-Action</th>
|
||||
<th style="min-width: 120px">Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($shopping_payment->payment_transactions as $payment_transaction)
|
||||
<tr>
|
||||
<td>{{$payment_transaction->request}}</td>
|
||||
<td>{{$payment_transaction->status}}</td>
|
||||
<td>{{$payment_transaction->txaction}} {{$payment_transaction->errormessage}}</td>
|
||||
<td>{{$payment_transaction->created_at->format("d.m.Y H:i")}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,15 +1,11 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Bestellung Kunde') }}
|
||||
<a href="{{route('admin_sales_customers')}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
{{ __('Bestellung Kunde') }} <span class="text-muted">#{{$shopping_order->id}}</span>
|
||||
</h4>
|
||||
@include('admin.sales._detail')
|
||||
<a href="{{route('admin_sales_customers')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<p>Ansicht Bestellung</p>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -6,12 +6,46 @@
|
|||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Bestellungen Kunden') }}
|
||||
</h4>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatable-customers table table-striped table-bordered">
|
||||
<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="custom-select" name="filter_member_id" id="filter_member_id">
|
||||
<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-sm-4 mb-2">
|
||||
<label class="form-label" for="filter_user_shop_id">Filter Gekauft im Shop</label>
|
||||
<select class="custom-select" name="filter_user_shop_id" id="filter_user_shop_id">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach($filter_user_shops as $id=>$name)
|
||||
<option value="{{$id}}" @if(get_user_attr('filter_user_shop_id') == $id) selected @endif>{{$name}}.{{config('app.domain').config('app.tld_care')}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-10 col-sm-3 mb-2">
|
||||
<label class="form-label" for="filter_txaction">Filter Status</label>
|
||||
<select class="custom-select" name="filter_txaction" id="filter_txaction">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach(\App\Services\Payment::$txaction_text as $id=>$name)
|
||||
<option value="{{$id}}" @if(get_user_attr('filter_txaction') == $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-customers table table-striped table-bordered" id="datatable-customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
|
|
@ -22,7 +56,8 @@
|
|||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('Betrag')}}</th>
|
||||
<th>{{__('Käufe')}}</th>
|
||||
<th>{{__('Shop')}}</th>
|
||||
<th>{{__('zugewiesener Berater')}}</th>
|
||||
<th>{{__('Gekauft im Shop')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
|
@ -30,29 +65,45 @@
|
|||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatable-customers').dataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": '{!! route('admin_sales_customers_datatable') !!}',
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false },
|
||||
{ data: 'billing_firstname', name: 'shopping_user.billing_firstname' },
|
||||
{ data: 'billing_lastname', name: 'shopping_user.billing_lastname' },
|
||||
{ data: 'billing_email', name: 'shopping_user.billing_email' },
|
||||
{ data: 'created_at', name: 'shopping_orders.created_at' },
|
||||
{ data: 'txaction', name: 'txaction' },
|
||||
{ data: 'total_shipping', name: 'shopping_orders.total_shipping' },
|
||||
{ data: 'orders', name: 'shopping_user.orders' },
|
||||
{ data: 'user_shop_id', name: 'user_shop_id' },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
var oTable = $('#datatable-customers').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'admin_sales_customers_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_txaction = $('select[name=filter_txaction]').val();
|
||||
}
|
||||
},
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', name: 'id', 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: 'created_at', name: 'created_at' },
|
||||
{ data: 'txaction', name: 'txaction' },
|
||||
{ data: 'total_shipping', name: 'total_shipping' },
|
||||
{ data: 'shopping_user.orders', name: 'shopping_user.orders' },
|
||||
{ data: 'member_id', name: 'member_id', searchable: false, orderable: false },
|
||||
{ data: 'user_shop_id', name: 'user_shop_id', searchable: false, orderable: true },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.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
|
||||
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Bestellung Berater') }}
|
||||
<a href="{{route('admin_sales_users')}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
{{ __('Bestellung Berater') }} <span class="text-muted">#{{$shopping_order->id}}</span>
|
||||
</h4>
|
||||
@include('admin.sales._detail')
|
||||
<a href="{{route('admin_sales_users')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<p>Ansicht Bestellung</p>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('Betrag')}}</th>
|
||||
<th>{{__('Käufe')}}</th>
|
||||
<th>{{__('User-Shop')}}</th>
|
||||
<th>{{__('Berater-Shop')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
|
@ -37,13 +37,13 @@
|
|||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false },
|
||||
{ data: 'billing_firstname', name: 'shopping_user.billing_firstname' },
|
||||
{ data: 'billing_lastname', name: 'shopping_user.billing_lastname' },
|
||||
{ data: 'billing_email', name: 'shopping_user.billing_email' },
|
||||
{ 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: 'shopping_orders.created_at' },
|
||||
{ data: 'txaction', name: 'txaction' },
|
||||
{ data: 'total_shipping', name: 'shopping_orders.total_shipping' },
|
||||
{ data: 'orders', name: 'shopping_user.orders' },
|
||||
{ data: 'total_shipping', name: 'total_shipping' },
|
||||
{ data: 'shopping_user.orders', name: 'shopping_user.orders' },
|
||||
{ data: 'auth_user_shop', name: 'auth_user_shop' },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue