Homparty v1.0
This commit is contained in:
parent
ac0d5b781e
commit
c73299e52e
40 changed files with 1234 additions and 908 deletions
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="title">{{ __('Kategorie (Mehrfachauswahl)') }}</label>
|
||||
<select class="selectpicker" name="categories[]" id="categories" data-style="btn-light" data-live-search="false" multiple>
|
||||
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray()) !!}
|
||||
<label class="form-label" for="title">{{ __('Kategorie (Mehrfachauswahl)') }}*</label>
|
||||
<select class="selectpicker" name="categories[]" id="categories" data-style="btn-light" data-live-search="false" multiple required>
|
||||
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray(), false) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-sm-5">
|
||||
|
|
|
|||
|
|
@ -177,11 +177,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<!-- / Billing -->
|
||||
|
||||
<!-- Shipping -->
|
||||
<div class="card-body">
|
||||
@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')
|
||||
@if($shopping_order->shopping_user->is_for === 'me')
|
||||
|
|
@ -256,6 +258,7 @@
|
|||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<hr class="m-0">
|
||||
<!-- / Shipping -->
|
||||
|
||||
|
|
@ -278,6 +281,10 @@
|
|||
@if($shopping_order->shopping_user->is_from === 'shopping')
|
||||
<strong>Kundenbestellung über Shop</strong>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'homeparty')
|
||||
<h5>Beraterbestellung für eine Homeparty</h5>
|
||||
<hr>
|
||||
@endif
|
||||
</h6>
|
||||
<style>
|
||||
table.table-product, table.table-product tr td, table.table-product tr th {
|
||||
|
|
@ -291,7 +298,8 @@
|
|||
}
|
||||
|
||||
</style>
|
||||
<div class="table-responsive">
|
||||
@if(!$shopping_order->shopping_user->is_from === 'homeparty')
|
||||
<div class="table-responsive">
|
||||
<table class="table table-product m-0" style="">
|
||||
<tbody>
|
||||
<tr class="border-bottom">
|
||||
|
|
@ -393,6 +401,105 @@
|
|||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
@if($shopping_order->homeparty)
|
||||
<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;
|
||||
}
|
||||
</style>
|
||||
@php($homeparty = $shopping_order->homeparty)
|
||||
@if($homeparty->homeparty_host)
|
||||
<p><strong>Bestellung Gastgeber/in {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</strong></p>
|
||||
@include('admin.sales._detail_homparty', ['homeparty'=>$shopping_order->homeparty, 'homeparty_guest' => $homeparty->homeparty_host])
|
||||
@endif
|
||||
|
||||
@if($homeparty->homeparty_guests)
|
||||
@php($g_count = 1)
|
||||
@foreach($homeparty->homeparty_guests as $homeparty_guest)
|
||||
<hr>
|
||||
<p><strong>Bestellung {!! $g_count++ !!}. Gast {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</strong></p>
|
||||
@include('admin.sales._detail_homparty', ['homeparty'=>$shopping_order->homeparty, 'homeparty_guest' => $homeparty_guest])
|
||||
@endforeach
|
||||
@endif
|
||||
<hr>
|
||||
|
||||
@include('admin.sales._detail_homparty_total', ['homeparty' => $homeparty])
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
|
||||
|
|
|
|||
246
resources/views/admin/sales/_detail_homparty.blade.php
Normal file
246
resources/views/admin/sales/_detail_homparty.blade.php
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
@if($homeparty_guest && $homeparty_guest->homeparty_user_order_items->count() || $homeparty_guest->is_host)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{__('Bild')}}</th>
|
||||
<th>{{__('Produkt')}}</th>
|
||||
<th>{{__('Anzahl')}}</th>
|
||||
<th>{{__('Marge')}}</th>
|
||||
<th class="text-right">{{__('EK-Preis')}}</th>
|
||||
<th class="text-right">{{__('Points')}}</th>
|
||||
<th class="text-right">{{__('Verdienst')}}</th>
|
||||
<th class="text-right">{{__('VK-Preis')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($homeparty_guest->homeparty_user_order_items as $value)
|
||||
<tr>
|
||||
<td>
|
||||
@if(count($value->product->images))
|
||||
<img class="img-fluid img-extra" alt="" src="{{ route('product_image', [$value->product->images->first()->slug]) }}">
|
||||
@endif
|
||||
</td>
|
||||
<td class="min-width-80">
|
||||
<strong>{{ $value->product->name }}</strong>
|
||||
<div class="text-body">
|
||||
<div>Inhalt: {{ $value->product->contents }}</div>
|
||||
<div>Art.-Nr.: {{ $value->product->number }}</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{$value->qty}}
|
||||
</td>
|
||||
<td>
|
||||
{{ $value->margin }}%
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ $value->getFormattedTotalEKPrice() }} €
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ $value->getFormattedTotalPoints() }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ $value->getFormattedTotalIncomePrice() }} €
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ $value->getFormattedTotalPrice() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
<tfoot id="insert_show_bonus_host">
|
||||
@php($user_cart = $homeparty->order['user_carts'][$homeparty_guest->id])
|
||||
@php($hp_order = $homeparty->order)
|
||||
|
||||
@if(!$homeparty_guest->is_host)
|
||||
<tr class="foot-small">
|
||||
<td colspan="8" class="text-left">
|
||||
@if($homeparty_guest->getDelivery() === 'host')
|
||||
Lieferung an Gastgeber
|
||||
@endif
|
||||
@if($homeparty_guest->getDelivery() === 'direct')
|
||||
Lieferung direkt an den Gast
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($homeparty_guest->getDelivery() === 'direct')
|
||||
<tr>
|
||||
<td colspan="5" class="text-left">Versandkosten</td>
|
||||
<td> </td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right">{{ Util::formatNumber($user_cart['shipping_price'])}} €</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td colspan="4" class="border-top"><strong>Gesamt:</strong></td>
|
||||
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['ek_price'])}} €</strong></td>
|
||||
<td class="border-top text-right"><strong>{{$user_cart['points']}}</strong></td>
|
||||
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['income_price'])}} €</strong></td>
|
||||
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['price'])}} €</strong></td>
|
||||
</tr>
|
||||
@else
|
||||
@if($hp_order['is_bonus'])
|
||||
<tr class="foot-small">
|
||||
<td colspan="5" class="text-left">Gutschrift Homeparty Gutschein</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right">- {{ Util::formatNumber($hp_order['bonus_value']) }} €</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($hp_order['is_bonus_coupon'])
|
||||
<tr class="foot-small">
|
||||
<td colspan="5" class="text-left">Gutschrift Bonus</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right">- {{ Util::formatNumber($hp_order['bonus_coupon']) }} €</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($hp_order['is_bonus'])
|
||||
<tr class="foot-small">
|
||||
<td colspan="5" class="text-left">Abzug Points durch Gutschein</td>
|
||||
<td class="text-right">- {{ $hp_order['bonus_points_diff'] }} </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr class="foot-small">
|
||||
<td colspan="5" class="text-left">Versandkosten:</td>
|
||||
<td> </td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right">{{Util::formatNumber($user_cart['shipping_price'])}} €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="border-top"><strong>Summen:</strong></td>
|
||||
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['ek_price'])}} €</strong></td>
|
||||
<td class="border-top text-right"><strong>{{$user_cart['points']}}</strong></td>
|
||||
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['income_price'])}} €</strong></td>
|
||||
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['price'])}} €</strong></td>
|
||||
</tr>
|
||||
|
||||
@endif
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if($homeparty_guest->is_host || $homeparty_guest->getDelivery() === 'direct')
|
||||
|
||||
<hr class="m-0">
|
||||
|
||||
<div class="card-body" style="background-color: #E5E9EF">
|
||||
<h6 class="small font-weight-semibold">
|
||||
Lieferadresse
|
||||
</h6>
|
||||
@if($homeparty_guest->same_as_billing)
|
||||
<div class="row">
|
||||
@if($homeparty_guest->billing_company)
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="text-muted small">Firma</div>
|
||||
{{ $homeparty_guest->billing_company }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Anrede</div>
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($homeparty_guest->billing_salutation) }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Vorname</div>
|
||||
{{ $homeparty_guest->billing_firstname }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Nachname</div>
|
||||
{{ $homeparty_guest->billing_lastname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Straße</div>
|
||||
{{ $homeparty_guest->billing_address }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Zusatz</div>
|
||||
{{ $homeparty_guest->billing_address_2 }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">PLZ</div>
|
||||
{{ $homeparty_guest->billing_zipcode }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Stadt</div>
|
||||
{{ $homeparty_guest->billing_city }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">E-Mail</div>
|
||||
{{ $homeparty_guest->billing_email }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Telefon</div>
|
||||
{{ $homeparty_guest->billing_phone }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Land</div>
|
||||
{{ $homeparty_guest->billing_country->getLocated() }}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
@if($homeparty_guest->shipping_company)
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="text-muted small">Firma</div>
|
||||
{{ $homeparty_guest->shipping_company }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Anrede</div>
|
||||
{{ \App\Services\HTMLHelper::getSalutationLang($homeparty_guest->shipping_salutation) }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Vorname</div>
|
||||
{{ $homeparty_guest->shipping_firstname }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Nachname</div>
|
||||
{{ $homeparty_guest->shipping_lastname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Straße</div>
|
||||
{{ $homeparty_guest->shipping_address }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Zusatz</div>
|
||||
{{ $homeparty_guest->shipping_address_2 }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">PLZ</div>
|
||||
{{ $homeparty_guest->shipping_zipcode }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Stadt</div>
|
||||
{{ $homeparty_guest->shipping_city }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">E-Mail</div>
|
||||
{{ $homeparty_guest->shipping_email }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Telefon</div>
|
||||
{{ $homeparty_guest->shipping_phone }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">Land</div>
|
||||
{{ $homeparty_guest->shipping_country->getLocated() }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@else
|
||||
<p>Keine Bestellung</p>
|
||||
@endif
|
||||
58
resources/views/admin/sales/_detail_homparty_total.blade.php
Normal file
58
resources/views/admin/sales/_detail_homparty_total.blade.php
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Gesamt</th>
|
||||
<th class="text-right">{{__('EK-Preis')}}</th>
|
||||
<th class="text-right">{{__('Points')}}</th>
|
||||
<th class="text-right">{{__('Verdienst')}}</th>
|
||||
<th class="text-right">{{__('VK-Preis')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@php($hp_order = $homeparty->order)
|
||||
|
||||
@if($hp_order['is_bonus'])
|
||||
<tr class="foot-small">
|
||||
<td colspan="4" class="border-top">
|
||||
{{ $hp_order['voucher_name'] }}
|
||||
</td>
|
||||
<td class="border-top text-right">{{ Util::formatNumber($hp_order['voucher_price'])}} €</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr class="foot-small">
|
||||
<td colspan="1" class="border-top">
|
||||
<strong>Gesamtsummen:</strong>
|
||||
</td>
|
||||
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['ek_price'])}} €</strong></td>
|
||||
<td class="border-top text-right"><strong>{{ $hp_order['points']}}</strong></td>
|
||||
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['income_price'])}} €</strong></td>
|
||||
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['price'])}} €</strong></td>
|
||||
</tr>
|
||||
<tr class="foot-small">
|
||||
<td colspan="1" class="text-muted">
|
||||
Summe ohne MwSt:
|
||||
</td>
|
||||
<td class=""> </td>
|
||||
|
||||
<td class=""> </td>
|
||||
<td class=""> </td>
|
||||
<td class="text-muted text-right">{{ Util::formatNumber($hp_order['price_net'])}} €</td>
|
||||
</tr>
|
||||
<tr class="foot-small">
|
||||
<td colspan="1" class="text-muted">
|
||||
Enthaltene MwSt:
|
||||
</td>
|
||||
<td class=""> </td>
|
||||
|
||||
<td class=""> </td>
|
||||
<td class=""> </td>
|
||||
<td class="text-muted text-right">{{ Util::formatNumber($hp_order['price']-$hp_order['price_net'])}} €</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue