diff --git a/db/db.sql b/db/db.sql index 9e277b6f6..05dd35941 100644 --- a/db/db.sql +++ b/db/db.sql @@ -1,1342 +1,1392 @@ - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES cp1251 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `branches`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `branches` ( - `branch_id` int(11) NOT NULL AUTO_INCREMENT, - `branch_name` varchar(255) NOT NULL, - `details` longtext NOT NULL, - `disabled` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`branch_id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `contracts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `contracts` ( - `contract_id` int(11) NOT NULL AUTO_INCREMENT, - `customer_id` int(11) DEFAULT '0', - `firm_id` int(11) DEFAULT '0', - `createdon` date NOT NULL, - `contract_number` varchar(64) NOT NULL, - `disabled` tinyint(1) DEFAULT '0', - `details` longtext NOT NULL, - PRIMARY KEY (`contract_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `contracts_view`; -/*!50001 DROP VIEW IF EXISTS `contracts_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `contracts_view` AS SELECT - 1 AS `contract_id`, - 1 AS `customer_id`, - 1 AS `firm_id`, - 1 AS `createdon`, - 1 AS `contract_number`, - 1 AS `disabled`, - 1 AS `details`, - 1 AS `customer_name`, - 1 AS `firm_name`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `customers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `customers` ( - `customer_id` int(11) NOT NULL AUTO_INCREMENT, - `customer_name` varchar(255) DEFAULT NULL, - `detail` mediumtext NOT NULL, - `email` varchar(64) DEFAULT NULL, - `phone` varchar(64) DEFAULT NULL, - `status` smallint(4) NOT NULL DEFAULT '0', - `city` varchar(255) DEFAULT NULL, - `leadstatus` varchar(255) DEFAULT NULL, - `leadsource` varchar(255) DEFAULT NULL, - `createdon` date DEFAULT NULL, - PRIMARY KEY (`customer_id`) -) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `customers_view`; -/*!50001 DROP VIEW IF EXISTS `customers_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `customers_view` AS SELECT - 1 AS `customer_id`, - 1 AS `customer_name`, - 1 AS `detail`, - 1 AS `email`, - 1 AS `phone`, - 1 AS `status`, - 1 AS `city`, - 1 AS `leadsource`, - 1 AS `leadstatus`, - 1 AS `mcnt`, - 1 AS `fcnt`, - 1 AS `ecnt`*/; -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`) -) ENGINE=InnoDB AUTO_INCREMENT=1687 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 */; -CREATE TABLE `documents` ( - `document_id` int(11) NOT NULL AUTO_INCREMENT, - `document_number` varchar(45) NOT NULL, - `document_date` date NOT NULL, - `user_id` int(11) NOT NULL, - `content` longtext, - `amount` decimal(11,2) DEFAULT NULL, - `meta_id` int(11) NOT NULL, - `state` tinyint(4) NOT NULL, - `notes` varchar(255) NOT NULL, - `customer_id` int(11) DEFAULT '0', - `payamount` decimal(11,2) DEFAULT '0.00', - `payed` decimal(11,2) DEFAULT '0.00', - `branch_id` int(11) DEFAULT '0', - `parent_id` bigint(20) DEFAULT '0', - `firm_id` int(11) DEFAULT NULL, - PRIMARY KEY (`document_id`), - UNIQUE KEY `unuqnumber` (`meta_id`,`document_number`,`branch_id`), - KEY `document_date` (`document_date`), - KEY `customer_id` (`customer_id`), - KEY `user_id` (`user_id`), - KEY `branch_id` (`branch_id`), - CONSTRAINT `documents_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=463 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `documents_view`; -/*!50001 DROP VIEW IF EXISTS `documents_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `documents_view` AS SELECT - 1 AS `document_id`, - 1 AS `document_number`, - 1 AS `document_date`, - 1 AS `user_id`, - 1 AS `content`, - 1 AS `amount`, - 1 AS `meta_id`, - 1 AS `username`, - 1 AS `customer_id`, - 1 AS `customer_name`, - 1 AS `state`, - 1 AS `notes`, - 1 AS `payamount`, - 1 AS `payed`, - 1 AS `parent_id`, - 1 AS `branch_id`, - 1 AS `branch_name`, - 1 AS `firm_id`, - 1 AS `firm_name`, - 1 AS `meta_name`, - 1 AS `meta_desc`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `employees`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `employees` ( - `employee_id` int(11) NOT NULL AUTO_INCREMENT, - `login` varchar(64) DEFAULT NULL, - `detail` mediumtext, - `disabled` tinyint(1) DEFAULT '0', - `emp_name` varchar(64) NOT NULL, - `branch_id` int(11) DEFAULT '0', - PRIMARY KEY (`employee_id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `entrylist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `entrylist` ( - `entry_id` bigint(20) NOT NULL AUTO_INCREMENT, - `document_id` int(11) NOT NULL, - `amount` decimal(11,2) NOT NULL DEFAULT '0.00', - `quantity` decimal(11,3) DEFAULT '0.000', - `extcode` int(11) DEFAULT NULL, - `stock_id` int(11) DEFAULT NULL, - `service_id` int(11) DEFAULT NULL, - `outprice` decimal(10,2) DEFAULT NULL, - PRIMARY KEY (`entry_id`), - KEY `document_id` (`document_id`), - KEY `stock_id` (`stock_id`), - CONSTRAINT `entrylist_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `documents` (`document_id`), - CONSTRAINT `entrylist_ibfk_2` FOREIGN KEY (`stock_id`) REFERENCES `store_stock` (`stock_id`) -) ENGINE=InnoDB AUTO_INCREMENT=961 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 */ ; -/*!50003 SET @saved_col_connection = @@collation_connection */ ; -/*!50003 SET character_set_client = latin1 */ ; -/*!50003 SET character_set_results = latin1 */ ; -/*!50003 SET collation_connection = latin1_swedish_ci */ ; -/*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ; -DELIMITER ;; -/*!50003 CREATE*/ /*!50017 */ /*!50003 TRIGGER `entrylist_after_ins_tr` AFTER INSERT ON `entrylist` - FOR EACH ROW -BEGIN - - - - IF new.stock_id >0 then - - update store_stock set qty=(select coalesce(sum(quantity),0) from entrylist where stock_id=new.stock_id) where store_stock.stock_id = new.stock_id; - END IF; -END */;; -DELIMITER ; -/*!50003 SET sql_mode = @saved_sql_mode */ ; -/*!50003 SET character_set_client = @saved_cs_client */ ; -/*!50003 SET character_set_results = @saved_cs_results */ ; -/*!50003 SET collation_connection = @saved_col_connection */ ; - - -/*!50003 SET @saved_cs_client = @@character_set_client */ ; -/*!50003 SET @saved_cs_results = @@character_set_results */ ; -/*!50003 SET @saved_col_connection = @@collation_connection */ ; -/*!50003 SET character_set_client = latin1 */ ; -/*!50003 SET character_set_results = latin1 */ ; -/*!50003 SET collation_connection = latin1_swedish_ci */ ; -/*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ; -DELIMITER ;; -/*!50003 CREATE*/ /*!50017 */ /*!50003 TRIGGER `entrylist_after_del_tr` AFTER DELETE ON `entrylist` - FOR EACH ROW -BEGIN - - - IF old.stock_id >0 then - - update store_stock set qty=(select coalesce(sum(quantity),0) from entrylist where stock_id=old.stock_id) where store_stock.stock_id = old.stock_id; - END IF; -END */;; -DELIMITER ; -/*!50003 SET sql_mode = @saved_sql_mode */ ; -/*!50003 SET character_set_client = @saved_cs_client */ ; -/*!50003 SET character_set_results = @saved_cs_results */ ; -/*!50003 SET collation_connection = @saved_col_connection */ ; - -DROP TABLE IF EXISTS `entrylist_view`; -/*!50001 DROP VIEW IF EXISTS `entrylist_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `entrylist_view` AS SELECT - 1 AS `entry_id`, - 1 AS `document_id`, - 1 AS `amount`, - 1 AS `quantity`, - 1 AS `customer_id`, - 1 AS `extcode`, - 1 AS `stock_id`, - 1 AS `service_id`, - 1 AS `item_id`, - 1 AS `partion`, - 1 AS `document_date`, - 1 AS `outprice`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `equipments`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `equipments` ( - `eq_id` int(11) NOT NULL AUTO_INCREMENT, - `eq_name` varchar(255) DEFAULT NULL, - `detail` mediumtext, - `disabled` tinyint(1) DEFAULT '0', - `description` text, - PRIMARY KEY (`eq_id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `eventlist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `eventlist` ( - `user_id` int(11) NOT NULL, - `eventdate` datetime NOT NULL, - `title` varchar(255) NOT NULL, - `description` text NOT NULL, - `isdone` TINYINT(1) NOT NULL DEFAULT 0 , - `event_id` int(11) NOT NULL AUTO_INCREMENT, - `customer_id` int(11) NOT NULL, - PRIMARY KEY (`event_id`), - KEY `user_id` (`user_id`), - KEY `customer_id` (`customer_id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `eventlist_view`; -/*!50001 DROP VIEW IF EXISTS `eventlist_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `eventlist_view` AS SELECT - 1 AS `user_id`, - 1 AS `eventdate`, - 1 AS `title`, - 1 AS `description`, - 1 AS `isdone`, - 1 AS `event_id`, - 1 AS `customer_id`, - 1 AS `customer_name`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `files`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `files` ( - `file_id` int(11) NOT NULL AUTO_INCREMENT, - `item_id` int(11) DEFAULT NULL, - `filename` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `item_type` int(11) NOT NULL, - `mime` varchar(16) DEFAULT NULL, - PRIMARY KEY (`file_id`), - KEY `item_id` (`item_id`) -) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `filesdata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `filesdata` ( - `file_id` int(11) DEFAULT NULL, - `filedata` longblob, - UNIQUE KEY `file_id` (`file_id`) -) ENGINE=MYISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `firms`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `firms` ( - `firm_id` int(11) NOT NULL AUTO_INCREMENT, - `firm_name` varchar(255) NOT NULL, - `details` longtext NOT NULL, - `disabled` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`firm_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `images`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `images` ( - `image_id` int(11) NOT NULL AUTO_INCREMENT, - `content` longblob NOT NULL, - `mime` varchar(16) DEFAULT NULL, - `thumb` longblob, - PRIMARY KEY (`image_id`) -) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `issue_history`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `issue_history` ( - `hist_id` bigint(20) NOT NULL AUTO_INCREMENT, - `issue_id` int(11) NOT NULL, - `createdon` date NOT NULL, - `user_id` int(11) NOT NULL, - `description` varchar(255) NOT NULL, - PRIMARY KEY (`hist_id`), - KEY `issue_id` (`issue_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `issue_issuelist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `issue_issuelist` ( - `issue_id` int(11) NOT NULL AUTO_INCREMENT, - `issue_name` varchar(255) NOT NULL, - `details` longtext NOT NULL, - `status` smallint(6) NOT NULL, - `priority` tinyint(4) NOT NULL, - `user_id` int(11) NOT NULL, - `lastupdate` datetime DEFAULT NULL, - `project_id` int(11) NOT NULL, - PRIMARY KEY (`issue_id`), - KEY `project_id` (`project_id`), - KEY `user_id` (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `issue_issuelist_view`; -/*!50001 DROP VIEW IF EXISTS `issue_issuelist_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `issue_issuelist_view` AS SELECT - 1 AS `issue_id`, - 1 AS `issue_name`, - 1 AS `details`, - 1 AS `status`, - 1 AS `priority`, - 1 AS `user_id`, - 1 AS `lastupdate`, - 1 AS `project_id`, - 1 AS `username`, - 1 AS `project_name`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `issue_projectacc`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `issue_projectacc` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `project_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `issue_projectlist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `issue_projectlist` ( - `project_id` int(11) NOT NULL AUTO_INCREMENT, - `project_name` varchar(255) NOT NULL, - `details` longtext NOT NULL, - `customer_id` int(11) DEFAULT NULL, - `status` smallint(6) DEFAULT NULL, - PRIMARY KEY (`project_id`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `issue_projectlist_view`; -/*!50001 DROP VIEW IF EXISTS `issue_projectlist_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `issue_projectlist_view` AS SELECT - 1 AS `project_id`, - 1 AS `project_name`, - 1 AS `details`, - 1 AS `customer_id`, - 1 AS `status`, - 1 AS `customer_name`, - 1 AS `inew`, - 1 AS `iproc`, - 1 AS `iclose`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `issue_time`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `issue_time` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `issue_id` int(11) NOT NULL, - `createdon` datetime NOT NULL, - `user_id` int(11) NOT NULL, - `duration` decimal(10,2) DEFAULT NULL, - `notes` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `issue_id` (`issue_id`) -) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `issue_time_view`; -/*!50001 DROP VIEW IF EXISTS `issue_time_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `issue_time_view` AS SELECT - 1 AS `id`, - 1 AS `issue_id`, - 1 AS `createdon`, - 1 AS `user_id`, - 1 AS `duration`, - 1 AS `notes`, - 1 AS `username`, - 1 AS `issue_name`, - 1 AS `project_id`, - 1 AS `project_name`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `item_cat`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `item_cat` ( - `cat_id` int(11) NOT NULL AUTO_INCREMENT, - `cat_name` varchar(255) NOT NULL, - `detail` longtext, - `parent_id` int(11) DEFAULT '0', - PRIMARY KEY (`cat_id`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `item_set`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `item_set` ( - `set_id` int(11) NOT NULL AUTO_INCREMENT, - `item_id` int(11) DEFAULT '0', - `pitem_id` int(11) DEFAULT '0', - `qty` decimal(11,3) DEFAULT '0.000', - PRIMARY KEY (`set_id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `item_set_view`; -/*!50001 DROP VIEW IF EXISTS `item_set_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `item_set_view` AS SELECT - 1 AS `set_id`, - 1 AS `item_id`, - 1 AS `pitem_id`, - 1 AS `qty`, - 1 AS `itemname`, - 1 AS `item_code`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `items`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `items` ( - `item_id` int(11) NOT NULL AUTO_INCREMENT, - `itemname` varchar(255) DEFAULT NULL, - `description` longtext, - `detail` longtext NOT NULL, - `item_code` varchar(64) DEFAULT NULL, - `bar_code` varchar(64) DEFAULT NULL, - `cat_id` int(11) NOT NULL, - `msr` varchar(64) DEFAULT NULL, - `disabled` tinyint(1) DEFAULT '0', - `minqty` decimal(11,3) DEFAULT '0.000', - `manufacturer` varchar(355) DEFAULT NULL, - `item_type` int(11) DEFAULT NULL, - PRIMARY KEY (`item_id`), - KEY `item_code` (`item_code`), - KEY `itemname` (`itemname`), - KEY `cat_id` (`cat_id`) -) ENGINE=InnoDB AUTO_INCREMENT=593 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `items_view`; -/*!50001 DROP VIEW IF EXISTS `items_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `items_view` AS SELECT - 1 AS `item_id`, - 1 AS `itemname`, - 1 AS `description`, - 1 AS `detail`, - 1 AS `item_code`, - 1 AS `bar_code`, - 1 AS `cat_id`, - 1 AS `msr`, - 1 AS `disabled`, - 1 AS `minqty`, - 1 AS `item_type`, - 1 AS `manufacturer`, - 1 AS `cat_name`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `messages`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `messages` ( - `message_id` bigint(20) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, - `created` datetime DEFAULT NULL, - `message` text, - `item_id` int(11) NOT NULL, - `item_type` int(11) DEFAULT NULL, - PRIMARY KEY (`message_id`), - KEY `item_id` (`item_id`) -) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `messages_view`; -/*!50001 DROP VIEW IF EXISTS `messages_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `messages_view` AS SELECT - 1 AS `message_id`, - 1 AS `user_id`, - 1 AS `created`, - 1 AS `message`, - 1 AS `item_id`, - 1 AS `item_type`, - 1 AS `username`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `metadata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `metadata` ( - `meta_id` int(11) NOT NULL AUTO_INCREMENT, - `meta_type` tinyint(11) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `meta_name` varchar(255) NOT NULL, - `menugroup` varchar(255) DEFAULT NULL, - `disabled` tinyint(4) NOT NULL, - PRIMARY KEY (`meta_id`) -) ENGINE=InnoDB AUTO_INCREMENT=95 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, - `branch_id` int(11) DEFAULT '0', - `detail` longtext, - PRIMARY KEY (`mf_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `note_fav`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `note_fav` ( - `fav_id` int(11) NOT NULL AUTO_INCREMENT, - `topic_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - PRIMARY KEY (`fav_id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `note_nodes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `note_nodes` ( - `node_id` int(11) NOT NULL AUTO_INCREMENT, - `pid` int(11) NOT NULL, - `title` varchar(50) NOT NULL, - `mpath` varchar(255) CHARACTER SET latin1 NOT NULL, - `user_id` int(11) DEFAULT NULL, - `ispublic` tinyint(1) DEFAULT '0', - PRIMARY KEY (`node_id`), - KEY `user_id` (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `note_nodesview`; -/*!50001 DROP VIEW IF EXISTS `note_nodesview`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `note_nodesview` AS SELECT - 1 AS `node_id`, - 1 AS `pid`, - 1 AS `title`, - 1 AS `mpath`, - 1 AS `user_id`, - 1 AS `ispublic`, - 1 AS `tcnt`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `note_tags`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `note_tags` ( - `tag_id` int(11) NOT NULL AUTO_INCREMENT, - `topic_id` int(11) NOT NULL, - `tagvalue` varchar(255) NOT NULL, - PRIMARY KEY (`tag_id`), - KEY `topic_id` (`topic_id`) -) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `note_topicnode`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `note_topicnode` ( - `topic_id` int(11) NOT NULL, - `node_id` int(11) NOT NULL, - `tn_id` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`tn_id`), - KEY `topic_id` (`topic_id`), - KEY `node_id` (`node_id`) -) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `note_topicnodeview`; -/*!50001 DROP VIEW IF EXISTS `note_topicnodeview`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `note_topicnodeview` AS SELECT - 1 AS `topic_id`, - 1 AS `node_id`, - 1 AS `tn_id`, - 1 AS `title`, - 1 AS `user_id`, - 1 AS `content`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `note_topics`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `note_topics` ( - `topic_id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `content` longtext NOT NULL, - `acctype` smallint(4) DEFAULT '0', - `user_id` int(11) NOT NULL, - PRIMARY KEY (`topic_id`) -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `note_topicsview`; -/*!50001 DROP VIEW IF EXISTS `note_topicsview`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `note_topicsview` AS SELECT - 1 AS `topic_id`, - 1 AS `title`, - 1 AS `content`, - 1 AS `acctype`, - 1 AS `user_id`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `notifies`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notifies` ( - `notify_id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `dateshow` datetime NOT NULL, - `checked` tinyint(1) NOT NULL DEFAULT '0', - `message` text NOT NULL, - `sender_name` varchar(255) DEFAULT NULL, - PRIMARY KEY (`notify_id`), - KEY `user_id` (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `options`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `options` ( - `optname` varchar(64) NOT NULL, - `optvalue` longtext NOT NULL, - UNIQUE KEY `optname` (`optname`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `parealist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `parealist` ( - `pa_id` int(11) NOT NULL AUTO_INCREMENT, - `pa_name` varchar(255) NOT NULL, - PRIMARY KEY (`pa_id`) -) ENGINE=InnoDB 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` bigint(20) NOT NULL AUTO_INCREMENT, - `document_id` int(11) NOT NULL, - `amount` decimal(11,2) NOT NULL, - `mf_id` int(11) NOT NULL, - `notes` varchar(255) DEFAULT NULL, - `paydate` datetime DEFAULT NULL, - `user_id` int(11) NOT NULL, - `paytype` smallint(6) NOT NULL, - `detail` longtext, - PRIMARY KEY (`pl_id`), - KEY `document_id` (`document_id`), - CONSTRAINT `paylist_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `documents` (`document_id`) -) ENGINE=InnoDB AUTO_INCREMENT=419 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 `paytype`, - 1 AS `detail`, - 1 AS `document_number`, - 1 AS `username`, - 1 AS `mf_name`, - 1 AS `customer_id`, - 1 AS `customer_name`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `poslist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `poslist` ( - `pos_id` int(11) NOT NULL AUTO_INCREMENT, - `pos_name` varchar(255) NOT NULL, - `details` longtext NOT NULL, - `branch_id` int(11) DEFAULT '0', - PRIMARY KEY (`pos_id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `ppo_zformstat`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ppo_zformstat` ( - `zf_id` int(11) NOT NULL AUTO_INCREMENT, - `pos_id` int(11) NOT NULL, - `checktype` int(11) NOT NULL, - `createdon` datetime NOT NULL, - `document_number` varchar(255) NOT NULL, - `amount0` decimal(10,2) NOT NULL, - `amount1` decimal(10,2) NOT NULL, - `amount2` decimal(10,2) NOT NULL, - `amount3` decimal(10,2) NOT NULL, - PRIMARY KEY (`zf_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `roles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `roles` ( - `role_id` int(11) NOT NULL AUTO_INCREMENT, - `rolename` varchar(255) DEFAULT NULL, - `acl` mediumtext, - PRIMARY KEY (`role_id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `roles_view`; -/*!50001 DROP VIEW IF EXISTS `roles_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `roles_view` AS SELECT - 1 AS `role_id`, - 1 AS `rolename`, - 1 AS `acl`, - 1 AS `cnt`*/; -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 */; -CREATE TABLE `services` ( - `service_id` int(11) NOT NULL AUTO_INCREMENT, - `service_name` varchar(255) NOT NULL, - `detail` text, - `disabled` tinyint(1) DEFAULT '0', - PRIMARY KEY (`service_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shop_attributes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shop_attributes` ( - `attribute_id` int(11) NOT NULL AUTO_INCREMENT, - `attributename` varchar(64) NOT NULL, - `cat_id` int(11) NOT NULL, - `attributetype` tinyint(4) NOT NULL, - `valueslist` text, - PRIMARY KEY (`attribute_id`) -) ENGINE=InnoDB AUTO_INCREMENT=21 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 */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shop_attributes_order` ( - `order_id` int(11) NOT NULL AUTO_INCREMENT, - `attr_id` int(11) NOT NULL, - `pg_id` int(11) NOT NULL, - `ordern` int(11) NOT NULL, - PRIMARY KEY (`order_id`) -) ENGINE=InnoDB AUTO_INCREMENT=19 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`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `shop_attributes_view` AS SELECT - 1 AS `attribute_id`, - 1 AS `attributename`, - 1 AS `cat_id`, - 1 AS `attributetype`, - 1 AS `valueslist`, - 1 AS `ordern`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `shop_attributevalues`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shop_attributevalues` ( - `attributevalue_id` int(11) NOT NULL AUTO_INCREMENT, - `attribute_id` int(11) NOT NULL, - `item_id` int(11) NOT NULL, - `attributevalue` varchar(255) NOT NULL, - PRIMARY KEY (`attributevalue_id`), - KEY `attribute_id` (`attribute_id`) -) ENGINE=InnoDB AUTO_INCREMENT=64 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 */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shop_prod_comments` ( - `comment_id` int(11) NOT NULL AUTO_INCREMENT, - `item_id` int(11) NOT NULL, - `author` varchar(64) NOT NULL, - `comment` text NOT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `rating` tinyint(4) NOT NULL DEFAULT '0', - `moderated` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`comment_id`), - KEY `product_id` (`item_id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 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`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `shop_products_view` AS SELECT - 1 AS `item_id`, - 1 AS `itemname`, - 1 AS `description`, - 1 AS `detail`, - 1 AS `item_code`, - 1 AS `bar_code`, - 1 AS `cat_id`, - 1 AS `msr`, - 1 AS `disabled`, - 1 AS `minqty`, - 1 AS `item_type`, - 1 AS `manufacturer`, - 1 AS `cat_name`, - 1 AS `qty`, - 1 AS `comments`, - 1 AS `ratings`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `store_stock`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `store_stock` ( - `stock_id` int(11) NOT NULL AUTO_INCREMENT, - `item_id` int(11) NOT NULL, - `partion` decimal(11,2) DEFAULT NULL, - `store_id` int(11) NOT NULL, - `qty` decimal(11,3) DEFAULT '0.000', - `snumber` varchar(64) DEFAULT NULL, - `sdate` date DEFAULT NULL, - PRIMARY KEY (`stock_id`), - KEY `item_id` (`item_id`), - KEY `store_id` (`store_id`), - CONSTRAINT `store_stock_fk` FOREIGN KEY (`store_id`) REFERENCES `stores` (`store_id`), - CONSTRAINT `store_stock_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `items` (`item_id`) -) ENGINE=InnoDB AUTO_INCREMENT=603 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`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `store_stock_view` AS SELECT - 1 AS `stock_id`, - 1 AS `item_id`, - 1 AS `partion`, - 1 AS `store_id`, - 1 AS `itemname`, - 1 AS `item_code`, - 1 AS `cat_id`, - 1 AS `msr`, - 1 AS `item_type`, - 1 AS `bar_code`, - 1 AS `cat_name`, - 1 AS `itemdisabled`, - 1 AS `storename`, - 1 AS `qty`, - 1 AS `snumber`, - 1 AS `sdate`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `stores`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `stores` ( - `store_id` int(11) NOT NULL AUTO_INCREMENT, - `storename` varchar(64) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `branch_id` int(11) DEFAULT '0', - PRIMARY KEY (`store_id`) -) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `subscribes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `subscribes` ( - `sub_id` int(11) NOT NULL AUTO_INCREMENT, - `sub_type` int(11) DEFAULT NULL, - `reciever_type` int(11) DEFAULT NULL, - `msg_type` int(11) DEFAULT NULL, - `msgtext` text, - `detail` longtext, - `disabled` int(1) DEFAULT '0', - PRIMARY KEY (`sub_id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `timesheet`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `timesheet` ( - `time_id` int(11) NOT NULL AUTO_INCREMENT, - `emp_id` int(11) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `t_start` datetime DEFAULT NULL, - `t_end` datetime DEFAULT NULL, - `t_type` int(11) DEFAULT '0', - `t_break` smallint(6) DEFAULT '0', - PRIMARY KEY (`time_id`), - KEY `emp_id` (`emp_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `timesheet_view`; -/*!50001 DROP VIEW IF EXISTS `timesheet_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `timesheet_view` AS SELECT - 1 AS `time_id`, - 1 AS `emp_id`, - 1 AS `description`, - 1 AS `t_start`, - 1 AS `t_end`, - 1 AS `t_type`, - 1 AS `t_break`, - 1 AS `emp_name`, - 1 AS `disabled`, - 1 AS `branch_id`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `users` ( - `user_id` int(11) NOT NULL AUTO_INCREMENT, - `userlogin` varchar(32) NOT NULL, - `userpass` varchar(255) NOT NULL, - `createdon` date NOT NULL, - `email` varchar(255) DEFAULT NULL, - `acl` mediumtext NOT NULL, - `disabled` int(1) NOT NULL DEFAULT '0', - `options` longtext, - `role_id` int(11) DEFAULT NULL, - PRIMARY KEY (`user_id`), - UNIQUE KEY `userlogin` (`userlogin`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `users_view`; -/*!50001 DROP VIEW IF EXISTS `users_view`*/; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -/*!50001 CREATE VIEW `users_view` AS SELECT - 1 AS `user_id`, - 1 AS `userlogin`, - 1 AS `userpass`, - 1 AS `createdon`, - 1 AS `email`, - 1 AS `acl`, - 1 AS `options`, - 1 AS `disabled`, - 1 AS `rolename`, - 1 AS `role_id`, - 1 AS `roleacl`, - 1 AS `employee_id`, - 1 AS `username`*/; -SET character_set_client = @saved_cs_client; -DROP TABLE IF EXISTS `zformstat`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `zformstat` ( - `zf_id` int(11) NOT NULL AUTO_INCREMENT, - `pos_id` int(11) NOT NULL, - `checktype` int(11) NOT NULL, - `amount0` decimal(10,2) NOT NULL, - `createdon` datetime NOT NULL, - `amount1` decimal(10,2) NOT NULL, - `amount2` decimal(10,2) NOT NULL, - `document_number` varchar(255) NOT NULL, - `amount3` decimal(10,2) NOT NULL, - PRIMARY KEY (`zf_id`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!50001 DROP VIEW IF EXISTS `contracts_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `contracts_view` AS select `co`.`contract_id` AS `contract_id`,`co`.`customer_id` AS `customer_id`,`co`.`firm_id` AS `firm_id`,`co`.`createdon` AS `createdon`,`co`.`contract_number` AS `contract_number`,`co`.`disabled` AS `disabled`,`co`.`details` AS `details`,`cu`.`customer_name` AS `customer_name`,`f`.`firm_name` AS `firm_name` from ((`contracts` `co` join `customers` `cu` on((`co`.`customer_id` = `cu`.`customer_id`))) left join `firms` `f` on((`co`.`firm_id` = `f`.`firm_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 `customers_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `customers_view` AS select `customers`.`customer_id` AS `customer_id`,`customers`.`customer_name` AS `customer_name`,`customers`.`detail` AS `detail`,`customers`.`email` AS `email`,`customers`.`phone` AS `phone`,`customers`.`status` AS `status`,`customers`.`city` AS `city`,`customers`.`leadsource` AS `leadsource`,`customers`.`leadstatus` AS `leadstatus`,(select count(0) from `messages` `m` where ((`m`.`item_id` = `customers`.`customer_id`) and (`m`.`item_type` = 2))) AS `mcnt`,(select count(0) from `files` `f` where ((`f`.`item_id` = `customers`.`customer_id`) and (`f`.`item_type` = 2))) AS `fcnt`,(select count(0) from `eventlist` `e` where ((`e`.`customer_id` = `customers`.`customer_id`) and (`e`.`eventdate` >= now()))) AS `ecnt` from `customers` */; -/*!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 SQL SECURITY DEFINER */ -/*!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 */; -/*!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 SQL SECURITY DEFINER */ -/*!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`,`d`.`payed` AS `payed`,`d`.`parent_id` AS `parent_id`,`d`.`branch_id` AS `branch_id`,`b`.`branch_name` AS `branch_name`,`d`.`firm_id` AS `firm_id`,`f`.`firm_name` AS `firm_name`,`metadata`.`meta_name` AS `meta_name`,`metadata`.`description` AS `meta_desc` from (((((`documents` `d` left 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`))) left join `branches` `b` on((`d`.`branch_id` = `b`.`branch_id`))) left join `firms` `f` on((`d`.`firm_id` = `f`.`firm_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 `entrylist_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `entrylist_view` AS select `entrylist`.`entry_id` AS `entry_id`,`entrylist`.`document_id` AS `document_id`,`entrylist`.`amount` AS `amount`,`entrylist`.`quantity` AS `quantity`,`documents`.`customer_id` AS `customer_id`,`entrylist`.`extcode` AS `extcode`,`entrylist`.`stock_id` AS `stock_id`,`entrylist`.`service_id` AS `service_id`,`store_stock`.`item_id` AS `item_id`,`store_stock`.`partion` AS `partion`,`documents`.`document_date` AS `document_date`,`entrylist`.`outprice` AS `outprice` from ((`entrylist` left join `store_stock` on((`entrylist`.`stock_id` = `store_stock`.`stock_id`))) join `documents` on((`entrylist`.`document_id` = `documents`.`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 `eventlist_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `eventlist_view` AS select `e`.`user_id` AS `user_id`,`e`.`eventdate` AS `eventdate`,`e`.`title` AS `title`,`e`.`description` AS `description`,`e`.`isdone` AS `isdone`,`e`.`event_id` AS `event_id`,`e`.`customer_id` AS `customer_id`,`c`.`customer_name` AS `customer_name` from (`eventlist` `e` left join `customers` `c` on((`e`.`customer_id` = `c`.`customer_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 `issue_issuelist_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `issue_issuelist_view` AS select `i`.`issue_id` AS `issue_id`,`i`.`issue_name` AS `issue_name`,`i`.`details` AS `details`,`i`.`status` AS `status`,`i`.`priority` AS `priority`,`i`.`user_id` AS `user_id`,`i`.`lastupdate` AS `lastupdate`,`i`.`project_id` AS `project_id`,`u`.`username` AS `username`,`p`.`project_name` AS `project_name` from ((`issue_issuelist` `i` left join `users_view` `u` on((`i`.`user_id` = `u`.`user_id`))) join `issue_projectlist` `p` on((`i`.`project_id` = `p`.`project_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 `issue_projectlist_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `issue_projectlist_view` AS select `p`.`project_id` AS `project_id`,`p`.`project_name` AS `project_name`,`p`.`details` AS `details`,`p`.`customer_id` AS `customer_id`,`p`.`status` AS `status`,`c`.`customer_name` AS `customer_name`,(select coalesce(sum((case when (`i`.`status` = 0) then 1 else 0 end)),0) from `issue_issuelist` `i` where (`i`.`project_id` = `p`.`project_id`)) AS `inew`,(select coalesce(sum((case when (`i`.`status` > 1) then 1 else 0 end)),0) from `issue_issuelist` `i` where (`i`.`project_id` = `p`.`project_id`)) AS `iproc`,(select coalesce(sum((case when (`i`.`status` = 1) then 1 else 0 end)),0) from `issue_issuelist` `i` where (`i`.`project_id` = `p`.`project_id`)) AS `iclose` from (`issue_projectlist` `p` left join `customers` `c` on((`p`.`customer_id` = `c`.`customer_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 `issue_time_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `issue_time_view` AS select `t`.`id` AS `id`,`t`.`issue_id` AS `issue_id`,`t`.`createdon` AS `createdon`,`t`.`user_id` AS `user_id`,`t`.`duration` AS `duration`,`t`.`notes` AS `notes`,`u`.`username` AS `username`,`i`.`issue_name` AS `issue_name`,`i`.`project_id` AS `project_id`,`i`.`project_name` AS `project_name` from ((`issue_time` `t` join `users_view` `u` on((`t`.`user_id` = `u`.`user_id`))) join `issue_issuelist_view` `i` on((`t`.`issue_id` = `i`.`issue_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 `item_set_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 CREATE */ -/*!50013 SQL SECURITY DEFINER */ -/*!50001 VIEW `item_set_view` AS select `item_set`.`set_id` AS `set_id`,`item_set`.`item_id` AS `item_id`,`item_set`.`pitem_id` AS `pitem_id`,`item_set`.`qty` AS `qty`,`items`.`itemname` AS `itemname`,`items`.`item_code` AS `item_code` from (`item_set` join `items` on((`item_set`.`item_id` = `items`.`item_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 `items_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 CREATE */ -/*!50013 SQL SECURITY DEFINER */ -/*!50001 VIEW `items_view` AS select `items`.`item_id` AS `item_id`,`items`.`itemname` AS `itemname`,`items`.`description` AS `description`,`items`.`detail` AS `detail`,`items`.`item_code` AS `item_code`,`items`.`bar_code` AS `bar_code`,`items`.`cat_id` AS `cat_id`,`items`.`msr` AS `msr`,`items`.`disabled` AS `disabled`,`items`.`minqty` AS `minqty`,`items`.`item_type` AS `item_type`,`items`.`manufacturer` AS `manufacturer`,`item_cat`.`cat_name` AS `cat_name` from (`items` left join `item_cat` on((`items`.`cat_id` = `item_cat`.`cat_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 `messages_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `messages_view` AS select `messages`.`message_id` AS `message_id`,`messages`.`user_id` AS `user_id`,`messages`.`created` AS `created`,`messages`.`message` AS `message`,`messages`.`item_id` AS `item_id`,`messages`.`item_type` AS `item_type`,`users_view`.`username` AS `username` from (`messages` join `users_view` on((`messages`.`user_id` = `users_view`.`user_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 `note_nodesview`*/; -/*!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 SQL SECURITY DEFINER */ -/*!50001 VIEW `note_nodesview` AS select `note_nodes`.`node_id` AS `node_id`,`note_nodes`.`pid` AS `pid`,`note_nodes`.`title` AS `title`,`note_nodes`.`mpath` AS `mpath`,`note_nodes`.`user_id` AS `user_id`,`note_nodes`.`ispublic` AS `ispublic`,(select count(`note_topicnode`.`topic_id`) AS `Count(topic_id)` from `note_topicnode` where (`note_topicnode`.`node_id` = `note_nodes`.`node_id`)) AS `tcnt` from `note_nodes` */; -/*!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 `note_topicnodeview`*/; -/*!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 SQL SECURITY DEFINER */ -/*!50001 VIEW `note_topicnodeview` AS select `note_topicnode`.`topic_id` AS `topic_id`,`note_topicnode`.`node_id` AS `node_id`,`note_topicnode`.`tn_id` AS `tn_id`,`note_topics`.`title` AS `title`,`note_nodes`.`user_id` AS `user_id`,`note_topics`.`content` AS `content` from ((`note_topics` join `note_topicnode` on((`note_topics`.`topic_id` = `note_topicnode`.`topic_id`))) join `note_nodes` on((`note_nodes`.`node_id` = `note_topicnode`.`node_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 `note_topicsview`*/; -/*!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 SQL SECURITY DEFINER */ -/*!50001 VIEW `note_topicsview` AS select `t`.`topic_id` AS `topic_id`,`t`.`title` AS `title`,`t`.`content` AS `content`,`t`.`acctype` AS `acctype`,`t`.`user_id` AS `user_id` from `note_topics` `t` */; -/*!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 SQL SECURITY DEFINER */ -/*!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`,`pl`.`paytype` AS `paytype`,`pl`.`detail` AS `detail`,`d`.`document_number` AS `document_number`,`u`.`username` AS `username`,`m`.`mf_name` AS `mf_name`,`d`.`customer_id` AS `customer_id`,`d`.`customer_name` AS `customer_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 `roles_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 CREATE */ -/*!50013 SQL SECURITY DEFINER */ -/*!50001 VIEW `roles_view` AS select `roles`.`role_id` AS `role_id`,`roles`.`rolename` AS `rolename`,`roles`.`acl` AS `acl`,(select coalesce(count(0),0) from `users` where (`users`.`role_id` = `roles`.`role_id`)) AS `cnt` from `roles` */; -/*!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 */; -/*!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 SQL SECURITY DEFINER */ -/*!50001 VIEW `shop_attributes_view` AS select `shop_attributes`.`attribute_id` AS `attribute_id`,`shop_attributes`.`attributename` AS `attributename`,`shop_attributes`.`cat_id` AS `cat_id`,`shop_attributes`.`attributetype` AS `attributetype`,`shop_attributes`.`valueslist` AS `valueslist`,`shop_attributes_order`.`ordern` AS `ordern` from (`shop_attributes` join `shop_attributes_order` on(((`shop_attributes`.`attribute_id` = `shop_attributes_order`.`attr_id`) and (`shop_attributes`.`cat_id` = `shop_attributes_order`.`pg_id`)))) order by `shop_attributes_order`.`ordern` */; -/*!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_products_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `shop_products_view` AS select `i`.`item_id` AS `item_id`,`i`.`itemname` AS `itemname`,`i`.`description` AS `description`,`i`.`detail` AS `detail`,`i`.`item_code` AS `item_code`,`i`.`bar_code` AS `bar_code`,`i`.`cat_id` AS `cat_id`,`i`.`msr` AS `msr`,`i`.`disabled` AS `disabled`,`i`.`minqty` AS `minqty`,`i`.`item_type` AS `item_type`,`i`.`manufacturer` AS `manufacturer`,`i`.`cat_name` AS `cat_name`,coalesce((select sum(`store_stock`.`qty`) from `store_stock` where (`store_stock`.`item_id` = `i`.`item_id`)),0) AS `qty`,coalesce((select count(0) from `shop_prod_comments` `c` where (`c`.`item_id` = `i`.`item_id`)),0) AS `comments`,coalesce((select sum(`c`.`rating`) from `shop_prod_comments` `c` where (`c`.`item_id` = `i`.`item_id`)),0) AS `ratings` from `items_view` `i` */; -/*!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 `store_stock_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 CREATE */ -/*!50013 SQL SECURITY DEFINER */ -/*!50001 VIEW `store_stock_view` AS select `st`.`stock_id` AS `stock_id`,`st`.`item_id` AS `item_id`,`st`.`partion` AS `partion`,`st`.`store_id` AS `store_id`,`i`.`itemname` AS `itemname`,`i`.`item_code` AS `item_code`,`i`.`cat_id` AS `cat_id`,`i`.`msr` AS `msr`,`i`.`item_type` AS `item_type`,`i`.`bar_code` AS `bar_code`,`i`.`cat_name` AS `cat_name`,`i`.`disabled` AS `itemdisabled`,`stores`.`storename` AS `storename`,`st`.`qty` AS `qty`,`st`.`snumber` AS `snumber`,`st`.`sdate` AS `sdate` from ((`store_stock` `st` join `items_view` `i` on(((`i`.`item_id` = `st`.`item_id`) and (`i`.`disabled` <> 1)))) join `stores` on((`stores`.`store_id` = `st`.`store_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 `timesheet_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 SQL SECURITY DEFINER */ -/*!50001 VIEW `timesheet_view` AS select `t`.`time_id` AS `time_id`,`t`.`emp_id` AS `emp_id`,`t`.`description` AS `description`,`t`.`t_start` AS `t_start`,`t`.`t_end` AS `t_end`,`t`.`t_type` AS `t_type`,`t`.`t_break` AS `t_break`,`e`.`emp_name` AS `emp_name`,`e`.`disabled` AS `disabled`,`e`.`branch_id` AS `branch_id` from (`timesheet` `t` join `employees` `e` on((`t`.`emp_id` = `e`.`employee_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 `users_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 CREATE */ -/*!50013 SQL SECURITY DEFINER */ -/*!50001 VIEW `users_view` AS select `users`.`user_id` AS `user_id`,`users`.`userlogin` AS `userlogin`,`users`.`userpass` AS `userpass`,`users`.`createdon` AS `createdon`,`users`.`email` AS `email`,`users`.`acl` AS `acl`,`users`.`options` AS `options`,`users`.`disabled` AS `disabled`,`roles`.`rolename` AS `rolename`,`users`.`role_id` AS `role_id`,`roles`.`acl` AS `roleacl`,coalesce(`employees`.`employee_id`,0) AS `employee_id`,(case when isnull(`employees`.`emp_name`) then `users`.`userlogin` else `employees`.`emp_name` end) AS `username` from ((`users` left join `employees` on(((`users`.`userlogin` = `employees`.`login`) and (`employees`.`disabled` <> 1)))) left join `roles` on((`users`.`role_id` = `roles`.`role_id`))) */; -/*!50001 SET character_set_client = @saved_cs_client */; -/*!50001 SET character_set_results = @saved_cs_results */; -/*!50001 SET collation_connection = @saved_col_connection */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES cp1251 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `branches`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `branches` ( + `branch_id` int(11) NOT NULL AUTO_INCREMENT, + `branch_name` varchar(255) NOT NULL, + `details` longtext NOT NULL, + `disabled` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`branch_id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `contracts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contracts` ( + `contract_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(11) DEFAULT '0', + `firm_id` int(11) DEFAULT '0', + `createdon` date NOT NULL, + `contract_number` varchar(64) NOT NULL, + `disabled` tinyint(1) DEFAULT '0', + `details` longtext NOT NULL, + PRIMARY KEY (`contract_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `contracts_view`; +/*!50001 DROP VIEW IF EXISTS `contracts_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `contracts_view` AS SELECT + 1 AS `contract_id`, + 1 AS `customer_id`, + 1 AS `firm_id`, + 1 AS `createdon`, + 1 AS `contract_number`, + 1 AS `disabled`, + 1 AS `details`, + 1 AS `customer_name`, + 1 AS `firm_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `custacc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custacc` ( + `ca_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(11) NOT NULL, + `document_id` int(11) DEFAULT NULL, + `optype` int(11) DEFAULT '0', + `amount` decimal(10,2) NOT NULL, + `createdon` date NOT NULL, + PRIMARY KEY (`ca_id`), + KEY `customer_id` (`customer_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custacc_view`; +/*!50001 DROP VIEW IF EXISTS `custacc_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `custacc_view` AS SELECT + 1 AS `ca_id`, + 1 AS `customer_id`, + 1 AS `document_id`, + 1 AS `optype`, + 1 AS `amount`, + 1 AS `document_number`, + 1 AS `createdon`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `customers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customers` ( + `customer_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_name` varchar(255) DEFAULT NULL, + `detail` mediumtext NOT NULL, + `email` varchar(64) DEFAULT NULL, + `phone` varchar(64) DEFAULT NULL, + `status` smallint(4) NOT NULL DEFAULT '0', + `city` varchar(255) DEFAULT NULL, + `leadstatus` varchar(255) DEFAULT NULL, + `leadsource` varchar(255) DEFAULT NULL, + `createdon` date DEFAULT NULL, + `country` varchar(255) DEFAULT NULL, + PRIMARY KEY (`customer_id`) +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `customers_view`; +/*!50001 DROP VIEW IF EXISTS `customers_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `customers_view` AS SELECT + 1 AS `customer_id`, + 1 AS `customer_name`, + 1 AS `detail`, + 1 AS `email`, + 1 AS `phone`, + 1 AS `status`, + 1 AS `city`, + 1 AS `leadsource`, + 1 AS `leadstatus`, + 1 AS `country`, + 1 AS `mcnt`, + 1 AS `fcnt`, + 1 AS `ecnt`*/; +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`) +) ENGINE=InnoDB AUTO_INCREMENT=1769 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 */; +CREATE TABLE `documents` ( + `document_id` int(11) NOT NULL AUTO_INCREMENT, + `document_number` varchar(45) NOT NULL, + `document_date` date NOT NULL, + `user_id` int(11) NOT NULL, + `content` longtext, + `amount` decimal(11,2) DEFAULT NULL, + `meta_id` int(11) NOT NULL, + `state` tinyint(4) NOT NULL, + `notes` varchar(255) NOT NULL, + `customer_id` int(11) DEFAULT '0', + `payamount` decimal(11,2) DEFAULT '0.00', + `payed` decimal(11,2) DEFAULT '0.00', + `branch_id` int(11) DEFAULT '0', + `parent_id` bigint(20) DEFAULT '0', + `firm_id` int(11) DEFAULT NULL, + PRIMARY KEY (`document_id`), + UNIQUE KEY `unuqnumber` (`meta_id`,`document_number`,`branch_id`), + KEY `document_date` (`document_date`), + KEY `customer_id` (`customer_id`), + KEY `user_id` (`user_id`), + KEY `branch_id` (`branch_id`), + CONSTRAINT `documents_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) +) ENGINE=InnoDB AUTO_INCREMENT=488 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `documents_view`; +/*!50001 DROP VIEW IF EXISTS `documents_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `documents_view` AS SELECT + 1 AS `document_id`, + 1 AS `document_number`, + 1 AS `document_date`, + 1 AS `user_id`, + 1 AS `content`, + 1 AS `amount`, + 1 AS `meta_id`, + 1 AS `username`, + 1 AS `customer_id`, + 1 AS `customer_name`, + 1 AS `state`, + 1 AS `notes`, + 1 AS `payamount`, + 1 AS `payed`, + 1 AS `parent_id`, + 1 AS `branch_id`, + 1 AS `branch_name`, + 1 AS `firm_id`, + 1 AS `firm_name`, + 1 AS `meta_name`, + 1 AS `meta_desc`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `employees`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `employees` ( + `employee_id` int(11) NOT NULL AUTO_INCREMENT, + `login` varchar(64) DEFAULT NULL, + `detail` mediumtext, + `disabled` tinyint(1) DEFAULT '0', + `emp_name` varchar(64) NOT NULL, + `branch_id` int(11) DEFAULT '0', + PRIMARY KEY (`employee_id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `entrylist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `entrylist` ( + `entry_id` bigint(20) NOT NULL AUTO_INCREMENT, + `document_id` int(11) NOT NULL, + `quantity` decimal(11,3) DEFAULT '0.000', + `stock_id` int(11) DEFAULT NULL, + `service_id` int(11) DEFAULT NULL, + `outprice` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`entry_id`), + KEY `document_id` (`document_id`), + KEY `stock_id` (`stock_id`), + CONSTRAINT `entrylist_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `documents` (`document_id`), + CONSTRAINT `entrylist_ibfk_2` FOREIGN KEY (`stock_id`) REFERENCES `store_stock` (`stock_id`) +) ENGINE=InnoDB AUTO_INCREMENT=986 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +ALTER DATABASE `zstore` CHARACTER SET utf8 COLLATE utf8_general_ci ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `entrylist_after_ins_tr` AFTER INSERT ON `entrylist` + FOR EACH ROW +BEGIN + + + + IF new.stock_id >0 then + + update store_stock set qty=(select coalesce(sum(quantity),0) from entrylist where stock_id=new.stock_id) where store_stock.stock_id = new.stock_id; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +ALTER DATABASE `zstore` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ; +ALTER DATABASE `zstore` CHARACTER SET utf8 COLLATE utf8_general_ci ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `entrylist_after_del_tr` AFTER DELETE ON `entrylist` + FOR EACH ROW +BEGIN + + + IF old.stock_id >0 then + + update store_stock set qty=(select coalesce(sum(quantity),0) from entrylist where stock_id=old.stock_id) where store_stock.stock_id = old.stock_id; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +ALTER DATABASE `zstore` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ; +DROP TABLE IF EXISTS `entrylist_view`; +/*!50001 DROP VIEW IF EXISTS `entrylist_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `entrylist_view` AS SELECT + 1 AS `entry_id`, + 1 AS `document_id`, + 1 AS `quantity`, + 1 AS `customer_id`, + 1 AS `stock_id`, + 1 AS `service_id`, + 1 AS `item_id`, + 1 AS `partion`, + 1 AS `document_date`, + 1 AS `outprice`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `equipments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `equipments` ( + `eq_id` int(11) NOT NULL AUTO_INCREMENT, + `eq_name` varchar(255) DEFAULT NULL, + `detail` mediumtext, + `disabled` tinyint(1) DEFAULT '0', + `description` text, + PRIMARY KEY (`eq_id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `eventlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `eventlist` ( + `user_id` int(11) NOT NULL, + `eventdate` datetime NOT NULL, + `title` varchar(255) NOT NULL, + `description` text NOT NULL, + `event_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(11) NOT NULL, + `isdone` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`event_id`), + KEY `user_id` (`user_id`), + KEY `customer_id` (`customer_id`) +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `eventlist_view`; +/*!50001 DROP VIEW IF EXISTS `eventlist_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `eventlist_view` AS SELECT + 1 AS `user_id`, + 1 AS `eventdate`, + 1 AS `title`, + 1 AS `description`, + 1 AS `event_id`, + 1 AS `customer_id`, + 1 AS `isdone`, + 1 AS `customer_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `files`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `files` ( + `file_id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) DEFAULT NULL, + `filename` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `item_type` int(11) NOT NULL, + `mime` varchar(16) DEFAULT NULL, + PRIMARY KEY (`file_id`), + KEY `item_id` (`item_id`) +) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `filesdata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `filesdata` ( + `file_id` int(11) DEFAULT NULL, + `filedata` longblob, + UNIQUE KEY `file_id` (`file_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `firms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `firms` ( + `firm_id` int(11) NOT NULL AUTO_INCREMENT, + `firm_name` varchar(255) NOT NULL, + `details` longtext NOT NULL, + `disabled` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`firm_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `images`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `images` ( + `image_id` int(11) NOT NULL AUTO_INCREMENT, + `content` longblob NOT NULL, + `mime` varchar(16) DEFAULT NULL, + `thumb` longblob, + PRIMARY KEY (`image_id`) +) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `issue_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `issue_history` ( + `hist_id` bigint(20) NOT NULL AUTO_INCREMENT, + `issue_id` int(11) NOT NULL, + `createdon` date NOT NULL, + `user_id` int(11) NOT NULL, + `description` varchar(255) NOT NULL, + PRIMARY KEY (`hist_id`), + KEY `issue_id` (`issue_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `issue_issuelist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `issue_issuelist` ( + `issue_id` int(11) NOT NULL AUTO_INCREMENT, + `issue_name` varchar(255) NOT NULL, + `details` longtext NOT NULL, + `status` smallint(6) NOT NULL, + `priority` tinyint(4) NOT NULL, + `user_id` int(11) NOT NULL, + `lastupdate` datetime DEFAULT NULL, + `project_id` int(11) NOT NULL, + PRIMARY KEY (`issue_id`), + KEY `project_id` (`project_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `issue_issuelist_view`; +/*!50001 DROP VIEW IF EXISTS `issue_issuelist_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `issue_issuelist_view` AS SELECT + 1 AS `issue_id`, + 1 AS `issue_name`, + 1 AS `details`, + 1 AS `status`, + 1 AS `priority`, + 1 AS `user_id`, + 1 AS `lastupdate`, + 1 AS `project_id`, + 1 AS `username`, + 1 AS `project_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `issue_projectacc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `issue_projectacc` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `project_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `issue_projectlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `issue_projectlist` ( + `project_id` int(11) NOT NULL AUTO_INCREMENT, + `project_name` varchar(255) NOT NULL, + `details` longtext NOT NULL, + `customer_id` int(11) DEFAULT NULL, + `status` smallint(6) DEFAULT NULL, + PRIMARY KEY (`project_id`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `issue_projectlist_view`; +/*!50001 DROP VIEW IF EXISTS `issue_projectlist_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `issue_projectlist_view` AS SELECT + 1 AS `project_id`, + 1 AS `project_name`, + 1 AS `details`, + 1 AS `customer_id`, + 1 AS `status`, + 1 AS `customer_name`, + 1 AS `inew`, + 1 AS `iproc`, + 1 AS `iclose`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `issue_time`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `issue_time` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `issue_id` int(11) NOT NULL, + `createdon` datetime NOT NULL, + `user_id` int(11) NOT NULL, + `duration` decimal(10,2) DEFAULT NULL, + `notes` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `issue_id` (`issue_id`) +) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `issue_time_view`; +/*!50001 DROP VIEW IF EXISTS `issue_time_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `issue_time_view` AS SELECT + 1 AS `id`, + 1 AS `issue_id`, + 1 AS `createdon`, + 1 AS `user_id`, + 1 AS `duration`, + 1 AS `notes`, + 1 AS `username`, + 1 AS `issue_name`, + 1 AS `project_id`, + 1 AS `project_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `item_cat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `item_cat` ( + `cat_id` int(11) NOT NULL AUTO_INCREMENT, + `cat_name` varchar(255) NOT NULL, + `detail` longtext, + `parent_id` int(11) DEFAULT '0', + PRIMARY KEY (`cat_id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `item_set`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `item_set` ( + `set_id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) DEFAULT '0', + `pitem_id` int(11) DEFAULT '0', + `qty` decimal(11,3) DEFAULT '0.000', + PRIMARY KEY (`set_id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `item_set_view`; +/*!50001 DROP VIEW IF EXISTS `item_set_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `item_set_view` AS SELECT + 1 AS `set_id`, + 1 AS `item_id`, + 1 AS `pitem_id`, + 1 AS `qty`, + 1 AS `itemname`, + 1 AS `item_code`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `items` ( + `item_id` int(11) NOT NULL AUTO_INCREMENT, + `itemname` varchar(255) DEFAULT NULL, + `description` longtext, + `detail` longtext NOT NULL, + `item_code` varchar(64) DEFAULT NULL, + `bar_code` varchar(64) DEFAULT NULL, + `cat_id` int(11) NOT NULL, + `msr` varchar(64) DEFAULT NULL, + `disabled` tinyint(1) DEFAULT '0', + `minqty` decimal(11,3) DEFAULT '0.000', + `manufacturer` varchar(355) DEFAULT NULL, + `item_type` int(11) DEFAULT NULL, + PRIMARY KEY (`item_id`), + KEY `item_code` (`item_code`), + KEY `itemname` (`itemname`), + KEY `cat_id` (`cat_id`) +) ENGINE=InnoDB AUTO_INCREMENT=598 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_view`; +/*!50001 DROP VIEW IF EXISTS `items_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `items_view` AS SELECT + 1 AS `item_id`, + 1 AS `itemname`, + 1 AS `description`, + 1 AS `detail`, + 1 AS `item_code`, + 1 AS `bar_code`, + 1 AS `cat_id`, + 1 AS `msr`, + 1 AS `disabled`, + 1 AS `minqty`, + 1 AS `item_type`, + 1 AS `manufacturer`, + 1 AS `cat_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `messages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `messages` ( + `message_id` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `created` datetime DEFAULT NULL, + `message` text, + `item_id` int(11) NOT NULL, + `item_type` int(11) DEFAULT NULL, + PRIMARY KEY (`message_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `messages_view`; +/*!50001 DROP VIEW IF EXISTS `messages_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `messages_view` AS SELECT + 1 AS `message_id`, + 1 AS `user_id`, + 1 AS `created`, + 1 AS `message`, + 1 AS `item_id`, + 1 AS `item_type`, + 1 AS `username`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `metadata` ( + `meta_id` int(11) NOT NULL AUTO_INCREMENT, + `meta_type` tinyint(11) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `meta_name` varchar(255) NOT NULL, + `menugroup` varchar(255) DEFAULT NULL, + `disabled` tinyint(4) NOT NULL, + PRIMARY KEY (`meta_id`) +) ENGINE=InnoDB AUTO_INCREMENT=95 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, + `branch_id` int(11) DEFAULT '0', + `detail` longtext, + PRIMARY KEY (`mf_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `note_fav`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note_fav` ( + `fav_id` int(11) NOT NULL AUTO_INCREMENT, + `topic_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`fav_id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `note_nodes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note_nodes` ( + `node_id` int(11) NOT NULL AUTO_INCREMENT, + `pid` int(11) NOT NULL, + `title` varchar(50) NOT NULL, + `mpath` varchar(255) CHARACTER SET latin1 NOT NULL, + `user_id` int(11) DEFAULT NULL, + `ispublic` tinyint(1) DEFAULT '0', + PRIMARY KEY (`node_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `note_nodesview`; +/*!50001 DROP VIEW IF EXISTS `note_nodesview`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `note_nodesview` AS SELECT + 1 AS `node_id`, + 1 AS `pid`, + 1 AS `title`, + 1 AS `mpath`, + 1 AS `user_id`, + 1 AS `ispublic`, + 1 AS `tcnt`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `note_tags`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note_tags` ( + `tag_id` int(11) NOT NULL AUTO_INCREMENT, + `topic_id` int(11) NOT NULL, + `tagvalue` varchar(255) NOT NULL, + PRIMARY KEY (`tag_id`), + KEY `topic_id` (`topic_id`) +) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `note_topicnode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note_topicnode` ( + `topic_id` int(11) NOT NULL, + `node_id` int(11) NOT NULL, + `tn_id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`tn_id`), + KEY `topic_id` (`topic_id`), + KEY `node_id` (`node_id`) +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `note_topicnodeview`; +/*!50001 DROP VIEW IF EXISTS `note_topicnodeview`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `note_topicnodeview` AS SELECT + 1 AS `topic_id`, + 1 AS `node_id`, + 1 AS `tn_id`, + 1 AS `title`, + 1 AS `user_id`, + 1 AS `content`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `note_topics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note_topics` ( + `topic_id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `content` longtext NOT NULL, + `acctype` smallint(4) DEFAULT '0', + `user_id` int(11) NOT NULL, + PRIMARY KEY (`topic_id`) +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `note_topicsview`; +/*!50001 DROP VIEW IF EXISTS `note_topicsview`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `note_topicsview` AS SELECT + 1 AS `topic_id`, + 1 AS `title`, + 1 AS `content`, + 1 AS `acctype`, + 1 AS `user_id`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `notifies`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notifies` ( + `notify_id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `dateshow` datetime NOT NULL, + `checked` tinyint(1) NOT NULL DEFAULT '0', + `message` text NOT NULL, + `sender_name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`notify_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `options` ( + `optname` varchar(64) NOT NULL, + `optvalue` longtext NOT NULL, + UNIQUE KEY `optname` (`optname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `parealist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `parealist` ( + `pa_id` int(11) NOT NULL AUTO_INCREMENT, + `pa_name` varchar(255) NOT NULL, + PRIMARY KEY (`pa_id`) +) ENGINE=InnoDB 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` bigint(20) NOT NULL AUTO_INCREMENT, + `document_id` int(11) NOT NULL, + `amount` decimal(11,2) NOT NULL, + `mf_id` int(11) NOT NULL, + `notes` varchar(255) DEFAULT NULL, + `paydate` datetime DEFAULT NULL, + `user_id` int(11) NOT NULL, + `paytype` smallint(6) NOT NULL, + `detail` longtext, + PRIMARY KEY (`pl_id`), + KEY `document_id` (`document_id`), + CONSTRAINT `paylist_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `documents` (`document_id`) +) ENGINE=InnoDB AUTO_INCREMENT=437 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 `paytype`, + 1 AS `detail`, + 1 AS `document_number`, + 1 AS `username`, + 1 AS `mf_name`, + 1 AS `customer_id`, + 1 AS `customer_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `poslist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `poslist` ( + `pos_id` int(11) NOT NULL AUTO_INCREMENT, + `pos_name` varchar(255) NOT NULL, + `details` longtext NOT NULL, + `branch_id` int(11) DEFAULT '0', + PRIMARY KEY (`pos_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ppo_zformstat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ppo_zformstat` ( + `zf_id` int(11) NOT NULL AUTO_INCREMENT, + `pos_id` int(11) NOT NULL, + `checktype` int(11) NOT NULL, + `createdon` datetime NOT NULL, + `document_number` varchar(255) NOT NULL, + `amount0` decimal(10,2) NOT NULL, + `amount1` decimal(10,2) NOT NULL, + `amount2` decimal(10,2) NOT NULL, + `amount3` decimal(10,2) NOT NULL, + PRIMARY KEY (`zf_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `roles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `roles` ( + `role_id` int(11) NOT NULL AUTO_INCREMENT, + `rolename` varchar(255) DEFAULT NULL, + `acl` mediumtext, + PRIMARY KEY (`role_id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `roles_view`; +/*!50001 DROP VIEW IF EXISTS `roles_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `roles_view` AS SELECT + 1 AS `role_id`, + 1 AS `rolename`, + 1 AS `acl`, + 1 AS `cnt`*/; +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 */; +CREATE TABLE `services` ( + `service_id` int(11) NOT NULL AUTO_INCREMENT, + `service_name` varchar(255) NOT NULL, + `detail` text, + `disabled` tinyint(1) DEFAULT '0', + PRIMARY KEY (`service_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shop_attributes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shop_attributes` ( + `attribute_id` int(11) NOT NULL AUTO_INCREMENT, + `attributename` varchar(64) NOT NULL, + `cat_id` int(11) NOT NULL, + `attributetype` tinyint(4) NOT NULL, + `valueslist` text, + PRIMARY KEY (`attribute_id`) +) ENGINE=InnoDB AUTO_INCREMENT=21 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 */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shop_attributes_order` ( + `order_id` int(11) NOT NULL AUTO_INCREMENT, + `attr_id` int(11) NOT NULL, + `pg_id` int(11) NOT NULL, + `ordern` int(11) NOT NULL, + PRIMARY KEY (`order_id`) +) ENGINE=InnoDB AUTO_INCREMENT=19 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`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `shop_attributes_view` AS SELECT + 1 AS `attribute_id`, + 1 AS `attributename`, + 1 AS `cat_id`, + 1 AS `attributetype`, + 1 AS `valueslist`, + 1 AS `ordern`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `shop_attributevalues`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shop_attributevalues` ( + `attributevalue_id` int(11) NOT NULL AUTO_INCREMENT, + `attribute_id` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + `attributevalue` varchar(255) NOT NULL, + PRIMARY KEY (`attributevalue_id`), + KEY `attribute_id` (`attribute_id`) +) ENGINE=InnoDB AUTO_INCREMENT=64 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 */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shop_prod_comments` ( + `comment_id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) NOT NULL, + `author` varchar(64) NOT NULL, + `comment` text NOT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `rating` tinyint(4) NOT NULL DEFAULT '0', + `moderated` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`comment_id`), + KEY `product_id` (`item_id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 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`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `shop_products_view` AS SELECT + 1 AS `item_id`, + 1 AS `itemname`, + 1 AS `description`, + 1 AS `detail`, + 1 AS `item_code`, + 1 AS `bar_code`, + 1 AS `cat_id`, + 1 AS `msr`, + 1 AS `disabled`, + 1 AS `minqty`, + 1 AS `item_type`, + 1 AS `manufacturer`, + 1 AS `cat_name`, + 1 AS `qty`, + 1 AS `comments`, + 1 AS `ratings`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `store_stock`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `store_stock` ( + `stock_id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) NOT NULL, + `partion` decimal(11,2) DEFAULT NULL, + `store_id` int(11) NOT NULL, + `qty` decimal(11,3) DEFAULT '0.000', + `snumber` varchar(64) DEFAULT NULL, + `sdate` date DEFAULT NULL, + PRIMARY KEY (`stock_id`), + KEY `item_id` (`item_id`), + KEY `store_id` (`store_id`), + CONSTRAINT `store_stock_fk` FOREIGN KEY (`store_id`) REFERENCES `stores` (`store_id`), + CONSTRAINT `store_stock_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `items` (`item_id`) +) ENGINE=InnoDB AUTO_INCREMENT=605 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`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `store_stock_view` AS SELECT + 1 AS `stock_id`, + 1 AS `item_id`, + 1 AS `partion`, + 1 AS `store_id`, + 1 AS `itemname`, + 1 AS `item_code`, + 1 AS `cat_id`, + 1 AS `msr`, + 1 AS `item_type`, + 1 AS `bar_code`, + 1 AS `cat_name`, + 1 AS `itemdisabled`, + 1 AS `storename`, + 1 AS `qty`, + 1 AS `snumber`, + 1 AS `sdate`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `stores`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `stores` ( + `store_id` int(11) NOT NULL AUTO_INCREMENT, + `storename` varchar(64) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `branch_id` int(11) DEFAULT '0', + PRIMARY KEY (`store_id`) +) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `subscribes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `subscribes` ( + `sub_id` int(11) NOT NULL AUTO_INCREMENT, + `sub_type` int(11) DEFAULT NULL, + `reciever_type` int(11) DEFAULT NULL, + `msg_type` int(11) DEFAULT NULL, + `msgtext` text, + `detail` longtext, + `disabled` int(1) DEFAULT '0', + PRIMARY KEY (`sub_id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `timesheet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `timesheet` ( + `time_id` int(11) NOT NULL AUTO_INCREMENT, + `emp_id` int(11) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `t_start` datetime DEFAULT NULL, + `t_end` datetime DEFAULT NULL, + `t_type` int(11) DEFAULT '0', + `t_break` smallint(6) DEFAULT '0', + `branch_id` int(11) DEFAULT NULL, + PRIMARY KEY (`time_id`), + KEY `emp_id` (`emp_id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `timesheet_view`; +/*!50001 DROP VIEW IF EXISTS `timesheet_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `timesheet_view` AS SELECT + 1 AS `time_id`, + 1 AS `emp_id`, + 1 AS `description`, + 1 AS `t_start`, + 1 AS `t_end`, + 1 AS `t_type`, + 1 AS `t_break`, + 1 AS `emp_name`, + 1 AS `branch_name`, + 1 AS `disabled`, + 1 AS `branch_id`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `users` ( + `user_id` int(11) NOT NULL AUTO_INCREMENT, + `userlogin` varchar(32) NOT NULL, + `userpass` varchar(255) NOT NULL, + `createdon` date NOT NULL, + `email` varchar(255) DEFAULT NULL, + `acl` mediumtext NOT NULL, + `disabled` int(1) NOT NULL DEFAULT '0', + `options` longtext, + `role_id` int(11) DEFAULT NULL, + PRIMARY KEY (`user_id`), + UNIQUE KEY `userlogin` (`userlogin`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_view`; +/*!50001 DROP VIEW IF EXISTS `users_view`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `users_view` AS SELECT + 1 AS `user_id`, + 1 AS `userlogin`, + 1 AS `userpass`, + 1 AS `createdon`, + 1 AS `email`, + 1 AS `acl`, + 1 AS `options`, + 1 AS `disabled`, + 1 AS `rolename`, + 1 AS `role_id`, + 1 AS `roleacl`, + 1 AS `employee_id`, + 1 AS `username`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `zformstat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `zformstat` ( + `zf_id` int(11) NOT NULL AUTO_INCREMENT, + `pos_id` int(11) NOT NULL, + `checktype` int(11) NOT NULL, + `amount0` decimal(10,2) NOT NULL, + `createdon` datetime NOT NULL, + `amount1` decimal(10,2) NOT NULL, + `amount2` decimal(10,2) NOT NULL, + `document_number` varchar(255) NOT NULL, + `amount3` decimal(10,2) NOT NULL, + PRIMARY KEY (`zf_id`) +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50001 DROP VIEW IF EXISTS `contracts_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `contracts_view` AS select `co`.`contract_id` AS `contract_id`,`co`.`customer_id` AS `customer_id`,`co`.`firm_id` AS `firm_id`,`co`.`createdon` AS `createdon`,`co`.`contract_number` AS `contract_number`,`co`.`disabled` AS `disabled`,`co`.`details` AS `details`,`cu`.`customer_name` AS `customer_name`,`f`.`firm_name` AS `firm_name` from ((`contracts` `co` join `customers` `cu` on((`co`.`customer_id` = `cu`.`customer_id`))) left join `firms` `f` on((`co`.`firm_id` = `f`.`firm_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 `custacc_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `custacc_view` AS select `c`.`ca_id` AS `ca_id`,`c`.`customer_id` AS `customer_id`,`c`.`document_id` AS `document_id`,`c`.`optype` AS `optype`,`c`.`amount` AS `amount`,`d`.`document_number` AS `document_number`,`c`.`createdon` AS `createdon` from (`custacc` `c` join `documents` `d` on((`d`.`document_id` = `c`.`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 `customers_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `customers_view` AS select `customers`.`customer_id` AS `customer_id`,`customers`.`customer_name` AS `customer_name`,`customers`.`detail` AS `detail`,`customers`.`email` AS `email`,`customers`.`phone` AS `phone`,`customers`.`status` AS `status`,`customers`.`city` AS `city`,`customers`.`leadsource` AS `leadsource`,`customers`.`leadstatus` AS `leadstatus`,`customers`.`country` AS `country`,(select count(0) from `messages` `m` where ((`m`.`item_id` = `customers`.`customer_id`) and (`m`.`item_type` = 2))) AS `mcnt`,(select count(0) from `files` `f` where ((`f`.`item_id` = `customers`.`customer_id`) and (`f`.`item_type` = 2))) AS `fcnt`,(select count(0) from `eventlist` `e` where ((`e`.`customer_id` = `customers`.`customer_id`) and (`e`.`eventdate` >= now()))) AS `ecnt` from `customers` */; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!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 */; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!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`,`d`.`payed` AS `payed`,`d`.`parent_id` AS `parent_id`,`d`.`branch_id` AS `branch_id`,`b`.`branch_name` AS `branch_name`,`d`.`firm_id` AS `firm_id`,`f`.`firm_name` AS `firm_name`,`metadata`.`meta_name` AS `meta_name`,`metadata`.`description` AS `meta_desc` from (((((`documents` `d` left 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`))) left join `branches` `b` on((`d`.`branch_id` = `b`.`branch_id`))) left join `firms` `f` on((`d`.`firm_id` = `f`.`firm_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 `entrylist_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `entrylist_view` AS select `entrylist`.`entry_id` AS `entry_id`,`entrylist`.`document_id` AS `document_id`,`entrylist`.`quantity` AS `quantity`,`documents`.`customer_id` AS `customer_id`,`entrylist`.`stock_id` AS `stock_id`,`entrylist`.`service_id` AS `service_id`,`store_stock`.`item_id` AS `item_id`,`store_stock`.`partion` AS `partion`,`documents`.`document_date` AS `document_date`,`entrylist`.`outprice` AS `outprice` from ((`entrylist` left join `store_stock` on((`entrylist`.`stock_id` = `store_stock`.`stock_id`))) join `documents` on((`entrylist`.`document_id` = `documents`.`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 `eventlist_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `eventlist_view` AS select `e`.`user_id` AS `user_id`,`e`.`eventdate` AS `eventdate`,`e`.`title` AS `title`,`e`.`description` AS `description`,`e`.`event_id` AS `event_id`,`e`.`customer_id` AS `customer_id`,`e`.`isdone` AS `isdone`,`c`.`customer_name` AS `customer_name` from (`eventlist` `e` left join `customers` `c` on((`e`.`customer_id` = `c`.`customer_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 `issue_issuelist_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `issue_issuelist_view` AS select `i`.`issue_id` AS `issue_id`,`i`.`issue_name` AS `issue_name`,`i`.`details` AS `details`,`i`.`status` AS `status`,`i`.`priority` AS `priority`,`i`.`user_id` AS `user_id`,`i`.`lastupdate` AS `lastupdate`,`i`.`project_id` AS `project_id`,`u`.`username` AS `username`,`p`.`project_name` AS `project_name` from ((`issue_issuelist` `i` left join `users_view` `u` on((`i`.`user_id` = `u`.`user_id`))) join `issue_projectlist` `p` on((`i`.`project_id` = `p`.`project_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 `issue_projectlist_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `issue_projectlist_view` AS select `p`.`project_id` AS `project_id`,`p`.`project_name` AS `project_name`,`p`.`details` AS `details`,`p`.`customer_id` AS `customer_id`,`p`.`status` AS `status`,`c`.`customer_name` AS `customer_name`,(select coalesce(sum((case when (`i`.`status` = 0) then 1 else 0 end)),0) from `issue_issuelist` `i` where (`i`.`project_id` = `p`.`project_id`)) AS `inew`,(select coalesce(sum((case when (`i`.`status` > 1) then 1 else 0 end)),0) from `issue_issuelist` `i` where (`i`.`project_id` = `p`.`project_id`)) AS `iproc`,(select coalesce(sum((case when (`i`.`status` = 1) then 1 else 0 end)),0) from `issue_issuelist` `i` where (`i`.`project_id` = `p`.`project_id`)) AS `iclose` from (`issue_projectlist` `p` left join `customers` `c` on((`p`.`customer_id` = `c`.`customer_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 `issue_time_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `issue_time_view` AS select `t`.`id` AS `id`,`t`.`issue_id` AS `issue_id`,`t`.`createdon` AS `createdon`,`t`.`user_id` AS `user_id`,`t`.`duration` AS `duration`,`t`.`notes` AS `notes`,`u`.`username` AS `username`,`i`.`issue_name` AS `issue_name`,`i`.`project_id` AS `project_id`,`i`.`project_name` AS `project_name` from ((`issue_time` `t` join `users_view` `u` on((`t`.`user_id` = `u`.`user_id`))) join `issue_issuelist_view` `i` on((`t`.`issue_id` = `i`.`issue_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 `item_set_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `item_set_view` AS select `item_set`.`set_id` AS `set_id`,`item_set`.`item_id` AS `item_id`,`item_set`.`pitem_id` AS `pitem_id`,`item_set`.`qty` AS `qty`,`items`.`itemname` AS `itemname`,`items`.`item_code` AS `item_code` from (`item_set` join `items` on((`item_set`.`item_id` = `items`.`item_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 `items_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `items_view` AS select `items`.`item_id` AS `item_id`,`items`.`itemname` AS `itemname`,`items`.`description` AS `description`,`items`.`detail` AS `detail`,`items`.`item_code` AS `item_code`,`items`.`bar_code` AS `bar_code`,`items`.`cat_id` AS `cat_id`,`items`.`msr` AS `msr`,`items`.`disabled` AS `disabled`,`items`.`minqty` AS `minqty`,`items`.`item_type` AS `item_type`,`items`.`manufacturer` AS `manufacturer`,`item_cat`.`cat_name` AS `cat_name` from (`items` left join `item_cat` on((`items`.`cat_id` = `item_cat`.`cat_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 `messages_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `messages_view` AS select `messages`.`message_id` AS `message_id`,`messages`.`user_id` AS `user_id`,`messages`.`created` AS `created`,`messages`.`message` AS `message`,`messages`.`item_id` AS `item_id`,`messages`.`item_type` AS `item_type`,`users_view`.`username` AS `username` from (`messages` join `users_view` on((`messages`.`user_id` = `users_view`.`user_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 `note_nodesview`*/; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `note_nodesview` AS select `note_nodes`.`node_id` AS `node_id`,`note_nodes`.`pid` AS `pid`,`note_nodes`.`title` AS `title`,`note_nodes`.`mpath` AS `mpath`,`note_nodes`.`user_id` AS `user_id`,`note_nodes`.`ispublic` AS `ispublic`,(select count(`note_topicnode`.`topic_id`) AS `Count(topic_id)` from `note_topicnode` where (`note_topicnode`.`node_id` = `note_nodes`.`node_id`)) AS `tcnt` from `note_nodes` */; +/*!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 `note_topicnodeview`*/; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `note_topicnodeview` AS select `note_topicnode`.`topic_id` AS `topic_id`,`note_topicnode`.`node_id` AS `node_id`,`note_topicnode`.`tn_id` AS `tn_id`,`note_topics`.`title` AS `title`,`note_nodes`.`user_id` AS `user_id`,`note_topics`.`content` AS `content` from ((`note_topics` join `note_topicnode` on((`note_topics`.`topic_id` = `note_topicnode`.`topic_id`))) join `note_nodes` on((`note_nodes`.`node_id` = `note_topicnode`.`node_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 `note_topicsview`*/; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `note_topicsview` AS select `t`.`topic_id` AS `topic_id`,`t`.`title` AS `title`,`t`.`content` AS `content`,`t`.`acctype` AS `acctype`,`t`.`user_id` AS `user_id` from `note_topics` `t` */; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!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`,`pl`.`paytype` AS `paytype`,`pl`.`detail` AS `detail`,`d`.`document_number` AS `document_number`,`u`.`username` AS `username`,`m`.`mf_name` AS `mf_name`,`d`.`customer_id` AS `customer_id`,`d`.`customer_name` AS `customer_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 `roles_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `roles_view` AS select `roles`.`role_id` AS `role_id`,`roles`.`rolename` AS `rolename`,`roles`.`acl` AS `acl`,(select coalesce(count(0),0) from `users` where (`users`.`role_id` = `roles`.`role_id`)) AS `cnt` from `roles` */; +/*!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 */; +/*!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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `shop_attributes_view` AS select `shop_attributes`.`attribute_id` AS `attribute_id`,`shop_attributes`.`attributename` AS `attributename`,`shop_attributes`.`cat_id` AS `cat_id`,`shop_attributes`.`attributetype` AS `attributetype`,`shop_attributes`.`valueslist` AS `valueslist`,`shop_attributes_order`.`ordern` AS `ordern` from (`shop_attributes` join `shop_attributes_order` on(((`shop_attributes`.`attribute_id` = `shop_attributes_order`.`attr_id`) and (`shop_attributes`.`cat_id` = `shop_attributes_order`.`pg_id`)))) order by `shop_attributes_order`.`ordern` */; +/*!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_products_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 ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `shop_products_view` AS select `i`.`item_id` AS `item_id`,`i`.`itemname` AS `itemname`,`i`.`description` AS `description`,`i`.`detail` AS `detail`,`i`.`item_code` AS `item_code`,`i`.`bar_code` AS `bar_code`,`i`.`cat_id` AS `cat_id`,`i`.`msr` AS `msr`,`i`.`disabled` AS `disabled`,`i`.`minqty` AS `minqty`,`i`.`item_type` AS `item_type`,`i`.`manufacturer` AS `manufacturer`,`i`.`cat_name` AS `cat_name`,coalesce((select sum(`store_stock`.`qty`) from `store_stock` where (`store_stock`.`item_id` = `i`.`item_id`)),0) AS `qty`,coalesce((select count(0) from `shop_prod_comments` `c` where (`c`.`item_id` = `i`.`item_id`)),0) AS `comments`,coalesce((select sum(`c`.`rating`) from `shop_prod_comments` `c` where (`c`.`item_id` = `i`.`item_id`)),0) AS `ratings` from `items_view` `i` */; +/*!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 `store_stock_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `store_stock_view` AS select `st`.`stock_id` AS `stock_id`,`st`.`item_id` AS `item_id`,`st`.`partion` AS `partion`,`st`.`store_id` AS `store_id`,`i`.`itemname` AS `itemname`,`i`.`item_code` AS `item_code`,`i`.`cat_id` AS `cat_id`,`i`.`msr` AS `msr`,`i`.`item_type` AS `item_type`,`i`.`bar_code` AS `bar_code`,`i`.`cat_name` AS `cat_name`,`i`.`disabled` AS `itemdisabled`,`stores`.`storename` AS `storename`,`st`.`qty` AS `qty`,`st`.`snumber` AS `snumber`,`st`.`sdate` AS `sdate` from ((`store_stock` `st` join `items_view` `i` on(((`i`.`item_id` = `st`.`item_id`) and (`i`.`disabled` <> 1)))) join `stores` on((`stores`.`store_id` = `st`.`store_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 `timesheet_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `timesheet_view` AS select `t`.`time_id` AS `time_id`,`t`.`emp_id` AS `emp_id`,`t`.`description` AS `description`,`t`.`t_start` AS `t_start`,`t`.`t_end` AS `t_end`,`t`.`t_type` AS `t_type`,`t`.`t_break` AS `t_break`,`e`.`emp_name` AS `emp_name`,`b`.`branch_name` AS `branch_name`,`e`.`disabled` AS `disabled`,`t`.`branch_id` AS `branch_id` from ((`timesheet` `t` join `employees` `e` on((`t`.`emp_id` = `e`.`employee_id`))) left join `branches` `b` on((`t`.`branch_id` = `b`.`branch_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 `users_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 = utf8mb4 */; +/*!50001 SET character_set_results = utf8mb4 */; +/*!50001 SET collation_connection = utf8mb4_unicode_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `users_view` AS select `users`.`user_id` AS `user_id`,`users`.`userlogin` AS `userlogin`,`users`.`userpass` AS `userpass`,`users`.`createdon` AS `createdon`,`users`.`email` AS `email`,`users`.`acl` AS `acl`,`users`.`options` AS `options`,`users`.`disabled` AS `disabled`,`roles`.`rolename` AS `rolename`,`users`.`role_id` AS `role_id`,`roles`.`acl` AS `roleacl`,coalesce(`employees`.`employee_id`,0) AS `employee_id`,(case when isnull(`employees`.`emp_name`) then `users`.`userlogin` else `employees`.`emp_name` end) AS `username` from ((`users` left join `employees` on(((`users`.`userlogin` = `employees`.`login`) and (`employees`.`disabled` <> 1)))) left join `roles` on((`users`.`role_id` = `roles`.`role_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + diff --git a/db/initdata.sql b/db/initdata.sql index 684ac29be..4c189a05e 100644 --- a/db/initdata.sql +++ b/db/initdata.sql @@ -17,7 +17,7 @@ INSERT INTO `customers` ( `customer_name`, `detail`, `email`, `phone`, `status`, INSERT INTO `options` (`optname`, `optvalue`) VALUES('common', 'a:30:{s:9:"qtydigits";s:1:"0";s:8:"amdigits";s:1:"0";s:10:"dateformat";s:5:"d.m.Y";s:11:"partiontype";s:1:"1";s:4:"curr";s:2:"gr";s:6:"phonel";s:2:"10";s:6:"price1";s:18:"Розничная";s:6:"price2";s:14:"Оптовая";s:6:"price3";s:0:"";s:6:"price4";s:0:"";s:6:"price5";s:0:"";s:8:"defprice";s:2:"10";s:8:"shopname";s:20:"Наша фирма";s:8:"ts_break";s:2:"60";s:8:"ts_start";s:5:"09:00";s:6:"ts_end";s:5:"18:00";s:11:"checkslogan";s:8:"Тест";s:11:"autoarticle";i:1;s:10:"usesnumber";i:0;s:10:"usescanner";i:0;s:9:"useimages";i:0;s:15:"showactiveusers";i:0;s:10:"usecattree";i:0;s:9:"usebranch";i:0;s:10:"noallowfiz";i:0;s:10:"allowminus";i:1;s:6:"useval";i:0;s:6:"capcha";i:0;s:9:"numberttn";i:0;s:11:"salesources";a:1:{i:1620576897;O:12:"App\\DataItem":2:{s:2:"id";i:1620576897;s:9:"\0*\0fields";a:1:{s:4:"name";s:31:"Основной магазин";}}}}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('api', 'a:3:{s:3:"exp";N;s:3:"key";N;s:5:"atype";s:1:"3";}'); -INSERT INTO `options` (`optname`, `optvalue`) VALUES('printer', 'a:8:{s:6:"pwidth";s:4:"100%";s:9:"pricetype";s:6:"price1";s:11:"barcodetype";s:5:"EAN13";s:9:"pfontsize";s:2:"16";s:5:"pname";i:1;s:5:"pcode";i:0;s:8:"pbarcode";i:1;s:6:"pprice";i:0;}'); +INSERT INTO `options` (`optname`, `optvalue`) VALUES('printer', 'a:8:{s:6:"pwidth";s:4:"100%";s:9:"pricetype";s:6:"price1";s:11:"barcodetype";s:4:"C128";s:9:"pfontsize";s:2:"16";s:5:"pname";i:1;s:5:"pcode";i:0;s:8:"pbarcode";i:1;s:6:"pprice";i:0;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('shop', 'a:8:{s:7:"defcust";s:1:"2";s:12:"defpricetype";s:6:"price1";s:5:"email";s:0:"";s:8:"shopname";s:17:"Наш магаз";s:12:"currencyname";s:6:"грн";s:8:"uselogin";i:0;s:9:"usefilter";i:1;s:11:"usefeedback";i:1;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('sms', 'a:7:{s:13:"turbosmstoken";s:0:"";s:12:"smssemytoken";s:0:"";s:12:"smssemydevid";s:0:"";s:11:"flysmslogin";s:0:"";s:10:"flysmspass";s:0:"";s:8:"flysmsan";s:0:"";s:7:"smstype";s:1:"0";}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('val', 'a:5:{s:6:"valuan";s:0:"";s:6:"valusd";s:2:"28";s:7:"valeuro";s:0:"";s:6:"valrub";s:0:"";s:8:"valprice";i:0;}'); diff --git a/db/initdata_ua.sql b/db/initdata_ua.sql index 980bcdce8..53bd24cac 100644 --- a/db/initdata_ua.sql +++ b/db/initdata_ua.sql @@ -16,7 +16,7 @@ INSERT INTO `customers` ( `customer_name`, `detail`, `email`, `phone`, `status`, INSERT INTO `options` (`optname`, `optvalue`) VALUES('common', 'a:30:{s:9:"qtydigits";s:1:"0";s:8:"amdigits";s:1:"0";s:10:"dateformat";s:5:"d.m.Y";s:11:"partiontype";s:1:"1";s:4:"curr";s:2:"gr";s:6:"phonel";s:2:"10";s:6:"price1";s:18:"Розничная";s:6:"price2";s:14:"Оптовая";s:6:"price3";s:0:"";s:6:"price4";s:0:"";s:6:"price5";s:0:"";s:8:"defprice";s:2:"10";s:8:"shopname";s:20:"Наша фирма";s:8:"ts_break";s:2:"60";s:8:"ts_start";s:5:"09:00";s:6:"ts_end";s:5:"18:00";s:11:"checkslogan";s:8:"Тест";s:11:"autoarticle";i:1;s:10:"usesnumber";i:0;s:10:"usescanner";i:0;s:9:"useimages";i:0;s:15:"showactiveusers";i:0;s:10:"usecattree";i:0;s:9:"usebranch";i:0;s:10:"noallowfiz";i:0;s:10:"allowminus";i:1;s:6:"useval";i:0;s:6:"capcha";i:0;s:9:"numberttn";i:0;s:11:"salesources";a:1:{i:1620576897;O:12:"App\\DataItem":2:{s:2:"id";i:1620576897;s:9:"\0*\0fields";a:1:{s:4:"name";s:31:"Основной магазин";}}}}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('api', 'a:3:{s:3:"exp";N;s:3:"key";N;s:5:"atype";s:1:"3";}'); -INSERT INTO `options` (`optname`, `optvalue`) VALUES('printer', 'a:8:{s:6:"pwidth";s:4:"100%";s:9:"pricetype";s:6:"price1";s:11:"barcodetype";s:5:"EAN13";s:9:"pfontsize";s:2:"16";s:5:"pname";i:1;s:5:"pcode";i:0;s:8:"pbarcode";i:1;s:6:"pprice";i:0;}'); +INSERT INTO `options` (`optname`, `optvalue`) VALUES('printer', 'a:8:{s:6:"pwidth";s:4:"100%";s:9:"pricetype";s:6:"price1";s:11:"barcodetype";s:4:"C128";s:9:"pfontsize";s:2:"16";s:5:"pname";i:1;s:5:"pcode";i:0;s:8:"pbarcode";i:1;s:6:"pprice";i:0;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('shop', 'a:8:{s:7:"defcust";s:1:"2";s:12:"defpricetype";s:6:"price1";s:5:"email";s:0:"";s:8:"shopname";s:17:"Наш магаз";s:12:"currencyname";s:6:"грн";s:8:"uselogin";i:0;s:9:"usefilter";i:1;s:11:"usefeedback";i:1;}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('sms', 'a:7:{s:13:"turbosmstoken";s:0:"";s:12:"smssemytoken";s:0:"";s:12:"smssemydevid";s:0:"";s:11:"flysmslogin";s:0:"";s:10:"flysmspass";s:0:"";s:8:"flysmsan";s:0:"";s:7:"smstype";s:1:"0";}'); INSERT INTO `options` (`optname`, `optvalue`) VALUES('val', 'a:5:{s:6:"valuan";s:0:"";s:6:"valusd";s:2:"28";s:7:"valeuro";s:0:"";s:6:"valrub";s:0:"";s:8:"valprice";i:0;}'); diff --git a/db/temp.sql b/db/temp.sql index 347f06c74..4d069a255 100644 --- a/db/temp.sql +++ b/db/temp.sql @@ -1,67 +1,28 @@ + + CREATE TABLE `custacc` ( + `ca_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(11) NOT NULL, + `document_id` int(11) DEFAULT NULL, + `optype` int(11) DEFAULT '0', + + `amount` decimal(10,2) NOT NULL, + `createdon` date NOT NULL, + PRIMARY KEY (`ca_id`), + KEY `customer_id` (`customer_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -ALTER TABLE `timesheet` ADD `branch_id` INT NULL ; - -alter VIEW `timesheet_view` AS - select - `t`.`time_id` AS `time_id`, - `t`.`emp_id` AS `emp_id`, - `t`.`description` AS `description`, - `t`.`t_start` AS `t_start`, - `t`.`t_end` AS `t_end`, - `t`.`t_type` AS `t_type`, - `t`.`t_break` AS `t_break`, - `e`.`emp_name` AS `emp_name`, - `b`.`branch_name` AS `branch_name`, - `e`.`disabled` AS `disabled`, - `t`.`branch_id` AS `branch_id` - from - `timesheet` `t` join `employees` `e` on `t`.`emp_id` = `e`.`employee_id` - left join branches b on t.branch_id = b.branch_id; - -ALTER TABLE `customers` ADD `country` VARCHAR(255) NULL ; - -ALTER VIEW `customers_view` AS - select - `customers`.`customer_id` AS `customer_id`, - `customers`.`customer_name` AS `customer_name`, - `customers`.`detail` AS `detail`, - `customers`.`email` AS `email`, - `customers`.`phone` AS `phone`, - `customers`.`status` AS `status`, - `customers`.`city` AS `city`, - `customers`.`leadsource` AS `leadsource`, - `customers`.`leadstatus` AS `leadstatus`, - `customers`.`country` AS `country`, - ( +CREATE VIEW `custacc_view` AS select - count(0) - from - `messages` `m` - where - ((`m`.`item_id` = `customers`.`customer_id`) and (`m`.`item_type` = 2))) AS `mcnt`,( - select - count(0) - from - `files` `f` - where - ((`f`.`item_id` = `customers`.`customer_id`) and (`f`.`item_type` = 2))) AS `fcnt`,( - select - count(0) - from - `eventlist` `e` - where - ((`e`.`customer_id` = `customers`.`customer_id`) and (`e`.`eventdate` >= now()))) AS `ecnt` + `c`.`ca_id` AS `ca_id`, + `c`.`customer_id` AS `customer_id`, + `c`.`document_id` AS `document_id`, + `c`.`optype` AS `optype`, + + `c`.`amount` AS `amount`, + `d`.`document_number` AS `document_number`, + `c`.`createdon` AS `createdon` from - `customers`; - - - - - - - + (`custacc` `c` join `documents` `d` on((`d`.`document_id` = `c`.`document_id`))); /* diff --git a/db/update500to510.sql b/db/update500to510.sql new file mode 100644 index 000000000..5442d16b7 --- /dev/null +++ b/db/update500to510.sql @@ -0,0 +1,59 @@ + + +ALTER TABLE `customers` ADD `country` VARCHAR(255) NULL ; +ALTER TABLE `timesheet` ADD `branch_id` INT NULL ; + + +alter VIEW `timesheet_view` AS + select + `t`.`time_id` AS `time_id`, + `t`.`emp_id` AS `emp_id`, + `t`.`description` AS `description`, + `t`.`t_start` AS `t_start`, + `t`.`t_end` AS `t_end`, + `t`.`t_type` AS `t_type`, + `t`.`t_break` AS `t_break`, + `e`.`emp_name` AS `emp_name`, + `b`.`branch_name` AS `branch_name`, + `e`.`disabled` AS `disabled`, + `t`.`branch_id` AS `branch_id` + from + `timesheet` `t` join `employees` `e` on `t`.`emp_id` = `e`.`employee_id` + left join branches b on t.branch_id = b.branch_id; + + +ALTER VIEW `customers_view` AS + select + `customers`.`customer_id` AS `customer_id`, + `customers`.`customer_name` AS `customer_name`, + `customers`.`detail` AS `detail`, + `customers`.`email` AS `email`, + `customers`.`phone` AS `phone`, + `customers`.`status` AS `status`, + `customers`.`city` AS `city`, + `customers`.`leadsource` AS `leadsource`, + `customers`.`leadstatus` AS `leadstatus`, + `customers`.`country` AS `country`, + ( + select + count(0) + from + `messages` `m` + where + ((`m`.`item_id` = `customers`.`customer_id`) and (`m`.`item_type` = 2))) AS `mcnt`,( + select + count(0) + from + `files` `f` + where + ((`f`.`item_id` = `customers`.`customer_id`) and (`f`.`item_type` = 2))) AS `fcnt`,( + select + count(0) + from + `eventlist` `e` + where + ((`e`.`customer_id` = `customers`.`customer_id`) and (`e`.`eventdate` >= now()))) AS `ecnt` + from + `customers`; + + diff --git a/www/app/api/customers.php b/www/app/api/customers.php index b299c4bdb..4d9e59a18 100644 --- a/www/app/api/customers.php +++ b/www/app/api/customers.php @@ -20,6 +20,7 @@ public function list() { 'phone' => $cust->phone, 'email' => $cust->email, 'city' => $cust->city, + 'country' => $cust->country, 'address' => $cust->address, 'description' => base64_encode($cust->comment) ); diff --git a/www/app/api/docs.php b/www/app/api/docs.php index 803ec71e4..5bdf38419 100644 --- a/www/app/api/docs.php +++ b/www/app/api/docs.php @@ -292,4 +292,6 @@ public function createprodissue($args) { return $doc->document_number; } + + } diff --git a/www/app/api/items.php b/www/app/api/items.php index 9449c15b0..00af1d720 100644 --- a/www/app/api/items.php +++ b/www/app/api/items.php @@ -29,6 +29,10 @@ public function storelist() { } return $list; } + //список типов ТМЦ + public function typelist() { + return Item::getTypes(); + } // список артикулов public function articlelist() { @@ -56,21 +60,37 @@ public function itemlist() { if ($args['cat'] > 0) { $w .= " and cat_id=" . $args['cat']; } + if ($args['item_type'] > 0) { + $w .= " and item_type=" . $args['item_type']; + } + if (strlen($args['item_code']) > 0) { + $w .= " and item_code=" . Item::qstr($args['item_code']); + } + if (strlen($args['bar_code']) > 0) { + $w .= " and bar_code=" . Item::qstr($args['bar_code']); + } foreach (Item::find($w, 'itemname') as $item) { $plist = array(); - $it = $it = array( + $it = array( 'item_code' => $item->item_code, 'bar_code' => $item->bar_code, 'itemname' => $item->itemname, 'description' => base64_encode($item->description), 'measure' => $item->msr, + 'item_type' => $item->item_type, 'manufacturer' => $item->manufacturer, 'cat_name' => $item->cat_name, 'cat_id' => $item->cat_id ); - + + $it = array_merge($it,$item->getData()) ; + + unset($it['detail']); + unset($it['disabled']); + + if (strlen($item->price1) > 0) { $it['price1'] = $item->price1; } @@ -131,10 +151,11 @@ public function save($args) { $item->item_code = $args['item_code']; $item->bar_code = $args['bar_code']; $item->itemname = $args['itemname']; - $item->measure = $args['measure']; + $item->msr = $args['measure']; $item->manufacturer = $args['manufacturer']; $item->description = @base64_decode($args['description']); $item->cat_id = $args['cat_id']; + $item->item_type = $args['item_type']; if ($args['price1'] > 0) { $item->price1 = $args['price1']; diff --git a/www/app/entity/category.php b/www/app/entity/category.php index 43fd9d0e3..1d7b05548 100644 --- a/www/app/entity/category.php +++ b/www/app/entity/category.php @@ -124,7 +124,7 @@ public function getChildren(&$clist = null) { } //список с тмц - public static function getList($fullname = false) { + public static function getList($fullname = false ) { if ($fullname == false) { return Category::findArray("cat_name", "cat_id in (select cat_id from items where disabled <>1 )", "cat_name"); } @@ -138,5 +138,7 @@ public static function getList($fullname = false) { } return $ret; } + + } diff --git a/www/app/entity/custacc.php b/www/app/entity/custacc.php new file mode 100644 index 000000000..f2de94faf --- /dev/null +++ b/www/app/entity/custacc.php @@ -0,0 +1,35 @@ +customer_id = 0; + $this->optype = 0; + + } + protected function afterLoad() { + $this->document_date = strtotime($this->document_date); + } + + public static function addEntry($customer_id,$amount,$document_id,$optype=0){ + $custacc = new CustAcc(); + $custacc->customer_id = $customer_id; + $custacc->optype = $optype; + $custacc->document_id = $document_id; + $custacc->createdon=time() ; + + $custacc->save(); + } +} diff --git a/www/app/entity/doc/document.php b/www/app/entity/doc/document.php index 2172ac9d3..65a979191 100644 --- a/www/app/entity/doc/document.php +++ b/www/app/entity/doc/document.php @@ -128,9 +128,7 @@ private function packData() { $this->content = "
"; foreach ($this->headerdata as $key => $value) { - if ($key > 0) { - continue; - } + if (strpos($value, '[CDATA[') !== false) { \App\System::setWarnMsg('CDATA в поле обьекта'); @@ -169,7 +167,13 @@ private function unpackData() { return; } foreach ($xml->header->children() as $child) { - $this->headerdata[(string)$child->getName()] = (string)$child; + /* $ch = (string)$child; + if(is_numeric($ch)) { + if(ctype_digit($ch)) $ch = intval($ch); + else $ch = doubleval($ch) ; + } + */ + $this->headerdata[(string)$child->getName()] =$ch ; } $this->detaildata = array(); @@ -367,10 +371,7 @@ public function updateStatus($state) { if ($oldstate != $state) { $doc = $this->cast(); $doc->onState($state); - - - - + \App\Entity\Subscribe::onDocumentState($doc->document_id, $state); } diff --git a/www/app/entity/doc/goodsissue.php b/www/app/entity/doc/goodsissue.php index 9c804b1bc..731ac5b74 100644 --- a/www/app/entity/doc/goodsissue.php +++ b/www/app/entity/doc/goodsissue.php @@ -132,7 +132,7 @@ public function Execute() { foreach ($listst as $st) { $sc = new Entry($this->document_id, 0 - $st->quantity * $st->partion, 0 - $st->quantity); $sc->setStock($st->stock_id); - $sc->setExtCode($item->price * $k - $st->partion); //Для АВС + // $sc->setExtCode($item->price * $k - $st->partion); //Для АВС $sc->setOutPrice($item->price * $k); $sc->save(); $amount += $item->price * $k * $st->quantity; diff --git a/www/app/entity/doc/goodsreceipt.php b/www/app/entity/doc/goodsreceipt.php index 936e34d4f..fcf46f22a 100644 --- a/www/app/entity/doc/goodsreceipt.php +++ b/www/app/entity/doc/goodsreceipt.php @@ -107,7 +107,7 @@ public function Execute() { $sc = new Entry($this->document_id, $item->price * $item->quantity, $item->quantity); $sc->setStock($stock->stock_id); - $sc->setExtCode($item->price); //Для АВС + // $sc->setExtCode($item->price); //Для АВС $sc->setOutPrice($item->price); $sc->save(); diff --git a/www/app/entity/doc/orderfood.php b/www/app/entity/doc/orderfood.php index 9151cbe0a..c16fa1578 100644 --- a/www/app/entity/doc/orderfood.php +++ b/www/app/entity/doc/orderfood.php @@ -171,7 +171,7 @@ public function Execute() { foreach ($listst as $st) { $sc = new Entry($this->document_id, 0 - $st->quantity * $st->partion, 0 - $st->quantity); $sc->setStock($st->stock_id); - $sc->setExtCode($item->price * $k - $st->partion); //Для АВС + // $sc->setExtCode($item->price * $k - $st->partion); //Для АВС $sc->setOutPrice($item->price * $k); $sc->save(); } diff --git a/www/app/entity/doc/poscheck.php b/www/app/entity/doc/poscheck.php index 995973b66..ef55b2a3b 100644 --- a/www/app/entity/doc/poscheck.php +++ b/www/app/entity/doc/poscheck.php @@ -186,7 +186,7 @@ public function Execute() { foreach ($listst as $st) { $sc = new Entry($this->document_id, 0 - $st->quantity * $st->partion, 0 - $st->quantity); $sc->setStock($st->stock_id); - $sc->setExtCode($item->price * $k - $st->partion); //Для АВС + // $sc->setExtCode($item->price * $k - $st->partion); //Для АВС $sc->setOutPrice($item->price * $k); $sc->save(); } @@ -214,7 +214,7 @@ public function Execute() { $sc = new Entry($this->document_id, 0 - ($ser->price * $k * $ser->quantity), 0); $sc->setService($ser->service_id); - $sc->setExtCode(0 - ($ser->price * $k)); //Для АВС + // $sc->setExtCode(0 - ($ser->price * $k)); //Для АВС $sc->setOutPrice(0 - $item->price * $k); $sc->save(); diff --git a/www/app/entity/doc/retcustissue.php b/www/app/entity/doc/retcustissue.php index a6c93423c..2dde08ea5 100644 --- a/www/app/entity/doc/retcustissue.php +++ b/www/app/entity/doc/retcustissue.php @@ -69,7 +69,7 @@ public function Execute() { foreach ($listst as $st) { $sc = new Entry($this->document_id, 0 - $st->quantity * $item->price, 0 - $st->quantity); $sc->setStock($st->stock_id); - $sc->setExtCode($item->price - $st->partion); //Для АВС + // $sc->setExtCode($item->price - $st->partion); //Для АВС $sc->setOutPrice($item->price); $sc->save(); } diff --git a/www/app/entity/doc/returnissue.php b/www/app/entity/doc/returnissue.php index 6b7b00a0c..7180cad0a 100644 --- a/www/app/entity/doc/returnissue.php +++ b/www/app/entity/doc/returnissue.php @@ -67,7 +67,7 @@ public function Execute() { $sc = new Entry($this->document_id, $item->amount, $item->quantity); $sc->setStock($stock->stock_id); - $sc->setExtCode(($item->price - $stock->partion)); //Для АВС + // $sc->setExtCode(($item->price - $stock->partion)); //Для АВС // $sc->setCustomer($this->customer_id); $sc->setOutPrice($item->price); $sc->save(); diff --git a/www/app/entity/doc/serviceact.php b/www/app/entity/doc/serviceact.php index fac25de03..c8eee7035 100644 --- a/www/app/entity/doc/serviceact.php +++ b/www/app/entity/doc/serviceact.php @@ -66,7 +66,7 @@ public function Execute() { $sc = new Entry($this->document_id, 0 - ($ser->price * $ser->quantity), $ser->quantity); $sc->setService($ser->service_id); - $sc->setExtCode($ser->price); //Для АВС + // $sc->setExtCode($ser->price); //Для АВС //$sc->setCustomer($this->customer_id); $sc->setOutPrice($item->price); $sc->save(); diff --git a/www/app/entity/doc/ttn.php b/www/app/entity/doc/ttn.php index e33cf09de..b4d84bb8f 100644 --- a/www/app/entity/doc/ttn.php +++ b/www/app/entity/doc/ttn.php @@ -198,7 +198,7 @@ public function Execute() { foreach ($listst as $st) { $sc = new Entry($this->document_id, 0 - $st->quantity * $st->partion, 0 - $st->quantity); $sc->setStock($st->stock_id); - $sc->setExtCode($item->price - $st->partion); //Для АВС + // $sc->setExtCode($item->price - $st->partion); //Для АВС $sc->setOutPrice($item->price); $sc->save(); } diff --git a/www/app/entity/entry.php b/www/app/entity/entry.php index 2569f8afa..2cc156b6d 100644 --- a/www/app/entity/entry.php +++ b/www/app/entity/entry.php @@ -22,15 +22,13 @@ public function __construct($document_id=0 , $amount = 0, $quantity = 0) { parent::__construct(); $this->document_id = $document_id; - $this->amount = $amount; + // $this->amount = $amount; $this->quantity = $quantity; } protected function init() { - - $this->extcode = 0; - + } protected function afterLoad() { @@ -50,12 +48,7 @@ public function setService($service_id) { $this->service_id = $service_id; } - //типы налогов, начислений удержаний, прочая вспомагтельная аналитика - public function setExtCode($code) { - - $this->extcode = $code; - } - + public function setOutPrice($price) { $this->outprice = $price; diff --git a/www/app/entity/item.php b/www/app/entity/item.php index e5885b8b1..ff7b05e46 100644 --- a/www/app/entity/item.php +++ b/www/app/entity/item.php @@ -61,6 +61,7 @@ protected function afterLoad() { $this->warranty = (string)$xml->warranty[0]; $this->extdata = (string)$xml->extdata[0]; $this->sef = (string)$xml->sef[0]; + $this->url = (string)$xml->url[0]; $this->cell = (string)$xml->cell[0]; // $this->octoreoptions = (string) $xml->octoreoptions[0]; @@ -127,6 +128,7 @@ protected function beforeSave() { $this->detail .= "{$this->lost}"; $this->detail .= "{$this->customsize}"; $this->detail .= "{$this->sef}"; + $this->detail .= "{$this->url}"; //упаковываем цены по филиалам $brprice = serialize($this->brprice); diff --git a/www/app/entity/pay.php b/www/app/entity/pay.php index 44c1dedcf..2a015abf1 100644 --- a/www/app/entity/pay.php +++ b/www/app/entity/pay.php @@ -60,7 +60,7 @@ protected function afterLoad() { //возвращает список оплат public static function getPayments($document_id) { - $list = Pay::find("document_id=" . $document_id, "pl_id"); + $list = Pay::find("mf_id >0 and document_id=" . $document_id, "pl_id"); return $list; } diff --git a/www/app/entity/stock.php b/www/app/entity/stock.php index 756bb41fe..a083e9dc0 100644 --- a/www/app/entity/stock.php +++ b/www/app/entity/stock.php @@ -73,19 +73,23 @@ public static function getStock($store_id, $item_id, $price, $snumber = "", $sda $conn = \ZDB\DB::getConnect(); $where = "store_id = {$store_id} and item_id = {$item_id} "; - - if ($partiontype == '2') { //учет отдельно по каждой цене - $where .= " and partion = {$price} "; - } + if (strlen($snumber) > 0) { $where .= " and snumber = " . $conn->qstr($snumber); } - //на случай если удален - //$conn->Execute("update store_stock set deleted=0 where " . $where); + // if ($partiontype == '2') { //учет отдельно по каждой цене + // $where .= " and partion = {$price} "; + // } - $stock = self::getFirst($where, 'stock_id desc'); + + $stock = self::getFirst($where." and partion = {$price} ", 'stock_id desc'); + if ($partiontype == '1' && $stock == null) { //если не нашли такую партию то берем последнюю + $stock = self::getFirst($where , 'stock_id desc'); + } + + if ($stock == null && $create == true) { $stock = new Stock(); $stock->store_id = $store_id; diff --git a/www/app/entity/user.php b/www/app/entity/user.php index ca8f21797..d20093a55 100644 --- a/www/app/entity/user.php +++ b/www/app/entity/user.php @@ -199,4 +199,22 @@ public function setOption($key, $value) { $this->_options[$key] = $value; } + + public static function getByBranch($branch_id) { + $users = array(); + + foreach(User::find('disabled <> 1','username') as $u){ + if($u->userrole=='admins' || $branch_id==0) { + $users[$u->user_id]=$u->username ; + continue; + } + $br = explode(',', $u->aclbranch) ; + if(in_array($branch_id,$br)){ + $users[$u->user_id]=$u->username ; + } + + } + return $users; + } + } diff --git a/www/app/pages/base.php b/www/app/pages/base.php index 9fbfc2d3a..701c153af 100644 --- a/www/app/pages/base.php +++ b/www/app/pages/base.php @@ -35,13 +35,7 @@ public function __construct($params = null) { $this->_tvars["useval"] = $options['useval'] == 1; $this->_tvars["usecattree"] = $options['usecattree'] == 1; $this->_tvars["usemobileprinter"] = $options['usemobileprinter'] == 1; - if (System::getSession()->defbranch > 0) { - $this->branch_id = System::getSession()->defbranch; - System::setBranch($this->branch_id); - } - if($this->branch_id==null) { - $this->branch_id =0; - } + $blist = array(); @@ -53,6 +47,16 @@ public function __construct($params = null) { $this->branch_id = array_pop($k); System::setBranch($this->branch_id); } + + //куки после логина + if (System::getSession()->defbranch > 0 && $this->branch_id == 0) { + $this->branch_id = System::getSession()->defbranch; + System::setBranch($this->branch_id); + } + if($this->branch_id==null) { + $this->branch_id =0; + } + } //форма филиалов $this->add(new \Zippy\Html\Form\Form('nbform')); @@ -295,7 +299,7 @@ private function generateTosats() { if ($user->defmf == 0) { $this->_tvars["toasts"][] = array('title' => "title:\"" . Helper::l("nodefmf") . "\""); } - + if(count( $this->_tvars["toasts"])==0)$this->_tvars["toasts"][] = array('title' => ''); \App\Session::getSession()->toasts = true; } diff --git a/www/app/pages/doc/warranty.php b/www/app/pages/doc/warranty.php index 73797c620..e6259f00f 100644 --- a/www/app/pages/doc/warranty.php +++ b/www/app/pages/doc/warranty.php @@ -73,26 +73,14 @@ public function __construct($docid = 0, $basedocid = 0) { if ($basedoc instanceof Document) { $this->_basedocid = $basedocid; $this->docform->customer->setText($basedoc->headerdata['customer_name']); + $this->_tovarlist = $basedoc->unpackDetails('detaildata'); if ($basedoc->meta_name == 'GoodsIssue') { - $this->_tovarlist = array(); - $itemlist = $basedoc->unpackDetails('detaildata'); - foreach ($itemlist as $it) { - - $this->_tovarlist[$it->item_id] = $it; - } - } - if ($basedoc->meta_name == 'TTN') { - - - $this->_tovarlist = $basedoc->unpackDetails('detaildata'); - } - if ($basedoc->meta_name == 'POSCheck') { - - - $this->_tovarlist = $basedoc->unpackDetails('detaildata'); + } - } + + + } } @@ -101,6 +89,7 @@ public function __construct($docid = 0, $basedocid = 0) { return; } } + } public function detailOnRow($row) { $item = $row->getDataItem(); @@ -120,10 +109,10 @@ public function deleteOnClick($sender) { if (false == \App\ACL::checkEditDoc($this->_doc)) { return; } - $tovar = $sender->owner->getDataItem(); - // unset($this->_tovarlist[$tovar->tovar_id]); - - $this->_tovarlist = array_diff_key($this->_tovarlist, array($tovar->item_id => $this->_tovarlist[$tovar->item_id])); + $item = $sender->owner->getDataItem(); + $this->_tovarlist = array_diff_key($this->_tovarlist, array($item->rowid => $this->_tovarlist[$item->rowid])); + + $this->docform->detail->Reload(); } @@ -139,7 +128,7 @@ public function editOnClick($sender) { $this->editdetail->editsn->setText($item->sn); $this->editdetail->setVisible(true); $this->docform->setVisible(false); - $this->_rowid = $item->item_id; + $this->_rowid = $item->rowid; } public function addrowOnClick($sender) { @@ -163,8 +152,17 @@ public function saverowOnClick($sender) { $item->price = $this->editdetail->editprice->getText(); $item->sn = $this->editdetail->editsn->getText(); $item->warranty = $this->editdetail->editwarranty->getText(); + + if ($this->_rowid > 0) { + $item->rowid = $this->_rowid; + } else { + $next = count($this->_tovarlist) > 0 ? max(array_keys($this->_tovarlist)) : 0; + $item->rowid = $next + 1; + } + $this->_tovarlist[$item->rowid] = $item; - $this->_tovarlist[$item->item_id] = $item; + $this->_rowid = 0; + $this->editdetail->setVisible(false); $this->docform->setVisible(true); $this->docform->detail->Reload(); diff --git a/www/app/pages/main.php b/www/app/pages/main.php index 1ad01d7bb..9e9b975b4 100644 --- a/www/app/pages/main.php +++ b/www/app/pages/main.php @@ -206,7 +206,7 @@ public function __construct() { $mon[] = $m['name']; $sql = " - select coalesce(sum(0-e.`amount`)) as summa + select coalesce(sum(0-(e.outprice*e.quantity))) as summa from `entrylist_view` e join `items_view` i on e.`item_id` = i.`item_id` @@ -223,7 +223,7 @@ public function __construct() { $tstov[] = abs(round($conn->GetOne($sql))); $sql = " - select coalesce( sum(0-e.`amount`) ) as summa + select coalesce( sum(0-(e.outprice*e.quantity)) ) as summa from `entrylist_view` e join `services` s on e.`service_id` = s.`service_id` diff --git a/www/app/pages/options.php b/www/app/pages/options.php index c6ff0885b..37ab3ed4d 100644 --- a/www/app/pages/options.php +++ b/www/app/pages/options.php @@ -100,6 +100,7 @@ public function __construct() { $this->common->usesnumber->setChecked($common['usesnumber']); + $this->common->usemobileprinter->setChecked($common['usemobileprinter']); $this->common->showactiveusers->setChecked($common['showactiveusers']); $this->common->usecattree->setChecked($common['usecattree']); $this->common->usescanner->setChecked($common['usescanner']); @@ -138,7 +139,7 @@ public function __construct() { $this->add(new Form('printer'))->onSubmit($this, 'savePrinterOnClick'); $this->printer->add(new TextInput('pwidth')); $this->printer->add(new DropDownChoice('pricetype', \App\Entity\Item::getPriceTypeList())); - $this->printer->add(new DropDownChoice('barcodetype', array('EAN13' => 'EAN-13', 'EAN8' => 'EAN-8', 'C128' => 'Code128', 'C39' => 'Code39'), 'EAN13')); + $this->printer->add(new DropDownChoice('barcodetype', array('EAN13' => 'EAN-13', 'EAN8' => 'EAN-8', 'C128' => 'Code128', 'C39' => 'Code39'), 'Code128')); $this->printer->add(new DropDownChoice('pfontsize', array('12' => '12', '14' => '14', '16' => '16', '20' => '20', '24' => '24', '28' => '28', '36' => '36',), '16')); $this->printer->add(new CheckBox('pname')); $this->printer->add(new CheckBox('pcode')); @@ -256,7 +257,7 @@ public function saveCommonOnClick($sender) { $common['shopname'] = $this->common->shopname->getText(); $common['ts_break'] = $this->common->ts_break->getText(); $common['ts_start'] = $this->common->ts_start->getText(); - $common['ts_end'] = $this->common->ts_end->getText(); + $common['ts_end'] = $this->common->ts_end->getText(); $common['checkslogan'] = $this->common->checkslogan->getText(); $common['autoarticle'] = $this->common->autoarticle->isChecked() ? 1 : 0; @@ -265,6 +266,7 @@ public function saveCommonOnClick($sender) { $common['usescanner'] = $this->common->usescanner->isChecked() ? 1 : 0; $common['useimages'] = $this->common->useimages->isChecked() ? 1 : 0; + $common['usemobileprinter'] = $this->common->usemobileprinter->isChecked() ? 1 : 0; $common['showactiveusers'] = $this->common->showactiveusers->isChecked() ? 1 : 0; $common['usecattree'] = $this->common->usecattree->isChecked() ? 1 : 0; $common['usebranch'] = $this->common->usebranch->isChecked() ? 1 : 0; diff --git a/www/app/pages/reference/customerlist.php b/www/app/pages/reference/customerlist.php index 7197bf5f7..43af69b9e 100644 --- a/www/app/pages/reference/customerlist.php +++ b/www/app/pages/reference/customerlist.php @@ -54,17 +54,20 @@ public function __construct($id = 0 ) { $this->filter->add(new DropDownChoice('searchleadstatus', Customer::getLeadStatuses(), "0")); $this->add(new Panel('customertable'))->setVisible(true); - $this->customertable->add(new DataView('customerlist', new CustomerDataSource($this), $this, 'customerlistOnRow')); - $this->customertable->customerlist->setPageSize(Helper::getPG()); - $this->customertable->add(new \Zippy\Html\DataList\Paginator('pag', $this->customertable->customerlist)); - - $this->customertable->customerlist->Reload(); - $this->customertable->add(new SortLink("sortdoc", "docs", $this, "onSort")); - $this->customertable->add(new SortLink("sortname", "customer_name", $this, "onSort")); - $this->customertable->add(new SortLink("sortleadstatus", "leadstatus", $this, "onSort")); - - $this->customertable->add(new ClickLink('addnew'))->onClick($this, 'addOnClick'); - $this->customertable->add(new ClickLink('showstat'))->onClick($this, 'showStat'); + $this->customertable->add(new Form('listform')) ; + $this->customertable->listform->add(new DataView('customerlist', new CustomerDataSource($this), $this, 'customerlistOnRow')); + $this->customertable->listform->customerlist->setPageSize(Helper::getPG()); + $this->customertable->listform->add(new \Zippy\Html\DataList\Paginator('pag', $this->customertable->listform->customerlist)); + + $this->customertable->listform->customerlist->Reload(); + $this->customertable->listform->add(new SortLink("sortdoc", "docs", $this, "onSort")); + $this->customertable->listform->add(new SortLink("sortname", "customer_name", $this, "onSort")); + $this->customertable->listform->add(new SortLink("sortleadstatus", "leadstatus", $this, "onSort")); + + $this->customertable->listform->add(new ClickLink('addnew'))->onClick($this, 'addOnClick'); + $this->customertable->listform->add(new ClickLink('showstat'))->onClick($this, 'showStat'); + $this->customertable->listform->add(new SubmitLink('deleteall'))->onClick($this, 'OnDelAll'); + $this->add(new Panel('statpan'))->setVisible(false); $this->statpan->add(new ClickLink('closestat'))->onClick($this, 'closeStat'); @@ -158,12 +161,12 @@ public function OnLeadMode($sender) { $this->_tvars['leadmode'] = $sender->isChecked(); $this->filter->clean(); - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); } public function OnSearch($sender) { - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); $this->contentview->setVisible(false); } @@ -185,8 +188,9 @@ public function customerlistOnRow($row) { $row->add(new ClickLink('edit'))->onClick($this, 'editOnClick'); $row->add(new ClickLink('contentlist'))->onClick($this, 'editContentOnClick'); - $row->add(new ClickLink('delete'))->onClick($this, 'deleteOnClick'); - + + $row->add(new CheckBox('seldel', new \Zippy\Binding\PropertyBinding($item, 'seldel'))); + $row->setAttribute('style', $item->status == 1 ? 'color: #aaa' : null); if ($item->customer_id == $this->_customer->customer_id) { $row->setAttribute('class', 'table-success'); @@ -197,13 +201,13 @@ public function onSort($sender) { $sortfield = $sender->fileld; $sortdir = $sender->dir; - $this->customertable->sortdoc->Reset(); + $this->customertable->listform->sortdoc->Reset(); - $this->customertable->customerlist->setSorting($sortfield, $sortdir); + $this->customertable->listform->customerlist->setSorting($sortfield, $sortdir); $sender->fileld = $sortfield; $sender->dir = $sortdir; - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); } public function editOnClick($sender) { @@ -251,7 +255,7 @@ public function deleteOnClick($sender) { } - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); } public function addOnClick($sender) { @@ -342,7 +346,7 @@ public function saveOnClick($sender) { $this->_customer->save(); $this->customerdetail->setVisible(false); $this->customertable->setVisible(true); - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); } public function cancelOnClick($sender) { @@ -357,8 +361,8 @@ public function cancelOnClick($sender) { //просмотр контента public function editContentOnClick($sender) { $this->_customer = $sender->getOwner()->getDataItem(); - $this->customertable->customerlist->setSelectedRow($sender->getOwner()); - $this->customertable->customerlist->Reload(); + + $this->customertable->listform->customerlist->Reload(); $this->viewContent(); } @@ -407,7 +411,7 @@ public function OnFileSubmit($sender) { $this->contentview->addfileform->adddescfile->setText(''); $this->updateFiles(); $this->goAnkor('contentviewlink'); - $this->customertable->customerlist->Reload(false); + $this->customertable->listform->customerlist->Reload(false); } // обновление списка прикрепленных файлов @@ -432,7 +436,7 @@ public function deleteFileOnClick($sender) { $file = $sender->owner->getDataItem(); Helper::deleteFile($file->file_id); $this->updateFiles(); - $this->customertable->customerlist->Reload(false); + $this->customertable->listform->customerlist->Reload(false); } /** @@ -455,7 +459,7 @@ public function OnMsgSubmit($sender) { $this->contentview->addmsgform->addmsg->setText(''); $this->updateMessages(); $this->goAnkor('contentviewlink'); - $this->customertable->customerlist->Reload(false); + $this->customertable->listform->customerlist->Reload(false); } //список комментариев @@ -480,7 +484,7 @@ public function deleteMsgOnClick($sender) { $msg = $sender->owner->getDataItem(); \App\Entity\Message::delete($msg->message_id); $this->updateMessages(); - $this->customertable->customerlist->Reload(false); + $this->customertable->listform->customerlist->Reload(false); } public function OnEventSubmit($sender) { @@ -510,7 +514,7 @@ public function OnEventSubmit($sender) { $this->contentview->addeventform->clean(); $this->updateEvents(); $this->goAnkor('contentviewlink'); - $this->customertable->customerlist->Reload(false); + $this->customertable->listform->customerlist->Reload(false); } //список событий @@ -541,7 +545,7 @@ public function deleteEventOnClick($sender) { $event = $sender->owner->getDataItem(); \App\Entity\Event::delete($event->event_id); $this->updateEvents(); - $this->customertable->customerlist->Reload(false); + $this->customertable->listform->customerlist->Reload(false); } public function contrListOnRow(DataRow $row) { @@ -562,7 +566,7 @@ public function contractOnClick($sender) { public function OnSelStatus($sender) { $this->_customer->leadstatus = $sender->getValue(); $this->_customer->save(); - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); } public function onConvert($sender) { @@ -570,7 +574,7 @@ public function onConvert($sender) { $this->_tvars['leadmode'] = false; $this->filter->clean(); - $this->customertable->customerlist->Reload(); + $this->customertable->listform->customerlist->Reload(); $this->_customer->status = 0; $this->_customer->fromlead = 1; @@ -762,6 +766,42 @@ public function closeStat($sender) { $this->customertable->setVisible(true); $this->statpan->setVisible(false); } + + public function OnDelAll($sender) { + if (false == \App\ACL::checkDelRef('CustomerList')) { + return; + } + + $ids = array(); + foreach ( $this->customertable->listform->customerlist->getDataRows() as $row) { + $item = $row->getDataItem(); + if ($item->seldel == true) { + $ids[] = $item->customer_id; + } + } + if(count($ids)==0) return; + + $conn = \ZDB\DB::getConnect(); + $d=0;$u=0; + foreach($ids as $id) { + $sql = " select count(*) from documents where customer_id = {$id} "; + $cnt = $conn->GetOne($sql); + if($cnt >0) { + $u++; + $conn->Execute("update customers set status=1 where customer_id={$id}"); + } else { + $d++; + $conn->Execute("delete from customers where customer_id={$id}"); + + } + } + + + $this->setSuccess("delcusts",$d,$u) ; + + $this->customertable->listform->customerlist->Reload(); + + } } diff --git a/www/app/pages/reference/itemlist.php b/www/app/pages/reference/itemlist.php index 2b1e15428..bad378cd5 100644 --- a/www/app/pages/reference/itemlist.php +++ b/www/app/pages/reference/itemlist.php @@ -20,6 +20,7 @@ use Zippy\Html\Label; use Zippy\Html\Link\ClickLink; use Zippy\Html\Panel; +use Zippy\Html\Link\SubmitLink; class ItemList extends \App\Pages\Base { @@ -43,13 +44,23 @@ public function __construct($add = false) { $catlist[$k] = $v; } $this->filter->add(new DropDownChoice('searchcat', $catlist, 0)); - + $this->add(new Panel('itemtable'))->setVisible(true); - $this->itemtable->add(new DataView('itemlist', new ItemDataSource($this), $this, 'itemlistOnRow')); $this->itemtable->add(new ClickLink('addnew'))->onClick($this, 'addOnClick'); - $this->itemtable->itemlist->setPageSize(H::getPG()); - $this->itemtable->add(new \Zippy\Html\DataList\Paginator('pag', $this->itemtable->itemlist)); - $this->itemtable->itemlist->setSelectedClass('table-success'); + + $this->itemtable->add(new Form('listform')) ; + + $this->itemtable->listform->add(new DataView('itemlist', new ItemDataSource($this), $this, 'itemlistOnRow')); + $this->itemtable->listform->itemlist->setPageSize(H::getPG()); + $this->itemtable->listform->add(new \Zippy\Html\DataList\Paginator('pag', $this->itemtable->listform->itemlist)); + $this->itemtable->listform->itemlist->setSelectedClass('table-success'); + $this->itemtable->listform->add(new SubmitLink('deleteall'))->onClick($this, 'OnDelAll'); + $this->itemtable->listform->add(new SubmitLink('printall'))->onClick($this, 'OnPrintAll',true); + + $catlist = Category::findArray( "cat_name","cat_id not in (select parent_id from item_cat )", "cat_name"); + + + $this->itemtable->listform->add(new DropDownChoice('allcat', $catlist, 0))->onChange($this,'onAllCat'); $this->add(new Form('itemdetail'))->setVisible(false); $this->itemdetail->add(new TextInput('editname')); @@ -60,6 +71,7 @@ public function __construct($add = false) { $this->itemdetail->add(new TextInput('editprice4')); $this->itemdetail->add(new TextInput('editprice5')); $this->itemdetail->add(new TextInput('editmanufacturer')); + $this->itemdetail->add(new TextInput('editurl')); $common = System::getOptions('common'); if (strlen($common['price1']) > 0) { $this->itemdetail->editprice1->setVisible(true); @@ -140,7 +152,7 @@ public function __construct($add = false) { if ($add == false) { - $this->itemtable->itemlist->Reload(); + $this->itemtable->listform->itemlist->Reload(); } else { $this->addOnClick(null); } @@ -170,39 +182,25 @@ public function itemlistOnRow(\Zippy\Html\DataList\DataRow $row) { $row->add(new Label('inseria'))->setVisible($item->useserial); $row->add(new ClickLink('edit'))->onClick($this, 'editOnClick'); - $row->add(new ClickLink('delete'))->onClick($this, 'deleteOnClick'); + $row->add(new ClickLink('set'))->onClick($this, 'setOnClick'); $row->set->setVisible($item->item_type == Item::TYPE_PROD || $item->item_type == Item::TYPE_HALFPROD); - $row->add(new ClickLink('print'))->onClick($this, 'printOnClick', true); - + $row->add(new ClickLink('printqr'))->onClick($this, 'printQrOnClick', true); + $row->printqr->setVisible(strlen($item->url)>0) ; + $row->add(new \Zippy\Html\Link\BookmarkableLink('imagelistitem'))->setValue("/loadimage.php?id={$item->image_id}"); $row->imagelistitem->setAttribute('href', "/loadimage.php?id={$item->image_id}"); $row->imagelistitem->setAttribute('data-gallery', $item->image_id); if ($item->image_id == 0) { $row->imagelistitem->setVisible(false); } + + $row->add(new CheckBox('seldel', new \Zippy\Binding\PropertyBinding($item, 'seldel'))); + } - public function deleteOnClick($sender) { - if (false == \App\ACL::checkDelRef('ItemList')) { - return; - } - - $item = $sender->owner->getDataItem(); - - if ($item->allowDelete()) { - Item::delete($item->item_id); - } else { - $this->setWarn("delitemwarn"); - $item->disabled = 1; - $item->save(); - } - - - $this->itemtable->itemlist->Reload(false); - $this->resetURL(); - } + public function editOnClick($sender) { $item = $sender->owner->getDataItem(); @@ -232,6 +230,7 @@ public function editOnClick($sender) { $this->itemdetail->editwarranty->setText($this->_item->warranty); $this->itemdetail->edittype->setValue($this->_item->item_type); + $this->itemdetail->editurl->setText($this->_item->url); $this->itemdetail->editcell->setText($this->_item->cell); $this->itemdetail->editminqty->setText(\App\Helper::fqty($this->_item->minqty)); $this->itemdetail->editzarp->setText(\App\Helper::fqty($this->_item->zarp)); @@ -250,8 +249,8 @@ public function editOnClick($sender) { $this->itemdetail->editimage->setVisible(false); } - $this->itemtable->itemlist->setSelectedRow($sender->getOwner()); - $this->itemtable->itemlist->Reload(false); + $this->itemtable->listform->itemlist->setSelectedRow($sender->getOwner()); + $this->itemtable->listform->itemlist->Reload(false); $this->updateman(); } @@ -282,7 +281,7 @@ public function cancelOnClick($sender) { } public function OnFilter($sender) { - $this->itemtable->itemlist->Reload(); + $this->itemtable->listform->itemlist->Reload(); } public function OnSubmit($sender) { @@ -307,6 +306,7 @@ public function OnSubmit($sender) { $this->_item->manufacturer = trim($this->itemdetail->editmanufacturer->getText()); $this->_item->bar_code = trim($this->itemdetail->editbarcode->getText()); + $this->_item->url = trim($this->itemdetail->editurl->getText()); $this->_item->msr = $this->itemdetail->editmsr->getText(); $this->_item->weight = $this->itemdetail->editweight->getText(); $this->_item->maxsize = $this->itemdetail->editmaxsize->getText(); @@ -419,7 +419,7 @@ public function OnSubmit($sender) { $this->_item->Save(); } - $this->itemtable->itemlist->Reload(false); + $this->itemtable->listform->itemlist->Reload(false); $this->itemtable->setVisible(true); $this->itemdetail->setVisible(false); @@ -496,6 +496,19 @@ public function ondelset($sender) { $this->setpanel->setlist->Reload(); } + public function printQrOnClick($sender) { + $item = $sender->getOwner()->getDataItem(); + + $qrCode = new \Endroid\QrCode\QrCode($item->url); + $qrCode->setSize(100); + $qrCode->setMargin(5); + $qrCode->setWriterByName('png'); + + $dataUri = $qrCode->writeDataUri(); + $html = ""; + $this->updateAjax(array(), " $('#tag').html('{$html}') ; $('#pform').modal()"); + + } public function printOnClick($sender) { $item = $sender->getOwner()->getDataItem(); $printer = \App\System::getOptions('printer'); @@ -544,6 +557,8 @@ public function printOnClick($sender) { $html = $report->generate($header); + + $this->updateAjax(array(), " $('#tag').html('{$html}') ; $('#pform').modal()"); } @@ -559,6 +574,133 @@ public function updateman() { } } + + public function OnPrintAll($sender) { + + $items= array(); + foreach ( $this->itemtable->listform->itemlist->getDataRows() as $row) { + $item = $row->getDataItem(); + if ($item->seldel == true) { + $items[] = $item ; + } + } + if(count($items)==0) return; + + $printer = \App\System::getOptions('printer'); + $pwidth = 'style="width:40mm;"'; + $pfs = 'style="font-size:16px;"'; + + if (strlen($printer['pwidth']) > 0) { + $pwidth = 'style="width:' . $printer['pwidth'] . ' ";'; + } + if (strlen($printer['pfontsize']) > 0) { + $pfs = 'style="font-size:' . $printer['pfontsize'] . 'px";'; + } + + $htmls=""; + + foreach($items as $item){ + $report = new \App\Report('item_tag.tpl'); + $header = array('width' => $pwidth, 'fsize' => $pfs); + if ($printer['pname'] == 1) { + + if (strlen($item->shortname) > 0) { + $header['name'] = $item->shortname; + } else { + $header['name'] = $item->itemname; + } + } + $header['isap'] = false; + if ($printer['pprice'] == 1) { + $header['price'] = number_format($item->getPrice($printer['pricetype']), 2, '.', ''); + $header['isap'] = true; + } + if ($printer['pcode'] == 1) { + $header['article'] = $item->item_code; + $header['isap'] = true; + } + + if ($printer['pbarcode'] == 1) { + $barcode = $item->bar_code; + if (strlen($barcode) == 0) { + $barcode = $item->item_code; + } + if(strlen($barcode)==0) continue; + + $generator = new \Picqer\Barcode\BarcodeGeneratorPNG(); + $img = ''; + $header['img'] = $img; + $header['barcode'] = \App\Util::addSpaces($barcode); + } + + + $htmls = $htmls. $report->generate($header); + + } + $this->updateAjax(array(), " $('#tag').html('{$htmls}') ;$('.seldel').prop('checked',null); $('#pform').modal()"); + + + } + public function onAllCat($sender) { + $cat_id = $sender->getValue(); + if($cat_id==0) return; + + $items= array(); + foreach ( $this->itemtable->listform->itemlist->getDataRows() as $row) { + $item = $row->getDataItem(); + if ($item->seldel == true) { + $items[] = $item ; + } + } + if(count($items)==0) return; + $conn = \ZDB\DB::getConnect(); + + + foreach($items as $item) { + + $conn->Execute("update items set cat_id={$cat_id} where item_id={$item->item_id}") ; + } + + $this->itemtable->listform->itemlist->Reload(); + + } + public function OnDelAll($sender) { + if (false == \App\ACL::checkDelRef('ItemList')) { + return; + } + + $ids = array(); + foreach ( $this->itemtable->listform->itemlist->getDataRows() as $row) { + $item = $row->getDataItem(); + if ($item->seldel == true) { + $ids[] = $item->item_id; + } + } + if(count($ids)==0) return; + + $conn = \ZDB\DB::getConnect(); + $d=0;$u=0; + foreach($ids as $id) { + $sql = " select count(*) from store_stock where item_id = {$id} "; + $cnt = $conn->GetOne($sql); + if($cnt >0) { + $u++; + $conn->Execute("update items set disabled=1 where item_id={$id}"); + } else { + $d++; + $conn->Execute("delete from items where item_id={$id}"); + + } + } + + + $this->setSuccess("delitems",$d,$u) ; + + $this->itemtable->listform->itemlist->Reload(); + + } + + } class ItemDataSource implements \Zippy\Interfaces\DataSource diff --git a/www/app/pages/register/doclist.php b/www/app/pages/register/doclist.php index 3b40cb144..519939c59 100644 --- a/www/app/pages/register/doclist.php +++ b/www/app/pages/register/doclist.php @@ -48,6 +48,7 @@ public function __construct($docid = 0) { $filter->page = 1; $filter->doctype = 0; $filter->customer = 0; + $filter->author = 0; $filter->customer_name = ''; $filter->searchnumber = ''; @@ -56,6 +57,7 @@ public function __construct($docid = 0) { $this->filter->add(new Date('from', $filter->from)); $this->filter->add(new Date('to', $filter->to)); $this->filter->add(new DropDownChoice('doctype', H::getDocTypes(), $filter->doctype)); + $this->filter->add(new DropDownChoice('author', \App\Entity\User::findArray('username','','username'), $filter->author)); $this->filter->add(new ClickLink('erase', $this, "onErase")); $this->filter->add(new AutocompleteTextInput('searchcust'))->onText($this, 'OnAutoCustomer'); @@ -126,6 +128,7 @@ public function filterOnSubmit($sender) { $filter->from = $this->filter->from->getDate(); $filter->to = $this->filter->to->getDate(true); $filter->doctype = $this->filter->doctype->getValue(); + $filter->author = $this->filter->author->getValue(); $filter->customer = $this->filter->searchcust->getKey(); $filter->customer_name = $this->filter->searchcust->getText(); @@ -428,6 +431,10 @@ private function getWhere() { $where .= " and customer_id ={$filter->customer} "; } + if ($filter->author > 0) { + $where .= " and user_id ={$filter->author} "; + } + $sn = $filter->searchnumber; diff --git a/www/app/pages/register/gilist.php b/www/app/pages/register/gilist.php index 57687f3c6..e882c4148 100644 --- a/www/app/pages/register/gilist.php +++ b/www/app/pages/register/gilist.php @@ -630,6 +630,16 @@ public function npOnSubmit($sender) { $this->_doc->save(); $this->setSuccess(H::l("npnewdec", $this->_doc->headerdata['ship_number'])); + + $order = Document::load($this->_doc->parent_id); + if ($order instanceof Document) { + if ($order->state == Document::STATE_READYTOSHIP ) { + $order->updateStatus(Document::STATE_INSHIPMENT) ; + } + } + + + $this->statuspan->setVisible(false); $this->listpan->setVisible(true); $this->nppan->setVisible(false); diff --git a/www/app/pages/register/stocklist.php b/www/app/pages/register/stocklist.php index ea4df28cd..4ff29e76c 100644 --- a/www/app/pages/register/stocklist.php +++ b/www/app/pages/register/stocklist.php @@ -66,9 +66,9 @@ public function doclistOnRow(\Zippy\Html\DataList\DataRow $row) { $row->add(new Label('partion', H::fa($doc->partion))); $row->add(new Label('qty', H::fqty($doc->quantity))); - $price = $doc->quantity >= 0 ? '' : H::fa($doc->extcode + $doc->partion); + $price = $doc->quantity >= 0 ? H::fa($doc->outprice ) : ''; if ($doc->meta_name == 'ReturnIssue') { - $price = H::fa((0 - $doc->extcode) + $doc->partion); + $price = H::fa((0 - $doc->outprice) ); } $row->add(new Label('price', $price)); @@ -147,7 +147,7 @@ public function getItemCount() { public function getItems($start, $count, $sortfield = null, $asc = null) { $conn = \ZDB\DB::getConnect(); - $sql = "select e.extcode,e.entry_id, e.quantity, e.amount , d.document_id, d.document_number,d.document_date,s.partion,s.snumber from documents d "; + $sql = "select e.outprice,e.entry_id, e.quantity, e.amount , d.document_id, d.document_number,d.document_date,s.partion,s.snumber from documents d "; $sql .= " join `entrylist` e on d.`document_id` = e.`document_id` "; $sql .= " join `store_stock` s on s.`stock_id` = e.`stock_id` "; $sql .= " where " . $this->getWhere() . " order by entry_id "; diff --git a/www/app/pages/report/abc.php b/www/app/pages/report/abc.php index 9eb4c435f..9857386a0 100644 --- a/www/app/pages/report/abc.php +++ b/www/app/pages/report/abc.php @@ -32,14 +32,10 @@ public function __construct() { $this->typelist[4] = H::l('abc4'); $this->typelist[5] = H::l('abc5'); - $dt = new \Carbon\Carbon; - $dt->subMonth(); - $from = $dt->startOfMonth()->timestamp; - $to = $dt->endOfMonth()->timestamp; - + $this->add(new Form('filter'))->onSubmit($this, 'OnSubmit'); - $this->filter->add(new Date('from', $from)); - $this->filter->add(new Date('to', $to)); + $this->filter->add(new Date('from', time() - (7 * 24 * 3600))); + $this->filter->add(new Date('to', time())); $this->filter->add(new DropDownChoice('type', $this->typelist, 1)); $this->add(new Panel('detail'))->setVisible(false); @@ -81,19 +77,19 @@ private function generateReport() { $detail = array(); - if ($type == 1) { + if ($type == 1) { //Товары, прибыль $detail = $this->find1(); } - if ($type == 2) { + if ($type == 2) { //Поставщики, объем поставок $detail = $this->find2(); } - if ($type == 3) { + if ($type == 3) { //Покупатели, объем продаж" $detail = $this->find3(); } - if ($type == 4) { + if ($type == 4) { //Услуги, выручка $detail = $this->find4(); } - if ($type == 5) { + if ($type == 5) { //Покупатели, прибыль $detail = $this->find5(); } @@ -137,12 +133,12 @@ private function find1() { $list = array(); $conn = \ZDB\DB::getConnect(); $sql = "SELECT * FROM ( - SELECT items.itemname as name, SUM( ABS( extcode*quantity ) ) AS value + SELECT items.itemname as name, SUM( ABS( (outprice-partion )*quantity ) ) AS value FROM `entrylist_view` join items on entrylist_view.item_id = items.item_id join documents_view on entrylist_view.document_id = documents_view.document_id - WHERE extcode <>0 and meta_name in('GoodsIssue', 'POSCheck','ReturnIssue','TTN') + WHERE partion is not null and in('GoodsIssue', 'POSCheck','ReturnIssue','TTN') AND entrylist_view.document_date >= " . $conn->DBDate($this->filter->from->getDate()) . " AND entrylist_view.document_date <= " . $conn->DBDate($this->filter->to->getDate()) . " {$this->br} @@ -164,11 +160,11 @@ private function find2() { $list = array(); $conn = \ZDB\DB::getConnect(); $sql = "SELECT * FROM ( - SELECT customers.customer_name as name, SUM( ABS( entrylist_view.amount ) ) AS value + SELECT customers.customer_name as name, SUM( ABS( partion *quantity ) ) AS value FROM `entrylist_view` join customers on entrylist_view.customer_id = customers.customer_id join documents_view on entrylist_view.document_id = documents_view.document_id - WHERE entrylist_view.amount >0 and meta_name in('GoodsReceipt') + WHERE partion is not null and entrylist_view.quantity >0 and meta_name in('GoodsReceipt','RetCustIssue') AND entrylist_view.document_date >= " . $conn->DBDate($this->filter->from->getDate()) . " AND entrylist_view.document_date <= " . $conn->DBDate($this->filter->to->getDate()) . " AND customers.detail not like '%1%' @@ -179,7 +175,7 @@ private function find2() { $rs = $conn->Execute($sql); foreach ($rs as $row) { - $row['value'] = round($row['value'] / 1000); + $row['value'] = round($row['value'] ); $list[] = $row; } @@ -190,11 +186,11 @@ private function find3() { $list = array(); $conn = \ZDB\DB::getConnect(); $sql = "SELECT * FROM ( - SELECT customers.customer_name as name, SUM( ABS( entrylist_view.amount ) ) AS value + SELECT customers.customer_name as name, SUM( ABS( partion *quantity ) ) AS value FROM `entrylist_view` join customers on entrylist_view.customer_id = customers.customer_id join documents_view on entrylist_view.document_id = documents_view.document_id - WHERE entrylist_view.amount <0 and meta_name in('GoodsIssue','POSCheck','Order') + WHERE partion is not null and entrylist_view.quantity <0 and meta_name in('GoodsIssue', 'POSCheck','ReturnIssue','TTN' ) AND entrylist_view.document_date >= " . $conn->DBDate($this->filter->from->getDate()) . " AND entrylist_view.document_date <= " . $conn->DBDate($this->filter->to->getDate()) . " AND customers.detail not like '%1%' @@ -205,7 +201,7 @@ private function find3() { $rs = $conn->Execute($sql); foreach ($rs as $row) { - $row['value'] = round($row['value'] / 1000); + $row['value'] = round($row['value'] ); $list[] = $row; } @@ -216,12 +212,12 @@ private function find4() { $list = array(); $conn = \ZDB\DB::getConnect(); $sql = "SELECT * FROM ( - SELECT services.service_name as name, SUM( ABS( entrylist_view.amount ) ) AS value + SELECT services.service_name as name, SUM( ABS( entrylist_view.outprice ) ) AS value FROM `entrylist_view` join services on entrylist_view.service_id = services.service_id join documents_view on entrylist_view.document_id = documents_view.document_id - WHERE entrylist_view.amount>0 and meta_name in('ServiceAct') + WHERE partion is not null and entrylist_view.outprice>0 and meta_name in('ServiceAct') AND entrylist_view.document_date >= " . $conn->DBDate($this->filter->from->getDate()) . " AND entrylist_view.document_date <= " . $conn->DBDate($this->filter->to->getDate()) . " {$this->br} @@ -231,7 +227,7 @@ private function find4() { $rs = $conn->Execute($sql); foreach ($rs as $row) { - $row['value'] = round($row['value'] / 1000); + $row['value'] = round($row['value'] ); $list[] = $row; } @@ -242,11 +238,11 @@ private function find5() { $list = array(); $conn = \ZDB\DB::getConnect(); $sql = "SELECT * FROM ( - SELECT customers.customer_name as name, SUM( ABS( extcode*quantity ) ) AS value + SELECT customers.customer_name as name, SUM( ABS( (outprice-partion )*quantity ) ) AS value FROM `entrylist_view` join customers on entrylist_view.customer_id = customers.customer_id join documents_view on entrylist_view.document_id = documents_view.document_id - WHERE entrylist_view.amount <0 and meta_name in('GoodsIssue','POSCheck','TTN') + WHERE entrylist_view.quantity <0 and meta_name in('GoodsIssue', 'POSCheck','ReturnIssue','TTN' ) AND entrylist_view.document_date >= " . $conn->DBDate($this->filter->from->getDate()) . " AND entrylist_view.document_date <= " . $conn->DBDate($this->filter->to->getDate()) . " {$this->br} diff --git a/www/app/pages/report/outcome.php b/www/app/pages/report/outcome.php index c95b6d194..bb3344c54 100644 --- a/www/app/pages/report/outcome.php +++ b/www/app/pages/report/outcome.php @@ -165,13 +165,13 @@ private function generateReport() { $sql = ''; if ($type == 1 || $type == 6 || strlen($cat) > 0) { //по товарам $sql = " - select i.`itemname`,i.`item_code`,sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select i.`itemname`,i.`item_code`,sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e join `items_view` i on e.`item_id` = i.`item_id` join `documents_view` d on d.`document_id` = e.`document_id` - where e.`item_id` >0 and e.`quantity` <> 0 {$cat} {$cust} - and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN','OrderCust') + where e.partion is not null and e.`item_id` >0 and e.`quantity` <> 0 {$cat} {$cust} + and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN' ) {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " AND DATE(e.document_date) <= " . $conn->DBDate($to) . " @@ -182,13 +182,13 @@ private function generateReport() { if ($type == 2) { //по покупателям $empty = H::l("emptycust"); $sql = " - select coalesce(c.`customer_name`,'{$empty}') as itemname,c.`customer_id`, sum(0-e.quantity*e.partion) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select coalesce(c.`customer_name`,'{$empty}') as itemname,c.`customer_id`, sum(0-e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e left join `customers` c on c.`customer_id` = e.`customer_id` join `documents_view` d on d.`document_id` = e.`document_id` - where e.`quantity` <>0 - and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN','OrderCust') AND DATE(e.document_date) >= " . $conn->DBDate($from) . " + where e.partion is not null and e.`quantity` <>0 + and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN' ) AND DATE(e.document_date) >= " . $conn->DBDate($from) . " {$br} {$u} AND DATE(e.document_date) <= " . $conn->DBDate($to) . " AND c.detail not like '%1%' group by c.`customer_name`,c.`customer_id` @@ -197,7 +197,7 @@ private function generateReport() { } if ($type == 3) { //по датам $sql = " - select e.`document_date` as dt , sum(0-e.`amount`) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select e.`document_date` as dt , sum(0-e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e join `items` i on e.`item_id` = i.`item_id` @@ -213,7 +213,7 @@ private function generateReport() { if ($type == 4 || $type == 7) { //по сервисам $sql = " - select s.`service_name` as itemname, sum(0-e.`quantity`) as qty, sum(0-e.`amount`) as summa ,0 as navar + select s.`service_name` as itemname, sum(0-e.`quantity`) as qty, sum(0-e.`outprice`) as summa ,0 as navar from `entrylist_view` e join `services` s on e.`service_id` = s.`service_id` @@ -228,13 +228,13 @@ private function generateReport() { if ($type == 5 && strlen($cat) == 0) { //по категориях $sql = " - select i.`cat_name` as itemname,sum(0-e.`quantity`) as qty, sum(0- e.quantity*e.partion) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select i.`cat_name` as itemname,sum(0-e.`quantity`) as qty, sum(0- e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e join `items_view` i on e.`item_id` = i.`item_id` join `documents_view` d on d.`document_id` = e.`document_id` - where e.`item_id` >0 and e.`quantity` <>0 - and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN','OrderCust') + where e.partion is not null and e.`item_id` >0 and e.`quantity` <>0 + and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN' ) {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " AND DATE(e.document_date) <= " . $conn->DBDate($to) . " @@ -259,13 +259,13 @@ private function generateReport() { $sqlc = " - select coalesce(sum(0-e.`amount`) ,0) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select coalesce(sum(0-e.quantity*e.partion) ,0) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e join `documents_view` d on d.`document_id` = e.`document_id` - where e.`quantity` <>0 - and d.`meta_name` in ('GoodsIssue', 'ServiceAct' , 'POSCheck','ReturnIssue','TTN','OrderCust') + where e.partion is not null and e.`quantity` <>0 + and d.`meta_name` in ('GoodsIssue', 'ServiceAct' , 'POSCheck','ReturnIssue','TTN' ) {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " AND DATE(e.document_date) <= " . $conn->DBDate($to) . " and d.customer_id in({$custlist}) @@ -282,12 +282,12 @@ private function generateReport() { if ($type == 9) { //по компаниям $sql = " - select d.`firm_name` as itemname,sum(0-e.`quantity`) as qty, sum(0-e.`amount`) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select d.`firm_name` as itemname,sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e join `documents_view` d on d.`document_id` = e.`document_id` - where d.`firm_id` >0 and e.`quantity` <>0 + where e.partion is not null and d.`firm_id` >0 and e.`quantity` <>0 and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN') {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " @@ -298,7 +298,7 @@ private function generateReport() { } if ($type == 10) { //по складах $sql = " - select sr.`storename` as itemname,sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select sr.`storename` as itemname,sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e @@ -306,7 +306,7 @@ private function generateReport() { join `stores` sr on sr.`store_id` = st.`store_id` join `documents_view` d on d.`document_id` = e.`document_id` - where e.`quantity` <>0 + where e.partion is not null and e.`quantity` <>0 and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN') {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " @@ -319,13 +319,13 @@ private function generateReport() { if ($type == 11) { //по источникам $sql = " - select i.itemname, sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum(e.extcode*(0-e.`quantity`)) as navar + select i.itemname, sum(0-e.`quantity`) as qty, sum(0-e.quantity*e.partion) as summa, sum((e.outprice-e.partion )*(0-e.`quantity`)) as navar from `entrylist_view` e join `items` i on e.`item_id` = i.`item_id` join `documents_view` d on d.`document_id` = e.`document_id` - where e.`quantity` <>0 and ExtractValue(d.content, '//doc/header/salesource') = {$salesource} + where e.partion is not null and e.`quantity` <>0 and ExtractValue(d.content, '//doc/header/salesource') = {$salesource} and d.`meta_name` in ('GoodsIssue', 'POSCheck','ReturnIssue','TTN') {$br} {$u} AND DATE(e.document_date) >= " . $conn->DBDate($from) . " diff --git a/www/app/pages/service/import.php b/www/app/pages/service/import.php index 4056bc962..7b49d8e51 100644 --- a/www/app/pages/service/import.php +++ b/www/app/pages/service/import.php @@ -50,6 +50,8 @@ public function __construct() { $form->add(new CheckBox("passfirst")); $form->add(new CheckBox("preview")); $form->add(new CheckBox("checkname")); + $form->add(new CheckBox("showprice")); + $form->add(new CheckBox("showshop")); $form->onSubmit($this, "onImport"); @@ -104,6 +106,19 @@ public function onType($sender) { $this->iform->colqty->setVisible($t == 1); $this->iform->store->setVisible($t == 1); $this->iform->colinprice->setVisible($t == 1); + if($t==2) { + $this->iform->checkname->setVisible(false); + $this->iform->showprice->setVisible(false); + $this->iform->showshop->setVisible(false); + $this->iform->colname->setVisible(false); + $this->iform->colbarcode->setVisible(false); + $this->iform->colgr->setVisible(false); + $this->iform->colmsr->setVisible(false); + $this->iform->coldesc->setVisible(false); + $this->iform->colqty->setVisible(false); + $this->iform->colinprice->setVisible(false); + + } } public function onImport($sender) { @@ -130,7 +145,7 @@ public function onImport($sender) { $colmsr = $this->iform->colmsr->getValue(); $colbrand = $this->iform->colbrand->getValue(); $coldesc = $this->iform->coldesc->getValue(); - if ($colname === '0') { + if ($colname === '0' && $t != 2) { $this->setError('noselcolname'); return; } @@ -195,6 +210,40 @@ public function onImport($sender) { $newitems = array(); foreach ($data as $row) { + $price1 = str_replace(',', '.', trim($row[$colprice1])); + $price2 = str_replace(',', '.', trim($row[$colprice2])); + $price3 = str_replace(',', '.', trim($row[$colprice3])); + $price4 = str_replace(',', '.', trim($row[$colprice4])); + $price5 = str_replace(',', '.', trim($row[$colprice5])); + $itemcode = trim($row[$colcode]); + $colbrand = trim($row[$colbrand]); + + if ($t == 2){ //обновление цен + + if(strlen($itemcode)==0) continue; + if(strlen($colbrand)>0) { + $it = Item::getFirst('item_code='.Item::qstr($itemcode). " and manufacturer = ".Item::qstr($colbrand) ) ; + } else { + $it = Item::getFirst('item_code='.Item::qstr($itemcode)) ; + } + if($it==null) continue; + + if($price1>0) $it->price1 = $price1; + if($price2>0) $it->price2 = $price2; + if($price3>0) $it->price3 = $price3; + if($price4>0) $it->price4 = $price4; + if($price5>0) $it->price5 = $price5; + + + $it->save() ; + $cnt++; + + continue; + } + + + + $catname = $row[$colgr]; if (strlen($catname) > 0) { $cat = Category::getFirst('cat_name=' . Category::qstr($catname)); @@ -242,7 +291,7 @@ public function onImport($sender) { $item->msr = trim($row[$colmsr]); } if (strlen($row[$colbrand]) > 0) { - $item->manufacturer = trim($row[$colbrand]); + $item->manufacturer = $colbrand ; } if (strlen(trim($row[$coldesc])) > 0) { $item->description = trim($row[$coldesc]); @@ -274,6 +323,10 @@ public function onImport($sender) { } $item->amount = $item->quantity * $item->price; + + $item->noprice= $this->iform->showprice->isChecked()?1:0 ; + $item->noshop= $this->iform->showshop->isChecked()?1:0 ; + $item->save(); $cnt++; if ($item->quantity > 0) { diff --git a/www/app/pages/timesheet.php b/www/app/pages/timesheet.php index 3d4ec07a0..a836bcf9e 100644 --- a/www/app/pages/timesheet.php +++ b/www/app/pages/timesheet.php @@ -286,7 +286,7 @@ public function listOnRow($row) { $row->add(new Label('lto', date('H:i', $item->t_end))); $row->add(new Label('ltypename', $tl[$item->t_type])); $row->add(new Label('ldesc', $item->description)); - $row->add(new Label('lbranch', $item->branch_name)); + $row->add(new Label('lbranch', $item->branch_id > 0 ? $item->branch_name :'')); $diff = $item->t_end - $item->t_start - ($item->t_break * 60); $diff = number_format($diff / 3600, 2, '.', ''); diff --git a/www/app/pages/userlogin.php b/www/app/pages/userlogin.php index f6b12ac7d..b6cc6cfce 100644 --- a/www/app/pages/userlogin.php +++ b/www/app/pages/userlogin.php @@ -31,7 +31,7 @@ public function __construct() { $this->add($form); $this->setError(''); - $curver = 'v5.0.2'; + $curver = 'v5.1.0'; $this->_tvars['curversion'] = $curver; //проверка новой версии diff --git a/www/app/widgets/docview.php b/www/app/widgets/docview.php index 692ebc128..9b4188dcc 100644 --- a/www/app/widgets/docview.php +++ b/www/app/widgets/docview.php @@ -74,6 +74,9 @@ public function __construct($id) { $this->addmsgform->add(new TextArea('addmsg')); $this->add(new DataView('dw_msglist', new ArrayDataSource(new Prop($this, '_msglist')), $this, 'msgListOnRow')); + $this->addmsgform->add(new \Zippy\Html\Form\CheckBoxList('userm', '
')); + + $this->add(new ClickLink('doctabp', $this, "onTab")); $this->add(new ClickLink('doctabd', $this, "onTab")); $this->add(new ClickLink('doctabf', $this, "onTab")); @@ -149,6 +152,17 @@ public function setDoc(\App\Entity\Doc\Document $doc) { $this->scanimage->setUrl('/loadfile.php?im=1&id=' . $this->_doc->headerdata['scan']); } + $users = \App\Entity\User::getByBranch($this->_doc->branch_id) ; + $this->addmsgform->userm->clean() ; + $curr = System::getUser() ; + foreach($users as $id=>$name){ + $f = false; + if($id==$this->_doc->user_id) $f =true;//автор + if($id==$curr->user_id) continue;//себе не нужно + + $this->addmsgform->userm->AddCheckBox($id, $f, $name); + } + $this->onTab($this->doctabp); } @@ -256,20 +270,10 @@ public function OnMsgSubmit($sender) { // уведомления - $users = array(); - foreach ($this->_msglist as $msg) { - $users[$msg->user_id] = $msg->user_id; - } - $users[$this->_doc->user_id] = $this->_doc->user_id; //автор дока - - unset($users[$user->user_id]); //себе не нужно - - - foreach ($users as $adr) { - if ($adr == $user->user_id) { - continue; - } //себе не нужно + + foreach ($this->addmsgform->userm->getCheckedList() as $adr) { + $n = new \App\Entity\Notify(); $n->user_id = $adr; $n->message = "" . H::l("newdoccomment") . ": {$this->_doc->meta_desc} {$this->_doc->document_number} "; diff --git a/www/composer.json b/www/composer.json index 20e9e67ab..7cf6f0718 100644 --- a/www/composer.json +++ b/www/composer.json @@ -17,8 +17,9 @@ "dompdf/dompdf": "v0.8.5", "firebase/php-jwt": "v5.0.0", "roave/security-advisories": "dev-master", - "picqer/php-barcode-generator": "v0.3", - + "picqer/php-barcode-generator": "v2.0.1", + "endroid/qr-code": "3.9.6", + "masterexploder/phpthumb" :"*", "lemmon/fetch" :"v0.3.0", "lis-dev/nova-poshta-api-2" :"0.1.6", @@ -28,7 +29,7 @@ "symfony/polyfill-mbstring": "v1.22.0", "symfony/polyfill-uuid": "v1.22.0", - "leon-mbs/zippy": "2.2.9" + "leon-mbs/zippy": "2.2.10" } } diff --git a/www/composer.lock b/www/composer.lock index 70c67d831..01f4b2092 100644 --- a/www/composer.lock +++ b/www/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e5b23d3c95bc1d93cb32c8a466076553", + "content-hash": "a935492e8867814d9c68e861bef140cb", "packages": [ { "name": "adodb/adodb-php", @@ -116,6 +116,106 @@ }, "time": "2019-01-16T20:28:40+00:00" }, + { + "name": "bacon/bacon-qr-code", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "3e9d791b67d0a2912922b7b7c7312f4b37af41e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/3e9d791b67d0a2912922b7b7c7312f4b37af41e4", + "reference": "3e9d791b67d0a2912922b7b7c7312f4b37af41e4", + "shasum": "" + }, + "require": { + "dasprid/enum": "^1.0.3", + "ext-iconv": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phly/keep-a-changelog": "^1.4", + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "^3.4" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.3" + }, + "time": "2020-10-30T02:02:47+00:00" + }, + { + "name": "dasprid/enum", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2", + "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.3" + }, + "time": "2020-10-02T16:03:48+00:00" + }, { "name": "dompdf/dompdf", "version": "v0.8.5", @@ -186,6 +286,81 @@ }, "time": "2020-02-20T03:52:51+00:00" }, + { + "name": "endroid/qr-code", + "version": "3.9.6", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", + "reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "php": ">=7.2", + "symfony/options-resolver": "^3.4||^4.4||^5.0", + "symfony/property-access": "^3.4||^4.4||^5.0" + }, + "require-dev": { + "endroid/quality": "^1.3.7", + "setasign/fpdf": "^1.8" + }, + "suggest": { + "ext-gd": "Required for generating PNG images", + "roave/security-advisories": "Avoids installation of package versions with vulnerabilities", + "setasign/fpdf": "Required to use the FPDF writer.", + "symfony/security-checker": "Checks your composer.lock for vulnerabilities" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "description": "Endroid QR Code", + "homepage": "https://github.com/endroid/qr-code", + "keywords": [ + "bundle", + "code", + "endroid", + "php", + "qr", + "qrcode" + ], + "support": { + "issues": "https://github.com/endroid/qr-code/issues", + "source": "https://github.com/endroid/qr-code/tree/3.9.6" + }, + "funding": [ + { + "url": "https://github.com/endroid", + "type": "github" + } + ], + "time": "2020-11-27T14:30:38+00:00" + }, { "name": "ezyang/htmlpurifier", "version": "v4.13.0", @@ -491,6 +666,61 @@ }, "time": "2021-04-26T09:17:50+00:00" }, + { + "name": "khanamiryan/qrcode-detector-decoder", + "version": "1.0.5.1", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "b96163d4f074970dfe67d4185e75e1f4541b30ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/b96163d4f074970dfe67d4185e75e1f4541b30ca", + "reference": "b96163d4f074970dfe67d4185e75e1f4541b30ca", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 | ^7.5 | ^8.0 | ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Zxing\\": "lib/" + }, + "files": [ + "lib/Common/customFunctions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Ashot Khanamiryan", + "email": "a.khanamiryan@gmail.com", + "homepage": "https://github.com/khanamiryan", + "role": "Developer" + } + ], + "description": "QR code decoder / reader", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", + "keywords": [ + "barcode", + "qr", + "zxing" + ], + "support": { + "issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues", + "source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/1.0.5.1" + }, + "time": "2021-04-21T08:02:08+00:00" + }, { "name": "lemmon/fetch", "version": "v0.3.0", @@ -638,16 +868,16 @@ }, { "name": "leon-mbs/zippy", - "version": "2.2.9", + "version": "2.2.10", "source": { "type": "git", "url": "https://github.com/leon-mbs/zippy.git", - "reference": "18e946ffd99ae0f5cacf055ce318168bca5586f4" + "reference": "c58d3548c96927788c9622c632112df09eefb456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leon-mbs/zippy/zipball/18e946ffd99ae0f5cacf055ce318168bca5586f4", - "reference": "18e946ffd99ae0f5cacf055ce318168bca5586f4", + "url": "https://api.github.com/repos/leon-mbs/zippy/zipball/c58d3548c96927788c9622c632112df09eefb456", + "reference": "c58d3548c96927788c9622c632112df09eefb456", "shasum": "" }, "require": { @@ -679,9 +909,9 @@ ], "support": { "issues": "https://github.com/leon-mbs/zippy/issues", - "source": "https://github.com/leon-mbs/zippy/tree/2.2.9" + "source": "https://github.com/leon-mbs/zippy/tree/2.2.10" }, - "time": "2021-05-07T06:54:38+00:00" + "time": "2021-05-11T18:37:08+00:00" }, { "name": "lis-dev/nova-poshta-api-2", @@ -1584,23 +1814,29 @@ }, { "name": "picqer/php-barcode-generator", - "version": "v0.3", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/picqer/php-barcode-generator.git", - "reference": "2e4d5b1f7f04fdb348d0721ada65963dac6f0c0c" + "reference": "16c51a795454198500cdfb4f82de288945af3960" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/picqer/php-barcode-generator/zipball/2e4d5b1f7f04fdb348d0721ada65963dac6f0c0c", - "reference": "2e4d5b1f7f04fdb348d0721ada65963dac6f0c0c", + "url": "https://api.github.com/repos/picqer/php-barcode-generator/zipball/16c51a795454198500cdfb4f82de288945af3960", + "reference": "16c51a795454198500cdfb4f82de288945af3960", "shasum": "" }, "require": { - "php": ">=5.4.0" + "ext-mbstring": "*", + "php": ">=7.2.0" }, "require-dev": { - "phpunit/phpunit": "^5.3" + "phpunit/phpunit": "^8.5" + }, + "suggest": { + "ext-bcmath": "Barcode IMB (Intelligent Mail Barcode) needs bcmath extension", + "ext-gd": "For JPG and PNG generators, GD or Imagick is required", + "ext-imagick": "For JPG and PNG generators, GD or Imagick is required" }, "type": "library", "autoload": { @@ -1610,7 +1846,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPLv3" + "LGPL-3.0-or-later" ], "authors": [ { @@ -1620,11 +1856,12 @@ }, { "name": "Casper Bakker", - "email": "info@picqer.com" + "email": "info@picqer.com", + "homepage": "https://picqer.com" } ], "description": "An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.", - "homepage": "http://github.com/picqer/php-barcode-generator", + "homepage": "https://github.com/picqer/php-barcode-generator", "keywords": [ "CODABAR", "Code11", @@ -1651,9 +1888,9 @@ ], "support": { "issues": "https://github.com/picqer/php-barcode-generator/issues", - "source": "https://github.com/picqer/php-barcode-generator/tree/v0.3" + "source": "https://github.com/picqer/php-barcode-generator/tree/master" }, - "time": "2019-01-12T09:29:34+00:00" + "time": "2020-01-28T13:00:23+00:00" }, { "name": "psr/http-client", @@ -1966,12 +2203,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "07314cf15422b2e162d591fe8ef2b850612b808f" + "reference": "5ffdb87f627ff16cc392e30515a1fe069cddc3e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/07314cf15422b2e162d591fe8ef2b850612b808f", - "reference": "07314cf15422b2e162d591fe8ef2b850612b808f", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5ffdb87f627ff16cc392e30515a1fe069cddc3e2", + "reference": "5ffdb87f627ff16cc392e30515a1fe069cddc3e2", "shasum": "" }, "conflict": { @@ -2019,8 +2256,8 @@ "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<11.0.4", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", - "drupal/drupal": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", + "drupal/core": ">=7,<7.80|>=8,<8.9.14|>=9,<9.0.12|>=9.1,<9.1.7", + "drupal/drupal": ">=7,<7.80|>=8,<8.9.14|>=9,<9.0.12|>=9.1,<9.1.7", "dweeves/magmi": "<=0.7.24", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", @@ -2079,6 +2316,7 @@ "laravel/framework": "<6.20.26|>=7,<8.40", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "league/commonmark": "<0.18.3", + "lexik/jwt-authentication-bundle": ">=2,<2.10.7|>=2.11,<2.11.3", "librenms/librenms": "<21.1", "livewire/livewire": ">2.2.4,<2.2.6", "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", @@ -2199,20 +2437,21 @@ "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/maker-bundle": ">=1.27,<1.31.1", "symfony/mime": ">=4.3,<4.3.8", "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/polyfill": ">=1,<1.10", "symfony/polyfill-php55": ">=1,<1.10", "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=4.4,<4.4.7|>=5,<5.0.7", + "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.37|>=3,<3.3.17|>=3.4,<3.4.7|>=4,<4.0.7", + "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", + "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", + "symfony/symfony": ">=2,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", @@ -2312,7 +2551,7 @@ "type": "tidelift" } ], - "time": "2021-05-06T19:08:33+00:00" + "time": "2021-05-13T21:03:10+00:00" }, { "name": "sabberworm/php-css-parser", @@ -2364,43 +2603,35 @@ "time": "2020-06-01T09:10:00+00:00" }, { - "name": "symfony/polyfill-intl-idn", - "version": "v1.22.1", + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "2.4-dev" }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, "files": [ - "bootstrap.php" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2409,30 +2640,18 @@ ], "authors": [ { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" }, "funding": [ { @@ -2448,47 +2667,35 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-03-23T23:28:01+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.1", + "name": "symfony/options-resolver", + "version": "v5.2.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "url": "https://github.com/symfony/options-resolver.git", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.15" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + "Symfony\\Component\\OptionsResolver\\": "" }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2497,26 +2704,23 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" + "config", + "configuration", + "options" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "source": "https://github.com/symfony/options-resolver/tree/v5.2.4" }, "funding": [ { @@ -2532,27 +2736,27 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-01-27T12:56:27+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.22.0", + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { "php": ">=7.1" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { @@ -2566,7 +2770,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, "files": [ "bootstrap.php" @@ -2578,25 +2782,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" }, "funding": [ { @@ -2615,22 +2818,25 @@ "time": "2021-01-07T16:49:33+00:00" }, { - "name": "symfony/polyfill-php72", + "name": "symfony/polyfill-intl-grapheme", "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", "shasum": "" }, "require": { "php": ">=7.1" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "branch-alias": { @@ -2643,7 +2849,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" }, "files": [ "bootstrap.php" @@ -2663,16 +2869,424 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" }, "funding": [ { @@ -2852,18 +3466,272 @@ ], "time": "2021-01-07T16:49:33+00:00" }, + { + "name": "symfony/property-access", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "3af8ed262bd3217512a13b023981fe68f36ad5f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/3af8ed262bd3217512a13b023981fe68f36ad5f3", + "reference": "3af8ed262bd3217512a13b023981fe68f36ad5f3", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15", + "symfony/property-info": "^5.2" + }, + "require-dev": { + "symfony/cache": "^4.4|^5.0" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides functions to read and write from/to an object or array using a simple string notation", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" + ], + "support": { + "source": "https://github.com/symfony/property-access/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:15:41+00:00" + }, + { + "name": "symfony/property-info", + "version": "v5.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-info.git", + "reference": "cc8121baf91039648d5f8feb894dc4a9d4935cc0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-info/zipball/cc8121baf91039648d5f8feb894dc4a9d4935cc0", + "reference": "cc8121baf91039648d5f8feb894dc4a9d4935cc0", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15", + "symfony/string": "^5.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/dependency-injection": "<4.4" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/cache": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" + }, + "suggest": { + "phpdocumentor/reflection-docblock": "To use the PHPDoc", + "psr/cache-implementation": "To cache results", + "symfony/doctrine-bridge": "To use Doctrine metadata", + "symfony/serializer": "To use Serializer metadata" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts information about PHP class' properties using metadata of popular sources", + "homepage": "https://symfony.com", + "keywords": [ + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" + ], + "support": { + "source": "https://github.com/symfony/property-info/tree/v5.2.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-07T14:04:56+00:00" + }, + { + "name": "symfony/string", + "version": "v5.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db", + "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-10T14:56:10+00:00" + }, { "name": "symfony/translation", - "version": "v5.2.7", + "version": "v5.2.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e37ece5242564bceea54d709eafc948377ec9749" + "reference": "445caa74a5986f1cc9dd91a2975ef68fa7cb2068" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e37ece5242564bceea54d709eafc948377ec9749", - "reference": "e37ece5242564bceea54d709eafc948377ec9749", + "url": "https://api.github.com/repos/symfony/translation/zipball/445caa74a5986f1cc9dd91a2975ef68fa7cb2068", + "reference": "445caa74a5986f1cc9dd91a2975ef68fa7cb2068", "shasum": "" }, "require": { @@ -2927,7 +3795,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.7" + "source": "https://github.com/symfony/translation/tree/v5.2.8" }, "funding": [ { @@ -2943,7 +3811,7 @@ "type": "tidelift" } ], - "time": "2021-04-01T08:15:21+00:00" + "time": "2021-05-07T13:41:16+00:00" }, { "name": "symfony/translation-contracts", diff --git a/www/templates/lang.json b/www/templates/lang.json index 197415d02..98fcac321 100644 --- a/www/templates/lang.json +++ b/www/templates/lang.json @@ -424,5 +424,7 @@ "shopneworder": "Создан заказ %s", "shopyoursorder": "Ваш заказ %s", "notalldata": "Не введены все данные", - "nocommonoptions": "Не заданы параметры в общих настройках" + "nocommonoptions": "Не заданы параметры в общих настройках", + "delcusts": "Удалено %s, деактивировано %s " , + "delitems": "Удалено %s, деактивировано %s " } \ No newline at end of file diff --git a/www/templates/pages/base.html b/www/templates/pages/base.html index 6da995556..73306ee40 100644 --- a/www/templates/pages/base.html +++ b/www/templates/pages/base.html @@ -824,18 +824,19 @@ - {{/toasts}} + {{/leadmode}} + + diff --git a/www/templates/pages/reference/itemlist.html b/www/templates/pages/reference/itemlist.html index 8d9220c8f..08b2a7d6d 100644 --- a/www/templates/pages/reference/itemlist.html +++ b/www/templates/pages/reference/itemlist.html @@ -37,9 +37,13 @@

Справочник номенклатуры Добавить - + +
- {{#useimages}} + + {{#useimages}} {{/useimages}} @@ -61,12 +65,14 @@

Справочник номенклатуры {{/usesnumber}}

+ - + - {{#useimages}} + + {{#useimages}} + + + +
Наименование
@@ -97,17 +103,26 @@

Справочник номенклатуры data-html="true">

  + + -      - - +
+       +       + в категорию +
+ @@ -321,11 +336,20 @@

Редактирование

- Изображение должно быть квадратным иначе будет обрезано + Изображение должно быть примерно квадратным иначе будет обрезано {{/useimages}} +
+ +
+ + +
+
+ +
@@ -382,7 +406,7 @@