Soft-Delete customer appointments when deleting a customer.

This commit is contained in:
Alex Tselegidis 2022-05-10 14:40:02 +02:00
parent 0e316e7dea
commit 353a13fa38

View file

@ -208,6 +208,7 @@ class Customers_model extends EA_Model {
else else
{ {
$this->db->update('users', ['delete_datetime' => date('Y-m-d H:i:s')], ['id' => $customer_id]); $this->db->update('users', ['delete_datetime' => date('Y-m-d H:i:s')], ['id' => $customer_id]);
$this->db->update('appointments', ['delete_datetime' => date('Y-m-d H:i:s')], ['id_users_customer' => $customer_id, 'delete_datetime' => NULL]);
} }
} }