diff --git a/classes/Carrier/SendCloud/SendCloudApi.php b/classes/Carrier/SendCloud/SendCloudApi.php index be52229e..df9425e1 100644 --- a/classes/Carrier/SendCloud/SendCloudApi.php +++ b/classes/Carrier/SendCloud/SendCloudApi.php @@ -138,6 +138,7 @@ class SendCloudApi case 'shipment-on-route': case 'driver-on-route': $highest = ShipmentStatus::EnRoute; + break; case 'delivered': return ShipmentStatus::Delivered; } } diff --git a/cronjobs/shipment_tracking.php b/cronjobs/shipment_tracking.php index 5fc99cf1..0a41a011 100644 --- a/cronjobs/shipment_tracking.php +++ b/cronjobs/shipment_tracking.php @@ -27,7 +27,7 @@ $shipments = $db->fetchGroup($shipments_sql); foreach ($shipments as $module => $vps) { list($moduleId, $moduleName) = explode(';', $module,2); - $module = $app->erp->LoadVersandModul($moduleName, $moduleName); + $module = $app->erp->LoadVersandModul($moduleName, intval($moduleId)); foreach ($vps as $vp) { $status = match ($module->GetShipmentStatus($vp['tracking'])) { @@ -38,6 +38,6 @@ foreach ($shipments as $module => $vps) { }; if ($status === null || $status === $vp['status']) continue; $db->perform('UPDATE versandpakete SET status = :status WHERE id = :id', - [':status' => $status, ':id' => $vp['id']]); + ['status' => $status, 'id' => $vp['id']]); } }