test fix driver issues
This commit is contained in:
parent
b7f8a4b4e3
commit
9bae2414d1
18
include/controllers/default/cockpit2/api/test/driverfix.php
Normal file
18
include/controllers/default/cockpit2/api/test/driverfix.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$q = '
|
||||
select `order`.* from `order`
|
||||
left join restaurant using (id_restaurant)
|
||||
left join admin_notification_log using (id_order)
|
||||
where restaurant.delivery_service=1 and restaurant.active=1 and admin_notification_log.id_admin_notification_log is null
|
||||
and `order`.date > date_sub(now(), interval 10 minute)
|
||||
order by `order`.id_order desc
|
||||
';
|
||||
$orders = Order::q($q);
|
||||
|
||||
foreach ($orders as $order) {
|
||||
echo $order->id_order."\n";
|
||||
$order->notifyDrivers();
|
||||
}
|
||||
|
||||
echo 'done';
|
||||
Loading…
x
Reference in New Issue
Block a user