mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 12:07:15 +01:00
Tracking Status from Sendcloud fixes
This commit is contained in:
parent
e3488040ec
commit
1985a69cfa
@ -138,6 +138,7 @@ class SendCloudApi
|
|||||||
case 'shipment-on-route':
|
case 'shipment-on-route':
|
||||||
case 'driver-on-route':
|
case 'driver-on-route':
|
||||||
$highest = ShipmentStatus::EnRoute;
|
$highest = ShipmentStatus::EnRoute;
|
||||||
|
break;
|
||||||
case 'delivered': return ShipmentStatus::Delivered;
|
case 'delivered': return ShipmentStatus::Delivered;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ $shipments = $db->fetchGroup($shipments_sql);
|
|||||||
|
|
||||||
foreach ($shipments as $module => $vps) {
|
foreach ($shipments as $module => $vps) {
|
||||||
list($moduleId, $moduleName) = explode(';', $module,2);
|
list($moduleId, $moduleName) = explode(';', $module,2);
|
||||||
$module = $app->erp->LoadVersandModul($moduleName, $moduleName);
|
$module = $app->erp->LoadVersandModul($moduleName, intval($moduleId));
|
||||||
|
|
||||||
foreach ($vps as $vp) {
|
foreach ($vps as $vp) {
|
||||||
$status = match ($module->GetShipmentStatus($vp['tracking'])) {
|
$status = match ($module->GetShipmentStatus($vp['tracking'])) {
|
||||||
@ -38,6 +38,6 @@ foreach ($shipments as $module => $vps) {
|
|||||||
};
|
};
|
||||||
if ($status === null || $status === $vp['status']) continue;
|
if ($status === null || $status === $vp['status']) continue;
|
||||||
$db->perform('UPDATE versandpakete SET status = :status WHERE id = :id',
|
$db->perform('UPDATE versandpakete SET status = :status WHERE id = :id',
|
||||||
[':status' => $status, ':id' => $vp['id']]);
|
['status' => $status, 'id' => $vp['id']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user