Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-mbs committed Jun 19, 2019
1 parent 482de32 commit 8a1c8f9
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 399 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CHANGELOG
=========
### v1.3.5 (2019-06-05)
### v1.4.0 (2019-06-15)
* учет по партиям поставщика
* учет платежей


### v1.3.4 (2019-05-05)
* модуль интеграции с опенкарт
Expand Down
141 changes: 119 additions & 22 deletions db/db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,38 @@ CREATE TABLE `docrel` (
`doc2` int(11) DEFAULT NULL,
KEY `doc1` (`doc1`),
KEY `doc2` (`doc2`)
) DEFAULT CHARSET=utf8 ;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `docstatelog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `docstatelog` (
`log_id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`document_id` int(11) NOT NULL,
`docstate` smallint(6) NOT NULL,
`createdon` datetime NOT NULL,
`hostname` varchar(64) NOT NULL,
PRIMARY KEY (`log_id`),
KEY `document_id` (`document_id`)
) AUTO_INCREMENT=98 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `docstatelog_view`;
/*!50001 DROP VIEW IF EXISTS `docstatelog_view`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `docstatelog_view` AS SELECT
1 AS `log_id`,
1 AS `user_id`,
1 AS `document_id`,
1 AS `docstate`,
1 AS `createdon`,
1 AS `hostname`,
1 AS `username`,
1 AS `document_number`,
1 AS `meta_desc`,
1 AS `meta_name`*/;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Expand All @@ -54,14 +84,14 @@ CREATE TABLE `documents` (
`amount` int(11) DEFAULT NULL,
`meta_id` int(11) NOT NULL,
`state` tinyint(4) NOT NULL,
`datatag` int(11) DEFAULT NULL,
`notes` varchar(255) NOT NULL,
`customer_id` int(11) DEFAULT '0',
`payamount` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`document_id`),
KEY `document_date` (`document_date`),
KEY `customer_id` (`customer_id`),
KEY `user_id` (`user_id`)
) AUTO_INCREMENT=88 DEFAULT CHARSET=utf8;
) AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `documents_view`;
/*!50001 DROP VIEW IF EXISTS `documents_view`*/;
Expand All @@ -80,7 +110,7 @@ SET character_set_client = utf8;
1 AS `customer_name`,
1 AS `state`,
1 AS `notes`,
1 AS `datatag`,
1 AS `payamount`,
1 AS `meta_name`,
1 AS `meta_desc`*/;
SET character_set_client = @saved_cs_client;
Expand Down Expand Up @@ -111,7 +141,7 @@ CREATE TABLE `entrylist` (
PRIMARY KEY (`entry_id`),
KEY `document_id` (`document_id`),
KEY `stock_id` (`stock_id`)
) AUTO_INCREMENT=98 DEFAULT CHARSET=utf8;
) AUTO_INCREMENT=42 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
Expand All @@ -122,7 +152,7 @@ CREATE TABLE `entrylist` (
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50003 TRIGGER `entrylist_after_ins_tr` AFTER INSERT ON `entrylist`
/*!50003 CREATE*/ /*!50017 */ /*!50003 TRIGGER `entrylist_after_ins_tr` AFTER INSERT ON `entrylist`
FOR EACH ROW
BEGIN

Expand All @@ -147,7 +177,7 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50003 TRIGGER `entrylist_after_del_tr` AFTER DELETE ON `entrylist`
/*!50003 CREATE*/ /*!50017 */ /*!50003 TRIGGER `entrylist_after_del_tr` AFTER DELETE ON `entrylist`
FOR EACH ROW
BEGIN

Expand Down Expand Up @@ -204,7 +234,7 @@ CREATE TABLE `eventlist` (
PRIMARY KEY (`event_id`),
KEY `user_id` (`user_id`),
KEY `customer_id` (`customer_id`)
) AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `eventlist_view`;
/*!50001 DROP VIEW IF EXISTS `eventlist_view`*/;
Expand Down Expand Up @@ -333,7 +363,7 @@ CREATE TABLE `messages` (
`item_id` int(11) NOT NULL,
`item_type` int(11) DEFAULT NULL,
PRIMARY KEY (`message_id`)
) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `messages_view`;
/*!50001 DROP VIEW IF EXISTS `messages_view`*/;
Expand All @@ -356,12 +386,22 @@ CREATE TABLE `metadata` (
`meta_type` tinyint(11) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`meta_name` varchar(255) NOT NULL,
`menugroup` varchar(255) DEFAULT NULL ,
`menugroup` varchar(255) DEFAULT NULL,
`notes` text NOT NULL,
`disabled` tinyint(4) NOT NULL,
`smartmenu` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`meta_id`)
) AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
) AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `mfund`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mfund` (
`mf_id` int(11) NOT NULL AUTO_INCREMENT,
`mf_name` varchar(255) NOT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`mf_id`)
) AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `notifies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand All @@ -374,7 +414,7 @@ CREATE TABLE `notifies` (
`message` text NOT NULL,
PRIMARY KEY (`notify_id`),
KEY `user_id` (`user_id`)
) AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `options`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand All @@ -394,6 +434,37 @@ CREATE TABLE `parealist` (
PRIMARY KEY (`pa_id`)
) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `paylist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `paylist` (
`pl_id` int(11) NOT NULL AUTO_INCREMENT,
`document_id` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`mf_id` int(11) NOT NULL,
`notes` varchar(255) DEFAULT NULL,
`paydate` date DEFAULT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`pl_id`),
KEY `document_id` (`document_id`)
) AUTO_INCREMENT=49 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `paylist_view`;
/*!50001 DROP VIEW IF EXISTS `paylist_view`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `paylist_view` AS SELECT
1 AS `pl_id`,
1 AS `document_id`,
1 AS `amount`,
1 AS `mf_id`,
1 AS `notes`,
1 AS `user_id`,
1 AS `paydate`,
1 AS `document_number`,
1 AS `username`,
1 AS `mf_name`*/;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `services`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Expand All @@ -415,7 +486,7 @@ CREATE TABLE `shop_attributes` (
`valueslist` varchar(255) DEFAULT NULL,
`showinlist` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`attribute_id`)
) AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_attributes_order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand All @@ -426,7 +497,7 @@ CREATE TABLE `shop_attributes_order` (
`pg_id` int(11) NOT NULL,
`ordern` int(11) NOT NULL,
PRIMARY KEY (`order_id`)
) AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_attributes_view`;
/*!50001 DROP VIEW IF EXISTS `shop_attributes_view`*/;
Expand All @@ -451,7 +522,7 @@ CREATE TABLE `shop_attributevalues` (
`attributevalue` varchar(255) NOT NULL,
PRIMARY KEY (`attributevalue_id`),
KEY `attribute_id` (`attribute_id`)
) AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_manufacturers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand All @@ -461,7 +532,7 @@ CREATE TABLE `shop_manufacturers` (
`manufacturername` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
PRIMARY KEY (`manufacturer_id`)
) AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_prod_comments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand All @@ -476,7 +547,7 @@ CREATE TABLE `shop_prod_comments` (
`moderated` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`comment_id`),
KEY `product_id` (`product_id`)
) AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_productgroups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand All @@ -488,7 +559,7 @@ CREATE TABLE `shop_productgroups` (
`mpath` varchar(1024) DEFAULT NULL,
`image_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`group_id`)
) AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_productgroups_view`;
/*!50001 DROP VIEW IF EXISTS `shop_productgroups_view`*/;
Expand Down Expand Up @@ -522,7 +593,7 @@ CREATE TABLE `shop_products` (
`comments` int(11) DEFAULT '0',
PRIMARY KEY (`product_id`),
KEY `group_id` (`group_id`)
) AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_products_view`;
/*!50001 DROP VIEW IF EXISTS `shop_products_view`*/;
Expand Down Expand Up @@ -560,7 +631,7 @@ CREATE TABLE `store_stock` (
`sdate` date DEFAULT NULL,
PRIMARY KEY (`stock_id`),
KEY `item_id` (`item_id`)
) AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
) AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `store_stock_view`;
/*!50001 DROP VIEW IF EXISTS `store_stock_view`*/;
Expand Down Expand Up @@ -593,7 +664,7 @@ CREATE TABLE `stores` (
`storename` varchar(64) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`store_id`)
) AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ;
) AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
Expand Down Expand Up @@ -640,6 +711,19 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP VIEW IF EXISTS `docstatelog_view`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = latin1 */;
/*!50001 SET character_set_results = latin1 */;
/*!50001 SET collation_connection = latin1_swedish_ci */;
/*!50001 CREATE */
/*!50013 */
/*!50001 VIEW `docstatelog_view` AS select `dl`.`log_id` AS `log_id`,`dl`.`user_id` AS `user_id`,`dl`.`document_id` AS `document_id`,`dl`.`docstate` AS `docstate`,`dl`.`createdon` AS `createdon`,`dl`.`hostname` AS `hostname`,`u`.`username` AS `username`,`d`.`document_number` AS `document_number`,`d`.`meta_desc` AS `meta_desc`,`d`.`meta_name` AS `meta_name` from ((`docstatelog` `dl` join `users_view` `u` on((`dl`.`user_id` = `u`.`user_id`))) join `documents_view` `d` on((`d`.`document_id` = `dl`.`document_id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP VIEW IF EXISTS `documents_view`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
Expand All @@ -649,7 +733,7 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET collation_connection = latin1_swedish_ci */;
/*!50001 CREATE */
/*!50013 */
/*!50001 VIEW `documents_view` AS select `d`.`document_id` AS `document_id`,`d`.`document_number` AS `document_number`,`d`.`document_date` AS `document_date`,`d`.`user_id` AS `user_id`,`d`.`content` AS `content`,`d`.`amount` AS `amount`,`d`.`meta_id` AS `meta_id`,`u`.`username` AS `username`,`c`.`customer_id` AS `customer_id`,`c`.`customer_name` AS `customer_name`,`d`.`state` AS `state`,`d`.`notes` AS `notes`,`d`.`datatag` AS `datatag`,`metadata`.`meta_name` AS `meta_name`,`metadata`.`description` AS `meta_desc` from (((`documents` `d` join `users_view` `u` on((`d`.`user_id` = `u`.`user_id`))) left join `customers` `c` on((`d`.`customer_id` = `c`.`customer_id`))) join `metadata` on((`metadata`.`meta_id` = `d`.`meta_id`))) */;
/*!50001 VIEW `documents_view` AS select `d`.`document_id` AS `document_id`,`d`.`document_number` AS `document_number`,`d`.`document_date` AS `document_date`,`d`.`user_id` AS `user_id`,`d`.`content` AS `content`,`d`.`amount` AS `amount`,`d`.`meta_id` AS `meta_id`,`u`.`username` AS `username`,`c`.`customer_id` AS `customer_id`,`c`.`customer_name` AS `customer_name`,`d`.`state` AS `state`,`d`.`notes` AS `notes`,`d`.`payamount` AS `payamount`,`metadata`.`meta_name` AS `meta_name`,`metadata`.`description` AS `meta_desc` from (((`documents` `d` join `users_view` `u` on((`d`.`user_id` = `u`.`user_id`))) left join `customers` `c` on((`d`.`customer_id` = `c`.`customer_id`))) join `metadata` on((`metadata`.`meta_id` = `d`.`meta_id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
Expand Down Expand Up @@ -718,6 +802,19 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP VIEW IF EXISTS `paylist_view`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = latin1 */;
/*!50001 SET character_set_results = latin1 */;
/*!50001 SET collation_connection = latin1_swedish_ci */;
/*!50001 CREATE */
/*!50013 */
/*!50001 VIEW `paylist_view` AS select `pl`.`pl_id` AS `pl_id`,`pl`.`document_id` AS `document_id`,`pl`.`amount` AS `amount`,`pl`.`mf_id` AS `mf_id`,`pl`.`notes` AS `notes`,`pl`.`user_id` AS `user_id`,`pl`.`paydate` AS `paydate`,`d`.`document_number` AS `document_number`,`u`.`username` AS `username`,`m`.`mf_name` AS `mf_name` from (((`paylist` `pl` join `documents_view` `d` on((`pl`.`document_id` = `d`.`document_id`))) join `users_view` `u` on((`pl`.`user_id` = `u`.`user_id`))) join `mfund` `m` on((`pl`.`mf_id` = `m`.`mf_id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP VIEW IF EXISTS `shop_attributes_view`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
Expand Down
Loading

0 comments on commit 8a1c8f9

Please sign in to comment.