API Shopping Order backend

This commit is contained in:
Kevin Adametz 2022-07-15 21:21:56 +02:00
parent 7a040c3e19
commit d01b4bd560
24 changed files with 1584 additions and 34 deletions

View file

@ -10,11 +10,6 @@
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
{{-- <div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
<input class="form-control on_keyup_invoice" name="business_user_filter_name" type="text" value="{{session('business_user_filter_name')}}" placeholder="Name">
</div>
--}}
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_month">
@foreach($filter_months as $key=>$value)

View file

@ -564,17 +564,17 @@
</div>
</div>
@endif
@if($shopping_order->wp_notice['wp_advertising'])
@if($shopping_order->api_notice['wp_advertising'])
<div class="row">
<div class="col-sm-12">
<b>Werbemittel: {!! $shopping_order->wp_notice['wp_advertising'] !!}<br></b>
<b>Werbemittel: {!! $shopping_order->api_notice['wp_advertising'] !!}<br></b>
</div>
</div>
@endif
@if($shopping_order->wp_notice['wp_incentives'])
@if($shopping_order->api_notice['wp_incentives'])
<div class="row">
<div class="col-sm-12">
<b>Incentives: {!! $shopping_order->wp_notice['wp_incentives'] !!}<br></b>
<b>Incentives: {!! $shopping_order->api_notice['wp_incentives'] !!}<br></b>
</div>
</div>
@endif

View file

@ -471,18 +471,18 @@
</td>
<tr>
@endif
@if($shopping_order->wp_notice['wp_advertising'])
@if($shopping_order->api_notice['wp_advertising'])
<tr>
<td class="sub_headline">
<b>Werbemittel: {!! $shopping_order->wp_notice['wp_advertising'] !!}<br></b>
<b>Werbemittel: {!! $shopping_order->api_notice['wp_advertising'] !!}<br></b>
<hr>
</td>
<tr>
@endif
@if($shopping_order->wp_notice['wp_incentives'])
@if($shopping_order->api_notice['wp_incentives'])
<tr>
<td class="sub_headline">
<b>Incentives: {!! $shopping_order->wp_notice['wp_incentives'] !!}<br></b>
<b>Incentives: {!! $shopping_order->api_notice['wp_incentives'] !!}<br></b>
<hr>
</td>
<tr>

View file

@ -41,6 +41,11 @@
<li class="sidenav-item{{ Request::is('user/shop/orders', 'user/shop/order/*') ? ' active' : '' }}">
<a href="{{ route('user_shop_orders') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-cart"></i><div>{{ __('navigation.orders') }}</div></a>
</li>
@if(Auth::user()->isUserHasApi())
<li class="sidenav-item{{ Request::is('user/shop/api/orders', 'user/shop/order/*') ? ' active' : '' }}">
<a href="{{ route('user_shop_api_orders') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-appstore"></i><div>Externe Bestellungen </div></a>
</li>
@endif
</ul>
</li>
@endif

View file

