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

This commit is contained in:
johnny@pittpc.com 2019-09-23 22:18:39 -04:00
parent a9e3d0fa7e
commit 5f51bc4cc9
2 changed files with 5 additions and 5 deletions

6
db.sql
View File

@ -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

View File

@ -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