Resolve "Send SMS to hub when no inventory" #1467

Merged
korina.cordero merged 24 commits from 553-send-sms-to-hub-when-no-inventory into master 2021-04-28 07:28:41 +00:00
Showing only changes of commit d812e34797 - Show all commits

View file

@ -306,7 +306,7 @@ class HubSelector
protected function getClosestHubsWithTime(Point $point, $limit_results, $limit_distance, $date_time)
{
// get closest hubs that are open at the given time based on st_distance function from db
$query = $this->em->createQuery('SELECT h, st_distance(h.coordinates, point(:lng, :lat)) as dist FROM App\Entity\Hub h' . ($time ? ' WHERE :time BETWEEN h.time_open AND h.time_close' : '') . ' ORDER BY dist')
$query = $this->em->createQuery('SELECT h, st_distance(h.coordinates, point(:lng, :lat)) as dist FROM App\Entity\Hub h' . ($time ? ' WHERE :time BETWEEN h.time_open AND h.time_close' : '') . ' ORDER BY dist');
$query = $this->em->createQuery($query_string)
->setParameter('lat', $point->getLatitude())