@ -0,0 +1,283 @@
@extends('layouts.layout-2')
@section('content')
<style>
.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;
}
</style>
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('navigation.my_homeparty') }} / {{ $homeparty->name }} - {{ $homeparty->date }}</div>
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default float-right">zurück</a>
</h4>
@if(Session::has('custom-error'))
<div class="alert alert-dark-warning alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ Session::get('custom-error') }}</strong>
</div>
@endif
@if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
<h6 class="alert badge-{{$userHistoryPaymentOrder->getStatusColor()}}">Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryPaymentOrder->getStatusType())}}</h6>
@endif
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Bestellland</div>
{{ App\Services\UserService::getOrderInfo('billing_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Lieferland</div>
{{ App\Services\UserService::getOrderInfo('shipping_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">MwSt</div>
{{ App\Services\UserService::getOrderInfo('tax_free') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Reverse Charge Verfahren</div>
{{ App\Services\UserService::getOrderInfo('user_reverse_charge') }}
</div>
</div>
<i>Das Lieferland kann nicht mehr geändert werden.</i>
</div>
</div>
{!! Form::open(['url' => route('user_homeparty_order', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-order-form']) !!}
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung anlegen</div>
@if(!$homeparty->completed)
<div class="float-right">
<a href="{{route('user_homeparty_detail', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-ios-cog"></i> Verwalten</a>
<a href="{{route('user_homeparty_guests', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-md-person-add"></i> Gäste anlegen</a>
</div>
@endif
</div>
</div>
</div>
</h5>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h6>Lieferadresse
@if(!$homeparty->completed)
<a href="{{route('user_homeparty_detail', [$homeparty->id, 13])}}"><i class="fa fa-edit"></i> </a>
@endif
</h6>
@include('user.homeparty._address', ['homeparty_user' => $homeparty->homeparty_host])
</div>
{{-- TODO Berechnung Bonus --}}
<div class="col-md-6">
<h6>Aktuelle Bonusansicht</h6>
<div id="insert_show_bonus">
@include('user.homeparty.show_bonus', ['homeparty' => $homeparty])
</div>
</div>
</div>
</div>
</div>
@if($homeparty->homeparty_host)
<div class="card mb-3">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung Gastgeber:in {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</div>
</div>
</div>
@if(!$homeparty->completed)
<div class="col-12">
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $homeparty->id }}"
data-action="homeparty-add-product"
data-user_id="{{$homeparty->homeparty_host->id}}"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> Produkt hinzufügen</button>
</div>
@endif
</div>
</h5>
<div class="card-body">
<div class="insert_show_products_order" id="insert_show_products_order_{{$homeparty->homeparty_host->id}}" data-homeparty-id="{{ $homeparty->id }}" data-homeparty-user-id="{{$homeparty->homeparty_host->id}}">
@include('user.homeparty.show_products_order', ['homeparty_guest' => $homeparty->homeparty_host])
</div>
</div>
</div>
@endif
@if($homeparty->homeparty_guests)
@php($g_count = 1)
@foreach($homeparty->homeparty_guests as $homeparty_guest)
<div class="card mb-3">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung {!! $g_count++ !!}. Gast {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</div>
</div>
</div>
@if(!$homeparty->completed)
<div class="col-12">
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $homeparty->id }}"
data-action="homeparty-add-product"
data-user_id="{{$homeparty_guest->id}}"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> Produkt hinzufügen</button>
</div>
@endif
</div>
</h5>
<div class="card-body">
<div class="insert_show_products_order" id="insert_show_products_order_{{$homeparty_guest->id}}" data-homeparty-id="{{ $homeparty->id }}" data-homeparty-user-id="{{$homeparty_guest->id}}">
@include('user.homeparty.show_products_order', ['homeparty_guest' => $homeparty_guest])
</div>
</div>
</div>
@endforeach
@endif
<hr>
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Gesamtübersicht</div>
</div>
</div>
</div>
</h5>
<div class="card-body">
<div id="insert_show_total_order">
@include('user.homeparty.show_total_order', ['homeparty' => $homeparty])
</div>
@if(!$homeparty->completed)
<hr>
@if($homeparty->homeparty_host && $homeparty->homeparty_host->isAddress())
<div class="float-right">
<button type="submit" class="btn btn-secondary"><i class="ion ion-ios-redo"></i> bestätigen und weiter zur Kasse</button>
</div>
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
@else
<div class="alert alert-warning">
Die Bestellung kann erst abgesendet werden, wenn die Lieferadresse Gastgeber/in angelegt ist. <a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty->homeparty_host->id])}}"><i class="fa fa-edit"></i> </a></h6>
</div>
@endif
@endif
</div>
</div>
<div class="text-left mt-3">
@if(!$homeparty->completed)
<a href="{{route('user_homeparty_detail', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-2"><i class="ion ion-ios-cog"></i> Homparty verwalten</a>
@endif
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default mb-2">zurück zur Übersicht</a>
</div>
{!! Form::close() !!}
@endsection
@section('scripts')
<script src="{{ asset('/js/iq-homeparty-cart.js') }}?v=1{{ get_file_last_time('/js/iq-homeparty-cart.js') }}"></script>
<script type="application/javascript">
var iqHomepartyCart = IqHomepartyCart.init();
$( document ).ready(function() {
});
</script>
@endsection

View file

@ -0,0 +1,283 @@
@extends('layouts.layout-2')
@section('content')
<style>
.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;
}
</style>
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('navigation.my_homeparty') }} / {{ $homeparty->name }} - {{ $homeparty->date }}</div>
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default float-right">zurück</a>
</h4>
@if(Session::has('custom-error'))
<div class="alert alert-dark-warning alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ Session::get('custom-error') }}</strong>
</div>
@endif
@if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
<h6 class="alert badge-{{$userHistoryPaymentOrder->getStatusColor()}}">Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryPaymentOrder->getStatusType())}}</h6>
@endif
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Bestellland</div>
{{ App\Services\UserService::getOrderInfo('billing_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Lieferland</div>
{{ App\Services\UserService::getOrderInfo('shipping_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">MwSt</div>
{{ App\Services\UserService::getOrderInfo('tax_free') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Reverse Charge Verfahren</div>
{{ App\Services\UserService::getOrderInfo('user_reverse_charge') }}
</div>
</div>
<i>Das Lieferland kann nicht mehr geändert werden.</i>
</div>
</div>
{!! Form::open(['url' => route('user_homeparty_order', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-order-form']) !!}
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung anlegen</div>
@if(!$homeparty->completed)
<div class="float-right">
<a href="{{route('user_homeparty_detail', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-ios-cog"></i> Verwalten</a>
<a href="{{route('user_homeparty_guests', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-md-person-add"></i> Gäste anlegen</a>
</div>
@endif
</div>
</div>
</div>
</h5>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h6>Lieferadresse
@if(!$homeparty->completed)
<a href="{{route('user_homeparty_detail', [$homeparty->id, 13])}}"><i class="fa fa-edit"></i> </a>
@endif
</h6>
@include('user.homeparty._address', ['homeparty_user' => $homeparty->homeparty_host])
</div>
{{-- TODO Berechnung Bonus --}}
<div class="col-md-6">
<h6>Aktuelle Bonusansicht</h6>
<div id="insert_show_bonus">
@include('user.homeparty.show_bonus', ['homeparty' => $homeparty])
</div>
</div>
</div>
</div>
</div>
@if($homeparty->homeparty_host)
<div class="card mb-3">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung Gastgeber:in {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</div>
</div>
</div>
@if(!$homeparty->completed)
<div class="col-12">
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $homeparty->id }}"
data-action="homeparty-add-product"
data-user_id="{{$homeparty->homeparty_host->id}}"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> Produkt hinzufügen</button>
</div>
@endif
</div>
</h5>
<div class="card-body">
<div class="insert_show_products_order" id="insert_show_products_order_{{$homeparty->homeparty_host->id}}" data-homeparty-id="{{ $homeparty->id }}" data-homeparty-user-id="{{$homeparty->homeparty_host->id}}">
@include('user.homeparty.show_products_order', ['homeparty_guest' => $homeparty->homeparty_host])
</div>
</div>
</div>
@endif
@if($homeparty->homeparty_guests)
@php($g_count = 1)
@foreach($homeparty->homeparty_guests as $homeparty_guest)
<div class="card mb-3">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung {!! $g_count++ !!}. Gast {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</div>
</div>
</div>
@if(!$homeparty->completed)
<div class="col-12">
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $homeparty->id }}"
data-action="homeparty-add-product"
data-user_id="{{$homeparty_guest->id}}"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> Produkt hinzufügen</button>
</div>
@endif
</div>
</h5>
<div class="card-body">
<div class="insert_show_products_order" id="insert_show_products_order_{{$homeparty_guest->id}}" data-homeparty-id="{{ $homeparty->id }}" data-homeparty-user-id="{{$homeparty_guest->id}}">
@include('user.homeparty.show_products_order', ['homeparty_guest' => $homeparty_guest])
</div>
</div>
</div>
@endforeach
@endif
<hr>
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Gesamtübersicht</div>
</div>
</div>
</div>
</h5>
<div class="card-body">
<div id="insert_show_total_order">
@include('user.homeparty.show_total_order', ['homeparty' => $homeparty])
</div>
@if(!$homeparty->completed)
<hr>
@if($homeparty->homeparty_host && $homeparty->homeparty_host->isAddress())
<div class="float-right">
<button type="submit" class="btn btn-secondary"><i class="ion ion-ios-redo"></i> bestätigen und weiter zur Kasse</button>
</div>
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
@else
<div class="alert alert-warning">
Die Bestellung kann erst abgesendet werden, wenn die Lieferadresse Gastgeber/in angelegt ist. <a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty->homeparty_host->id])}}"><i class="fa fa-edit"></i> </a></h6>
</div>
@endif
@endif
</div>
</div>
<div class="text-left mt-3">
@if(!$homeparty->completed)
<a href="{{route('user_homeparty_detail', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-2"><i class="ion ion-ios-cog"></i> Homparty verwalten</a>
@endif
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default mb-2">zurück zur Übersicht</a>
</div>
{!! Form::close() !!}
@endsection
@section('scripts')
<script src="{{ asset('/js/iq-homeparty-cart.js') }}?v=1{{ get_file_last_time('/js/iq-homeparty-cart.js') }}"></script>
<script type="application/javascript">
var iqHomepartyCart = IqHomepartyCart.init();
$( document ).ready(function() {
});
</script>
@endsection

View file

@ -0,0 +1,23 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ __('Bestellung Kunde') }} <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">
@include('admin.sales._detail')
</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

@ -0,0 +1,194 @@
@extends('layouts.layout-2')
@section('content')
<style>
tr.border-none td {
border:none;
}
tr.td-small td {
font-size: 0.9em;
padding-top: 0.2em;
padding-bottom: 0.2em;
}
</style>
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('Externe Bestellungen') }} | bestellen</div>
<a href="{{route('user_shop_api_orders')}}" class="btn btn-sm btn-default float-right">zurück</a>
</h4>
@if(Session::has('custom-error'))
<div class="alert alert-dark-warning alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ Session::get('custom-error') }}</strong>
</div>
@endif
{{-- Not includes in shopApiOrderCart
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Bestellland</div>
{{ App\Services\UserService::getOrderInfo('billing_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Lieferland</div>
{{ App\Services\UserService::getOrderInfo('shipping_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">MwSt</div>
{{ App\Services\UserService::getOrderInfo('tax_free') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Reverse Charge Verfahren</div>
{{ App\Services\UserService::getOrderInfo('user_reverse_charge') }}
</div>
</div>
<i>Das Lieferland kann nicht mehr geändert werden.</i>
</div>
</div>--}}
@if($shopApiOrderCart)
@foreach($shopApiOrderCart->orders as $order)
<div class="card mb-3">
<div class="card-body pb-1">
<div class="row">
</div>
<div class="row">
<div class="col-md-12 mb-3">
Bestellnummer: {{ $order->order_id }} | WP Number: {{ $order->wp_order_number }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Bestelldatum</div>
{{$order->shopping_order->created_at->format("d.m.Y H:i")}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Anzahl Artikel</div>
{{$order->shopping_order->getItemsCount()}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Preis gesamt</div>
{{$order->shopping_order->getFormattedTotalShipping()}} &euro;
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Points gesamt</div>
{{ $order->shopping_order->points }}
</div>
<div class="col-md-12 mb-3">
<div class="text-muted small">Rechnungsadresse</div>
{{ $order->billing_address }}
</div>
<div class="col-md-12 mb-3">
<div class="text-muted small">Lieferadresse</div>
{{ $order->shipping_address }}
</div>
</div>
</div>
<div class="card-body pt-1">
<div class="table-responsive">
<table class="table table-product m-0" style="">
<tbody>
<tr class="">
<th class="text-left">Produkt</th>
<th class="text-right">
VK-Preis brutto
</th>
<th class="text-right">Anzahl</th>
<th class="text-right">Summe</th>
</tr>
@foreach($order->shopping_order->shopping_order_items as $shopping_order_item)
<tr class="">
<td class="py-2">
<strong>{{ $shopping_order_item->product->name }}</strong>
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span>
</td>
<td class="align-middle py-2 nowrap text-right" style="min-width:100px;">
{{ $shopping_order_item->getFormattedPrice() }} &euro;
</td>
<td class="align-middle py-2 text-right" style="min-width: 60px;">
{{ $shopping_order_item->qty }}
</td>
<td class="font-weight-semibold align-middle py-2 text-right" style="min-width:120px;">
{{ $shopping_order_item->getFormattedTotalPrice() }} &euro;
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="td-small">
<td colspan="3">
{{__('email.checkout_mail_shipping')}}
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
{{ $order->shopping_order->getFormattedShipping() }} &euro;
</td>
</tr>
<tr class="border-none td-small">
<td colspan="3">
{{__('email.checkout_mail_subtotal_ws')}}
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
{{ $order->shopping_order->getFormattedSubtotalWs() }} &euro;
</td>
</tr>
<tr class="border-none td-small">
<td colspan="3">
{{__('email.checkout_mail_tax')}}
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
{{ $order->shopping_order->getFormattedTax() }} &euro;
</td>
</tr>
<tr>
<td colspan="3">
<b>{{__('email.checkout_mail_total')}}</b>
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
<b>{{ $order->shopping_order->getFormattedTotalShipping() }} &euro;</b>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
@endforeach
@endif
<hr>
{!! Form::open(['url' => route('user_shop_api_orders_checkout'), 'class' => 'form-horizontal', 'id'=>'api-order-list-form']) !!}
@foreach($shopApiOrderCart->orders as $order)
{{ Form::hidden('api_action_list[]', $order->order_id) }}
@endforeach
<div class="card mb-4">
<h4 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Warenkorb</div>
</div>
</div>
</div>
</h4>
<div class="card-body">
@include('user.shop.sales.api_order_list_total')
<hr>
<div class="float-right">
<button type="submit" class="btn btn-secondary"><i class="ion ion-ios-redo"></i> bestätigen und weiter zur Kasse</button>
</div>
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
</div>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,125 @@
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th class="text-left">{{__('Produkt')}}</th>
<th class="text-right">{{__('Points')}}</th>
<th class="text-right">{{__('Netto-Preis')}}</th>
<th class="text-right">{{__('Anzahl')}}</th>
<th class="text-right">{{__('Summe Netto')}}</th>
<th class="text-right" style="max-width: 5%">{{__('%')}}</th>
<th class="text-right" style="max-width: 10%">{{__('MwSt')}}</th>
</tr>
</thead>
<tbody>
@foreach($shopApiOrderCart->shop_items as $shop_item)
<tr>
<td>
<strong>{{$shop_item->name}}</strong>
<span class="text-muted">#{{ $shop_item->number }}</span>
</td>
<td class="text-right">
{{$shop_item->points_total}}
</td>
<td class="text-right">
{{ formatNumber($shop_item->user_price_net) }} &euro;
</td>
<td class="text-right">
{{$shop_item->qty}}
</td>
<td class="text-right">
<strong>{{ formatNumber($shop_item->user_price_total_net) }} &euro;</strong>
</td>
<td class="text-right">
{{ formatNumber($shop_item->tax_rate, 0) }}
</td>
<td class="text-right">
{{ formatNumber($shop_item->user_tax_total) }} &euro;
</td>
</tr>
@endforeach
<tr>
<td>
<strong>Gesamte Versandkosten</strong>
</td>
<td class="text-right">
</td>
<td class="text-right">
1
</td>
<td class="text-right">
</td>
<td class="text-right">
<strong>{{ formatNumber($shopApiOrderCart->shipping_net) }} &euro;</strong>
</td>
<td class="text-right">
</td>
<td class="text-right">
{{ formatNumber($shopApiOrderCart->shipping_tax) }} &euro;
</td>
</tr>
</tbody>
<tfoot>
<tr>
<tr>
<td colspan="7">
</td>
</tr>
<tr>
<td colspan="1">
Summen:
</td>
<td class="text-right" colspan="1">
<strong>{{ $shopApiOrderCart->points_total }} <strong>
</td>
<td class="text-right">
</td>
<td class="text-right">
<strong>{{ $shopApiOrderCart->qty_total }}</strong>
</td>
<td class="text-right">
<strong>{{ formatNumber($shopApiOrderCart->price_total_net) }} &euro;</strong>
</td>
<td class="text-right">
</td>
<td class="text-right">
<strong>{{ formatNumber($shopApiOrderCart->tax_total) }} &euro;</strong>
</td>
</tr>
<tr>
<td colspan="6">
<strong>Gesamte netto</strong>
</td>
<td class="text-right">
<strong>{{ formatNumber($shopApiOrderCart->price_total_net) }} &euro;</strong>
</td>
</tr>
<tr class="border-none td-small">
<td colspan="5">
zzgl. MwSt:
</td>
<td class="text-right" colspan="2">
@foreach ($shopApiOrderCart->tax_split as $rate => $tax )
{{ $rate }}% = {{ formatNumber($tax) }} &euro; <br>
@endforeach
</td>
</tr>
<tr>
<td colspan="6">
<strong>Gesamtsumme Brutto: </strong>
</td>
<td class="text-right">
<strong>{{ formatNumber($shopApiOrderCart->getTotalPrice()) }} &euro;<strong>
</td>
</tr>
</tr>
</table>

View file

@ -0,0 +1,102 @@
@extends('layouts.layout-2')
@section('content')
{!! Form::open(['url' => route('user_shop_api_orders_action'), 'class' => 'form-horizontal', 'id'=>'user_shop_api_orders-form']) !!}
<div class="card">
<h5 class="card-header">
{{ __('Externe Bestellungen') }}
add api_action change wp_notice to api_notice
</h5>
<div class="card-body p-0">
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select" name="user_shop_api_orders_action">
@foreach($api_action as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>&nbsp;
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_datatable" name="user_shop_api_orders_filter">
@foreach($filter_show as $key=>$value)
<option value="{{$key}}" @if(session('user_shop_api_orders_filter') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-12 mb-0 mt-1">
<p class="mb-0">
bestellen = Sammelbestellung aufgeben<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
</p>
</div>
</div>
<div class="card-datatable table-responsive pt-0">
<table class="datatable-shopping table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('Status') }}
<th>{{__('Versand') }}
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Detail')}}</th>
<th>{{__('Art')}}</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
var oTable = $('.datatable-shopping').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route('user_shop_api_orders_datatable') !!}',
data: function(d) {
d.user_shop_api_orders_filter = $('select[name=user_shop_api_orders_filter]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'api_action', name: 'api_action', searchable: false },
{ data: 'api_status', name: 'api_status', searchable: false },
{ 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: 'total_shipping', name: 'total_shipping' },
{ data: 'id', searchable: false },
{ data: 'payment_for', name: 'payment_for' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
$('select.on_change_datatable').on('change', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -0,0 +1,23 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ __('Bestellung Kunde') }} <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">
@include('admin.sales._detail')
</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

@ -21,7 +21,9 @@
<th>{{__('Datum')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Versand')}}</th>
<th>{{__('Rechnung')}}</th>
<th>{{__('Art')}}</th>
</tr>
</thead>
@ -43,6 +45,7 @@
{ 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' },
],