Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Support staff are mostly interested in the error and emergency logs, but depending on the issue the other logs may be important. The error log contains PHP exceptions, and the emergency log contains Blesta errors. Find the files with the most recent date, and open them to find the errors. If the error is reproducible and you have SSH access to the server, you can "tail" the log files while reproducing the error to more easily find what you need. For example: tail -f general-*.log will tail all of the log files at once.

Forcefully disable auto-debit for clients that do not have active services

Clients who have no active services, yet have open invoices with auto-debit enabled will be charged. This query will create a client setting for autodebit and set it to false for any clients that do not have any active services. Backup your database first!

Code Block
languagesql
INSERT INTO client_settings (client_settings.key, client_settings.client_id, client_settings.value) SELECT 'autodebit', `clients`.`id`, 'true' FROM `clients` LEFT JOIN `services` ON `services`.`client_id` = `clients`.`id` AND `services`.`status` = 'active' LEFT JOIN `client_settings` ON `client_settings`.`client_id` = `clients`.`id` AND `client_settings`.`key` = 'autodebit'  WHERE `services`.`id` IS NULL AND `client_settings`.`key` IS NULL;