From 1c98e61cf872b884726bce9db1febfc60c9324fd Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Mon, 30 Mar 2020 20:01:59 -0400 Subject: [PATCH] Added initial country support for Canada --- add_client_modal.php | 17 ++++++++++++++++- add_company_modal.php | 17 ++++++++++++++++- add_location_modal.php | 17 ++++++++++++++++- add_vendor_modal.php | 17 ++++++++++++++++- client.php | 1 + client_contacts.php | 1 + client_locations.php | 1 + client_vendors.php | 1 + clients.php | 1 + companies.php | 15 ++++++++------- db.sql | 10 +++++++--- delete_confirm_modal.php | 17 +++++++++++++++++ edit_client_modal.php | 17 ++++++++++++++++- edit_company_modal.php | 17 ++++++++++++++++- edit_contact_modal.php | 1 + edit_location_modal.php | 17 ++++++++++++++++- edit_vendor_modal.php | 17 ++++++++++++++++- get_settings.php | 31 ++++++++++++++++++++++++++++++- post.php | 27 ++++++++++++++++++--------- settings-company.php | 17 ++++++++++++++++- setup.php | 37 ++++++++++++++++++++++++++++++++++--- vendors.php | 1 + 22 files changed, 265 insertions(+), 32 deletions(-) create mode 100644 delete_confirm_modal.php diff --git a/add_client_modal.php b/add_client_modal.php index dcbc939e..0eba4b98 100644 --- a/add_client_modal.php +++ b/add_client_modal.php @@ -79,6 +79,21 @@
+
+ +
+
+ +
+ +
+
+
@@ -120,7 +135,7 @@
- +
diff --git a/add_company_modal.php b/add_company_modal.php index eda1d4e7..ebfca29d 100644 --- a/add_company_modal.php +++ b/add_company_modal.php @@ -20,6 +20,21 @@
+
+ +
+
+ +
+ +
+
+
@@ -61,7 +76,7 @@
- +
diff --git a/add_location_modal.php b/add_location_modal.php index 05b6fd24..503c8514 100644 --- a/add_location_modal.php +++ b/add_location_modal.php @@ -59,6 +59,21 @@
+
+ +
+
+ +
+ +
+
+
@@ -100,7 +115,7 @@
- +
diff --git a/add_vendor_modal.php b/add_vendor_modal.php index b5dca7f2..79aca15a 100644 --- a/add_vendor_modal.php +++ b/add_vendor_modal.php @@ -66,6 +66,21 @@
+
+ +
+
+ +
+ +
+
+
@@ -107,7 +122,7 @@
- +
diff --git a/client.php b/client.php index a8726276..fcc6b591 100644 --- a/client.php +++ b/client.php @@ -16,6 +16,7 @@ if(isset($_GET['client_id'])){ $row = mysqli_fetch_array($sql); $client_name = $row['client_name']; $client_type = $row['client_type']; + $client_country = $row['client_country']; $client_address = $row['client_address']; $client_city = $row['client_city']; $client_state = $row['client_state']; diff --git a/client_contacts.php b/client_contacts.php index f2796e8b..7fded3df 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -152,6 +152,7 @@ $total_pages = ceil($total_found_rows / 10); +
diff --git a/client_locations.php b/client_locations.php index 2ca5e8eb..262f5259 100644 --- a/client_locations.php +++ b/client_locations.php @@ -84,6 +84,7 @@ $total_pages = ceil($total_found_rows / 10); while($row = mysqli_fetch_array($sql)){ $location_id = $row['location_id']; $location_name = $row['location_name']; + $location_country = $row['location_country']; $location_address = $row['location_address']; $location_city = $row['location_city']; $location_state = $row['location_state']; diff --git a/client_vendors.php b/client_vendors.php index 16c84477..1aca2acb 100644 --- a/client_vendors.php +++ b/client_vendors.php @@ -86,6 +86,7 @@ $total_pages = ceil($total_found_rows / 10); $vendor_name = $row['vendor_name']; $vendor_description = $row['vendor_description']; $vendor_account_number = $row['vendor_account_number']; + $vendor_country = $row['vendor_country']; $vendor_address = $row['vendor_address']; $vendor_city = $row['vendor_city']; $vendor_state = $row['vendor_state']; diff --git a/clients.php b/clients.php index a7e523b4..e2ac819a 100644 --- a/clients.php +++ b/clients.php @@ -116,6 +116,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); $client_id = $row['client_id']; $client_name = $row['client_name']; $client_type = $row['client_type']; + $client_country = $row['client_country']; $client_address = $row['client_address']; $client_city = $row['client_city']; $client_state = $row['client_state']; diff --git a/companies.php b/companies.php index 9927b187..f05194cd 100644 --- a/companies.php +++ b/companies.php @@ -78,13 +78,14 @@ while($row = mysqli_fetch_array($sql)){ $company_id = $row['company_id']; $company_name = $row['company_name']; - $company_address = $row['config_company_address']; - $company_city = $row['config_company_city']; - $company_state = $row['config_company_state']; - $company_zip = $row['config_company_zip']; - $company_phone = $row['config_company_phone']; - $company_site = $row['config_company_site']; - $company_logo = $row['config_invoice_logo']; + $company_country = $row['company_country']; + $company_address = $row['company_address']; + $company_city = $row['company_city']; + $company_state = $row['company_state']; + $company_zip = $row['company_zip']; + $company_phone = $row['company_phone']; + $company_site = $row['company_site']; + $company_logo = $row['company_invoice_logo']; $initials = initials($company_name); diff --git a/db.sql b/db.sql index 2f8f56e2..ad6714ff 100644 --- a/db.sql +++ b/db.sql @@ -1,8 +1,8 @@ --- MariaDB dump 10.17 Distrib 10.4.11-MariaDB, for debian-linux-gnu (x86_64) +-- MariaDB dump 10.17 Distrib 10.4.12-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: admin_crm -- ------------------------------------------------------ --- Server version 10.4.11-MariaDB-1:10.4.11+maria~bionic +-- Server version 10.4.12-MariaDB-1:10.4.12+maria~bionic /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -134,6 +134,7 @@ CREATE TABLE `clients` ( `client_id` int(11) NOT NULL AUTO_INCREMENT, `client_name` varchar(200) NOT NULL, `client_type` varchar(200) DEFAULT NULL, + `client_country` varchar(200) DEFAULT NULL, `client_address` varchar(200) DEFAULT NULL, `client_city` varchar(200) DEFAULT NULL, `client_state` varchar(200) DEFAULT NULL, @@ -370,6 +371,7 @@ DROP TABLE IF EXISTS `locations`; CREATE TABLE `locations` ( `location_id` int(11) NOT NULL AUTO_INCREMENT, `location_name` varchar(200) NOT NULL, + `location_country` varchar(200) DEFAULT NULL, `location_address` varchar(200) DEFAULT NULL, `location_city` varchar(200) DEFAULT NULL, `location_state` varchar(200) DEFAULT NULL, @@ -635,6 +637,7 @@ CREATE TABLE `settings` ( `config_default_calendar` int(11) DEFAULT NULL, `config_default_net_terms` int(11) DEFAULT NULL, `config_company_name` varchar(200) DEFAULT NULL, + `config_company_country` varchar(200) DEFAULT NULL, `config_company_address` varchar(200) DEFAULT NULL, `config_company_city` varchar(200) DEFAULT NULL, `config_company_state` varchar(200) DEFAULT NULL, @@ -828,6 +831,7 @@ CREATE TABLE `vendors` ( `vendor_id` int(11) NOT NULL AUTO_INCREMENT, `vendor_name` varchar(200) NOT NULL, `vendor_description` varchar(200) DEFAULT NULL, + `vendor_country` varchar(200) DEFAULT NULL, `vendor_address` varchar(200) DEFAULT NULL, `vendor_city` varchar(200) DEFAULT NULL, `vendor_state` varchar(200) DEFAULT NULL, @@ -857,4 +861,4 @@ CREATE TABLE `vendors` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-02-24 16:59:52 +-- Dump completed on 2020-03-30 20:01:15 diff --git a/delete_confirm_modal.php b/delete_confirm_modal.php new file mode 100644 index 00000000..1dc2f9e5 --- /dev/null +++ b/delete_confirm_modal.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/edit_client_modal.php b/edit_client_modal.php index 1c3fd53e..16c3711a 100644 --- a/edit_client_modal.php +++ b/edit_client_modal.php @@ -79,6 +79,21 @@
+
+ +
+
+ +
+ +
+
+
@@ -120,7 +135,7 @@
- +
diff --git a/edit_company_modal.php b/edit_company_modal.php index 811b42ee..9805ecb9 100644 --- a/edit_company_modal.php +++ b/edit_company_modal.php @@ -21,6 +21,21 @@
+
+ +
+
+ +
+ +
+
+
@@ -62,7 +77,7 @@
- +
diff --git a/edit_contact_modal.php b/edit_contact_modal.php index 738dfa13..08b8e302 100644 --- a/edit_contact_modal.php +++ b/edit_contact_modal.php @@ -122,6 +122,7 @@ + +
+ +
+
+ +
+ +
+
@@ -498,7 +529,7 @@ if(isset($_POST['add_company_settings'])){
- +
diff --git a/vendors.php b/vendors.php index a9abde05..cfdf4c84 100644 --- a/vendors.php +++ b/vendors.php @@ -88,6 +88,7 @@ $vendor_name = $row['vendor_name']; $vendor_description = $row['vendor_description']; $vendor_account_number = $row['vendor_account_number']; + $vendor_country = $row['vendor_country']; $vendor_address = $row['vendor_address']; $vendor_city = $row['vendor_city']; $vendor_state = $row['vendor_state'];