910 lines
48 KiB
PHP
910 lines
48 KiB
PHP
<div class="card">
|
||
<!-- Status -->
|
||
<div class="card-body">
|
||
<div class="row">
|
||
<div class="col-sm-6 col-md-4 col-lg-3 mb-1">
|
||
<strong class="mr-2">Status:</strong>
|
||
<span class="text-big">
|
||
{!! \App\Services\Payment::getPaymentForTypeBadge($shopping_order) !!}
|
||
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!}
|
||
</span>
|
||
</div>
|
||
<div class="col-sm-6 col-md-4 col-lg-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>
|
||
@endif
|
||
</div>
|
||
<div class="col-sm-6 col-md-4 col-lg-3 mb-1">
|
||
<strong class="mr-2">Rechnung:</strong>
|
||
@if ($isAdmin)
|
||
@if (App\Services\Invoice::isInvoice($shopping_order))
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'download']) }}"
|
||
class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'stream']) }}"
|
||
target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
|
||
@if (Auth::user()->isSuperAdmin())
|
||
<button type="button" class="btn btn-sm btn-danger" title="Rechnung überschreiben"
|
||
data-toggle="modal" data-target="#modals-invoice" data-id="{{ $shopping_order->id }}"
|
||
data-back="{{ url()->current() }}" data-action="create_invoice">
|
||
<span class="far fa-file-invoice"></span></strong>
|
||
</button>
|
||
@endif
|
||
@else
|
||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||
data-target="#modals-invoice" data-id="{{ $shopping_order->id }}" //TODO //
|
||
data-invoice="{{ $shopping_order->invoice_status }}" data-back="{{ url()->current() }}"
|
||
data-action="create_invoice">
|
||
<span class="far fa-file-invoice"></span> <strong>Rechnung erstellen</strong>
|
||
</button>
|
||
@endif
|
||
@else
|
||
@if (App\Services\Invoice::isInvoice($shopping_order))
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'download']) }}"
|
||
class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'stream']) }}"
|
||
target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
|
||
@endif
|
||
@endif
|
||
</div>
|
||
|
||
<div class="col-sm-6 col-md-4 col-lg-3 mb-1">
|
||
<strong class="mr-2">Stornorechnung:</strong>
|
||
@if ($isAdmin)
|
||
@if (App\Services\Invoice::isCancellationInvoice($shopping_order))
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'cancellation', 'download']) }}"
|
||
class="btn btn-success btn-sm"><i class="fa fa-download"></i></a>
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'cancellation', 'stream']) }}"
|
||
target="_blank" class="btn btn-info btn-sm"><i class="fa fa-eye"></i></a>
|
||
@else
|
||
@if (App\Services\Invoice::isInvoice($shopping_order))
|
||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal"
|
||
data-target="#modals-cancellation-invoice" data-id="{{ $shopping_order->id }}"
|
||
data-back="{{ url()->current() }}" data-action="create_cancellation_invoice">
|
||
<span class="fa fa-undo"></span> <strong>Stornorechnung erstellen</strong>
|
||
</button>
|
||
@else
|
||
<span class="text-muted">Erst Rechnung erstellen</span>
|
||
@endif
|
||
@endif
|
||
@else
|
||
@if (App\Services\Invoice::isCancellationInvoice($shopping_order))
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'cancellation', 'download']) }}"
|
||
class="btn btn-success btn-sm"><i class="fa fa-download"></i></a>
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'cancellation', 'stream']) }}"
|
||
target="_blank" class="btn btn-info btn-sm"><i class="fa fa-eye"></i></a>
|
||
@endif
|
||
@endif
|
||
</div>
|
||
|
||
<div class="col-sm-6 col-md-4 col-lg-3 mb-1">
|
||
@if ($isAdmin)
|
||
<strong class="mr-2">Lieferschein:</strong>
|
||
@if (App\Services\Invoice::isDelivery($shopping_order))
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'delivery', 'download']) }}"
|
||
class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'delivery', 'stream']) }}"
|
||
target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
|
||
|
||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice_delivery', 'download']) }}"
|
||
class="btn btn-dark btn-sm"><i class="fa fa-file-download"></i><i
|
||
class="fa fa-file-download"></i></a>
|
||
|
||
<a href="{{ route('admin_sales_send_logistic_mail', [$shopping_order->id]) }}"
|
||
class="btn btn-info btn-sm"><i class="fa fa-envelope"></i></a>
|
||
@endif
|
||
|
||
@endif
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<hr class="m-0">
|
||
<!-- / Status -->
|
||
|
||
<!-- Info -->
|
||
<div class="card-body pb-1">
|
||
<div class="row">
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">Bestelldatum</div>
|
||
{{ $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>
|
||
{{ $shopping_order->getItemsCount() }}
|
||
</div>
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">Preis gesamt</div>
|
||
{{ $shopping_order->getFormattedTotalShipping() }} €
|
||
</div>
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">White Label</div>
|
||
{{ $shopping_order->user_white_label ? 'Ja' : 'Nein' }}
|
||
</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 Vertriebspartner</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_detail', [$shopping_order->id]) }}"
|
||
data-modal="modal-xl" data-route="{{ route('modal_load') }}"><span
|
||
class="fa fa-edit"></span> Vertriebspartner 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"></div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<hr class="m-0">
|
||
<!-- / Member -->
|
||
@endif
|
||
|
||
<!-- Billing -->
|
||
<div class="card-body">
|
||
|
||
<h6 class="small font-weight-semibold">
|
||
@if ($shopping_order->shopping_user->is_from === 'shopping' || $shopping_order->shopping_user->is_from === 'extern')
|
||
Rechnungsadresse des Kunden
|
||
@else
|
||
Rechnungsadresse des Vertriebspartners
|
||
@endif
|
||
</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>
|
||
<!-- / Billing -->
|
||
|
||
<!-- Shipping -->
|
||
@if ($shopping_order->shopping_user->is_from !== 'homeparty')
|
||
<hr class="m-0">
|
||
|
||
<div class="card-body">
|
||
<h6 class="small font-weight-semibold">
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order' || $shopping_order->shopping_user->is_from === 'extern')
|
||
@if ($shopping_order->shopping_user->is_for === 'ot')
|
||
Lieferadresse des Kunden
|
||
@else
|
||
Lieferadresse des Vertriebspartner
|
||
@endif
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'wizard')
|
||
Lieferadresse des Vertriebspartner
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'membership')
|
||
Lieferadresse des Vertriebspartner
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'shopping')
|
||
@if ($shopping_order->isPickUp())
|
||
Kunde holt die Ware persönlich ab
|
||
@else
|
||
Lieferadresse des Kunden
|
||
@endif
|
||
@endif
|
||
</h6>
|
||
|
||
@if ($shopping_order->isPickUp())
|
||
@if ($shopping_order->promotion_user)
|
||
{!! nl2br($shopping_order->promotion_user->user_address) !!}
|
||
@endif
|
||
@else
|
||
@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
|
||
@endif
|
||
</div>
|
||
@endif
|
||
<hr class="m-0">
|
||
<!-- / Shipping -->
|
||
|
||
<!-- Items -->
|
||
<div class="card-body">
|
||
<h6 class="small font-weight-semibold">
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order')
|
||
@if ($shopping_order->shopping_user->is_for === 'ot')
|
||
<strong>Bestellung für Kunde</strong>
|
||
@else
|
||
<strong>Bestellung für Vertriebspartner</strong>
|
||
@endif
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'wizard')
|
||
<strong>Vertriebspartnerbestellung für Registrierung</strong>
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'membership')
|
||
<strong>Vertriebspartnerbestellung für Mitgliedschaft</strong>
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'shopping')
|
||
@if ($shopping_order->payment_for === 7)
|
||
<strong>Kundenbestellung über Promotion</strong>
|
||
@if ($shopping_order->promotion_user)
|
||
<br>{{ $shopping_order->promotion_user->name }} ||
|
||
{{ $shopping_order->promotion_user->user->getFullName() }}
|
||
@endif
|
||
@else
|
||
<strong>Kundenbestellung über Shop</strong>
|
||
@endif
|
||
@endif
|
||
@if ($shopping_order->shopping_user->is_from === 'homeparty')
|
||
<h5>Vertriebspartnerbestellung für eine Homeparty</h5>
|
||
<hr>
|
||
@endif
|
||
</h6>
|
||
<style>
|
||
table.table-product,
|
||
table.table-product tr td,
|
||
table.table-product tr th {
|
||
border: none;
|
||
}
|
||
|
||
table.table-product tr.border-top td {
|
||
border-top: 1px solid #b8b8b9;
|
||
}
|
||
|
||
table.table-product tr.border-bottom td,
|
||
table.table-product tr.border-bottom th {
|
||
border-bottom: 1px solid #b8b8b9;
|
||
}
|
||
</style>
|
||
<div class="table-responsive">
|
||
<table class="table table-product m-0" style="">
|
||
<tbody>
|
||
<tr class="border-bottom">
|
||
<th>Produkt</th>
|
||
<th class="text-right">
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order')
|
||
Netto-Preis
|
||
@else
|
||
Preis
|
||
@endif
|
||
</th>
|
||
<th class="text-right">Anzahl</th>
|
||
<th class="text-right">Summe</th>
|
||
</tr>
|
||
@foreach ($shopping_order->shopping_order_items as $shopping_order_item)
|
||
<tr class="border-bottom">
|
||
<td class="px-3 py-2">
|
||
<div class="media align-items-center">
|
||
@if ($shopping_order_item->product)
|
||
@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>
|
||
@if ($shopping_order_item->isFreeProduct())
|
||
<span class="">Promotionprodukt</span><br>
|
||
@endif
|
||
{{-- <span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }} --}}
|
||
</small>
|
||
</div>
|
||
@endif
|
||
</div>
|
||
</td>
|
||
<td class="align-middle px-3 py-2 nowrap text-right" style="min-width:100px;">
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order')
|
||
{{ $shopping_order_item->getFormattedPriceNet() }} €
|
||
@else
|
||
{{ $shopping_order_item->getFormattedPrice() }} €
|
||
@endif
|
||
</td>
|
||
<!-- Set column width -->
|
||
<td class="align-middle px-3 py-2 text-right" style="min-width: 60px;">
|
||
{{ $shopping_order_item->qty }}
|
||
</td>
|
||
<!-- Set column width -->
|
||
<td class="font-weight-semibold align-middle px-3 py-2 text-right"
|
||
style="min-width:120px;">
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order')
|
||
{{ $shopping_order_item->getFormattedTotalPriceNet() }} €
|
||
@else
|
||
{{ $shopping_order_item->getFormattedTotalPrice() }} €
|
||
@endif
|
||
</td>
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
<tfoot>
|
||
<style>
|
||
.table_small_td {
|
||
padding-top: 0.125rem !important;
|
||
}
|
||
</style>
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order')
|
||
<tr class="">
|
||
<td colspan="3">
|
||
Zwischensumme
|
||
</td>
|
||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
{{ $shopping_order->getFormattedSubtotalFull() }} €*
|
||
</td>
|
||
</tr>
|
||
<tr class="">
|
||
<td class="table_small_td" colspan="3">
|
||
Handelspanne
|
||
</td>
|
||
<td class="table_small_td"
|
||
style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
- {{ $shopping_order->getFormattedDiscount() }} €*
|
||
</td>
|
||
</tr>
|
||
<tr class="border-bottom">
|
||
<td class="table_small_td" colspan="3">
|
||
<strong>Summe (Netto)</strong>
|
||
</td>
|
||
<td class="table_small_td"
|
||
style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
<strong>{{ $shopping_order->getFormattedSubtotal() }} €*</strong>
|
||
</td>
|
||
</tr>
|
||
@endif
|
||
|
||
<tr class="border-bottom">
|
||
<td colspan="3">
|
||
{{ __('email.checkout_mail_shipping') }}
|
||
</td>
|
||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.4em;">
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order')
|
||
{{ $shopping_order->getFormattedShippingNet() }} €*
|
||
@else
|
||
{{ $shopping_order->getFormattedShipping() }} €
|
||
@endif
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="3">
|
||
{{ __('email.checkout_mail_subtotal_ws') }}
|
||
</td>
|
||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
{{ $shopping_order->getFormattedSubtotalShipping() }} €*
|
||
</td>
|
||
</tr>
|
||
<tr class="border-bottom">
|
||
<td class="table_small_td" colspan="3">
|
||
{{ __('email.checkout_mail_tax') }}
|
||
</td>
|
||
<td class="table_small_td"
|
||
style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
{{ $shopping_order->getFormattedTax() }} €
|
||
</td>
|
||
</tr>
|
||
@if ($shopping_order->shopping_user->is_from === 'user_order' && $shopping_order->payment_credit > 0)
|
||
<tr>
|
||
<td colspan="3">
|
||
<b> Summe (Brutto):</b>
|
||
</td>
|
||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
<b> {{ $shopping_order->getFormattedTotalWithoutCredit() }} €</b>
|
||
</td>
|
||
</tr>
|
||
<tr class="border-bottom">
|
||
<td class="table_small_td" colspan="3">
|
||
aus Guthaben (Brutto):
|
||
</td>
|
||
<td class="table_small_td"
|
||
style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||
{{ $shopping_order->getFormattedPaymentCredit() }} €
|
||
</td>
|
||
</tr>
|
||
@endif
|
||
<tr>
|
||
<td colspan="3">
|
||
<b>Gesamtsumme (Brutto):</b>
|
||
</td>
|
||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.4em;">
|
||
<b>{{ $shopping_order->getFormattedTotalShipping() }} €</b>
|
||
<br>
|
||
<span style="font-size: 0.9em"><em>* Nettobeträge</em></span>
|
||
</td>
|
||
</tr>
|
||
</tfoot>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<hr class="m-0">
|
||
@if ($shopping_order->shopping_order_margin)
|
||
|
||
<div class="card-body">
|
||
|
||
<h6 class="small font-weight-semibold">
|
||
Provisionen / Handelspanne
|
||
</h6>
|
||
<div class="row">
|
||
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">Einzelrabatt </div>
|
||
{{ number_format($shopping_order->shopping_order_margin->getRestoreContent('commission')->single_value_commission, 2, ',', '.') }}
|
||
</div>
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">Staffelrabatt</div>
|
||
@foreach ($shopping_order->shopping_order_margin->getRestoreContent('items') as $item)
|
||
ab {{ $item->price_from }} / {{ $item->trading_margin }}% :
|
||
{{ number_format($item->value_margin, 2, ',', '.') }} €*<br>
|
||
@endforeach
|
||
</div>
|
||
@if ($isAdmin)
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">Provisionen Vertriebspartner<br>
|
||
@if ($shopping_order->member)
|
||
{{ $shopping_order->member->getFullName(false) }}
|
||
@endif
|
||
</div>
|
||
{{ $shopping_order->shopping_order_margin->getFormattedNetDiscount() }} €
|
||
</div>
|
||
<div class="col-md-3 mb-3">
|
||
<div class="text-muted small">Provisionen Sponsor<br>
|
||
@if ($shopping_order->member && $shopping_order->member->user_sponsor)
|
||
{{ $shopping_order->member->user_sponsor->getFullName(false) }}
|
||
@endif
|
||
</div>
|
||
@if ($shopping_order->shopping_order_margin->net_partner_commission)
|
||
{{ $shopping_order->shopping_order_margin->getFormattedNetPartnerCommission() }} €
|
||
@endif
|
||
</div>
|
||
@endif
|
||
</div>
|
||
</div>
|
||
|
||
<hr class="m-0">
|
||
|
||
@endif
|
||
|
||
@if ($shopping_order->txaction === 'extern')
|
||
<div class="card-body">
|
||
@if ($shopping_order->wp_invoice_path)
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<a href="{{ $shopping_order->wp_invoice_path }}" target="_blank"
|
||
class="btn btn-secondary btn-sm">Link zur Rechnung</a>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if ($shopping_order->wp_notice['wp_advertising'])
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<b>Werbemittel: {!! $shopping_order->wp_notice['wp_advertising'] !!}<br></b>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if ($shopping_order->wp_notice['wp_incentives'])
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<b>Incentives: {!! $shopping_order->wp_notice['wp_incentives'] !!}<br></b>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
</div>
|
||
<hr class="m-0">
|
||
@endif
|
||
<div class="card-body">
|
||
<h6 class="small font-weight-semibold">
|
||
Zahlung
|
||
</h6>
|
||
@if ($shopping_order->txaction !== 'extern')
|
||
<div class="table-responsive">
|
||
<table class="table table-bordered table-striped">
|
||
<thead>
|
||
<tr>
|
||
<th style="min-width: 60px">#</th>
|
||
<th>Zahlungsart</th>
|
||
<th>Gesamt</th>
|
||
<th>Status</th>
|
||
<th>Datum</th>
|
||
<th>Referenznummer</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>
|
||
<td>{{ $shopping_payment->getPaymentAmount() }}</td>
|
||
<td>
|
||
@if ($isAdmin && ($shopping_payment->clearingtype === 'fnc' || $shopping_payment->clearingtype === 'vor'))
|
||
<button type="button"
|
||
class="btn btn-sm btn-{{ \App\Services\Payment::getFormattedTxactionColor($shopping_payment->txaction) }}"
|
||
data-toggle="modal" data-target="#modals-txaction"
|
||
data-id="{{ $shopping_order->id }}"
|
||
data-payment_id="{{ $shopping_payment->id }}"
|
||
data-txaction="{{ $shopping_payment->txaction }}"
|
||
data-back="{{ url()->current() }}" data-action="store_txaction">
|
||
<span class="far fa-edit"></span>
|
||
<strong>{{ \App\Services\Payment::getFormattedTxaction($shopping_payment->txaction) }}</strong>
|
||
</button>
|
||
@else
|
||
{!! \App\Services\Payment::getShoppingPaymentBadge($shopping_payment) !!}
|
||
@endif
|
||
</td>
|
||
<td>{{ $shopping_payment->created_at->format('d.m.Y H:i') }}</td>
|
||
<td>{{ $shopping_payment->reference }}</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>
|
||
@else
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<div class="alert alert-info p-2 mt-2">
|
||
<ul>
|
||
<li>Bestellung über externen SHOP</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
</div>
|
||
</div>
|
||
|
||
@if ($isAdmin)
|
||
<div class="modal fade" id="modals-shipped">
|
||
<div class="modal-dialog">
|
||
<form class="modal-content" action="{{ route('admin_sales_store') }}" method="post">
|
||
@csrf
|
||
<input type="hidden" name="id" value="{{ $shopping_order->id }}">
|
||
<input type="hidden" name="action" value="store_shipped">
|
||
<input type="hidden" name="back" value="{{ url()->current() }}">
|
||
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">{{ __('Bestellung') }} {{ __('Versand') }} </h5>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label" for="shipped">{{ __('Versand') }}</label>
|
||
{{ Form::select('shipped', \App\Models\ShoppingOrder::$shippedTypes, $shopping_order->shipped, ['data-live-search' => 'false', 'class' => 'selectpicker']) }}
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default"
|
||
data-dismiss="modal">{{ __('close') }}</button>
|
||
<button type="submit" class="btn btn-primary">{{ __('save') }}</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="modal fade" id="modals-invoice">
|
||
<div class="modal-dialog">
|
||
<form class="modal-content form-prevent-multiple-submits" action="{{ route('admin_sales_invoice') }}"
|
||
method="post">
|
||
@csrf
|
||
<input type="hidden" name="id" value="{{ $shopping_order->id }}">
|
||
<input type="hidden" name="action" value="create_invoice">
|
||
<input type="hidden" name="back" value="{{ url()->current() }}">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">{{ __('Rechnung') }}</h5>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group col-sm-12">
|
||
{{ Form::select('invoice_option', ['create' => 'Rechnung erstellen'], false, ['data-live-search' => 'false', 'class' => 'selectpicker']) }}
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label" for="invoice_date">{{ __('Rechnungsdatum') }}</label>
|
||
{!! Form::text('invoice_date', $shopping_order->created_at->format('d.m.Y'), [
|
||
'class' => 'form-control datepicker-base',
|
||
]) !!}
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label" for="invoice_number">{{ __('Rechnungsnummer') }}</label>
|
||
{!! Form::text('invoice_number', App\Services\Invoice::getInvoiceNumber(), [
|
||
'class' => 'form-control',
|
||
'disabled',
|
||
]) !!}
|
||
<em> nächste Rechnungsnummer <a href="{{ route('admin_settings') }}"><i
|
||
class="fa fa-edit"></i></a></em>
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="custom-control custom-checkbox">
|
||
{!! Form::checkbox('invoice_send_mail', 1, false, ['class' => 'custom-control-input']) !!}
|
||
<span class="custom-control-label">Rechnung an
|
||
{{ $shopping_order->shopping_user->billing_email }}</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default"
|
||
data-dismiss="modal">{{ __('close') }}</button>
|
||
<button type="submit" class="btn btn-primary button-prevent-multiple-submits"><i
|
||
class="spinner fa fa-spinner fa-spin"></i> {{ __('save') }}</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="modal fade" id="modals-txaction">
|
||
<div class="modal-dialog">
|
||
<form class="modal-content" action="{{ route('admin_sales_store') }}" method="post">
|
||
@csrf
|
||
<input type="hidden" name="id" value="{{ $shopping_order->id }}">
|
||
<input type="hidden" name="payment_id">
|
||
<input type="hidden" name="action" value="store_txaction">
|
||
<input type="hidden" name="back" value="{{ url()->current() }}">
|
||
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">{{ __('Bestellung') }} {{ __('Zahlung') }} </h5>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label" for="txaction">{{ __('Zahlung') }}</label>
|
||
{{ Form::select('txaction', \App\Services\Payment::$txaction_invoice, 'open', ['data-live-search' => 'false', 'class' => 'selectpicker']) }}
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default"
|
||
data-dismiss="modal">{{ __('close') }}</button>
|
||
<button type="submit" class="btn btn-primary button-prevent-multiple-submits"><i
|
||
class="spinner fa fa-spinner fa-spin"></i> {{ __('save') }}</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="modals-cancellation-invoice">
|
||
<div class="modal-dialog">
|
||
<form class="modal-content form-prevent-multiple-submits"
|
||
action="{{ route('admin_sales_invoice_cancellation') }}" method="post">
|
||
@csrf
|
||
<input type="hidden" name="id" value="{{ $shopping_order->id }}">
|
||
<input type="hidden" name="action" value="create_cancellation_invoice">
|
||
<input type="hidden" name="back" value="{{ url()->current() }}">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">{{ __('Stornorechnung erstellen') }}</h5>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="alert alert-warning">
|
||
<strong>Achtung!</strong> Sie sind dabei, eine Stornorechnung zu erstellen. Diese wird die
|
||
ursprüngliche Rechnung mit negativen Beträgen stornieren.
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label">{{ __('Ursprüngliche Rechnung') }}</label>
|
||
<div class="form-control-plaintext">
|
||
<strong>Rechnungsnummer:</strong>
|
||
{{ App\Services\Invoice::getNumber($shopping_order) }}<br>
|
||
<strong>Rechnungsdatum:</strong> {{ App\Services\Invoice::getDate($shopping_order) }}<br>
|
||
<strong>Betrag:</strong> {{ $shopping_order->getFormattedTotalShipping() }} €
|
||
</div>
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label" for="cancellation_date">{{ __('Stornodatum') }}</label>
|
||
{!! Form::text('cancellation_date', now()->format('d.m.Y'), ['class' => 'form-control datepicker-base']) !!}
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label" for="cancellation_number">{{ __('Stornonummer') }}</label>
|
||
{!! Form::text('cancellation_number', App\Services\Invoice::getInvoiceNumber(), [
|
||
'class' => 'form-control',
|
||
'disabled',
|
||
]) !!}
|
||
<em> nächste Rechnungsnummer <a href="{{ route('admin_settings') }}"><i
|
||
class="fa fa-edit"></i></a></em>
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="custom-control custom-checkbox">
|
||
{!! Form::checkbox('cancellation_send_mail', 1, false, ['class' => 'custom-control-input']) !!}
|
||
<span class="custom-control-label">Stornorechnung an
|
||
{{ $shopping_order->shopping_user->billing_email }}</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default"
|
||
data-dismiss="modal">{{ __('close') }}</button>
|
||
<button type="submit" class="btn btn-danger button-prevent-multiple-submits"><i
|
||
class="spinner fa fa-spinner fa-spin"></i> Stornorechnung erstellen</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
$(document).ready(function() {
|
||
$('#modals-txaction').on('show.bs.modal', function(event) {
|
||
var button = $(event.relatedTarget);
|
||
if (event.relatedTarget) {
|
||
$(this).find(".modal-content input[name='payment_id']").val(button.data('payment_id'));
|
||
$(this).find(".modal-body select[name='txaction']").val(button.data('txaction'));
|
||
$('.selectpicker').selectpicker('refresh');
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
@endif
|