23-01-2026
This commit is contained in:
parent
a939cd51ef
commit
a8b395e20d
248 changed files with 29342 additions and 4805 deletions
|
|
@ -114,7 +114,7 @@
|
|||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('order.points_total') }}</div>
|
||||
{{ $shopping_order->points }}
|
||||
{{ $shopping_order->getFormattedPoints() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -205,6 +205,64 @@
|
|||
<!-- / Member -->
|
||||
@endif
|
||||
|
||||
{{-- Vorkasse Hinweis mit TXID bei unbezahlten Bestellungen --}}
|
||||
@php
|
||||
$vorPayment = $shopping_order->shopping_payments->where('clearingtype', 'vor')->first();
|
||||
$isVorUnpaid = $vorPayment && !in_array($shopping_order->txaction, ['paid', 'completed']);
|
||||
@endphp
|
||||
@if($isVorUnpaid)
|
||||
@php
|
||||
$payTrans = $vorPayment->payment_transactions->first();
|
||||
$txid = $payTrans->txid ?? ($payTrans->transmitted_data['txid'] ?? null);
|
||||
@endphp
|
||||
<!-- Billing -->
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning border-warning mb-3" style="border-left: 4px solid #ffc107 !important;">
|
||||
<h5 class="mb-3"><i class="fa fa-university"></i> {{ __('payment.prepayment_bank_details') }}:</h5>
|
||||
<div style="background: #fff; border-radius: 8px; padding: 15px;">
|
||||
@if($payTrans && isset($payTrans->transmitted_data))
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0; width: 140px;"><strong>{{ __('payment.account_holder') }}:</strong></td>
|
||||
<td style="padding: 5px 0;">{{ $payTrans->transmitted_data['clearing_bankaccountholder'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0;"><strong>{{ __('payment.IBAN') }}:</strong></td>
|
||||
<td style="padding: 5px 0; font-family: monospace; letter-spacing: 1px;">{{ $payTrans->transmitted_data['clearing_bankiban'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0;"><strong>{{ __('payment.BIC') }}:</strong></td>
|
||||
<td style="padding: 5px 0; font-family: monospace;">{{ $payTrans->transmitted_data['clearing_bankbic'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0;"><strong>{{ __('payment.bank') }}:</strong></td>
|
||||
<td style="padding: 5px 0;">{{ $payTrans->transmitted_data['clearing_bankname'] }}</td>
|
||||
</tr>
|
||||
<tr style="border-top: 1px solid #ffc107;">
|
||||
<td style="padding: 10px 10px 5px 0;"><strong>{{ __('payment.total_amount') }}:</strong></td>
|
||||
<td style="padding: 10px 0 5px 0; font-size: 18px; font-weight: bold; color: #d35400;">{{ number_format( floatval($payTrans->shopping_payment->amount/100), 2, ",", ".") }} EUR</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<hr style="border-color: #ffc107;">
|
||||
|
||||
<p>{{ __('payment.prepayment_reference_notice') }}</p>
|
||||
|
||||
@if(isset($payTrans->transmitted_data['txid']))
|
||||
<div class="text-center p-4 my-3" style="background: #fff; border: 3px dashed #ffc107; border-radius: 8px;">
|
||||
<strong style="font-size: 16px;">{{ __('payment.prepayment_txid') }}:</strong><br>
|
||||
<span style="font-size: 32px; font-weight: bold; color: #d35400; letter-spacing: 3px;">{{ $payTrans->transmitted_data['txid'] }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<p><strong>{{ __('payment.prepayment_reference_only') }}</strong></p>
|
||||
<p class="mt-3 mb-0 text-muted"><em>{{ __('payment.prepayment_waiting_payment') }}</em></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
@endif
|
||||
<!-- Billing -->
|
||||
<div class="card-body">
|
||||
|
||||
|
|
@ -343,6 +401,13 @@
|
|||
<div class="text-muted small">{{ __('Phone') }}</div>
|
||||
{{ $shopping_order->shopping_user->shipping_phone }}
|
||||
</div>
|
||||
@if($shopping_order->shopping_user->shipping_postnumber)
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.dhl_postnumber') }}</div>
|
||||
<span class="badge badge-info">{{ $shopping_order->shopping_user->shipping_postnumber }}</span>
|
||||
<small class="d-block text-muted">{{ __('payment.packstation_delivery') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('Country') }}</div>
|
||||
{{ $shopping_order->shopping_user->shipping_country->getLocated() }}
|
||||
|
|
@ -354,6 +419,10 @@
|
|||
<hr class="m-0">
|
||||
<!-- / Shipping -->
|
||||
|
||||
<!-- DHL Sendungen -->
|
||||
@include('admin.sales._detail_dhl_shipments')
|
||||
<!-- / DHL Sendungen -->
|
||||
|
||||
<!-- Items -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
|
|
@ -446,6 +515,9 @@
|
|||
<h6 class="small font-weight-semibold">
|
||||
{{ __('tables.payment') }}
|
||||
</h6>
|
||||
|
||||
|
||||
|
||||
@if ($shopping_order->txaction !== 'extern')
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
|
|
|
|||
275
resources/views/admin/sales/_detail_dhl_shipments.blade.php
Normal file
275
resources/views/admin/sales/_detail_dhl_shipments.blade.php
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
{{-- DHL Sendungen Block für Order Detail --}}
|
||||
@if($shopping_order->dhlShipments && $shopping_order->dhlShipments->count() > 0)
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-warning text-dark">
|
||||
<h5 class="mb-0">
|
||||
<i class="fas fa-shipping-fast"></i>
|
||||
DHL Sendungen ({{ $shopping_order->dhlShipments->count() }})
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 80px;">#</th>
|
||||
<th>Sendungsnummer</th>
|
||||
<th>Status</th>
|
||||
<th>Tracking</th>
|
||||
<th>E-Mail</th>
|
||||
@if (isset($isAdmin) && $isAdmin)
|
||||
<th style="width: 150px;">Aktionen</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($shopping_order->dhlShipments as $shipment)
|
||||
<tr class="{{ $shipment->type === 'return' ? 'bg-warning bg-opacity-10' : '' }}" style="{{ $shipment->type === 'return' ? 'background-color: rgba(255, 193, 7, 0.1);' : '' }}">
|
||||
<td>
|
||||
<a href="{{ route('admin.dhl.show', $shipment) }}" class="font-weight-bold {{ $shipment->type === 'return' ? 'text-warning' : 'text-primary' }}">
|
||||
@if($shipment->type === 'return')<i class="fas fa-undo mr-1"></i>@endif#{{ $shipment->id }}
|
||||
</a>
|
||||
@if($shipment->type === 'return')
|
||||
<br><span class="badge badge-warning badge-sm" style="font-weight: 600;">RETOURE</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<code class="text-success">{{ $shipment->dhl_shipment_no }}</code>
|
||||
<br>
|
||||
<a href="{{ $shipment->getTrackingUrl() }}" target="_blank" class="small text-muted">
|
||||
<i class="fas fa-external-link-alt"></i> Bei DHL verfolgen
|
||||
</a>
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ $shipment->getStatusBadgeClass() }}">
|
||||
{{ $shipment->status }}
|
||||
</span>
|
||||
@if($shipment->tracking_status)
|
||||
<br><small class="text-muted">{{ $shipment->tracking_status }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($shipment->last_tracked_at)
|
||||
<small class="text-muted">
|
||||
{{ $shipment->last_tracked_at->format('d.m.Y H:i') }}
|
||||
</small>
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($shipment->wasTrackingEmailSent())
|
||||
<span class="badge badge-success" title="Gesendet am {{ $shipment->tracking_email_sent_at->format('d.m.Y H:i') }} ({{ $shipment->tracking_email_type === 'auto' ? 'automatisch' : 'manuell' }})">
|
||||
<i class="fas fa-check"></i> {{ $shipment->tracking_email_sent_at->format('d.m.Y') }}
|
||||
</span>
|
||||
<br>
|
||||
<small class="text-muted">
|
||||
@if($shipment->tracking_email_type === 'auto')
|
||||
<i class="fas fa-robot"></i> Automatisch
|
||||
@else
|
||||
<i class="fas fa-user"></i> Manuell
|
||||
@endif
|
||||
</small>
|
||||
@else
|
||||
<span class="badge badge-secondary">Nicht gesendet</span>
|
||||
@endif
|
||||
</td>
|
||||
@if (isset($isAdmin) && $isAdmin)
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<a href="{{ route('admin.dhl.show', $shipment) }}" class="btn btn-outline-primary" title="Details">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
@if($shipment->label_path)
|
||||
<a href="{{ route('admin.dhl.download-label', $shipment) }}" class="btn btn-outline-success" title="Label herunterladen">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<button type="button"
|
||||
class="btn btn-outline-secondary dhl-update-tracking-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="Tracking aktualisieren">
|
||||
<i class="fas fa-sync"></i>
|
||||
</button>
|
||||
@if($shipment->canSendTrackingEmail())
|
||||
<button type="button"
|
||||
class="btn {{ $shipment->wasTrackingEmailSent() ? 'btn-success' : 'btn-outline-info' }} dhl-send-email-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="{{ $shipment->wasTrackingEmailSent() ? 'E-Mail erneut senden' : 'Tracking-E-Mail senden' }}">
|
||||
<i class="fas fa-envelope"></i>
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
@if($shipment->type === 'outbound' && !$shipment->returns->count())
|
||||
<button type="button"
|
||||
class="btn btn-outline-info dhl-create-return-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="Retourenlabel erstellen">
|
||||
<i class="fas fa-undo"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($shipment->canCancel())
|
||||
<button type="button"
|
||||
class="btn btn-outline-danger dhl-cancel-shipment-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="Sendung stornieren">
|
||||
<i class="fas fa-ban"></i>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Update tracking button
|
||||
$('.dhl-update-tracking-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/update-tracking`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-sync"></i>');
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
alert('Fehler beim Aktualisieren des Trackings.');
|
||||
btn.prop('disabled', false).html('<i class="fas fa-sync"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Send email button
|
||||
$('.dhl-send-email-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Tracking-E-Mail an den Kunden senden?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/send-tracking-email`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert(response.message);
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Senden der E-Mail.';
|
||||
alert(errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Create return label button
|
||||
$('.dhl-create-return-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
// Check if already processing
|
||||
if (btn.prop('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!confirm('Möchten Sie ein Retourenlabel für diese Sendung erstellen?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/return-label`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert(response.message || 'Retourenlabel wurde erstellt!');
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Erstellen des Retourenlabels.';
|
||||
alert(errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Cancel shipment button
|
||||
$('.dhl-cancel-shipment-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Möchten Sie diese Sendung wirklich stornieren?\n\nDas Label wird bei DHL ungültig und kann nicht mehr verwendet werden.')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/cancel`,
|
||||
method: 'DELETE',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert(response.message || 'Sendung wird storniert...');
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-ban"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Stornieren der Sendung.';
|
||||
alert(errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-ban"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
|
@ -232,6 +232,13 @@
|
|||
<div class="text-muted small">{{ __('Phone') }}</div>
|
||||
{{ $homeparty_guest->shipping_phone }}
|
||||
</div>
|
||||
@if($homeparty_guest->shipping_postnumber)
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.dhl_postnumber') }}</div>
|
||||
<span class="badge badge-info">{{ $homeparty_guest->shipping_postnumber }}</span>
|
||||
<small class="d-block text-muted">{{ __('payment.packstation_delivery') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('Country') }}</div>
|
||||
{{ $homeparty_guest->shipping_country->getLocated() }}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<small>
|
||||
<span class="text-muted">{{ __('order.content') }}: </span> {{ $shopping_order_item->product->contents }}<br>
|
||||
<span class="text-muted">{{ __('order.weight') }}: </span> {{ $shopping_order_item->product->weight }} g<br>
|
||||
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->points }}<br>
|
||||
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->getFormattedPoints() }}<br>
|
||||
<span class="text-muted">{{ __('order.number') }}: </span> {{ $shopping_order_item->product->number }}
|
||||
</small>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue