DHL-Versand: Sendungs-Info-Button in Bestelllisten & Absenderadresse

Neuer schlanker DHL-Info-Button (getDhlShippingButton) in den Order- und
Shop-Sales-Datatables, oeffnet ein Read-only-Modal (modal_dhl_shipping_info)
mit den Tracking-Daten; dhlShipments wird dafuer eager geladen.
Absenderadresse in config/dhl.php aktualisiert, plus kleinere Fixes in
DhlShipmentController/Service/DataHelper und CreateReturnLabelJob.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kevin 2026-06-25 13:37:13 +00:00
parent 7a620d66ae
commit 42ef4dd1c6
14 changed files with 315 additions and 61 deletions

View file

@ -43,10 +43,10 @@ function dhlReferenceConfig(): array
'sender' => [
'company' => 'mivita care gmbh',
'name' => '',
'street' => 'Leinfeld',
'house_number' => '2',
'postalCode' => '87755',
'city' => 'Kirchhaslach',
'street' => 'Waldstr.',
'houseNumber' => '3e',
'postalCode' => '86498',
'city' => 'Kettershausen',
'country' => 'DE',
'email' => 'versand@example.com',
'phone' => '+4987654321',
@ -88,6 +88,17 @@ it('normalizes the DHL reference to the API length limit', function () {
->and($orderData['reference'])->toBe('Sehr lange interne Referenz fuer DH');
});
it('uses the sender house number from DHL config', function () {
$orderData = DhlDataHelper::prepareOrderData(
dhlReferenceOrder(),
1.2,
dhlReferenceOptions(),
dhlReferenceConfig()
);
expect($orderData['shipper']['houseNumber'])->toBe('3e');
});
it('passes the DHL mustEncode option into order data', function () {
$orderData = DhlDataHelper::prepareOrderData(
dhlReferenceOrder(),