GO: Add setting "defaultContent" as a workaround for international shipments until "Paketmarke"-Form gets updated

This commit is contained in:
Andreas Palm 2025-01-13 22:26:55 +01:00
parent 16bf511783
commit f6bbe6522e

View File

@ -61,6 +61,7 @@ class Versandart_go extends Versanddienstleister
'consignorEmail' => ['typ' => 'text', 'bezeichnung' => 'Absender Email:'], 'consignorEmail' => ['typ' => 'text', 'bezeichnung' => 'Absender Email:'],
'defaultPickupFrom' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit von:'], 'defaultPickupFrom' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit von:'],
'defaultPickupTill' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit bis:'], 'defaultPickupTill' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit bis:'],
'defaultContent' => ['typ' => 'text', 'bezeichnung' => 'Standard Inhalt:']
]; ];
} }
@ -73,6 +74,7 @@ class Versandart_go extends Versanddienstleister
$order->shipment->orderStatus = $this->settings->orderAsDraft ? OrderStatus::New : OrderStatus::Released; $order->shipment->orderStatus = $this->settings->orderAsDraft ? OrderStatus::New : OrderStatus::Released;
$order->shipment->SetService($json->product); $order->shipment->SetService($json->product);
$order->shipment->customerReference = $json->order_number; $order->shipment->customerReference = $json->order_number;
$order->shipment->content = $this->settings->defaultContent ?? '';
$order->shipment->weight = floatval($json->weight); $order->shipment->weight = floatval($json->weight);
$order->shipment->pickup->dateFrom = new DateTime($this->settings->defaultPickupFrom); $order->shipment->pickup->dateFrom = new DateTime($this->settings->defaultPickupFrom);
if ($order->shipment->pickup->dateFrom < new DateTime('now')) if ($order->shipment->pickup->dateFrom < new DateTime('now'))