Add source to invoice criteria. Modify invoice rules to get service fees from... #1701

Merged
arcticzero merged 217 commits from 746-resq-2-0-final into master 2023-11-22 08:54:48 +00:00
Showing only changes of commit c32b7d68c7 - Show all commits

View file

@ -389,7 +389,7 @@ class RiderAppController extends APIController
}
public function acceptJobOrder(Request $req, EntityManagerInterface $em)
public function acceptJobOrder(Request $req, EntityManagerInterface $em, MQTTClientApiv2 $mclientv2)
{
$required_params = ['jo_id'];
@ -412,6 +412,14 @@ class RiderAppController extends APIController
// set jo status to in transit
$jo->setStatus(JOStatus::IN_TRANSIT);
// NOTE: send new in transit event to new app
$payload = [
'event' => 'in_transit',
'jo_id' => $jo->getID(),
];
$mclientv2->sendEvent($jo, $payload);
// set delivery status
$jo->setDeliveryStatus(DeliveryStatus::RIDER_ACCEPT);