27-05-2026 Update DHL Modul v2.0

This commit is contained in:
Kevin 2026-05-27 13:40:38 +00:00
parent 53bdba33cd
commit 036595be94
41 changed files with 3346 additions and 310 deletions

View file

@ -170,11 +170,15 @@
</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 = $selectedDhlProduct === 'V62WP' ? 'V62KP' : $selectedDhlProduct;
@endphp
{{ Form::select('settings[dhl_product][val]', [
'V01PAK' => 'V01PAK - DHL Paket National',
'V53PAK' => 'V53PAK - DHL Paket International',
'V62WP' => 'V62WP - Warenpost National'
], \App\Models\Setting::getContentBySlug('dhl_product') ?: 'V01PAK', array('class'=>'form-control custom-select')) }}
'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">
@ -196,6 +200,50 @@
<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 V53PAK. Deutschland bleibt separat über V01PAK/V62KP geregelt.
</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
@ -227,9 +275,9 @@
{{ Form::hidden('settings[dhl_account_v53pak][type]', 'text') }}
</div>
<div class="form-group col-sm-6">
<label class="form-label">{{ __('V62WP - Warenpost National') }}</label>
{{ Form::text('settings[dhl_account_v62wp][val]', \App\Models\Setting::getContentBySlug('dhl_account_v62wp'), array('class'=>'form-control')) }}
{{ Form::hidden('settings[dhl_account_v62wp][type]', 'text') }}
<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>