From d5d48938409030e436d7666ba138cbc2eed96044 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 21 Nov 2020 23:08:07 +0200 Subject: [PATCH] Corrected method calls in when appointment gets saved from the backend --- application/controllers/Backend_api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/Backend_api.php b/application/controllers/Backend_api.php index d12cdd1d..6f1e7a7e 100755 --- a/application/controllers/Backend_api.php +++ b/application/controllers/Backend_api.php @@ -295,6 +295,7 @@ class Backend_api extends EA_Controller { } $manage_mode = isset($appointment['id']); + // If the appointment does not contain the customer record id, then it means that is is going to be // inserted. Get the customer's record ID. if ( ! isset($appointment['id_users_customer'])) @@ -328,8 +329,8 @@ class Backend_api extends EA_Controller { 'time_format' => $this->settings_model->get_setting('time_format') ]; - $this->synchronization->sync_appointment_deleted($appointment, $provider); - $this->notifications->notify_appointment_deleted($appointment, $service, $provider, $customer, $settings); + $this->synchronization->sync_appointment_saved($appointment, $service, $provider, $customer, $service, $manage_mode); + $this->notifications->notify_appointment_saved($appointment, $service, $provider, $customer, $settings); $response = AJAX_SUCCESS; }