From 40c08a1635309bc8f74a825f9ba2e8abd84163cb Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 Apr 2019 00:26:49 -0400 Subject: [PATCH] Added Products CRUD and new DB dump to include products --- accounts.php | 2 +- add_product_modal.php | 32 ++++++++++++ add_recurring_invoice_modal.php | 93 +++++++++++++++++++++++++++++++++ db.sql | 18 ++++++- edit_product_modal.php | 33 ++++++++++++ edit_vendor_modal.php | 2 +- post.php | 40 ++++++++++++++ products.php | 62 ++++++++++++++++++++++ recurring.php | 2 +- side_nav.php | 5 ++ 10 files changed, 285 insertions(+), 4 deletions(-) create mode 100644 add_product_modal.php create mode 100644 add_recurring_invoice_modal.php create mode 100644 edit_product_modal.php create mode 100644 products.php diff --git a/accounts.php b/accounts.php index d178cb7c..983eba3f 100644 --- a/accounts.php +++ b/accounts.php @@ -30,7 +30,7 @@ + + \ No newline at end of file diff --git a/add_recurring_invoice_modal.php b/add_recurring_invoice_modal.php new file mode 100644 index 00000000..c09e8e69 --- /dev/null +++ b/add_recurring_invoice_modal.php @@ -0,0 +1,93 @@ + \ No newline at end of file diff --git a/db.sql b/db.sql index 4d830921..02d77555 100644 --- a/db.sql +++ b/db.sql @@ -360,6 +360,22 @@ CREATE TABLE `payments` ( ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `products` +-- + +DROP TABLE IF EXISTS `products`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `products` ( + `product_id` int(11) NOT NULL AUTO_INCREMENT, + `product_name` varchar(200) NOT NULL, + `product_description` text NOT NULL, + `product_cost` decimal(15,2) NOT NULL, + PRIMARY KEY (`product_id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `recurring_invoices` -- @@ -442,4 +458,4 @@ CREATE TABLE `vendors` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-04-07 23:34:02 +-- Dump completed on 2019-04-08 0:26:08 diff --git a/edit_product_modal.php b/edit_product_modal.php new file mode 100644 index 00000000..cbbc65b0 --- /dev/null +++ b/edit_product_modal.php @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/edit_vendor_modal.php b/edit_vendor_modal.php index 7c96a92d..646d78d0 100644 --- a/edit_vendor_modal.php +++ b/edit_vendor_modal.php @@ -1,4 +1,4 @@ -