Load the appointment and customer data after inserting them for the first time
This commit is contained in:
parent
a76cf2dedb
commit
f2bb4519a5
1 changed files with 3 additions and 2 deletions
|
@ -497,11 +497,12 @@ class Booking extends EA_Controller {
|
|||
// Save customer language (the language which is used to render the booking page).
|
||||
$customer['language'] = session('language') ?? config('language');
|
||||
$customer_id = $this->customers_model->save($customer);
|
||||
$customer = $this->customers_model->find($customer_id);
|
||||
|
||||
$appointment['id_users_customer'] = $customer_id;
|
||||
$appointment['is_unavailable'] = (int)$appointment['is_unavailable'];
|
||||
$appointment['id'] = $this->appointments_model->save($appointment);
|
||||
$appointment['hash'] = $this->appointments_model->value($appointment['id'], 'hash');
|
||||
$appointment_id = $this->appointments_model->save($appointment);
|
||||
$appointment = $this->appointments_model->find($appointment_id);
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
|
|
Loading…
Reference in a new issue