From 5f51bc4cc9213861be817b613d2ca963e6424270 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Mon, 23 Sep 2019 22:18:39 -0400 Subject: [PATCH] Fixed base_url var in setup, added single quotes in phone number for setup removed starting_location in setup as this is not used anymore and caused the setting table not to populate remove auto increment for settings in the new db dump this should fix the login issues after setup --- db.sql | 6 +++--- setup.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/db.sql b/db.sql index 4aaaee6e..9fc56fcf 100644 --- a/db.sql +++ b/db.sql @@ -414,6 +414,7 @@ CREATE TABLE `logs` ( `log_action` varchar(255) NOT NULL, `log_description` varchar(255) NOT NULL, `log_created_at` datetime NOT NULL, + `client_id` int(11) DEFAULT NULL, `invoice_id` int(11) DEFAULT NULL, `quote_id` int(11) DEFAULT NULL, `recurring_id` int(11) DEFAULT NULL, @@ -564,7 +565,7 @@ DROP TABLE IF EXISTS `revenues`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `revenues` ( - `revenue_id` int(11) NOT NULL AUTO_INCREMENT, + `revenue_id` int(11) NOT NULL, `revenue_date` date NOT NULL, `revenue_amount` decimal(15,2) NOT NULL, `revenue_payment_method` varchar(200) DEFAULT NULL, @@ -630,7 +631,6 @@ CREATE TABLE `settings` ( `config_stripe_enable` int(1) DEFAULT NULL, `config_stripe_publishable` varchar(255) DEFAULT NULL, `config_stripe_secret` varchar(255) DEFAULT NULL, - `config_base_url` varchar(200) DEFAULT NULL, PRIMARY KEY (`company_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -818,4 +818,4 @@ CREATE TABLE `vendors` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-09-14 20:38:23 +-- Dump completed on 2019-09-23 22:16:00 diff --git a/setup.php b/setup.php index d95e6dce..8c250a34 100644 --- a/setup.php +++ b/setup.php @@ -91,7 +91,7 @@ if(isset($_POST['add_database'])){ fwrite($myfile, $txt); - $txt = "\$config_base_url = '\$config_base_url';\n"; + $txt = "\$config_base_url = '$config_base_url';\n"; fwrite($myfile, $txt); @@ -182,7 +182,7 @@ if(isset($_POST['add_company_settings'])){ mysqli_query($mysqli,"INSERT INTO user_companies SET user_id = $user_id, company_id = $company_id"); - mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_company_name = '$config_company_name', config_company_address = '$config_company_address', config_company_city = '$config_company_city', config_company_state = '$config_company_state', config_company_zip = '$config_company_zip', config_company_phone = $config_company_phone, config_company_site = '$config_company_site', config_start_page = 'dashboard.php', config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1"); + mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_company_name = '$config_company_name', config_company_address = '$config_company_address', config_company_city = '$config_company_city', config_company_state = '$config_company_state', config_company_zip = '$config_company_zip', config_company_phone = '$config_company_phone', config_company_site = '$config_company_site', config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1"); //Create Some Data