Resolve "New invoice service" #1669

Merged
korina.cordero merged 105 commits from 744-new-invoice-service into master 2023-11-22 08:54:54 +00:00
Showing only changes of commit 31c0f4a102 - Show all commits

View file

@ -173,6 +173,8 @@ class AuthController extends ApiController
}
if (!$customer_user) {
error_log("We don't have a customer user for session " . $this->session->getID());
$customer_user = $this->findCustomerUserByNumber($this->session->getPhoneNumber());
if ($customer_user === null) {
@ -183,15 +185,17 @@ class AuthController extends ApiController
// save
$this->em->persist($customer_user);
$this->em->flush();
} else {
error_log("Found existing customer user for " . $this->session->getPhoneNumber());
}
}
$this->em->flush();
error_log("Customer user ID is " . $customer_user->getID());
// set session customer user
$this->session->setCustomerUser($customer_user);
$this->em->flush();
// response
return new ApiResponse(true, '', [