mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 18:33:49 +00:00
change the Billing when you change the Tenant name
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
@@ -182,6 +183,16 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
// update billing, if installed
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
|
||||
$sql = "update v_billings set ";
|
||||
$sql .= "type_value = '".$domain_name."' ";
|
||||
$sql .= "where type_value = '".$original_domain_name."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
// rename switch/storage/voicemail/default/[domain] (folder)
|
||||
if ( isset($_SESSION['switch']['voicemail']['dir']) && file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$original_domain_name) ) {
|
||||
@rename($_SESSION['switch']['voicemail']['dir']."/default/".$original_domain_name, $_SESSION['switch']['voicemail']['dir']."/default/".$domain_name); // folder
|
||||
@@ -702,4 +713,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -306,4 +306,4 @@ if (sizeof($_REQUEST) > 1) {
|
||||
|
||||
//include the footer
|
||||
//require_once "resources/footer.php";
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user