Ein Storno einer Shop-Bestellung wurde als Eigenpunkt gebucht und liess damit die Shop-Provisionsbasis ungemindert. Betroffen sind 7 Faelle aus April bis August 2026 (178,82 EUR Differenz in der Provisionsbasis, gegen user_businesses geprueft). Ursache: `status_turnover` beschreibt nur, wohin der UMSATZ gehoert. Die Punkte folgen einer anderen Regel — eine Gutschrift (Status 4) bucht ihre Punkte immer auf KP/TP, auch wenn ihr Umsatz dem Shop zugeordnet ist. Die Gegenbuchung kann diese Aufteilung ohne die Ursprungsart nicht spiegeln, deshalb haelt `storno_origin_status` sie jetzt auf der Stornozeile fest. NULL heisst "Altzeile ohne Angabe" und faellt auf das bisherige Verhalten zurueck — abgeschlossene Monate aendern sich dadurch nicht. Stornoregel (Kundenentscheidung): Ein Storno mindert nur den Monat der Ursprungsbestellung. Ist der Monat abgeschlossen, passiert nichts mehr, denn Abrechnung und Gutschriften stehen. Ein Minus in den neuen Monat mitzunehmen waere nicht nachvollziehbar. Fuer den Ausnahmefall gibt es den Settings-Schalter `storno-points-current-month`, standardmaessig aus. Ausserdem: Die persoenliche Monatsstatistik summierte Status 0 (nicht zugeordnet) und 3 (pending) mit, die gemeinsame Punkteauswertung nicht. Beide nutzen jetzt dieselbe Statusliste, und ein Storno mindert das Segment seiner Ursprungsbuchung statt pauschal in "Sonstige" zu laufen. Die Migration fuer `status_turnover` zieht nur das Schema auf den tatsaechlichen Stand nach (nullable statt NOT NULL) — auf Produktion faktisch wirkungslos, aber Neuinstallationen und die Testdatenbank haben damit dieselbe Semantik. Audit-Befunde A02, A06, A15, R01-R03. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
521 lines
No EOL
34 KiB
PHP
Executable file
521 lines
No EOL
34 KiB
PHP
Executable file
@extends('layouts.layout-2')
|
||
|
||
@section('content')
|
||
<h4 class="font-weight-bold py-2 mb-2">
|
||
{{ __('Einstellungen') }}
|
||
</h4>
|
||
|
||
{!! Form::open(['action' => route('admin_setting_store'), 'method' => 'POST', 'class' => 'form-horizontal']) !!}
|
||
|
||
<div class="card mb-2">
|
||
<div class="card-body">
|
||
<h4>Kauf Einstellungen</h4>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-12">
|
||
|
||
<label class="custom-control custom-checkbox mt-2">
|
||
{!! Form::checkbox('settings[is_comp_me_order][val]', 1, \App\Models\Setting::getContentBySlug('is_comp_me_order'), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label">Kompensationprodukt für Berater bei Bestellung aufgeben</span>
|
||
</label>
|
||
{{ Form::hidden('settings[is_comp_me_order][type]', 'bool') }}
|
||
|
||
<label class="custom-control custom-checkbox mt-3">
|
||
{!! Form::checkbox('settings[is_comp_me_abo][val]', 1, \App\Models\Setting::getContentBySlug('is_comp_me_abo'), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label">Kompensationprodukt für Berater bei Abo - regelmäßige Lieferungen</span>
|
||
</label>
|
||
{{ Form::hidden('settings[is_comp_me_abo][type]', 'bool') }}
|
||
</div>
|
||
</div>
|
||
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="card mb-2">
|
||
<div class="card-body">
|
||
<h4>Zahlungen (Stripe / PAYONE)</h4>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Aktiver Zahlungsanbieter für <strong>neue</strong> Zahlungen</label>
|
||
{!! Form::select('settings[payment-active-provider][val]', ['payone' => 'PAYONE', 'stripe' => 'Stripe'], \App\Models\Setting::getContentBySlug('payment-active-provider') ?: 'payone', ['class' => 'form-control']) !!}
|
||
{{ Form::hidden('settings[payment-active-provider][type]', 'text') }}
|
||
<small class="text-muted">Wirkt nur auf neue Zahlungsvorgänge — bestehende Zahlungen/Abos behalten ihren Anbieter.</small>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-12">
|
||
<label class="custom-control custom-checkbox mt-2">
|
||
{!! Form::checkbox('settings[checkout-maintenance][val]', 1, \App\Models\Setting::getContentBySlug('checkout-maintenance'), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label"><strong>Checkout-Wartungsmodus</strong> — alle Besucher sehen „Technische Schwierigkeiten"; nur Admins können bestellen (zum Live-Testen von Stripe)</span>
|
||
</label>
|
||
{{ Form::hidden('settings[checkout-maintenance][type]', 'bool') }}
|
||
|
||
<label class="custom-control custom-checkbox mt-3">
|
||
{!! Form::checkbox('settings[abo-payments-frozen][val]', 1, \App\Models\Setting::getContentBySlug('abo-payments-frozen'), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label"><strong>Abo-Zahlungen einfrieren</strong> — Abo-Checkout, Retry und Abbuchungs-Cron pausieren mit Hinweis (Not-Schalter bis Stripe-Abos live sind)</span>
|
||
</label>
|
||
{{ Form::hidden('settings[abo-payments-frozen][type]', 'bool') }}
|
||
|
||
<label class="custom-control custom-checkbox mt-3">
|
||
{!! Form::checkbox('settings[payment-vorkasse-hidden][val]', 1, \App\Models\Setting::getContentBySlug('payment-vorkasse-hidden'), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label"><strong>Vorkasse ausblenden</strong> — Vorkasse läuft über PAYONE und wird im Checkout nicht mehr angeboten</span>
|
||
</label>
|
||
{{ Form::hidden('settings[payment-vorkasse-hidden][type]', 'bool') }}
|
||
</div>
|
||
</div>
|
||
<button type="submit" name="action" value="save_payment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="card mb-2">
|
||
<div class="card-body">
|
||
<h4>Rechnungen / Gutschriften Einstellungen</h4>
|
||
{{--<div class="form-row">
|
||
{{-- <div class="form-group col-sm-12">
|
||
<label class="form-label">{{ __('nächste Rechnungsnummer') }}*</label>
|
||
{{ Form::text('settings[invoice-number][val]', \App\Models\Setting::getContentBySlug('invoice-number'), array('class'=>'form-control', 'disabled')) }}
|
||
{{ Form::hidden('settings[invoice-number][type]', 'int') }}
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label">{{ __('nächste Gutschriftsnummer') }}*</label>
|
||
{{ Form::text('settings[credit-number][val]', \App\Models\Setting::getContentBySlug('credit-number'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[credit-number][type]', 'int') }}
|
||
</div>
|
||
</div>--}}
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Tag des Monats für die Fixierung/Auswertungen der Business Marketing Plans*</label>
|
||
{{ Form::text('settings[day-exectute-business-structur][val]', \App\Models\Setting::getContentBySlug('day-exectute-business-structur'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[day-exectute-business-structur][type]', 'int') }}
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-12">
|
||
<label class="custom-control custom-checkbox mt-2">
|
||
{!! Form::checkbox('settings[storno-points-current-month][val]', 1, \App\Models\Setting::getContentBySlug(\App\Services\BusinessPlan\SalesPointsVolume::SETTING_STORNO_CURRENT_MONTH), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label"><strong>Stornos aus abgeschlossenen Monaten im laufenden Monat abziehen</strong></span>
|
||
</label>
|
||
{{ Form::hidden('settings[storno-points-current-month][type]', 'bool') }}
|
||
<small class="form-text text-muted">Standard: aus. Storniert wird nur, solange der Monat der Ursprungsbestellung noch läuft — ist der Monat ausgewertet und die Gutschrift erstellt, bleiben die Punkte unverändert. Eingeschaltet wandert der Stornobetrag stattdessen als Minus in den laufenden Monat. Die Stornorechnung selbst wird in beiden Fällen erstellt.</small>
|
||
</div>
|
||
</div>
|
||
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="card mb-2">
|
||
<div class="card-body">
|
||
<h4>Abo Einstellungen</h4>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Mindestlaufzeit des Abos in Monaten*</label>
|
||
{{ Form::text('settings[abo-min-duration][val]', \App\Models\Setting::getContentBySlug('abo-min-duration'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[abo-min-duration][type]', 'int') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Zeitfenster für einmalige Produkte vor Ausführung (Tage)*</label>
|
||
{{ Form::text('settings[abo-onetime-window-days][val]', \App\Models\Setting::getContentBySlug('abo-onetime-window-days'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[abo-onetime-window-days][type]', 'int') }}
|
||
<small class="form-text text-muted">Anzahl Tage vor der Abo-Ausführung, in denen einmalig Produkte aus dem normalen Sortiment hinzugefügt werden können (Standard: 4).</small>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Sperrfrist Abo bearbeiten vor Ausführung (Tage)*</label>
|
||
{{ Form::text('settings[abo-lock-days-change][val]', \App\Models\Setting::getContentBySlug('abo-lock-days-change'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[abo-lock-days-change][type]', 'int') }}
|
||
<small class="form-text text-muted">Anzahl Tage vor der Ausführung, ab der das Abo (Intervall/Produkte) nicht mehr bearbeitet werden kann (Standard: 10).</small>
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Sperrfrist Pausieren/Kündigen vor Ausführung (Tage)*</label>
|
||
{{ Form::text('settings[abo-lock-days-pause-cancel][val]', \App\Models\Setting::getContentBySlug('abo-lock-days-pause-cancel'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[abo-lock-days-pause-cancel][type]', 'int') }}
|
||
<small class="form-text text-muted">Anzahl Tage vor der Ausführung, ab der das Abo nicht mehr pausiert oder gekündigt werden kann (Standard: 3).</small>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">Pause-Intervall (Monate)*</label>
|
||
{{ Form::text('settings[abo-pause-interval-months][val]', \App\Models\Setting::getContentBySlug('abo-pause-interval-months'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[abo-pause-interval-months][type]', 'int') }}
|
||
<small class="form-text text-muted">Maximal eine Pause pro X Monate (rollierend ab der letzten Pause, Standard: 6).</small>
|
||
</div>
|
||
</div>
|
||
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="card mb-2">
|
||
<div class="card-body">
|
||
<h4>Auszeitparty</h4>
|
||
<div class="form-row">
|
||
<div class="col-sm-12">
|
||
<h5>Bonus Gutschein</h5>
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Gutschein Wert in €') }}*</label>
|
||
{{ Form::text('settings[hp-bonus-value][val]', \App\Models\Setting::getContentBySlug('hp-bonus-value'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[hp-bonus-value][type]', 'int') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Zielumsatz in €') }}*</label>
|
||
{{ Form::text('settings[hp-bonus-start][val]', \App\Models\Setting::getContentBySlug('hp-bonus-start'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[hp-bonus-start][type]', 'int') }}
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="form-row">
|
||
<div class="col-sm-12">
|
||
<h5>Bonus Stufen</h5>
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label">{{ __('Anzahl der Bonus Stufen ') }}*</label>
|
||
{{ Form::text('settings[hp-bonus-steps][val]', \App\Models\Setting::getContentBySlug('hp-bonus-steps'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[hp-bonus-steps][type]', 'int') }}
|
||
</div>
|
||
@if($hpBonusSteps = \App\Models\Setting::getContentBySlug('hp-bonus-steps'))
|
||
@for ($i=1; $i<=$hpBonusSteps; $i++)
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ $i }}.{{ __('Stufe Wert in €') }}*</label>
|
||
{{ Form::text('settings[hp-bonus-step-value-'.$i.'][val]', \App\Models\Setting::getContentBySlug('hp-bonus-step-value-'.$i), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[hp-bonus-step-value-'.$i.'][type]', 'int') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ $i }}.{{ __('Stufe min. Umsatz in €') }}*</label>
|
||
{{ Form::text('settings[hp-bonus-step-start-'.$i.'][val]', \App\Models\Setting::getContentBySlug('hp-bonus-step-start-'.$i), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[hp-bonus-step-start-'.$i.'][type]', 'int') }}
|
||
</div>
|
||
@endfor
|
||
@endif
|
||
</div>
|
||
|
||
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- DHL Configuration Section -->
|
||
<div class="card mb-2">
|
||
<div class="card-body">
|
||
<h4><i class="fas fa-truck"></i> DHL Versandeinstellungen</h4>
|
||
|
||
@if(Session::has('alert-save-dhl'))
|
||
<div class="alert alert-success" role="alert">
|
||
<i class="fas fa-check-circle"></i> {{ Session::get('alert-save-dhl') }}
|
||
</div>
|
||
@endif
|
||
|
||
<!-- DHL Standard-Einstellungen -->
|
||
<div class="form-row">
|
||
<div class="col-sm-12">
|
||
<h5>Standard-Einstellungen @if(config('dhl.config_source') == 'database')
|
||
<span class="badge badge-success">Database</span>
|
||
@else
|
||
<span class="badge badge-primary">Environment</span>
|
||
@endif</h5>
|
||
</div>
|
||
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('API Basis URL') }}*</label>
|
||
{{ Form::text('settings[dhl_base_url][val]', \App\Models\Setting::getContentBySlug('dhl_base_url') ?: 'https://api-eu.dhl.com', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_base_url][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('API Schlüssel') }}*</label>
|
||
{{ Form::text('settings[dhl_api_key][val]', \App\Models\Setting::getContentBySlug('dhl_api_key'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_api_key][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('Benutzername') }}*</label>
|
||
{{ Form::text('settings[dhl_username][val]', \App\Models\Setting::getContentBySlug('dhl_username'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_username][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('Passwort') }}*</label>
|
||
{{ Form::password('settings[dhl_password][val]', array('class'=>'form-control', 'value' => \App\Models\Setting::getContentBySlug('dhl_password'))) }}
|
||
{{ Form::hidden('settings[dhl_password][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('Standard Abrechnungsnummer') }}*</label>
|
||
{{ Form::text('settings[dhl_billing_number][val]', \App\Models\Setting::getContentBySlug('dhl_billing_number'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_billing_number][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('Standard Produktcode') }}*</label>
|
||
@php
|
||
$selectedDhlProduct = \App\Models\Setting::getContentBySlug('dhl_product') ?: 'V01PAK';
|
||
$selectedDhlProduct = \App\Services\DhlProductResolver::LEGACY_PRODUCT_CODE_ALIASES[$selectedDhlProduct] ?? $selectedDhlProduct;
|
||
$selectedDhlProduct = $selectedDhlProduct === 'V62WP' ? 'V62KP' : $selectedDhlProduct;
|
||
@endphp
|
||
{{ Form::select('settings[dhl_product][val]', [
|
||
'V01PAK' => 'V01PAK - DHL Paket National',
|
||
'V53WPAK' => 'V53WPAK - DHL Paket International',
|
||
'V62KP' => 'V62KP - DHL Kleinpaket'
|
||
], $selectedDhlProduct, array('class'=>'form-control custom-select')) }}
|
||
{{ Form::hidden('settings[dhl_product][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Label Format') }}*</label>
|
||
{{ Form::select('settings[dhl_label_format][val]', [
|
||
'PDF' => 'PDF',
|
||
'ZPL' => 'ZPL'
|
||
], \App\Models\Setting::getContentBySlug('dhl_label_format') ?: 'PDF', array('class'=>'form-control custom-select')) }}
|
||
{{ Form::hidden('settings[dhl_label_format][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="custom-control custom-checkbox mt-4">
|
||
{!! Form::checkbox('settings[dhl_use_queue][val]', 1, \App\Models\Setting::getContentBySlug('dhl_use_queue'), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label">Queue für asynchrone Verarbeitung verwenden</span>
|
||
</label>
|
||
{{ Form::hidden('settings[dhl_use_queue][type]', 'bool') }}
|
||
<small class="form-text text-muted">
|
||
<strong>Aktiviert:</strong> Versandlabel werden im Hintergrund erstellt (erfordert Queue Worker)<br>
|
||
<strong>Deaktiviert:</strong> Versandlabel werden sofort erstellt (synchron)
|
||
</small>
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="custom-control custom-checkbox mt-4">
|
||
{!! Form::checkbox('settings[dhl_print_only_if_codeable][val]', 1, \App\Models\Setting::getContentBySlug('dhl_print_only_if_codeable') ?? config('dhl.print_only_if_codeable', true), ['class'=>'custom-control-input']) !!}
|
||
<span class="custom-control-label">DHL-Leitcodierung erzwingen (mustEncode)</span>
|
||
</label>
|
||
{{ Form::hidden('settings[dhl_print_only_if_codeable][type]', 'bool') }}
|
||
<small class="form-text text-muted">
|
||
Aktiviert für deutsche Empfängeradressen <code>mustEncode=true</code>. DHL erstellt dann nur ein Label, wenn die Adresse leitcodierbar ist.
|
||
</small>
|
||
</div>
|
||
<div class="form-group col-sm-12">
|
||
<label class="form-label">{{ __('DHL Paket International Zielländer') }}</label>
|
||
@php
|
||
$dhlInternationalCountries = (new \App\Services\DhlProductResolver())->getSupportedInternationalCountries();
|
||
$dhlCountryCodes = array_keys(\App\Services\DhlProductResolver::DHL_COUNTRY_CODES);
|
||
$dhlInternationalCountryOptions = \App\Models\Country::query()
|
||
->where('active', 1)
|
||
->whereIn('code', $dhlCountryCodes)
|
||
->where('code', '!=', \App\Services\DhlProductResolver::DOMESTIC_COUNTRY)
|
||
->orderBy('de')
|
||
->get();
|
||
@endphp
|
||
<div class="row">
|
||
@foreach ($dhlInternationalCountryOptions as $countryOption)
|
||
<div class="col-sm-6 col-md-4 col-lg-3">
|
||
<label class="custom-control custom-checkbox">
|
||
{!! Form::checkbox(
|
||
'settings[dhl_international_countries][val][]',
|
||
$countryOption->code,
|
||
in_array($countryOption->code, $dhlInternationalCountries, true),
|
||
['class' => 'custom-control-input']
|
||
) !!}
|
||
<span class="custom-control-label">
|
||
{{ $countryOption->getLocated() }} ({{ $countryOption->code }})
|
||
</span>
|
||
</label>
|
||
</div>
|
||
@endforeach
|
||
</div>
|
||
{{ Form::hidden('settings[dhl_international_countries][type]', 'object') }}
|
||
<small class="form-text text-muted">
|
||
Aktivierte Länder verwenden im DHL-Modul automatisch V53WPAK. Deutschland bleibt separat über V01PAK/V62KP geregelt.
|
||
Länder außerhalb der EU-Zollunion ({{ implode(', ', \App\Services\DhlProductResolver::CUSTOMS_REQUIRED_COUNTRIES) }}) bleiben gesperrt,
|
||
solange das Modul keine Zolldaten (ExportDocument/CN23) erzeugt – Sendungen dorthin bitte manuell anlegen.
|
||
</small>
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<button type="button" class="btn btn-secondary" id="test-dhl-login-btn">
|
||
<i class="fas fa-key"></i> API Login testen
|
||
</button>
|
||
<div id="dhl-test-result" class="mt-3 text-left"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
|
||
<!-- DHL Account Numbers -->
|
||
<div class="form-row">
|
||
<div class="col-sm-12">
|
||
<h5>Account Nummern für verschiedene Produkte</h5>
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('V01PAK - DHL Paket National') }}*</label>
|
||
{{ Form::text('settings[dhl_account_v01pak][val]', \App\Models\Setting::getContentBySlug('dhl_account_v01pak'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_account_v01pak][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('V07PAK - DHL Retoure Online') }}</label>
|
||
{{ Form::text('settings[dhl_account_v07pak][val]', \App\Models\Setting::getContentBySlug('dhl_account_v07pak'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_account_v07pak][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('V53WPAK - DHL Paket International') }}</label>
|
||
{{ Form::text('settings[dhl_account_v53wpak][val]', \App\Models\Setting::getContentBySlug('dhl_account_v53wpak') ?: \App\Models\Setting::getContentBySlug('dhl_account_v53pak'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_account_v53wpak][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('V62KP - DHL Kleinpaket') }}</label>
|
||
{{ Form::text('settings[dhl_account_v62kp][val]', \App\Models\Setting::getContentBySlug('dhl_account_v62kp') ?: \App\Models\Setting::getContentBySlug('dhl_account_v62wp'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_account_v62kp][type]', 'text') }}
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
|
||
<!-- DHL Absenderadresse -->
|
||
<div class="form-row">
|
||
<div class="col-sm-12">
|
||
<h5>Absenderadresse</h5>
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Firmenname') }}*</label>
|
||
{{ Form::text('settings[dhl_sender_company][val]', \App\Models\Setting::getContentBySlug('dhl_sender_company') ?: 'mivita care gmbh', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_company][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Name (optional)') }}</label>
|
||
{{ Form::text('settings[dhl_sender_name][val]', \App\Models\Setting::getContentBySlug('dhl_sender_name'), array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_name][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Straße') }}*</label>
|
||
{{ Form::text('settings[dhl_sender_street][val]', \App\Models\Setting::getContentBySlug('dhl_sender_street') ?: 'Leinfeld', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_street][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Hausnummer') }}*</label>
|
||
{{ Form::text('settings[dhl_sender_house_number][val]', \App\Models\Setting::getContentBySlug('dhl_sender_house_number') ?: '2', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_house_number][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('PLZ') }}*</label>
|
||
{{ Form::text('settings[dhl_sender_postal_code][val]', \App\Models\Setting::getContentBySlug('dhl_sender_postal_code') ?: '87755', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_postal_code][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('Stadt') }}*</label>
|
||
{{ Form::text('settings[dhl_sender_city][val]', \App\Models\Setting::getContentBySlug('dhl_sender_city') ?: 'Kirchhaslach', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_city][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-4">
|
||
<label class="form-label">{{ __('Land') }}*</label>
|
||
{{ Form::select('settings[dhl_sender_country][val]', [
|
||
'DE' => 'Deutschland',
|
||
'AT' => 'Österreich',
|
||
'CH' => 'Schweiz'
|
||
], \App\Models\Setting::getContentBySlug('dhl_sender_country') ?: 'DE', array('class'=>'form-control custom-select')) }}
|
||
{{ Form::hidden('settings[dhl_sender_country][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('E-Mail') }}*</label>
|
||
{{ Form::email('settings[dhl_sender_email][val]', \App\Models\Setting::getContentBySlug('dhl_sender_email') ?: 'versand@mivita.care', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_email][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Telefon') }}</label>
|
||
{{ Form::text('settings[dhl_sender_phone][val]', \App\Models\Setting::getContentBySlug('dhl_sender_phone') ?: '+49 123 456789', array('class'=>'form-control')) }}
|
||
{{ Form::hidden('settings[dhl_sender_phone][type]', 'text') }}
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<!-- DHL Absenderadresse -->
|
||
<div class="form-row">
|
||
<div class="col-sm-12">
|
||
<h5>Papierformat</h5>
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Versandlabel') }}*</label>
|
||
{{ Form::select('settings[dhl_print_format][val]', [
|
||
'A4' => 'Common Label Laserdruck A4 Normalpapier',
|
||
'910-300-600' => 'Common Label Thermodruck 103 x 199 mm (910-300-600)',
|
||
'910-300-610' => 'Common Label Thermodruck 103 x 199 mm (910-300-610)',
|
||
'910-300-700' => 'Common Label Laserdruck 105 x 205 mm (DIN A5 Normalpapier, 910-300-700)',
|
||
'910-300-700-oz' => 'Common Label Laserdruck 105 x 205 mm (DIN A5 Normalpapier, 910-300-700) ohne Zusatzetiketten',
|
||
'910-300-710' => 'Common Label Laserdruck 105 x 208 mm (910-300-710)',
|
||
'910-300-300' => 'Common Label Laserdruck 105 x 148 mm (DIN A5 Normalpapier, 910-300-300)',
|
||
'910-300-300-oz' => 'Common Label Laserdruck 105 x 148 mm (DIN A5 Normalpapier, 910-300-300) ohne Zusatzetiketten',
|
||
'910-300-400' => 'Common Label Thermodruck 103 x 150 mm (910-300-400)',
|
||
'910-300-410' => 'Common Label Thermodruck 103 x 150 mm (910-300-410)',
|
||
'100x70mm' => '100x70mm',
|
||
], \App\Models\Setting::getContentBySlug('dhl_print_format') ?: 'A4', array('class'=>'form-control custom-select')) }}
|
||
{{ Form::hidden('settings[dhl_print_format][type]', 'text') }}
|
||
</div>
|
||
<div class="form-group col-sm-6">
|
||
<label class="form-label">{{ __('Retoure Label') }}*</label>
|
||
{{ Form::select('settings[dhl_retoure_print_format][val]', [
|
||
'A4' => 'Common Label Laserdruck A4 Normalpapier',
|
||
'910-300-600' => 'Common Label Thermodruck 103 x 199 mm (910-300-600)',
|
||
'910-300-610' => 'Common Label Thermodruck 103 x 199 mm (910-300-610)',
|
||
'910-300-700' => 'Common Label Laserdruck 105 x 205 mm (DIN A5 Normalpapier, 910-300-700)',
|
||
'910-300-700-oz' => 'Common Label Laserdruck 105 x 205 mm (DIN A5 Normalpapier, 910-300-700) ohne Zusatzetiketten',
|
||
'910-300-710' => 'Common Label Laserdruck 105 x 208 mm (910-300-710)',
|
||
'910-300-300' => 'Common Label Laserdruck 105 x 148 mm (DIN A5 Normalpapier, 910-300-300)',
|
||
'910-300-300-oz' => 'Common Label Laserdruck 105 x 148 mm (DIN A5 Normalpapier, 910-300-300) ohne Zusatzetiketten',
|
||
'910-300-400' => 'Common Label Thermodruck 103 x 150 mm (910-300-400)',
|
||
'910-300-410' => 'Common Label Thermodruck 103 x 150 mm (910-300-410)',
|
||
'100x70mm' => '100x70mm',
|
||
], \App\Models\Setting::getContentBySlug('dhl_retoure_print_format') ?: 'A4', array('class'=>'form-control custom-select')) }}
|
||
{{ Form::hidden('settings[dhl_retoure_print_format][type]', 'text') }}
|
||
</div>
|
||
</div>
|
||
|
||
<button type="submit" name="action" value="save_dhl" class="btn btn-primary btn-sm mb-2">
|
||
<i class="fas fa-truck"></i> DHL Einstellungen speichern
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
{!! Form::close() !!}
|
||
|
||
|
||
@endsection
|
||
|
||
@section('scripts')
|
||
<script>
|
||
$(document).ready(function() {
|
||
// --- DHL LOGIN TEST ---
|
||
$('#test-dhl-login-btn').click(function() {
|
||
var btn = $(this);
|
||
var spinner = btn.find('.spinner-border');
|
||
var resultContainer = $('#dhl-test-result');
|
||
|
||
btn.prop('disabled', true);
|
||
spinner.show();
|
||
resultContainer.html('');
|
||
|
||
$.ajax({
|
||
url: '{{ route("admin.dhl.test_login") }}',
|
||
method: 'POST',
|
||
data: {
|
||
_token: '{{ csrf_token() }}'
|
||
},
|
||
success: function(response) {
|
||
var alertClass = response.success ? 'alert-success' : 'alert-danger';
|
||
var icon = response.success ? 'fas fa-check-circle' : 'fas fa-times-circle';
|
||
var resultHtml = `
|
||
<div class="alert ${alertClass} d-flex align-items-center" role="alert">
|
||
<i class="${icon} mr-2"></i>
|
||
<div>
|
||
${response.message}
|
||
</div>
|
||
</div>
|
||
`;
|
||
resultContainer.html(resultHtml);
|
||
},
|
||
error: function(xhr) {
|
||
var errorHtml = `
|
||
<div class="alert alert-danger d-flex align-items-center" role="alert">
|
||
<i class="fas fa-server mr-2"></i>
|
||
<div>
|
||
Ein Serverfehler ist aufgetreten. Prüfen Sie die Browser-Konsole und die Laravel-Logs.
|
||
</div>
|
||
</div>
|
||
`;
|
||
resultContainer.html(errorHtml);
|
||
},
|
||
complete: function() {
|
||
btn.prop('disabled', false);
|
||
spinner.hide();
|
||
}
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
@endsection
|