Resolve "Rider app trade-in support" #1723

Merged
arcticzero merged 79 commits from 783-rider-app-trade-in-support into master 2024-04-23 13:11:53 +00:00
Showing only changes of commit 20f5bb08e0 - Show all commits

View file

@ -41,7 +41,16 @@ class InvoiceController extends ApiController
}
// get customer location from customer_metadata using customer id
$coordinates = $this->getCustomerMetadata($cust);
$lng = $req->request->get('longitude');
$lat = $req->request->get('latitude');
if ((empty($lng)) || (empty($lat)))
{
// use customer metadata location as basis
$coordinates = $this->getCustomerMetadata($cust);
}
else
$coordinates = new Point($lng, $lat);
// make invoice criteria
$icrit = new InvoiceCriteria();