mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +03:00
Soft-Delete customer appointments when deleting a customer.
This commit is contained in:
parent
0e316e7dea
commit
353a13fa38
1 changed files with 1 additions and 0 deletions
|
@ -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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue