('36','САПОГИ','[BLOB]','35','111',36),('37','ТАБАК','[BLOB]','35','112',37),('38','АЛКОГОЛЬ','[BLOB]','35','113',38),('39','ВОДА','[BLOB]','35','114',39),('4','ТОРТ ДЮЖИНА ЗЛАТА ПРАГА 800Г','[BLOB]','1','11240',4),('5','ТОРТ ДЮЖИНА ЛЮБИМЫЙ(Весовой)','[BLOB]','1','9023800461001',5),('6','ТОРТ ДЮЖИНА МАННА НЕБЕСНАЯ 800Г','[BLOB]','1','11242',6),('7','ТОРТ ДЮЖИНА ЧЕРЕМУХОВЫЙ 800Г','[BLOB]','1','11228',7),('8','ТОРТ ПЕРФЕКТ ПОЗДРАВЛЯЮ 800Г','[BLOB]','1','10202',8),('9','Соки','[BLOB]',NULL,NULL,9);

--
-- Temporary view structure for view `prices`
--

/*!50001 DROP VIEW IF EXISTS `prices`*/;
/*!50001 CREATE VIEW `prices` AS SELECT 
 1 AS `barcode`,
 1 AS `documentid`,
 1 AS `effectivedate`,
 1 AS `doctype`,
 1 AS `price`,
 1 AS `aspectvaluesetcode`,
 1 AS `minprice`,
 1 AS `pricetype`,
 1 AS `effectivedateend`,
 1 AS `minretailprice`,
 1 AS `packingprice`*/;

--
-- Table structure for table `prices1`
--

CREATE TABLE `prices1` (
  `barcode` varchar(100) NOT NULL,
  `documentid` varchar(100) NOT NULL,
  `effectivedate` datetime NOT NULL,
  `doctype` int NOT NULL,
  `price` decimal(15,2) NOT NULL,
  `aspectvaluesetcode` int DEFAULT NULL,
  `minprice` decimal(15,2) NOT NULL,
  `pricetype` int DEFAULT NULL,
  `effectivedateend` datetime DEFAULT NULL,
  `minretailprice` decimal(13,2) DEFAULT NULL,
  `packingprice` decimal(13,2) DEFAULT NULL,
  UNIQUE KEY `pricesidxbarcodedoc` (`barcode`,`documentid`,`doctype`),
  KEY `pricesidxprice` (`price`),
  KEY `pricesidxeffectivedateend` (`effectivedateend`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `prices1`
--


--
-- Table structure for table `prices2`
--

CREATE TABLE `prices2` (
  `barcode` varchar(100) NOT NULL,
  `documentid` varchar(100) NOT NULL,
  `effectivedate` datetime NOT NULL,
  `doctype` int NOT NULL,
  `price` decimal(15,2) NOT NULL,
  `aspectvaluesetcode` int DEFAULT NULL,
  `minprice` decimal(15,2) NOT NULL,
  `pricetype` int DEFAULT NULL,
  `effectivedateend` datetime DEFAULT NULL,
  `minretailprice` decimal(13,2) DEFAULT NULL,
  `packingprice` decimal(13,2) DEFAULT NULL,
  UNIQUE KEY `pricesidxbarcodedoc` (`barcode`,`documentid`,`doctype`),
  KEY `pricesidxprice` (`price`),
  KEY `pricesidxeffectivedateend` (`effectivedateend`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `prices2`
--


--
-- Temporary view structure for view `provider`
--

/*!50001 DROP VIEW IF EXISTS `provider`*/;
/*!50001 CREATE VIEW `provider` AS SELECT 
 1 AS `providerid`,
 1 AS `providercode`,
 1 AS `terminalid`,
 1 AS `categoryid`,
 1 AS `name`,
 1 AS `inn`,
 1 AS `phone`,
 1 AS `address`,
 1 AS `accountmask`,
 1 AS `minsum`,
 1 AS `maxsum`,
 1 AS `bcodemask`,
 1 AS `bcodetransform`,
 1 AS `inputmask`,
 1 AS `inputtransform`,
 1 AS `accountdatamask`,
 1 AS `accountdatatransform`*/;

--
-- Table structure for table `provider1`
--

CREATE TABLE `provider1` (
  `providerid` int NOT NULL AUTO_INCREMENT,
  `providercode` varchar(100) NOT NULL,
  `terminalid` int NOT NULL,
  `categoryid` int NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `inn` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `accountmask` varchar(255) DEFAULT NULL,
  `minsum` decimal(13,2) DEFAULT NULL,
  `maxsum` decimal(13,2) DEFAULT NULL,
  `bcodemask` varchar(255) DEFAULT NULL,
  `bcodetransform` varchar(255) DEFAULT NULL,
  `inputmask` varchar(255) DEFAULT NULL,
  `inputtransform` varchar(255) DEFAULT NULL,
  `accountdatamask` varchar(255) DEFAULT NULL,
  `accountdatatransform` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`providerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `provider1`
--


--
-- Table structure for table `provider2`
--

CREATE TABLE `provider2` (
  `providerid` int NOT NULL AUTO_INCREMENT,
  `providercode` varchar(100) NOT NULL,
  `terminalid` int NOT NULL,
  `categoryid` int NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `inn` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `accountmask` varchar(255) DEFAULT NULL,
  `minsum` decimal(13,2) DEFAULT NULL,
  `maxsum` decimal(13,2) DEFAULT NULL,
  `bcodemask` varchar(255) DEFAULT NULL,
  `bcodetransform` varchar(255) DEFAULT NULL,
  `inputmask` varchar(255) DEFAULT NULL,
  `inputtransform` varchar(255) DEFAULT NULL,
  `accountdatamask` varchar(255) DEFAULT NULL,
  `accountdatatransform` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`providerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `provider2`
--


--
-- Temporary view structure for view `region`
--

/*!50001 DROP VIEW IF EXISTS `region`*/;
/*!50001 CREATE VIEW `region` AS SELECT 
 1 AS `regionid`,
 1 AS `regioncode`,
 1 AS `agentcode`,
 1 AS `name`*/;

--
-- Table structure for table `region1`
--

CREATE TABLE `region1` (
  `regionid` int NOT NULL AUTO_INCREMENT,
  `regioncode` varchar(100) NOT NULL,
  `agentcode` varchar(100) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`regionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `region1`
--


--
-- Table structure for table `region2`
--

CREATE TABLE `region2` (
  `regionid` int NOT NULL AUTO_INCREMENT,
  `regioncode` varchar(100) NOT NULL,
  `agentcode` varchar(100) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`regionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `region2`
--


--
-- Temporary view structure for view `remain`
--

/*!50001 DROP VIEW IF EXISTS `remain`*/;
/*!50001 CREATE VIEW `remain` AS SELECT 
 1 AS `remaincode`,
 1 AS `quant`,
 1 AS `timevalid`,
 1 AS `aspectvaluesetcode`,
 1 AS `goodscode`*/;

--
-- Table structure for table `remain1`
--

CREATE TABLE `remain1` (
  `remaincode` int NOT NULL AUTO_INCREMENT,
  `quant` decimal(19,2) DEFAULT NULL,
  `timevalid` datetime DEFAULT NULL,
  `aspectvaluesetcode` int DEFAULT NULL,
  `goodscode` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`remaincode`),
  KEY `remaintimevalid` (`timevalid`),
  KEY `remaingoodsasp` (`goodscode`,`aspectvaluesetcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `remain1`
--


--
-- Table structure for table `remain2`
--

CREATE TABLE `remain2` (
  `remaincode` int NOT NULL AUTO_INCREMENT,
  `quant` decimal(19,2) DEFAULT NULL,
  `timevalid` datetime DEFAULT NULL,
  `aspectvaluesetcode` int DEFAULT NULL,
  `goodscode` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`remaincode`),
  KEY `remaintimevalid` (`timevalid`),
  KEY `remaingoodsasp` (`goodscode`,`aspectvaluesetcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `remain2`
--


--
-- Temporary view structure for view `remainbarcode`
--

/*!50001 DROP VIEW IF EXISTS `remainbarcode`*/;
/*!50001 CREATE VIEW `remainbarcode` AS SELECT 
 1 AS `barcode`,
 1 AS `quant`,
 1 AS `datetime`*/;

--
-- Table structure for table `remainbarcode1`
--

CREATE TABLE `remainbarcode1` (
  `barcode` varchar(255) NOT NULL,
  `quant` decimal(13,3) NOT NULL,
  `datetime` datetime DEFAULT NULL,
  PRIMARY KEY (`barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `remainbarcode1`
--


--
-- Table structure for table `remainbarcode2`
--

CREATE TABLE `remainbarcode2` (
  `barcode` varchar(255) NOT NULL,
  `quant` decimal(13,3) NOT NULL,
  `datetime` datetime DEFAULT NULL,
  PRIMARY KEY (`barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `remainbarcode2`
--


--
-- Temporary view structure for view `remaindraftbeer`
--

/*!50001 DROP VIEW IF EXISTS `remaindraftbeer`*/;
/*!50001 CREATE VIEW `remaindraftbeer` AS SELECT 
 1 AS `markingcode`,
 1 AS `barcode`,
 1 AS `name`,
 1 AS `connectdate`,
 1 AS `expirationdate`,
 1 AS `volume`*/;

--
-- Table structure for table `remaindraftbeer1`
--

CREATE TABLE `remaindraftbeer1` (
  `markingcode` varchar(255) NOT NULL,
  `barcode` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `connectdate` datetime NOT NULL,
  `expirationdate` datetime DEFAULT NULL,
  `volume` decimal(13,3) NOT NULL,
  PRIMARY KEY (`markingcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `remaindraftbeer1`
--


--
-- Table structure for table `remaindraftbeer2`
--

CREATE TABLE `remaindraftbeer2` (
  `markingcode` varchar(255) NOT NULL,
  `barcode` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `connectdate` datetime NOT NULL,
  `expirationdate` datetime DEFAULT NULL,
  `volume` decimal(13,3) NOT NULL,
  PRIMARY KEY (`markingcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `remaindraftbeer2`
--


--
-- Temporary view structure for view `role`
--

/*!50001 DROP VIEW IF EXISTS `role`*/;
/*!50001 CREATE VIEW `role` AS SELECT 
 1 AS `rolecode`,
 1 AS `rolename`,
 1 AS `cashmanagement`*/;

--
-- Table structure for table `role1`
--

CREATE TABLE `role1` (
  `rolecode` int NOT NULL AUTO_INCREMENT,
  `rolename` varchar(100) DEFAULT NULL,
  `cashmanagement` int DEFAULT NULL,
  PRIMARY KEY (`rolecode`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `role1`
--

INSERT INTO `role1` VALUES (1,'Оператор-кассир',NULL),(2,'Администратор торгового зала',NULL),(3,'Кассир',NULL),(4,'Полный доступ',NULL);

--
-- Table structure for table `role2`
--

CREATE TABLE `role2` (
  `rolecode` int NOT NULL AUTO_INCREMENT,
  `rolename` varchar(100) DEFAULT NULL,
  `cashmanagement` int DEFAULT NULL,
  PRIMARY KEY (`rolecode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `role2`
--


--
-- Temporary view structure for view `rolecmaction`
--

/*!50001 DROP VIEW IF EXISTS `rolecmaction`*/;
/*!50001 CREATE VIEW `rolecmaction` AS SELECT 
 1 AS `id`,
 1 AS `rolecode`,
 1 AS `cmactioncode`,
 1 AS `rule`,
 1 AS `documenttype`*/;

--
-- Table structure for table `rolecmaction1`
--

CREATE TABLE `rolecmaction1` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rolecode` int NOT NULL,
  `cmactioncode` int NOT NULL,
  `rule` int NOT NULL,
  `documenttype` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rolecmaction1`
--


--
-- Table structure for table `rolecmaction2`
--

CREATE TABLE `rolecmaction2` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rolecode` int NOT NULL,
  `cmactioncode` int NOT NULL,
  `rule` int NOT NULL,
  `documenttype` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rolecmaction2`
--


--
-- Temporary view structure for view `rolecommand`
--

/*!50001 DROP VIEW IF EXISTS `rolecommand`*/;
/*!50001 CREATE VIEW `rolecommand` AS SELECT 
 1 AS `id`,
 1 AS `rolecode`,
 1 AS `commandcode`,
 1 AS `rule`,
 1 AS `documenttype`*/;

--
-- Table structure for table `rolecommand1`
--

CREATE TABLE `rolecommand1` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rolecode` int NOT NULL,
  `commandcode` int NOT NULL,
  `rule` int NOT NULL,
  `documenttype` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=535 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rolecommand1`
--

INSERT INTO `rolecommand1` VALUES (2,4,2,1,255),(3,4,3,1,255),(4,4,4,1,255),(5,4,5,1,255),(6,4,6,1,255),(7,4,7,1,255),(8,4,8,1,255),(9,4,9,1,255),(10,4,10,1,255),(11,4,11,1,255),(12,4,12,1,255),(13,4,13,1,255),(15,4,15,1,255),(16,4,16,1,255),(18,4,18,1,255),(19,4,19,1,255),(20,4,20,1,255),(21,4,21,1,255),(22,4,22,1,255),(23,4,23,1,255),(24,4,24,1,255),(25,4,27,1,255),(26,4,28,1,255),(27,4,29,1,255),(28,4,30,1,255),(29,4,42,1,255),(33,4,46,1,255),(35,4,48,1,255),(36,4,49,1,255),(37,4,50,1,255),(39,4,52,1,255),(40,4,53,1,255),(41,4,54,1,255),(42,4,55,1,255),(43,4,56,1,255),(45,4,58,1,255),(46,4,59,1,255),(48,4,61,1,255),(50,4,63,1,255),(52,4,65,1,255),(57,4,70,1,255),(59,4,72,1,255),(61,4,74,1,255),(64,4,77,1,255),(69,4,82,1,255),(70,4,83,1,255),(71,4,84,1,255),(73,4,86,1,255),(74,4,87,1,255),(75,4,88,1,255),(77,4,90,1,255),(79,4,1,1,255),(80,2,12,1,255),(81,2,13,1,255),(83,3,1,1,255),(84,3,2,1,255),(85,3,3,1,255),(86,3,4,1,255),(87,3,5,1,255),(89,3,7,1,255),(91,3,9,1,255),(92,3,10,1,255),(93,3,11,1,255),(97,3,15,1,255),(98,3,16,1,255),(100,3,18,1,255),(101,3,19,1,255),(102,3,20,1,255),(103,3,21,1,255),(104,3,22,1,255),(105,3,23,1,255),(106,3,24,1,255),(107,3,27,1,255),(108,3,28,1,255),(109,3,29,1,255),(110,3,30,1,255),(111,3,42,1,255),(115,3,46,1,255),(117,3,48,1,255),(118,3,49,1,255),(127,3,58,1,255),(128,3,59,1,255),(132,3,63,1,255),(134,3,65,1,255),(139,3,70,1,255),(141,3,72,1,255),(143,3,74,1,255),(151,3,82,1,255),(152,3,83,1,255),(153,3,84,1,255),(156,3,87,1,255),(157,3,88,1,255),(159,3,90,1,255),(161,4,92,1,255),(162,4,93,1,255),(163,3,92,1,255),(184,1,8,1,2),(185,1,50,1,255),(186,1,55,1,255),(187,1,54,1,255),(188,1,53,1,255),(189,1,52,1,255),(190,1,56,1,255),(192,1,61,1,255),(194,1,77,1,255),(195,1,6,1,255),(196,1,86,1,255),(198,2,2,1,255),(199,1,93,1,255),(360,4,94,1,255),(361,1,94,1,255),(362,4,95,1,255),(363,4,96,1,255),(364,4,97,1,255),(365,4,100,1,255),(366,4,98,1,255),(367,4,99,1,255),(368,3,6,1,255),(369,3,8,1,255),(370,3,12,1,255),(371,3,13,1,255),(373,3,50,1,255),(374,3,52,1,255),(375,3,53,1,255),(376,3,54,1,255),(377,3,55,1,255),(378,3,56,1,255),(380,3,61,1,255),(382,3,100,1,255),(383,3,77,1,255),(385,3,86,1,255),(387,3,93,1,255),(388,3,94,1,255),(389,3,95,1,255),(390,3,96,1,255),(391,3,97,1,255),(392,3,98,1,255),(393,3,99,1,255),(394,3,101,1,255),(395,3,102,1,255),(396,3,103,1,255),(397,4,101,1,255),(398,4,102,1,255),(399,4,103,1,255),(400,4,105,1,255),(401,4,106,1,255),(402,4,104,1,255),(403,3,105,1,255),(404,3,106,1,255),(405,3,104,1,255),(406,4,107,1,255),(407,4,108,1,255),(408,3,107,1,255),(409,3,108,1,255),(410,3,109,1,255),(411,4,109,1,255),(412,4,136,1,255),(413,3,136,1,255),(414,4,138,1,255),(415,4,138,1,255),(416,3,138,1,255),(417,4,139,1,255),(418,3,139,1,255),(421,3,140,1,255),(422,4,140,1,255),(425,4,141,1,255),(426,4,142,1,255),(428,4,143,1,255),(429,4,144,1,255),(431,3,145,1,255),(432,4,145,1,255),(433,4,146,1,255),(434,4,147,1,255),(435,4,148,1,255),(436,4,149,1,255),(437,4,150,1,255),(438,4,153,1,255),(439,4,154,1,255),(440,4,155,1,255),(441,4,156,1,255),(444,4,157,1,255),(445,4,158,1,255),(446,4,159,1,255),(448,4,160,1,255),(449,4,161,1,255),(450,4,162,1,255),(451,3,162,1,255),(452,4,163,1,255),(453,3,163,1,255),(454,4,164,1,255),(455,3,164,1,255),(456,4,165,1,255),(457,3,165,1,255),(458,3,166,1,255),(459,4,166,1,255),(460,3,168,1,255),(461,4,168,1,255),(462,3,169,1,255),(463,4,169,1,255),(467,4,170,1,255),(468,4,171,1,255),(469,4,137,1,255),(470,4,152,1,255),(477,4,176,1,255),(478,3,176,1,255),(480,4,178,1,255),(481,4,179,1,255),(482,4,180,1,255),(483,4,181,1,255),(484,3,181,1,255),(485,3,151,1,255),(486,4,151,1,255),(487,4,182,1,255),(488,3,182,1,255),(489,4,183,1,255),(490,3,183,1,255),(491,4,184,1,255),(492,4,185,1,255),(493,4,186,1,255),(494,3,184,1,255),(495,3,185,1,255),(496,3,186,1,255),(497,4,187,1,255),(498,4,188,1,255),(499,4,189,1,255),(500,4,190,1,255),(501,4,193,1,255),(502,4,194,1,255),(503,4,195,1,255),(504,3,170,1,255),(505,4,191,1,255),(506,3,190,1,255),(507,3,171,1,255),(508,3,193,1,255),(509,3,160,1,255),(510,3,156,1,255),(511,3,189,1,255),(512,4,196,1,255),(513,4,197,1,255),(514,3,198,1,255),(515,3,199,1,255),(516,4,198,1,255),(517,4,199,1,255),(518,3,200,1,255),(519,4,200,1,255),(520,3,201,1,255),(521,4,201,1,255),(522,3,202,1,255),(523,4,202,1,255),(524,3,204,1,255),(525,4,204,1,255),(526,3,205,1,255),(527,4,205,1,255),(528,3,206,1,255),(529,4,206,1,255),(530,4,207,1,255),(531,4,208,1,255),(532,4,209,1,255),(533,4,210,1,255),(534,4,211,1,255);

--
-- Table structure for table `rolecommand2`
--

CREATE TABLE `rolecommand2` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rolecode` int NOT NULL,
  `commandcode` int NOT NULL,
  `rule` int NOT NULL,
  `documenttype` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rolecommand2`
--


--
-- Temporary view structure for view `rolerelation`
--

/*!50001 DROP VIEW IF EXISTS `rolerelation`*/;
/*!50001 CREATE VIEW `rolerelation` AS SELECT 
 1 AS `id`,
 1 AS `primaryrole`,
 1 AS `secondaryrole`,
 1 AS `rule`*/;

--
-- Table structure for table `rolerelation1`
--

CREATE TABLE `rolerelation1` (
  `id` int NOT NULL AUTO_INCREMENT,
  `primaryrole` int NOT NULL,
  `secondaryrole` int NOT NULL,
  `rule` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rolerelation1`
--

INSERT INTO `rolerelation1` VALUES (2,1,3,1);

--
-- Table structure for table `rolerelation2`
--

CREATE TABLE `rolerelation2` (
  `id` int NOT NULL AUTO_INCREMENT,
  `primaryrole` int NOT NULL,
  `secondaryrole` int NOT NULL,
  `rule` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rolerelation2`
--


--
-- Temporary view structure for view `roleuser`
--

/*!50001 DROP VIEW IF EXISTS `roleuser`*/;
/*!50001 CREATE VIEW `roleuser` AS SELECT 
 1 AS `id`,
 1 AS `usercode`,
 1 AS `rolecode`,
 1 AS `rule`*/;

--
-- Table structure for table `roleuser1`
--

CREATE TABLE `roleuser1` (
  `id` int NOT NULL AUTO_INCREMENT,
  `usercode` varchar(30) NOT NULL,
  `rolecode` int NOT NULL,
  `rule` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `roleuser1`
--

INSERT INTO `roleuser1` VALUES (3,'3',3,1),(61,'4',4,1),(62,'1',1,1),(63,'2',2,1);

--
-- Table structure for table `roleuser2`
--

CREATE TABLE `roleuser2` (
  `id` int NOT NULL AUTO_INCREMENT,
  `usercode` varchar(30) NOT NULL,
  `rolecode` int NOT NULL,
  `rule` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `roleuser2`
--


--
-- Temporary view structure for view `rostat`
--

/*!50001 DROP VIEW IF EXISTS `rostat`*/;
/*!50001 CREATE VIEW `rostat` AS SELECT 
 1 AS `cashcode`,
 1 AS `dcode`,
 1 AS `bcode`,
 1 AS `code`,
 1 AS `quant`,
 1 AS `dt`,
 1 AS `policy`,
 1 AS `mode1`*/;

--
-- Table structure for table `rostat1`
--

CREATE TABLE `rostat1` (
  `cashcode` varchar(30) DEFAULT NULL,
  `dcode` int DEFAULT NULL,
  `bcode` varchar(20) DEFAULT NULL,
  `code` decimal(20,0) DEFAULT NULL,
  `quant` decimal(13,3) DEFAULT NULL,
  `dt` timestamp NULL DEFAULT NULL,
  `policy` int DEFAULT NULL,
  `mode1` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rostat1`
--


--
-- Table structure for table `rostat2`
--

CREATE TABLE `rostat2` (
  `cashcode` varchar(30) DEFAULT NULL,
  `dcode` int DEFAULT NULL,
  `bcode` varchar(20) DEFAULT NULL,
  `code` decimal(20,0) DEFAULT NULL,
  `quant` decimal(13,3) DEFAULT NULL,
  `dt` timestamp NULL DEFAULT NULL,
  `policy` int DEFAULT NULL,
  `mode1` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `rostat2`
--


--
-- Temporary view structure for view `sdabs`
--

/*!50001 DROP VIEW IF EXISTS `sdabs`*/;
/*!50001 CREATE VIEW `sdabs` AS SELECT 
 1 AS `disc_val`,
 1 AS `disc_name`*/;

--
-- Table structure for table `sdabs1`
--

CREATE TABLE `sdabs1` (
  `disc_val` decimal(13,2) DEFAULT NULL,
  `disc_name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sdabs1`
--


--
-- Table structure for table `sdabs2`
--

CREATE TABLE `sdabs2` (
  `disc_val` decimal(13,2) DEFAULT NULL,
  `disc_name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sdabs2`
--


--
-- Temporary view structure for view `sdperc`
--

/*!50001 DROP VIEW IF EXISTS `sdperc`*/;
/*!50001 CREATE VIEW `sdperc` AS SELECT 
 1 AS `disc_val`,
 1 AS `disc_name`*/;

--
-- Table structure for table `sdperc1`
--

CREATE TABLE `sdperc1` (
  `disc_val` decimal(5,2) DEFAULT NULL,
  `disc_name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sdperc1`
--


--
-- Table structure for table `sdperc2`
--

CREATE TABLE `sdperc2` (
  `disc_val` decimal(5,2) DEFAULT NULL,
  `disc_name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sdperc2`
--


--
-- Temporary view structure for view `securityweight`
--

/*!50001 DROP VIEW IF EXISTS `securityweight`*/;
/*!50001 CREATE VIEW `securityweight` AS SELECT 
 1 AS `barcode`,
 1 AS `weightfrom1`,
 1 AS `weightto1`,
 1 AS `weightfrom2`,
 1 AS `weightto2`,
 1 AS `weightfrom3`,
 1 AS `weightto3`*/;

--
-- Table structure for table `securityweight1`
--

CREATE TABLE `securityweight1` (
  `barcode` varchar(100) NOT NULL,
  `weightfrom1` decimal(13,3) NOT NULL,
  `weightto1` decimal(13,3) NOT NULL,
  `weightfrom2` decimal(13,3) DEFAULT NULL,
  `weightto2` decimal(13,3) DEFAULT NULL,
  `weightfrom3` decimal(13,3) DEFAULT NULL,
  `weightto3` decimal(13,3) DEFAULT NULL,
  PRIMARY KEY (`barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `securityweight1`
--


--
-- Table structure for table `securityweight2`
--

CREATE TABLE `securityweight2` (
  `barcode` varchar(100) NOT NULL,
  `weightfrom1` decimal(13,3) NOT NULL,
  `weightto1` decimal(13,3) NOT NULL,
  `weightfrom2` decimal(13,3) DEFAULT NULL,
  `weightto2` decimal(13,3) DEFAULT NULL,
  `weightfrom3` decimal(13,3) DEFAULT NULL,
  `weightto3` decimal(13,3) DEFAULT NULL,
  PRIMARY KEY (`barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `securityweight2`
--


--
-- Temporary view structure for view `settings`
--

/*!50001 DROP VIEW IF EXISTS `settings`*/;
/*!50001 CREATE VIEW `settings` AS SELECT 
 1 AS `name`,
 1 AS `val`*/;

--
-- Table structure for table `settings1`
--

CREATE TABLE `settings1` (
  `name` varchar(128) NOT NULL,
  `val` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `settings1`
--


--
-- Table structure for table `settings2`
--

CREATE TABLE `settings2` (
  `name` varchar(128) NOT NULL,
  `val` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `settings2`
--


--
-- Temporary view structure for view `shop`
--

/*!50001 DROP VIEW IF EXISTS `shop`*/;
/*!50001 CREATE VIEW `shop` AS SELECT 
 1 AS `code`,
 1 AS `title`,
 1 AS `extendedoptions`,
 1 AS `address`,
 1 AS `innexcise`,
 1 AS `kppexcise`,
 1 AS `fsraridexcise`,
 1 AS `innnonexcise`,
 1 AS `kppnonexcise`,
 1 AS `fsraridnonexcise`,
 1 AS `vendorname`,
 1 AS `vendorlegaladdress`,
 1 AS `vendorinn`,
 1 AS `vendorkpp`,
 1 AS `shippername`,
 1 AS `shipperaddress`*/;

--
-- Table structure for table `shop1`
--

CREATE TABLE `shop1` (
  `code` varchar(255) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `extendedoptions` text,
  `address` varchar(255) DEFAULT NULL,
  `innexcise` varchar(20) DEFAULT NULL,
  `kppexcise` varchar(20) DEFAULT NULL,
  `fsraridexcise` varchar(20) DEFAULT NULL,
  `innnonexcise` varchar(20) DEFAULT NULL,
  `kppnonexcise` varchar(20) DEFAULT NULL,
  `fsraridnonexcise` varchar(20) DEFAULT NULL,
  `vendorname` varchar(255) DEFAULT NULL,
  `vendorlegaladdress` varchar(255) DEFAULT NULL,
  `vendorinn` varchar(20) DEFAULT NULL,
  `vendorkpp` varchar(20) DEFAULT NULL,
  `shippername` varchar(255) DEFAULT NULL,
  `shipperaddress` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shop1`
--


--
-- Table structure for table `shop2`
--

CREATE TABLE `shop2` (
  `code` varchar(255) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `extendedoptions` text,
  `address` varchar(255) DEFAULT NULL,
  `innexcise` varchar(20) DEFAULT NULL,
  `kppexcise` varchar(20) DEFAULT NULL,
  `fsraridexcise` varchar(20) DEFAULT NULL,
  `innnonexcise` varchar(20) DEFAULT NULL,
  `kppnonexcise` varchar(20) DEFAULT NULL,
  `fsraridnonexcise` varchar(20) DEFAULT NULL,
  `vendorname` varchar(255) DEFAULT NULL,
  `vendorlegaladdress` varchar(255) DEFAULT NULL,
  `vendorinn` varchar(20) DEFAULT NULL,
  `vendorkpp` varchar(20) DEFAULT NULL,
  `shippername` varchar(255) DEFAULT NULL,
  `shipperaddress` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shop2`
--


--
-- Temporary view structure for view `shopgrouplabels`
--

/*!50001 DROP VIEW IF EXISTS `shopgrouplabels`*/;
/*!50001 CREATE VIEW `shopgrouplabels` AS SELECT 
 1 AS `code`,
 1 AS `name`*/;

--
-- Table structure for table `shopgrouplabels1`
--

CREATE TABLE `shopgrouplabels1` (
  `code` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shopgrouplabels1`
--


--
-- Table structure for table `shopgrouplabels2`
--

CREATE TABLE `shopgrouplabels2` (
  `code` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shopgrouplabels2`
--


--
-- Temporary view structure for view `shoplabels`
--

/*!50001 DROP VIEW IF EXISTS `shoplabels`*/;
/*!50001 CREATE VIEW `shoplabels` AS SELECT 
 1 AS `code`,
 1 AS `name`,
 1 AS `shopgrouplabelcode`*/;

--
-- Table structure for table `shoplabels1`
--

CREATE TABLE `shoplabels1` (
  `code` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `shopgrouplabelcode` varchar(100) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shoplabels1`
--


--
-- Table structure for table `shoplabels2`
--

CREATE TABLE `shoplabels2` (
  `code` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `shopgrouplabelcode` varchar(100) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shoplabels2`
--


--
-- Temporary view structure for view `shoptoshoplabels`
--

/*!50001 DROP VIEW IF EXISTS `shoptoshoplabels`*/;
/*!50001 CREATE VIEW `shoptoshoplabels` AS SELECT 
 1 AS `shopcode`,
 1 AS `shoplabelcode`*/;

--
-- Table structure for table `shoptoshoplabels1`
--

CREATE TABLE `shoptoshoplabels1` (
  `shopcode` varchar(255) NOT NULL,
  `shoplabelcode` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shoptoshoplabels1`
--


--
-- Table structure for table `shoptoshoplabels2`
--

CREATE TABLE `shoptoshoplabels2` (
  `shopcode` varchar(255) NOT NULL,
  `shoplabelcode` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shoptoshoplabels2`
--


--
-- Temporary view structure for view `spindex`
--

/*!50001 DROP VIEW IF EXISTS `spindex`*/;
/*!50001 CREATE VIEW `spindex` AS SELECT 
 1 AS `ind_val`,
 1 AS `ind_name`*/;

--
-- Table structure for table `spindex1`
--

CREATE TABLE `spindex1` (
  `ind_val` decimal(5,2) DEFAULT NULL,
  `ind_name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `spindex1`
--


--
-- Table structure for table `spindex2`
--

CREATE TABLE `spindex2` (
  `ind_val` decimal(5,2) DEFAULT NULL,
  `ind_name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `spindex2`
--


--
-- Temporary view structure for view `sprices`
--

/*!50001 DROP VIEW IF EXISTS `sprices`*/;
/*!50001 CREATE VIEW `sprices` AS SELECT 
 1 AS `code`,
 1 AS `name`,
 1 AS `type`,
 1 AS `inp_mode`,
 1 AS `force_mode`,
 1 AS `ext_mode`,
 1 AS `cmp_mode`,
 1 AS `price`,
 1 AS `sindex`,
 1 AS `disc_perc`,
 1 AS `disc_abs`,
 1 AS `ext_proc`,
 1 AS `oncheck`*/;

--
-- Table structure for table `sprices1`
--

CREATE TABLE `sprices1` (
  `code` int NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  `type` int DEFAULT NULL,
  `inp_mode` int DEFAULT NULL,
  `force_mode` int DEFAULT NULL,
  `ext_mode` int DEFAULT NULL,
  `cmp_mode` int DEFAULT NULL,
  `price` decimal(13,2) DEFAULT NULL,
  `sindex` int DEFAULT NULL,
  `disc_perc` decimal(5,2) DEFAULT NULL,
  `disc_abs` decimal(13,2) DEFAULT NULL,
  `ext_proc` varchar(80) DEFAULT NULL,
  `oncheck` int DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sprices1`
--


--
-- Table structure for table `sprices2`
--

CREATE TABLE `sprices2` (
  `code` int NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  `type` int DEFAULT NULL,
  `inp_mode` int DEFAULT NULL,
  `force_mode` int DEFAULT NULL,
  `ext_mode` int DEFAULT NULL,
  `cmp_mode` int DEFAULT NULL,
  `price` decimal(13,2) DEFAULT NULL,
  `sindex` int DEFAULT NULL,
  `disc_perc` decimal(5,2) DEFAULT NULL,
  `disc_abs` decimal(13,2) DEFAULT NULL,
  `ext_proc` varchar(80) DEFAULT NULL,
  `oncheck` int DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sprices2`
--


--
-- Temporary view structure for view `supplier`
--

/*!50001 DROP VIEW IF EXISTS `supplier`*/;
/*!50001 CREATE VIEW `supplier` AS SELECT 
 1 AS `code`,
 1 AS `name`,
 1 AS `phone`,
 1 AS `inn`*/;

--
-- Table structure for table `supplier1`
--

CREATE TABLE `supplier1` (
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(100) NOT NULL,
  `inn` varchar(20) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `supplier1`
--


--
-- Table structure for table `supplier2`
--

CREATE TABLE `supplier2` (
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(100) NOT NULL,
  `inn` varchar(20) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `supplier2`
--


--
-- Temporary view structure for view `terminal`
--

/*!50001 DROP VIEW IF EXISTS `terminal`*/;
/*!50001 CREATE VIEW `terminal` AS SELECT 
 1 AS `terminalid`,
 1 AS `agentcode`,
 1 AS `terminalcode`,
 1 AS `address`*/;

--
-- Table structure for table `terminal1`
--

CREATE TABLE `terminal1` (
  `terminalid` int NOT NULL AUTO_INCREMENT,
  `agentcode` varchar(100) NOT NULL,
  `terminalcode` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`terminalid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `terminal1`
--


--
-- Table structure for table `terminal2`
--

CREATE TABLE `terminal2` (
  `terminalid` int NOT NULL AUTO_INCREMENT,
  `agentcode` varchar(100) NOT NULL,
  `terminalcode` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`terminalid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `terminal2`
--


--
-- Temporary view structure for view `tgrlink`
--

/*!50001 DROP VIEW IF EXISTS `tgrlink`*/;
/*!50001 CREATE VIEW `tgrlink` AS SELECT 
 1 AS `bcode`,
 1 AS `class`,
 1 AS `sclass`*/;

--
-- Table structure for table `tgrlink1`
--

CREATE TABLE `tgrlink1` (
  `bcode` varchar(20) DEFAULT NULL,
  `class` int DEFAULT NULL,
  `sclass` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tgrlink1`
--


--
-- Table structure for table `tgrlink2`
--

CREATE TABLE `tgrlink2` (
  `bcode` varchar(20) DEFAULT NULL,
  `class` int DEFAULT NULL,
  `sclass` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tgrlink2`
--


--
-- Temporary view structure for view `timeperiod`
--

/*!50001 DROP VIEW IF EXISTS `timeperiod`*/;
/*!50001 CREATE VIEW `timeperiod` AS SELECT 
 1 AS `campaignid`,
 1 AS `date_end`,
 1 AS `date_start`,
 1 AS `day_end`,
 1 AS `day_start`,
 1 AS `timeperiodid`,
 1 AS `time_end`,
 1 AS `time_start`*/;

--
-- Table structure for table `timeperiod1`
--

CREATE TABLE `timeperiod1` (
  `campaignid` int DEFAULT NULL,
  `date_end` date DEFAULT NULL,
  `date_start` date DEFAULT NULL,
  `day_end` int DEFAULT NULL,
  `day_start` int DEFAULT NULL,
  `timeperiodid` int NOT NULL AUTO_INCREMENT,
  `time_end` time DEFAULT NULL,
  `time_start` time DEFAULT NULL,
  PRIMARY KEY (`timeperiodid`),
  KEY `timeperiodcampaignid` (`campaignid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `timeperiod1`
--


--
-- Table structure for table `timeperiod2`
--

CREATE TABLE `timeperiod2` (
  `campaignid` int DEFAULT NULL,
  `date_end` date DEFAULT NULL,
  `date_start` date DEFAULT NULL,
  `day_end` int DEFAULT NULL,
  `day_start` int DEFAULT NULL,
  `timeperiodid` int NOT NULL AUTO_INCREMENT,
  `time_end` time DEFAULT NULL,
  `time_start` time DEFAULT NULL,
  PRIMARY KEY (`timeperiodid`),
  KEY `timeperiodcampaignid` (`campaignid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `timeperiod2`
--


--
-- Temporary view structure for view `timerestrict`
--

/*!50001 DROP VIEW IF EXISTS `timerestrict`*/;
/*!50001 CREATE VIEW `timerestrict` AS SELECT 
 1 AS `timerestrictid`,
 1 AS `alcoholpercent`,
 1 AS `datebeg`,
 1 AS `dateend`,
 1 AS `daysbeg`,
 1 AS `daysend`,
 1 AS `timebeg`,
 1 AS `timeend`*/;

--
-- Table structure for table `timerestrict1`
--

CREATE TABLE `timerestrict1` (
  `timerestrictid` int NOT NULL AUTO_INCREMENT,
  `alcoholpercent` decimal(4,2) NOT NULL,
  `datebeg` date DEFAULT NULL,
  `dateend` date DEFAULT NULL,
  `daysbeg` int DEFAULT NULL,
  `daysend` int DEFAULT NULL,
  `timebeg` time DEFAULT NULL,
  `timeend` time DEFAULT NULL,
  PRIMARY KEY (`timerestrictid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `timerestrict1`
--


--
-- Table structure for table `timerestrict2`
--

CREATE TABLE `timerestrict2` (
  `timerestrictid` int NOT NULL AUTO_INCREMENT,
  `alcoholpercent` decimal(4,2) NOT NULL,
  `datebeg` date DEFAULT NULL,
  `dateend` date DEFAULT NULL,
  `daysbeg` int DEFAULT NULL,
  `daysend` int DEFAULT NULL,
  `timebeg` time DEFAULT NULL,
  `timeend` time DEFAULT NULL,
  PRIMARY KEY (`timerestrictid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `timerestrict2`
--


--
-- Temporary view structure for view `tmc`
--

/*!50001 DROP VIEW IF EXISTS `tmc`*/;
/*!50001 CREATE VIEW `tmc` AS SELECT 
 1 AS `bcode`,
 1 AS `vatcode1`,
 1 AS `vatcode2`,
 1 AS `vatcode3`,
 1 AS `vatcode4`,
 1 AS `vatcode5`,
 1 AS `dcode`,
 1 AS `name`,
 1 AS `articul`,
 1 AS `cquant`,
 1 AS `measure`,
 1 AS `pricetype`,
 1 AS `price`,
 1 AS `minprice`,
 1 AS `valcode`,
 1 AS `quantdefault`,
 1 AS `quantlimit`,
 1 AS `ostat`,
 1 AS `links`,
 1 AS `quant_mode`,
 1 AS `bcode_mode`,
 1 AS `op_mode`,
 1 AS `dept_mode`,
 1 AS `price_mode`,
 1 AS `tara_flag`,
 1 AS `tara_mode`,
 1 AS `tara_default`,
 1 AS `unit_weight`,
 1 AS `code`,
 1 AS `aspectschemecode`,
 1 AS `aspectvaluesetcode`,
 1 AS `aspectusecase`,
 1 AS `aspectselectionrule`,
 1 AS `extendetoptions`,
 1 AS `groupcode`,
 1 AS `remain`,
 1 AS `remaindate`,
 1 AS `documentquantlimit`,
 1 AS `age`,
 1 AS `alcoholpercent`,
 1 AS `inn`,
 1 AS `kpp`,
 1 AS `alctypecode`,
 1 AS `manufacturercountrycode`,
 1 AS `paymentobject`,
 1 AS `loyaltymode`,
 1 AS `minretailprice`,
 1 AS `ntin`,
 1 AS `packagecode`,
 1 AS `ownertype`*/;

--
-- Table structure for table `tmc1`
--

CREATE TABLE `tmc1` (
  `bcode` varchar(20) NOT NULL,
  `vatcode1` int DEFAULT NULL,
  `vatcode2` int DEFAULT NULL,
  `vatcode3` int DEFAULT NULL,
  `vatcode4` int DEFAULT NULL,
  `vatcode5` int DEFAULT NULL,
  `dcode` int DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL,
  `articul` varchar(200) DEFAULT NULL,
  `cquant` decimal(13,3) DEFAULT NULL,
  `measure` int DEFAULT NULL,
  `pricetype` int DEFAULT NULL,
  `price` decimal(13,2) DEFAULT NULL,
  `minprice` decimal(13,2) DEFAULT NULL,
  `valcode` int DEFAULT NULL,
  `quantdefault` decimal(13,3) DEFAULT NULL,
  `quantlimit` decimal(13,3) DEFAULT NULL,
  `ostat` int DEFAULT NULL,
  `links` int DEFAULT NULL,
  `quant_mode` int DEFAULT NULL,
  `bcode_mode` int DEFAULT NULL,
  `op_mode` int DEFAULT NULL,
  `dept_mode` int DEFAULT NULL,
  `price_mode` int DEFAULT NULL,
  `tara_flag` int DEFAULT NULL,
  `tara_mode` int DEFAULT NULL,
  `tara_default` varchar(20) DEFAULT NULL,
  `unit_weight` decimal(13,3) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `aspectschemecode` int DEFAULT NULL,
  `aspectvaluesetcode` int DEFAULT NULL,
  `aspectusecase` int DEFAULT NULL,
  `aspectselectionrule` int DEFAULT NULL,
  `extendetoptions` text,
  `groupcode` varchar(100) DEFAULT NULL,
  `remain` decimal(13,3) DEFAULT NULL,
  `remaindate` datetime DEFAULT NULL,
  `documentquantlimit` decimal(13,3) DEFAULT NULL,
  `age` int DEFAULT NULL,
  `alcoholpercent` decimal(4,2) DEFAULT NULL,
  `inn` varchar(20) DEFAULT NULL,
  `kpp` varchar(20) DEFAULT NULL,
  `alctypecode` int DEFAULT NULL,
  `manufacturercountrycode` int DEFAULT NULL,
  `paymentobject` int DEFAULT NULL,
  `loyaltymode` int DEFAULT NULL,
  `minretailprice` decimal(13,2) DEFAULT NULL,
  `ntin` varchar(255) DEFAULT NULL,
  `packagecode` varchar(255) DEFAULT NULL,
  `ownertype` int DEFAULT NULL,
  PRIMARY KEY (`bcode`),
  KEY `tmccode` (`code`),
  KEY `tmcname` (`name`),
  KEY `tmcgroupcode` (`groupcode`),
  KEY `tmcidxprice` (`price`),
  KEY `tmcidxaspectvaluesetcode` (`aspectvaluesetcode`),
  KEY `tmcidxaspectschemecode` (`aspectschemecode`),
  KEY `tmcidxarticul` (`articul`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmc1`
--

INSERT INTO `tmc1` VALUES ('1000001',NULL,1,2,3,4,NULL,'Подарочная карта 500','',1.000,1,NULL,500.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000001',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000002',NULL,1,2,3,4,NULL,'Подарочная карта 1000','',1.000,1,NULL,1000.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000002',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000003',NULL,1,2,3,4,NULL,'Подарочная карта 2000','',1.000,1,NULL,2000.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000003',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000004',NULL,1,2,3,4,NULL,'Подарочная карта 5000','',1.000,1,NULL,5000.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000004',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000005',NULL,1,2,3,4,NULL,'Пакет подарочный \"Для тебя\" , 31*26*12СМ','',1.000,1,NULL,169.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000005',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000006',NULL,1,2,3,4,NULL,'Пакет подарочный \"Цветы и бабочки\" , 31*26*12СМ','',1.000,1,NULL,169.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000006',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000007',NULL,1,2,3,4,NULL,'Пакет подарочный \"Hello Spring\" ,  31*26*12СМ','',1.000,1,NULL,169.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000007',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000008',NULL,1,2,3,4,NULL,'Пакет подарочный \"Для тебя\" ,  31*26*12СМ','',1.000,1,NULL,169.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000008',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000009',NULL,1,2,3,4,NULL,'Футболка поло колор блок с коротким рукавом','',1.000,1,8,1900.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000009',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000010',NULL,1,2,3,4,NULL,'Футболка оверсайз силуэт из хлопка с принтом','',1.000,1,NULL,1399.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000010',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000011',NULL,1,2,3,4,NULL,'Футболка поло с коротким рукавом и принтом','',1.000,1,8,1799.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000011',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000012',NULL,1,2,3,4,NULL,'Футболка из хлопка с коротким рукавом и надписью','',1.000,1,8,1199.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000012',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000013',NULL,1,2,3,4,NULL,'Футболка из хлопка с вырезом сердечко со стразами','',1.000,1,8,1399.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000013',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000014',NULL,1,2,3,4,NULL,'Лонгслив из полупрозрачной сетки с фактурным узором с драконами','',1.000,1,8,1199.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000014',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000015',NULL,1,2,3,4,NULL,'Трикотажный джемпер оверсайз в полоску с укороченным рукавом','',1.000,1,8,2799.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000015',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000016',NULL,1,2,3,4,NULL,'Свитшот с фактурным узором и укороченными рукавами','',1.000,1,8,1599.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000016',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000017',NULL,1,2,3,4,NULL,'Короткая вязаная шапка-бини из хлопка с отворотом','',1.000,1,8,599.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000017',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000018',NULL,1,2,3,4,NULL,'Трикотажная шапка-бини с отворотом','',1.000,1,8,799.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000018',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000019',NULL,1,2,3,4,NULL,'Короткая вязаная шапка-бини из хлопка с отворотом','',1.000,1,8,799.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000019',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000020',NULL,1,2,3,4,NULL,'Трикотажная шапка-бини с отворотом','',1.000,1,8,499.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000020',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000021',NULL,1,2,3,4,NULL,'Тёплые перчатки в спортивном стиле на синтепоне с флисом','',1.000,1,8,899.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000021',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000022',NULL,1,2,3,4,NULL,'Текстильный ремень с пряжкой','',1.000,1,8,599.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000022',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000023',NULL,1,2,3,4,NULL,'Ремень из экокожи','',1.000,1,8,599.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000023',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000024',NULL,1,2,3,4,NULL,'Поясная сумка из экокожи','',1.000,1,8,199.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000024',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000025',NULL,1,2,3,4,NULL,'Тёплая укороченная куртка с высоким воротником','',1.000,1,NULL,5559.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000025',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000026',NULL,1,2,3,4,NULL,'Жилет прямого силуэта из вязаного трикотажа с узором','',1.000,1,NULL,1799.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000026',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000027',NULL,1,2,3,4,NULL,'Тонкий вязаный джемпер из хлопка в полоску','',1.000,1,NULL,1799.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000027',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000028',NULL,1,2,3,4,NULL,'Тёплая куртка с капюшоном на синтепоне','',1.000,1,NULL,5999.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000028',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000029',NULL,1,2,3,4,NULL,'Джинсовая куртка-рубашка из хлопка на кнопках','',1.000,1,NULL,4999.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000029',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000030',NULL,1,2,3,4,NULL,'Утеплённая трикотажная куртка-рубашка с начёсом','',1.000,1,NULL,3599.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000030',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000031',NULL,1,2,3,4,NULL,'Новогодняя шапка-бини с лампочками и помпоном','',1.000,1,NULL,899.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000031',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000032',NULL,1,2,3,4,NULL,'Бейсболка из хлопка с полукруглым козырьком','',1.000,1,NULL,199.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000032',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('1000033',NULL,1,2,3,4,NULL,'Тёплая шапка-ушанка на синтепоне','',1.000,1,NULL,999.00,0.00,NULL,1.000,NULL,0,0,15,3,0,1,1,NULL,NULL,NULL,NULL,'1000033',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'2011-11-21 10:22:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `tmc2`
--

CREATE TABLE `tmc2` (
  `bcode` varchar(20) NOT NULL,
  `vatcode1` int DEFAULT NULL,
  `vatcode2` int DEFAULT NULL,
  `vatcode3` int DEFAULT NULL,
  `vatcode4` int DEFAULT NULL,
  `vatcode5` int DEFAULT NULL,
  `dcode` int DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL,
  `articul` varchar(200) DEFAULT NULL,
  `cquant` decimal(13,3) DEFAULT NULL,
  `measure` int DEFAULT NULL,
  `pricetype` int DEFAULT NULL,
  `price` decimal(13,2) DEFAULT NULL,
  `minprice` decimal(13,2) DEFAULT NULL,
  `valcode` int DEFAULT NULL,
  `quantdefault` decimal(13,3) DEFAULT NULL,
  `quantlimit` decimal(13,3) DEFAULT NULL,
  `ostat` int DEFAULT NULL,
  `links` int DEFAULT NULL,
  `quant_mode` int DEFAULT NULL,
  `bcode_mode` int DEFAULT NULL,
  `op_mode` int DEFAULT NULL,
  `dept_mode` int DEFAULT NULL,
  `price_mode` int DEFAULT NULL,
  `tara_flag` int DEFAULT NULL,
  `tara_mode` int DEFAULT NULL,
  `tara_default` varchar(20) DEFAULT NULL,
  `unit_weight` decimal(13,3) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `aspectschemecode` int DEFAULT NULL,
  `aspectvaluesetcode` int DEFAULT NULL,
  `aspectusecase` int DEFAULT NULL,
  `aspectselectionrule` int DEFAULT NULL,
  `extendetoptions` text,
  `groupcode` varchar(100) DEFAULT NULL,
  `remain` decimal(13,3) DEFAULT NULL,
  `remaindate` datetime DEFAULT NULL,
  `documentquantlimit` decimal(13,3) DEFAULT NULL,
  `age` int DEFAULT NULL,
  `alcoholpercent` decimal(4,2) DEFAULT NULL,
  `inn` varchar(20) DEFAULT NULL,
  `kpp` varchar(20) DEFAULT NULL,
  `alctypecode` int DEFAULT NULL,
  `manufacturercountrycode` int DEFAULT NULL,
  `paymentobject` int DEFAULT NULL,
  `loyaltymode` int DEFAULT NULL,
  `minretailprice` decimal(13,2) DEFAULT NULL,
  `ntin` varchar(255) DEFAULT NULL,
  `packagecode` varchar(255) DEFAULT NULL,
  `ownertype` int DEFAULT NULL,
  PRIMARY KEY (`bcode`),
  KEY `tmccode` (`code`),
  KEY `tmcname` (`name`),
  KEY `tmcgroupcode` (`groupcode`),
  KEY `tmcidxprice` (`price`),
  KEY `tmcidxaspectvaluesetcode` (`aspectvaluesetcode`),
  KEY `tmcidxaspectschemecode` (`aspectschemecode`),
  KEY `tmcidxarticul` (`articul`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmc2`
--


--
-- Temporary view structure for view `tmcalcocode`
--

/*!50001 DROP VIEW IF EXISTS `tmcalcocode`*/;
/*!50001 CREATE VIEW `tmcalcocode` AS SELECT 
 1 AS `tmccode`,
 1 AS `alcocode`*/;

--
-- Table structure for table `tmcalcocode1`
--

CREATE TABLE `tmcalcocode1` (
  `tmccode` varchar(255) NOT NULL,
  `alcocode` varchar(255) NOT NULL,
  PRIMARY KEY (`alcocode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcalcocode1`
--


--
-- Table structure for table `tmcalcocode2`
--

CREATE TABLE `tmcalcocode2` (
  `tmccode` varchar(255) NOT NULL,
  `alcocode` varchar(255) NOT NULL,
  PRIMARY KEY (`alcocode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcalcocode2`
--


--
-- Temporary view structure for view `tmccatalog`
--

/*!50001 DROP VIEW IF EXISTS `tmccatalog`*/;
/*!50001 CREATE VIEW `tmccatalog` AS SELECT 
 1 AS `tmccode`,
 1 AS `catalogid`,
 1 AS `tmcprice`,
 1 AS `image`,
 1 AS `percentdiscount`,
 1 AS `mincount`,
 1 AS `maxcount`,
 1 AS `multiplicity`*/;

--
-- Table structure for table `tmccatalog1`
--

CREATE TABLE `tmccatalog1` (
  `tmccode` varchar(100) NOT NULL,
  `catalogid` int NOT NULL,
  `tmcprice` decimal(13,2) DEFAULT NULL,
  `image` text,
  `percentdiscount` decimal(5,2) DEFAULT NULL,
  `mincount` int DEFAULT NULL,
  `maxcount` int DEFAULT NULL,
  `multiplicity` int DEFAULT NULL,
  PRIMARY KEY (`tmccode`,`catalogid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmccatalog1`
--


--
-- Table structure for table `tmccatalog2`
--

CREATE TABLE `tmccatalog2` (
  `tmccode` varchar(100) NOT NULL,
  `catalogid` int NOT NULL,
  `tmcprice` decimal(13,2) DEFAULT NULL,
  `image` text,
  `percentdiscount` decimal(5,2) DEFAULT NULL,
  `mincount` int DEFAULT NULL,
  `maxcount` int DEFAULT NULL,
  `multiplicity` int DEFAULT NULL,
  PRIMARY KEY (`tmccode`,`catalogid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmccatalog2`
--


--
-- Temporary view structure for view `tmcext`
--

/*!50001 DROP VIEW IF EXISTS `tmcext`*/;
/*!50001 CREATE VIEW `tmcext` AS SELECT 
 1 AS `bcode`,
 1 AS `code`,
 1 AS `name`*/;

--
-- Table structure for table `tmcext1`
--

CREATE TABLE `tmcext1` (
  `bcode` varchar(20) DEFAULT NULL,
  `code` decimal(20,0) DEFAULT NULL,
  `name` varchar(120) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcext1`
--


--
-- Table structure for table `tmcext2`
--

CREATE TABLE `tmcext2` (
  `bcode` varchar(20) DEFAULT NULL,
  `code` decimal(20,0) DEFAULT NULL,
  `name` varchar(120) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcext2`
--


--
-- Temporary view structure for view `tmcgroups`
--

/*!50001 DROP VIEW IF EXISTS `tmcgroups`*/;
/*!50001 CREATE VIEW `tmcgroups` AS SELECT 
 1 AS `groupcode`,
 1 AS `parentgroupcode`,
 1 AS `groupname`*/;

--
-- Table structure for table `tmcgroups1`
--

CREATE TABLE `tmcgroups1` (
  `groupcode` varchar(100) NOT NULL,
  `parentgroupcode` varchar(100) DEFAULT NULL,
  `groupname` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`groupcode`),
  KEY `tmcgroupsparentgroupcode` (`parentgroupcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcgroups1`
--


--
-- Table structure for table `tmcgroups2`
--

CREATE TABLE `tmcgroups2` (
  `groupcode` varchar(100) NOT NULL,
  `parentgroupcode` varchar(100) DEFAULT NULL,
  `groupname` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`groupcode`),
  KEY `tmcgroupsparentgroupcode` (`parentgroupcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcgroups2`
--


--
-- Temporary view structure for view `tmckit`
--

/*!50001 DROP VIEW IF EXISTS `tmckit`*/;
/*!50001 CREATE VIEW `tmckit` AS SELECT 
 1 AS `barcode`,
 1 AS `name`*/;

--
-- Table structure for table `tmckit1`
--

CREATE TABLE `tmckit1` (
  `barcode` varchar(200) NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmckit1`
--


--
-- Table structure for table `tmckit2`
--

CREATE TABLE `tmckit2` (
  `barcode` varchar(200) NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmckit2`
--


--
-- Temporary view structure for view `tmckititem`
--

/*!50001 DROP VIEW IF EXISTS `tmckititem`*/;
/*!50001 CREATE VIEW `tmckititem` AS SELECT 
 1 AS `tmccode`,
 1 AS `tmckitbarcode`,
 1 AS `quantity`*/;

--
-- Table structure for table `tmckititem1`
--

CREATE TABLE `tmckititem1` (
  `tmccode` varchar(100) NOT NULL,
  `tmckitbarcode` varchar(200) NOT NULL,
  `quantity` decimal(13,3) NOT NULL,
  PRIMARY KEY (`tmccode`,`tmckitbarcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmckititem1`
--


--
-- Table structure for table `tmckititem2`
--

CREATE TABLE `tmckititem2` (
  `tmccode` varchar(100) NOT NULL,
  `tmckitbarcode` varchar(200) NOT NULL,
  `quantity` decimal(13,3) NOT NULL,
  PRIMARY KEY (`tmccode`,`tmckitbarcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmckititem2`
--


--
-- Temporary view structure for view `tmclink`
--

/*!50001 DROP VIEW IF EXISTS `tmclink`*/;
/*!50001 CREATE VIEW `tmclink` AS SELECT 
 1 AS `bcode`,
 1 AS `bcodeslave`,
 1 AS `quantslave`,
 1 AS `trans`*/;

--
-- Table structure for table `tmclink1`
--

CREATE TABLE `tmclink1` (
  `bcode` varchar(20) DEFAULT NULL,
  `bcodeslave` varchar(20) DEFAULT NULL,
  `quantslave` decimal(13,3) DEFAULT NULL,
  `trans` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmclink1`
--


--
-- Table structure for table `tmclink2`
--

CREATE TABLE `tmclink2` (
  `bcode` varchar(20) DEFAULT NULL,
  `bcodeslave` varchar(20) DEFAULT NULL,
  `quantslave` decimal(13,3) DEFAULT NULL,
  `trans` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmclink2`
--


--
-- Temporary view structure for view `tmcrequiredquantity`
--

/*!50001 DROP VIEW IF EXISTS `tmcrequiredquantity`*/;
/*!50001 CREATE VIEW `tmcrequiredquantity` AS SELECT 
 1 AS `tmccode`*/;

--
-- Table structure for table `tmcrequiredquantity1`
--

CREATE TABLE `tmcrequiredquantity1` (
  `tmccode` varchar(30) NOT NULL,
  PRIMARY KEY (`tmccode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcrequiredquantity1`
--


--
-- Table structure for table `tmcrequiredquantity2`
--

CREATE TABLE `tmcrequiredquantity2` (
  `tmccode` varchar(30) NOT NULL,
  PRIMARY KEY (`tmccode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcrequiredquantity2`
--


--
-- Temporary view structure for view `tmcsalerestrict`
--

/*!50001 DROP VIEW IF EXISTS `tmcsalerestrict`*/;
/*!50001 CREATE VIEW `tmcsalerestrict` AS SELECT 
 1 AS `salerestrictcode`,
 1 AS `tmccode`,
 1 AS `datebeg`,
 1 AS `dateend`,
 1 AS `daysbeg`,
 1 AS `daysend`,
 1 AS `timebeg`,
 1 AS `timeend`*/;

--
-- Table structure for table `tmcsalerestrict1`
--

CREATE TABLE `tmcsalerestrict1` (
  `salerestrictcode` varchar(100) NOT NULL,
  `tmccode` varchar(100) DEFAULT NULL,
  `datebeg` date DEFAULT NULL,
  `dateend` date DEFAULT NULL,
  `daysbeg` int DEFAULT NULL,
  `daysend` int DEFAULT NULL,
  `timebeg` time DEFAULT NULL,
  `timeend` time DEFAULT NULL,
  PRIMARY KEY (`salerestrictcode`),
  KEY `tmcsalerestricttmccode` (`tmccode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcsalerestrict1`
--


--
-- Table structure for table `tmcsalerestrict2`
--

CREATE TABLE `tmcsalerestrict2` (
  `salerestrictcode` varchar(100) NOT NULL,
  `tmccode` varchar(100) DEFAULT NULL,
  `datebeg` date DEFAULT NULL,
  `dateend` date DEFAULT NULL,
  `daysbeg` int DEFAULT NULL,
  `daysend` int DEFAULT NULL,
  `timebeg` time DEFAULT NULL,
  `timeend` time DEFAULT NULL,
  PRIMARY KEY (`salerestrictcode`),
  KEY `tmcsalerestricttmccode` (`tmccode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcsalerestrict2`
--


--
-- Temporary view structure for view `tmcsupplier`
--

/*!50001 DROP VIEW IF EXISTS `tmcsupplier`*/;
/*!50001 CREATE VIEW `tmcsupplier` AS SELECT 
 1 AS `tmccode`,
 1 AS `suppliercode`,
 1 AS `agentpaymentobject`*/;

--
-- Table structure for table `tmcsupplier1`
--

CREATE TABLE `tmcsupplier1` (
  `tmccode` varchar(20) NOT NULL,
  `suppliercode` varchar(255) NOT NULL,
  `agentpaymentobject` int NOT NULL,
  PRIMARY KEY (`tmccode`,`suppliercode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcsupplier1`
--


--
-- Table structure for table `tmcsupplier2`
--

CREATE TABLE `tmcsupplier2` (
  `tmccode` varchar(20) NOT NULL,
  `suppliercode` varchar(255) NOT NULL,
  `agentpaymentobject` int NOT NULL,
  PRIMARY KEY (`tmccode`,`suppliercode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcsupplier2`
--


--
-- Temporary view structure for view `tmcvisualverify`
--

/*!50001 DROP VIEW IF EXISTS `tmcvisualverify`*/;
/*!50001 CREATE VIEW `tmcvisualverify` AS SELECT 
 1 AS `tmccode`*/;

--
-- Table structure for table `tmcvisualverify1`
--

CREATE TABLE `tmcvisualverify1` (
  `tmccode` varchar(30) NOT NULL,
  PRIMARY KEY (`tmccode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcvisualverify1`
--


--
-- Table structure for table `tmcvisualverify2`
--

CREATE TABLE `tmcvisualverify2` (
  `tmccode` varchar(30) NOT NULL,
  PRIMARY KEY (`tmccode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmcvisualverify2`
--


--
-- Table structure for table `tmpshortgoodslist`
--

CREATE TABLE `tmpshortgoodslist` (
  `code` varchar(100) NOT NULL,
  `quantity` decimal(15,3) DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tmpshortgoodslist`
--


--
-- Temporary view structure for view `tostat`
--

/*!50001 DROP VIEW IF EXISTS `tostat`*/;
/*!50001 CREATE VIEW `tostat` AS SELECT 
 1 AS `dcode`,
 1 AS `bcode`,
 1 AS `code`,
 1 AS `quant`,
 1 AS `dt`,
 1 AS `cashcode`*/;

--
-- Table structure for table `tostat1`
--

CREATE TABLE `tostat1` (
  `dcode` int DEFAULT NULL,
  `bcode` varchar(20) DEFAULT NULL,
  `code` decimal(20,0) DEFAULT NULL,
  `quant` decimal(13,3) DEFAULT NULL,
  `dt` timestamp NULL DEFAULT NULL,
  `cashcode` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tostat1`
--


--
-- Table structure for table `tostat2`
--

CREATE TABLE `tostat2` (
  `dcode` int DEFAULT NULL,
  `bcode` varchar(20) DEFAULT NULL,
  `code` decimal(20,0) DEFAULT NULL,
  `quant` decimal(13,3) DEFAULT NULL,
  `dt` timestamp NULL DEFAULT NULL,
  `cashcode` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tostat2`
--


--
-- Temporary view structure for view `tprices`
--

/*!50001 DROP VIEW IF EXISTS `tprices`*/;
/*!50001 CREATE VIEW `tprices` AS SELECT 
 1 AS `tindex`,
 1 AS `bcode`,
 1 AS `price`,
 1 AS `name`,
 1 AS `documentid`,
 1 AS `effectivedate`,
 1 AS `packingprice`*/;

--
-- Table structure for table `tprices1`
--

CREATE TABLE `tprices1` (
  `tindex` int NOT NULL AUTO_INCREMENT,
  `bcode` varchar(20) NOT NULL,
  `price` decimal(13,2) DEFAULT NULL,
  `name` varchar(40) DEFAULT NULL,
  `documentid` varchar(100) DEFAULT NULL,
  `effectivedate` datetime NOT NULL,
  `packingprice` decimal(13,2) DEFAULT NULL,
  PRIMARY KEY (`tindex`,`bcode`,`effectivedate`),
  KEY `bcodeidx` (`bcode`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tprices1`
--

INSERT INTO `tprices1` VALUES (1,'1072',10.00,'Доп цена 1',NULL,'2020-10-11 15:19:16',NULL),(1,'2017',170.00,'цена1','1','0000-00-00 00:00:00',NULL),(2,'1072',15.00,'Доп цена 2',NULL,'2020-10-11 15:19:37',NULL),(2,'2017',180.00,'цена2','1','0000-00-00 00:00:00',NULL),(3,'1072',20.00,'Доп цена 3',NULL,'2020-10-11 15:19:48',NULL),(4,'1072',25.00,'Доп цена 4',NULL,'2020-10-11 15:20:02',NULL);

--
-- Table structure for table `tprices2`
--

CREATE TABLE `tprices2` (
  `tindex` int NOT NULL AUTO_INCREMENT,
  `bcode` varchar(20) NOT NULL,
  `price` decimal(13,2) DEFAULT NULL,
  `name` varchar(40) DEFAULT NULL,
  `documentid` varchar(100) DEFAULT NULL,
  `effectivedate` datetime NOT NULL,
  `packingprice` decimal(13,2) DEFAULT NULL,
  PRIMARY KEY (`tindex`,`bcode`,`effectivedate`),
  KEY `bcodeidx` (`bcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tprices2`
--


--
-- Temporary view structure for view `tquick`
--

/*!50001 DROP VIEW IF EXISTS `tquick`*/;
/*!50001 CREATE VIEW `tquick` AS SELECT 
 1 AS `qcode`,
 1 AS `bcode`,
 1 AS `bquant`*/;

--
-- Table structure for table `tquick1`
--

CREATE TABLE `tquick1` (
  `qcode` varchar(8) DEFAULT NULL,
  `bcode` varchar(20) DEFAULT NULL,
  `bquant` decimal(7,3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tquick1`
--


--
-- Table structure for table `tquick2`
--

CREATE TABLE `tquick2` (
  `qcode` varchar(8) DEFAULT NULL,
  `bcode` varchar(20) DEFAULT NULL,
  `bquant` decimal(7,3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tquick2`
--


--
-- Temporary view structure for view `tr`
--

/*!50001 DROP VIEW IF EXISTS `tr`*/;
/*!50001 CREATE VIEW `tr` AS SELECT 
 1 AS `id`,
 1 AS `idtype`,
 1 AS `lang`,
 1 AS `translation`*/;

--
-- Table structure for table `tr1`
--

CREATE TABLE `tr1` (
  `id` varchar(255) NOT NULL,
  `idtype` int NOT NULL,
  `lang` varchar(50) NOT NULL,
  `translation` varchar(255) NOT NULL,
  PRIMARY KEY (`id`,`idtype`,`lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tr1`
--


--
-- Table structure for table `tr2`
--

CREATE TABLE `tr2` (
  `id` varchar(255) NOT NULL,
  `idtype` int NOT NULL,
  `lang` varchar(50) NOT NULL,
  `translation` varchar(255) NOT NULL,
  PRIMARY KEY (`id`,`idtype`,`lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tr2`
--


--
-- Temporary view structure for view `units`
--

/*!50001 DROP VIEW IF EXISTS `units`*/;
/*!50001 CREATE VIEW `units` AS SELECT 
 1 AS `code`,
 1 AS `name`,
 1 AS `flag`,
 1 AS `frunit`*/;

--
-- Table structure for table `units1`
--

CREATE TABLE `units1` (
  `code` int NOT NULL AUTO_INCREMENT,
  `name` varchar(8) DEFAULT NULL,
  `flag` int DEFAULT NULL,
  `frunit` int DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `units1`
--

INSERT INTO `units1` VALUES (1,'шт.',0,0),(2,'г',0,10),(3,'кг',1,11),(4,'т',1,12),(5,'см',0,20),(6,'дм',0,21),(7,'м',1,22),(8,'кв. см',0,30),(9,'кв. дм',0,31),(10,'кв. м',1,32),(11,'мл',0,40),(12,'л',1,41),(13,'куб. м',0,42),(14,'кВт · ч',0,50),(15,'Гкал',0,51),(16,'сутки',0,70),(17,'час',0,71),(18,'мин',0,72),(19,'с',0,73),(20,'Кбайт',0,80),(21,'Мбайт',0,81),(22,'Гбайт',0,82),(23,'Тбайт',0,83),(24,'-',0,255);

--
-- Table structure for table `units2`
--

CREATE TABLE `units2` (
  `code` int NOT NULL AUTO_INCREMENT,
  `name` varchar(8) DEFAULT NULL,
  `flag` int DEFAULT NULL,
  `frunit` int DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `units2`
--


--
-- Temporary view structure for view `valut`
--

/*!50001 DROP VIEW IF EXISTS `valut`*/;
/*!50001 CREATE VIEW `valut` AS SELECT 
 1 AS `code`,
 1 AS `stat`,
 1 AS `chr`,
 1 AS `name`,
 1 AS `type`,
 1 AS `rate`,
 1 AS `ratecb`,
 1 AS `decpoint`,
 1 AS `round`,
 1 AS `mode`,
 1 AS `drawer`,
 1 AS `discascheme`,
 1 AS `ishidden`,
 1 AS `operation`,
 1 AS `payprocmodule`,
 1 AS `merchantid`,
 1 AS `payprocdir`*/;

--
-- Table structure for table `valut1`
--

CREATE TABLE `valut1` (
  `code` int NOT NULL,
  `stat` int DEFAULT NULL,
  `chr` varchar(4) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `type` varchar(1) DEFAULT NULL,
  `rate` decimal(13,4) DEFAULT NULL,
  `ratecb` decimal(13,4) DEFAULT NULL,
  `decpoint` int DEFAULT NULL,
  `round` int DEFAULT NULL,
  `mode` int DEFAULT NULL,
  `drawer` int DEFAULT NULL,
  `discascheme` int DEFAULT NULL,
  `ishidden` int DEFAULT NULL,
  `operation` int DEFAULT NULL,
  `payprocmodule` varchar(4096) DEFAULT NULL,
  `merchantid` int DEFAULT NULL,
  `payprocdir` text,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `valut1`
--

INSERT INTO `valut1` VALUES (1,2,'Руб','Российский рубль','1',1.0000,1.0000,-2,2,0,1,0,0,0,NULL,NULL,NULL),(2,0,'СБ','СберБанк','2',1.0000,1.0000,-2,2,6,0,0,0,10,'libProcessingSb',NULL,NULL),(3,0,'АТ','Автономный терминал','2',1.0000,1.0000,-2,2,6,0,NULL,0,10,'libProcessingDummy',NULL,NULL);

--
-- Table structure for table `valut2`
--

CREATE TABLE `valut2` (
  `code` int NOT NULL,
  `stat` int DEFAULT NULL,
  `chr` varchar(4) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `type` varchar(1) DEFAULT NULL,
  `rate` decimal(13,4) DEFAULT NULL,
  `ratecb` decimal(13,4) DEFAULT NULL,
  `decpoint` int DEFAULT NULL,
  `round` int DEFAULT NULL,
  `mode` int DEFAULT NULL,
  `drawer` int DEFAULT NULL,
  `discascheme` int DEFAULT NULL,
  `ishidden` int DEFAULT NULL,
  `operation` int DEFAULT NULL,
  `payprocmodule` varchar(4096) DEFAULT NULL,
  `merchantid` int DEFAULT NULL,
  `payprocdir` text,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `valut2`
--


--
-- Temporary view structure for view `vat`
--

/*!50001 DROP VIEW IF EXISTS `vat`*/;
/*!50001 CREATE VIEW `vat` AS SELECT 
 1 AS `code`,
 1 AS `name`,
 1 AS `rate`,
 1 AS `mode`*/;

--
-- Table structure for table `vat1`
--

CREATE TABLE `vat1` (
  `code` int NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  `rate` decimal(5,2) DEFAULT NULL,
  `mode` int DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `vat1`
--

INSERT INTO `vat1` VALUES (1,'НДС 0%',0.00,NULL),(2,'НДС 10%',10.00,NULL),(3,'НДС 20%',20.00,NULL),(4,'НДС 10/110',10.00,NULL),(5,'НДС 20/120',20.00,NULL),(6,'БЕЗ НДС',NULL,NULL);

--
-- Table structure for table `vat2`
--

CREATE TABLE `vat2` (
  `code` int NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  `rate` decimal(5,2) DEFAULT NULL,
  `mode` int DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `vat2`
--


--
-- Temporary view structure for view `verification`
--

/*!50001 DROP VIEW IF EXISTS `verification`*/;
/*!50001 CREATE VIEW `verification` AS SELECT 
 1 AS `idverification`,
 1 AS `type`,
 1 AS `name`,
 1 AS `attribute`*/;

--
-- Table structure for table `verification1`
--

CREATE TABLE `verification1` (
  `idverification` int NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `attribute` int DEFAULT NULL,
  PRIMARY KEY (`idverification`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `verification1`
--


--
-- Table structure for table `verification2`
--

CREATE TABLE `verification2` (
  `idverification` int NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `attribute` int DEFAULT NULL,
  PRIMARY KEY (`idverification`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `verification2`
--


--
-- Final view structure for view `abnormalquantity`
--

/*!50001 DROP VIEW IF EXISTS `abnormalquantity`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `abnormalquantity` AS select `abnormalquantity1`.`barcode` AS `barcode`,`abnormalquantity1`.`minquant` AS `minquant`,`abnormalquantity1`.`maxquant` AS `maxquant` from `abnormalquantity1` */;

--
-- Final view structure for view `accountmask`
--

/*!50001 DROP VIEW IF EXISTS `accountmask`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `accountmask` AS select `accountmask1`.`maskid` AS `maskid`,`accountmask1`.`providerid` AS `providerid`,`accountmask1`.`mask` AS `mask`,`accountmask1`.`transform` AS `transform` from `accountmask1` */;

--
-- Final view structure for view `accumulatesprices`
--

/*!50001 DROP VIEW IF EXISTS `accumulatesprices`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `accumulatesprices` AS select `accumulatesprices1`.`code` AS `code`,`accumulatesprices1`.`name` AS `name` from `accumulatesprices1` */;

--
-- Final view structure for view `actionpanel`
--

/*!50001 DROP VIEW IF EXISTS `actionpanel`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `actionpanel` AS select `actionpanel1`.`actionpanelcode` AS `actionpanelcode`,`actionpanel1`.`context` AS `context`,`actionpanel1`.`page` AS `page`,`actionpanel1`.`rowcount` AS `rowcount`,`actionpanel1`.`columncount` AS `columncount` from `actionpanel1` */;

--
-- Final view structure for view `actionpanelitem`
--

/*!50001 DROP VIEW IF EXISTS `actionpanelitem`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `actionpanelitem` AS select `actionpanelitem1`.`actionpanelitemcode` AS `actionpanelitemcode`,`actionpanelitem1`.`actionpanelcode` AS `actionpanelcode`,`actionpanelitem1`.`actioncode` AS `actioncode`,`actionpanelitem1`.`row` AS `row`,`actionpanelitem1`.`column` AS `column`,`actionpanelitem1`.`rowspan` AS `rowspan`,`actionpanelitem1`.`columnspan` AS `columnspan`,`actionpanelitem1`.`color` AS `color`,`actionpanelitem1`.`name` AS `name` from `actionpanelitem1` */;

--
-- Final view structure for view `actionparameter`
--

/*!50001 DROP VIEW IF EXISTS `actionparameter`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `actionparameter` AS select `actionparameter1`.`actionparametercode` AS `actionparametercode`,`actionparameter1`.`parameterorder` AS `parameterorder`,`actionparameter1`.`parametervalue` AS `parametervalue`,`actionparameter1`.`cmactioncode` AS `cmactioncode`,`actionparameter1`.`parametername` AS `parametername` from `actionparameter1` */;

--
-- Final view structure for view `agent`
--

/*!50001 DROP VIEW IF EXISTS `agent`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `agent` AS select `agent1`.`code` AS `code`,`agent1`.`name` AS `name`,`agent1`.`inn` AS `inn`,`agent1`.`phone` AS `phone`,`agent1`.`address` AS `address` from `agent1` */;

--
-- Final view structure for view `agerestrict`
--

/*!50001 DROP VIEW IF EXISTS `agerestrict`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `agerestrict` AS select `agerestrict1`.`alcoholpercent` AS `alcoholpercent`,`agerestrict1`.`age` AS `age` from `agerestrict1` */;

--
-- Final view structure for view `alcocode`
--

/*!50001 DROP VIEW IF EXISTS `alcocode`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `alcocode` AS select `alcocode1`.`alcocode` AS `alcocode` from `alcocode1` */;

--
-- Final view structure for view `alcoset`
--

/*!50001 DROP VIEW IF EXISTS `alcoset`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `alcoset` AS select `alcoset1`.`alcosetbarcode` AS `alcosetbarcode`,`alcoset1`.`code` AS `code`,`alcoset1`.`barcode` AS `barcode`,`alcoset1`.`price` AS `price`,`alcoset1`.`taracapacity` AS `taracapacity`,`alcoset1`.`quant` AS `quant` from `alcoset1` */;

--
-- Final view structure for view `aspect`
--

/*!50001 DROP VIEW IF EXISTS `aspect`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `aspect` AS select `aspect1`.`aspectcode` AS `aspectcode`,`aspect1`.`aspectname` AS `aspectname`,`aspect1`.`aspectorder` AS `aspectorder`,`aspect1`.`aspectschemecode` AS `aspectschemecode`,`aspect1`.`aspectvaluedesc` AS `aspectvaluedesc` from `aspect1` */;

--
-- Final view structure for view `aspectscheme`
--

/*!50001 DROP VIEW IF EXISTS `aspectscheme`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `aspectscheme` AS select `aspectscheme1`.`aspectschemecode` AS `aspectschemecode`,`aspectscheme1`.`aspectschemename` AS `aspectschemename` from `aspectscheme1` */;

--
-- Final view structure for view `aspectvalue`
--

/*!50001 DROP VIEW IF EXISTS `aspectvalue`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `aspectvalue` AS select `aspectvalue1`.`aspectvaluecode` AS `aspectvaluecode`,`aspectvalue1`.`aspectvaluename` AS `aspectvaluename`,`aspectvalue1`.`aspectcode` AS `aspectcode` from `aspectvalue1` */;

--
-- Final view structure for view `aspectvalueset`
--

/*!50001 DROP VIEW IF EXISTS `aspectvalueset`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `aspectvalueset` AS select `aspectvalueset1`.`aspectvaluesetcode` AS `aspectvaluesetcode`,`aspectvalueset1`.`cquant` AS `cquant`,`aspectvalueset1`.`price` AS `price`,`aspectvalueset1`.`tmc_code` AS `tmc_code`,`aspectvalueset1`.`aspectschemecode` AS `aspectschemecode`,`aspectvalueset1`.`measure` AS `measure`,`aspectvalueset1`.`remain` AS `remain`,`aspectvalueset1`.`name` AS `name`,`aspectvalueset1`.`remaindate` AS `remaindate`,`aspectvalueset1`.`packingprice` AS `packingprice`,`aspectvalueset1`.`productsectioncode` AS `productsectioncode` from `aspectvalueset1` */;

--
-- Final view structure for view `aspectvaluesetvalues`
--

/*!50001 DROP VIEW IF EXISTS `aspectvaluesetvalues`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `aspectvaluesetvalues` AS select `aspectvaluesetvalues1`.`aspectcode` AS `aspectcode`,`aspectvaluesetvalues1`.`aspectvaluecode` AS `aspectvaluecode`,`aspectvaluesetvalues1`.`aspectvaluesetcode` AS `aspectvaluesetcode`,`aspectvaluesetvalues1`.`productsectioncode` AS `productsectioncode`,`aspectvaluesetvalues1`.`tmc_code` AS `tmc_code` from `aspectvaluesetvalues1` */;

--
-- Final view structure for view `backreason`
--

/*!50001 DROP VIEW IF EXISTS `backreason`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `backreason` AS select `backreason1`.`code` AS `code`,`backreason1`.`reason` AS `reason`,`backreason1`.`doctype` AS `doctype` from `backreason1` */;

--
-- Final view structure for view `barcodes`
--

/*!50001 DROP VIEW IF EXISTS `barcodes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `barcodes` AS select `barcodes1`.`code` AS `code`,`barcodes1`.`barcode` AS `barcode`,`barcodes1`.`name` AS `name`,`barcodes1`.`price` AS `price`,`barcodes1`.`cquant` AS `cquant`,`barcodes1`.`measure` AS `measure`,`barcodes1`.`aspectvaluesetcode` AS `aspectvaluesetcode`,`barcodes1`.`quantdefault` AS `quantdefault`,`barcodes1`.`packingmeasure` AS `packingmeasure`,`barcodes1`.`packingprice` AS `packingprice`,`barcodes1`.`minprice` AS `minprice`,`barcodes1`.`minretailprice` AS `minretailprice`,`barcodes1`.`customsdeclarationnumber` AS `customsdeclarationnumber`,`barcodes1`.`tmctype` AS `tmctype`,`barcodes1`.`ntin` AS `ntin`,`barcodes1`.`packagecode` AS `packagecode` from `barcodes1` */;

--
-- Final view structure for view `button`
--

/*!50001 DROP VIEW IF EXISTS `button`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `button` AS select `button1`.`code` AS `code`,`button1`.`name` AS `name`,`button1`.`tag` AS `tag`,`button1`.`rateobject` AS `rateobject`,`button1`.`ratetype` AS `ratetype`,`button1`.`ratevalue` AS `ratevalue`,`button1`.`maxratevalue` AS `maxratevalue`,`button1`.`minratevalue` AS `minratevalue` from `button1` */;

--
-- Final view structure for view `campaign`
--

/*!50001 DROP VIEW IF EXISTS `campaign`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `campaign` AS select `campaign1`.`campaignid` AS `campaignid`,`campaign1`.`name` AS `name` from `campaign1` */;

--
-- Final view structure for view `card`
--

/*!50001 DROP VIEW IF EXISTS `card`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `card` AS select `card1`.`idcard` AS `idcard`,`card1`.`idcardgroup` AS `idcardgroup`,`card1`.`idclient` AS `idclient`,`card1`.`number` AS `number`,`card1`.`validitydatebeg` AS `validitydatebeg`,`card1`.`validitydateend` AS `validitydateend`,`card1`.`cardSum` AS `cardSum`,`card1`.`blocked` AS `blocked`,`card1`.`lastknownbonusbalance` AS `lastknownbonusbalance`,`card1`.`lastknownbonusbalancedate` AS `lastknownbonusbalancedate`,`card1`.`multiplicator` AS `multiplicator`,`card1`.`multiplicatorbeg` AS `multiplicatorbeg`,`card1`.`multiplicatorend` AS `multiplicatorend`,`card1`.`multiplicatorcurrent` AS `multiplicatorcurrent`,`card1`.`discountpercent` AS `discountpercent`,`card1`.`purchases` AS `purchases`,`card1`.`pincode` AS `pincode`,`card1`.`cardstatus` AS `cardstatus`,`card1`.`shopcode` AS `shopcode`,`card1`.`options` AS `options` from `card1` */;

--
-- Final view structure for view `cardgroup`
--

/*!50001 DROP VIEW IF EXISTS `cardgroup`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `cardgroup` AS select `cardgroup1`.`idcardgroup` AS `idcardgroup`,`cardgroup1`.`name` AS `name`,`cardgroup1`.`text` AS `text`,`cardgroup1`.`cardmode` AS `cardmode`,`cardgroup1`.`prefixbeg` AS `prefixbeg`,`cardgroup1`.`prefixend` AS `prefixend`,`cardgroup1`.`lenbeg` AS `lenbeg`,`cardgroup1`.`lenend` AS `lenend`,`cardgroup1`.`regexpattern` AS `regexpattern`,`cardgroup1`.`inputmask` AS `inputmask`,`cardgroup1`.`regexrule` AS `regexrule`,`cardgroup1`.`valutcode` AS `valutcode`,`cardgroup1`.`discounttype` AS `discounttype`,`cardgroup1`.`discountvalue` AS `discountvalue`,`cardgroup1`.`bonususecase` AS `bonususecase`,`cardgroup1`.`showinfo` AS `showinfo`,`cardgroup1`.`notaddemptycard` AS `notaddemptycard`,`cardgroup1`.`printinfo` AS `printinfo`,`cardgroup1`.`additionalregistration` AS `additionalregistration`,`cardgroup1`.`searchrule` AS `searchrule`,`cardgroup1`.`userawdata` AS `userawdata`,`cardgroup1`.`options` AS `options` from `cardgroup1` */;

--
-- Final view structure for view `cardgroupverification`
--

/*!50001 DROP VIEW IF EXISTS `cardgroupverification`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `cardgroupverification` AS select `cardgroupverification1`.`idcardgroup` AS `idcardgroup`,`cardgroupverification1`.`idverification` AS `idverification`,`cardgroupverification1`.`inputsource` AS `inputsource`,`cardgroupverification1`.`extraverification` AS `extraverification` from `cardgroupverification1` */;

--
-- Final view structure for view `cashconfig`
--

/*!50001 DROP VIEW IF EXISTS `cashconfig`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `cashconfig` AS select `cashconfig1`.`name` AS `name`,`cashconfig1`.`value` AS `value` from `cashconfig1` */;

--
-- Final view structure for view `catalog`
--

/*!50001 DROP VIEW IF EXISTS `catalog`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `catalog` AS select `catalog1`.`catalogid` AS `catalogid`,`catalog1`.`catalogname` AS `catalogname`,`catalog1`.`image` AS `image`,`catalog1`.`type` AS `type` from `catalog1` */;

--
-- Final view structure for view `catalogattribute`
--

/*!50001 DROP VIEW IF EXISTS `catalogattribute`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `catalogattribute` AS select `catalogattribute1`.`catalogid` AS `catalogid`,`catalogattribute1`.`alcoholpercent` AS `alcoholpercent`,`catalogattribute1`.`age` AS `age`,`catalogattribute1`.`attribute` AS `attribute`,`catalogattribute1`.`egaistype` AS `egaistype` from `catalogattribute1` */;

--
-- Final view structure for view `catalogrestrict`
--

/*!50001 DROP VIEW IF EXISTS `catalogrestrict`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `catalogrestrict` AS select `catalogrestrict1`.`catalogid` AS `catalogid`,`catalogrestrict1`.`deptcode` AS `deptcode`,`catalogrestrict1`.`restrictid` AS `restrictid`,`catalogrestrict1`.`id` AS `id` from `catalogrestrict1` */;

--
-- Final view structure for view `category`
--

/*!50001 DROP VIEW IF EXISTS `category`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `category` AS select `category1`.`categoryid` AS `categoryid`,`category1`.`agentcode` AS `agentcode`,`category1`.`categorycode` AS `categorycode`,`category1`.`name` AS `name` from `category1` */;

--
-- Final view structure for view `certificate`
--

/*!50001 DROP VIEW IF EXISTS `certificate`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `certificate` AS select `certificate1`.`code` AS `code`,`certificate1`.`rangefrom` AS `rangefrom`,`certificate1`.`rangeto` AS `rangeto`,`certificate1`.`name` AS `name`,`certificate1`.`sum` AS `sum`,`certificate1`.`inputmask` AS `inputmask`,`certificate1`.`fullyspend` AS `fullyspend`,`certificate1`.`skiplastsymbol` AS `skiplastsymbol`,`certificate1`.`tmccode` AS `tmccode`,`certificate1`.`minsum` AS `minsum`,`certificate1`.`maxsum` AS `maxsum`,`certificate1`.`multiplesum` AS `multiplesum`,`certificate1`.`deptcode` AS `deptcode`,`certificate1`.`vatcode` AS `vatcode`,`certificate1`.`paymentobject` AS `paymentobject`,`certificate1`.`regexpattern` AS `regexpattern`,`certificate1`.`discountcampaign` AS `discountcampaign` from `certificate1` */;

--
-- Final view structure for view `client`
--

/*!50001 DROP VIEW IF EXISTS `client`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `client` AS select `client1`.`idclient` AS `idclient`,`client1`.`name` AS `name`,`client1`.`text` AS `text`,`client1`.`sex` AS `sex`,`client1`.`birthday` AS `birthday`,`client1`.`specialdate1` AS `specialdate1`,`client1`.`specialdate2` AS `specialdate2`,`client1`.`specialdate3` AS `specialdate3`,`client1`.`specialdate1name` AS `specialdate1name`,`client1`.`specialdate2name` AS `specialdate2name`,`client1`.`specialdate3name` AS `specialdate3name`,`client1`.`zipcode` AS `zipcode`,`client1`.`address` AS `address`,`client1`.`email` AS `email`,`client1`.`webpage` AS `webpage`,`client1`.`phonenumber` AS `phonenumber`,`client1`.`inn` AS `inn`,`client1`.`document` AS `document`,`client1`.`okpo` AS `okpo`,`client1`.`okpd` AS `okpd`,`client1`.`occupation` AS `occupation`,`client1`.`childrencount` AS `childrencount`,`client1`.`extendedoptions` AS `extendedoptions`,`client1`.`organizationcode` AS `organizationcode`,`client1`.`options` AS `options`,`client1`.`lastname` AS `lastname`,`client1`.`patronymic` AS `patronymic`,`client1`.`communications` AS `communications` from `client1` */;

--
-- Final view structure for view `clientcardmask`
--

/*!50001 DROP VIEW IF EXISTS `clientcardmask`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `clientcardmask` AS select `clientcardmask1`.`clientcardmaskid` AS `clientcardmaskid`,`clientcardmask1`.`agentcode` AS `agentcode`,`clientcardmask1`.`mask` AS `mask`,`clientcardmask1`.`transform` AS `transform` from `clientcardmask1` */;

--
-- Final view structure for view `cmaction`
--

/*!50001 DROP VIEW IF EXISTS `cmaction`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `cmaction` AS select `cmaction1`.`cmactioncode` AS `cmactioncode`,`cmaction1`.`cmactionname` AS `cmactionname`,`cmaction1`.`commandcode` AS `commandcode`,`cmaction1`.`logmode` AS `logmode`,`cmaction1`.`notshowinservicemenu` AS `notshowinservicemenu` from `cmaction1` */;

--
-- Final view structure for view `cmevent`
--

/*!50001 DROP VIEW IF EXISTS `cmevent`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `cmevent` AS select `cmevent1`.`eventname` AS `eventname`,`cmevent1`.`eventdescription` AS `eventdescription`,`cmevent1`.`macrocode` AS `macrocode` from `cmevent1` */;

--
-- Final view structure for view `cmkeys`
--

/*!50001 DROP VIEW IF EXISTS `cmkeys`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `cmkeys` AS select `cmkeys1`.`keycode` AS `keycode`,`cmkeys1`.`command` AS `command`,`cmkeys1`.`params` AS `params` from `cmkeys1` */;

--
-- Final view structure for view `command`
--

/*!50001 DROP VIEW IF EXISTS `command`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `command` AS select `command1`.`commandcode` AS `commandcode`,`command1`.`commandname` AS `commandname`,`command1`.`description` AS `description`,`command1`.`logmode` AS `logmode` from `command1` */;

--
-- Final view structure for view `commission`
--

/*!50001 DROP VIEW IF EXISTS `commission`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `commission` AS select `commission1`.`commissionid` AS `commissionid`,`commission1`.`providerid` AS `providerid`,`commission1`.`minsum` AS `minsum`,`commission1`.`type` AS `type`,`commission1`.`amount` AS `amount`,`commission1`.`datebegin` AS `datebegin`,`commission1`.`dateend` AS `dateend`,`commission1`.`timebegin` AS `timebegin`,`commission1`.`timeend` AS `timeend`,`commission1`.`cardgroup` AS `cardgroup` from `commission1` */;

--
-- Final view structure for view `consultant`
--

/*!50001 DROP VIEW IF EXISTS `consultant`*/;

--
-- Final view structure for view `correctionreason`
--

/*!50001 DROP VIEW IF EXISTS `correctionreason`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `correctionreason` AS select `correctionreason1`.`code` AS `code`,`correctionreason1`.`reason` AS `reason` from `correctionreason1` */;

--
-- Final view structure for view `country`
--

/*!50001 DROP VIEW IF EXISTS `country`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `country` AS select `country1`.`code` AS `code`,`country1`.`name` AS `name` from `country1` */;

--
-- Final view structure for view `defcode`
--

/*!50001 DROP VIEW IF EXISTS `defcode`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `defcode` AS select `defcode1`.`defcodeid` AS `defcodeid`,`defcode1`.`providerid` AS `providerid`,`defcode1`.`rangemin` AS `rangemin`,`defcode1`.`rangemax` AS `rangemax`,`defcode1`.`regionid` AS `regionid` from `defcode1` */;

--
-- Final view structure for view `dept`
--

/*!50001 DROP VIEW IF EXISTS `dept`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `dept` AS select `dept1`.`code` AS `code`,`dept1`.`name` AS `name`,`dept1`.`bcode` AS `bcode`,`dept1`.`vatcode1` AS `vatcode1`,`dept1`.`vatcode2` AS `vatcode2`,`dept1`.`vatcode3` AS `vatcode3`,`dept1`.`vatcode4` AS `vatcode4`,`dept1`.`vatcode5` AS `vatcode5`,`dept1`.`mode1` AS `mode1`,`dept1`.`mode2` AS `mode2`,`dept1`.`pricetype` AS `pricetype`,`dept1`.`sum_limit` AS `sum_limit`,`dept1`.`idclient` AS `idclient`,`dept1`.`documentprefix` AS `documentprefix`,`dept1`.`merchantid` AS `merchantid` from `dept1` */;

--
-- Final view structure for view `disccard`
--

/*!50001 DROP VIEW IF EXISTS `disccard`*/;

--
-- Final view structure for view `disccardaccumulate`
--

/*!50001 DROP VIEW IF EXISTS `disccardaccumulate`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `disccardaccumulate` AS select `disccardaccumulate1`.`disccode` AS `disccode`,`disccardaccumulate1`.`name` AS `name`,`disccardaccumulate1`.`rtext` AS `rtext`,`disccardaccumulate1`.`discperc` AS `discperc`,`disccardaccumulate1`.`isbegsum` AS `isbegsum`,`disccardaccumulate1`.`begsum` AS `begsum`,`disccardaccumulate1`.`isendsum` AS `isendsum`,`disccardaccumulate1`.`endsum` AS `endsum`,`disccardaccumulate1`.`isbegrcount` AS `isbegrcount`,`disccardaccumulate1`.`begrcount` AS `begrcount`,`disccardaccumulate1`.`isendrcount` AS `isendrcount`,`disccardaccumulate1`.`endrcount` AS `endrcount`,`disccardaccumulate1`.`discscheme` AS `discscheme`,`disccardaccumulate1`.`discschemename` AS `discschemename` from `disccardaccumulate1` */;

--
-- Final view structure for view `discountsauto`
--

/*!50001 DROP VIEW IF EXISTS `discountsauto`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `discountsauto` AS select `discountsauto1`.`shemecode` AS `shemecode`,`discountsauto1`.`disccode` AS `disccode`,`discountsauto1`.`name` AS `name`,`discountsauto1`.`disctype` AS `disctype`,`discountsauto1`.`discmode` AS `discmode`,`discountsauto1`.`discsize` AS `discsize`,`discountsauto1`.`rtext` AS `rtext`,`discountsauto1`.`date_beg` AS `date_beg`,`discountsauto1`.`date_end` AS `date_end`,`discountsauto1`.`time_beg` AS `time_beg`,`discountsauto1`.`time_end` AS `time_end`,`discountsauto1`.`days_beg` AS `days_beg`,`discountsauto1`.`days_end` AS `days_end`,`discountsauto1`.`quant_beg` AS `quant_beg`,`discountsauto1`.`quant_end` AS `quant_end`,`discountsauto1`.`sum_beg` AS `sum_beg`,`discountsauto1`.`sum_end` AS `sum_end`,`discountsauto1`.`pricecode` AS `pricecode`,`discountsauto1`.`rsummode` AS `rsummode`,`discountsauto1`.`cardgroupcode` AS `cardgroupcode`,`discountsauto1`.`birthdaymode` AS `birthdaymode`,`discountsauto1`.`catalogid` AS `catalogid`,`discountsauto1`.`catalogquantbeg` AS `catalogquantbeg`,`discountsauto1`.`catalogquantend` AS `catalogquantend`,`discountsauto1`.`catalogsumbeg` AS `catalogsumbeg`,`discountsauto1`.`catalogsumend` AS `catalogsumend` from `discountsauto1` */;

--
-- Final view structure for view `discountsfixed`
--

/*!50001 DROP VIEW IF EXISTS `discountsfixed`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `discountsfixed` AS select `discountsfixed1`.`disccode` AS `disccode`,`discountsfixed1`.`name` AS `name`,`discountsfixed1`.`disctype` AS `disctype`,`discountsfixed1`.`discmode` AS `discmode`,`discountsfixed1`.`discsize` AS `discsize`,`discountsfixed1`.`rtext` AS `rtext`,`discountsfixed1`.`cardpref` AS `cardpref`,`discountsfixed1`.`receiptmode` AS `receiptmode`,`discountsfixed1`.`positionmode` AS `positionmode`,`discountsfixed1`.`cardonly` AS `cardonly`,`discountsfixed1`.`cardsum_beg` AS `cardsum_beg`,`discountsfixed1`.`cardsum_end` AS `cardsum_end` from `discountsfixed1` */;

--
-- Final view structure for view `discountsystem`
--

/*!50001 DROP VIEW IF EXISTS `discountsystem`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `discountsystem` AS select `discountsystem1`.`discsystem` AS `discsystem`,`discountsystem1`.`name` AS `name`,`discountsystem1`.`discountsystemid` AS `discountsystemid`,`discountsystem1`.`bonusearnsystem` AS `bonusearnsystem`,`discountsystem1`.`bonuslimitsystem` AS `bonuslimitsystem`,`discountsystem1`.`update_time` AS `update_time`,`discountsystem1`.`seconddiscsystem` AS `seconddiscsystem` from `discountsystem1` */;

--
-- Final view structure for view `excisemarkwhite`
--

/*!50001 DROP VIEW IF EXISTS `excisemarkwhite`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `excisemarkwhite` AS select `excisemarkwhite1`.`excisemarkid` AS `excisemarkid`,`excisemarkwhite1`.`barcode` AS `barcode`,`excisemarkwhite1`.`updatetime` AS `updatetime`,`excisemarkwhite1`.`shopcode` AS `shopcode`,`excisemarkwhite1`.`excisetype` AS `excisetype`,`excisemarkwhite1`.`serialnumber` AS `serialnumber` from `excisemarkwhite1` */;

--
-- Final view structure for view `extendedparameter`
--

/*!50001 DROP VIEW IF EXISTS `extendedparameter`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `extendedparameter` AS select `extendedparameter1`.`extendedparameterid` AS `extendedparameterid`,`extendedparameter1`.`providerid` AS `providerid`,`extendedparameter1`.`code` AS `code`,`extendedparameter1`.`name` AS `name`,`extendedparameter1`.`mask` AS `mask`,`extendedparameter1`.`required` AS `required` from `extendedparameter1` */;

--
-- Final view structure for view `goodstimerestrict`
--

/*!50001 DROP VIEW IF EXISTS `goodstimerestrict`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `goodstimerestrict` AS select `goodstimerestrict1`.`bcode` AS `bcode`,`goodstimerestrict1`.`code` AS `code`,`goodstimerestrict1`.`flag` AS `flag`,`goodstimerestrict1`.`text` AS `text`,`goodstimerestrict1`.`time_beg` AS `time_beg`,`goodstimerestrict1`.`time_end` AS `time_end` from `goodstimerestrict1` */;

--
-- Final view structure for view `groups`
--

/*!50001 DROP VIEW IF EXISTS `groups`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `groups` AS select `groups1`.`class` AS `class`,`groups1`.`sclass` AS `sclass`,`groups1`.`name` AS `name`,`groups1`.`pricetype` AS `pricetype` from `groups1` */;

--
-- Final view structure for view `hotkey`
--

/*!50001 DROP VIEW IF EXISTS `hotkey`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `hotkey` AS select `hotkey1`.`hotkeycode` AS `hotkeycode`,`hotkey1`.`hotkeyname` AS `hotkeyname`,`hotkey1`.`bybarcode` AS `bybarcode` from `hotkey1` */;

--
-- Final view structure for view `hotkeyinvent`
--

/*!50001 DROP VIEW IF EXISTS `hotkeyinvent`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `hotkeyinvent` AS select `hotkeyinvent1`.`hotkeyinventid` AS `hotkeyinventid`,`hotkeyinvent1`.`inventcode` AS `inventcode`,`hotkeyinvent1`.`hotkeycode` AS `hotkeycode` from `hotkeyinvent1` */;

--
-- Final view structure for view `images`
--

/*!50001 DROP VIEW IF EXISTS `images`*/;

--
-- Final view structure for view `kbkey`
--

/*!50001 DROP VIEW IF EXISTS `kbkey`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `kbkey` AS select `kbkey1`.`keycode` AS `keycode`,`kbkey1`.`cmactioncode` AS `cmactioncode`,`kbkey1`.`keyvalue` AS `keyvalue`,`kbkey1`.`context` AS `context` from `kbkey1` */;

--
-- Final view structure for view `kit`
--

/*!50001 DROP VIEW IF EXISTS `kit`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `kit` AS select `kit1`.`campaignid` AS `campaignid`,`kit1`.`kitid` AS `kitid`,`kit1`.`name` AS `name`,`kit1`.`kittype` AS `kittype`,`kit1`.`maxtimes` AS `maxtimes` from `kit1` */;

--
-- Final view structure for view `kitdisc`
--

/*!50001 DROP VIEW IF EXISTS `kitdisc`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `kitdisc` AS select `kitdisc1`.`disckind` AS `disckind`,`kitdisc1`.`disctype` AS `disctype`,`kitdisc1`.`discval` AS `discval`,`kitdisc1`.`kitdiscid` AS `kitdiscid`,`kitdisc1`.`kitgoodsid` AS `kitgoodsid`,`kitdisc1`.`impactmode` AS `impactmode` from `kitdisc1` */;

--
-- Final view structure for view `kitgoods`
--

/*!50001 DROP VIEW IF EXISTS `kitgoods`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `kitgoods` AS select `kitgoods1`.`goodscode` AS `goodscode`,`kitgoods1`.`kitgoodsid` AS `kitgoodsid`,`kitgoods1`.`kitid` AS `kitid`,`kitgoods1`.`quantity` AS `quantity` from `kitgoods1` */;

--
-- Final view structure for view `macro`
--

/*!50001 DROP VIEW IF EXISTS `macro`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `macro` AS select `macro1`.`macrocode` AS `macrocode`,`macro1`.`macroname` AS `macroname` from `macro1` */;

--
-- Final view structure for view `macroparameters`
--

/*!50001 DROP VIEW IF EXISTS `macroparameters`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `macroparameters` AS select `macroparameters1`.`macroparametercode` AS `macroparametercode`,`macroparameters1`.`macroparameterorder` AS `macroparameterorder`,`macroparameters1`.`cmactioncode` AS `cmactioncode`,`macroparameters1`.`macrocode` AS `macrocode` from `macroparameters1` */;

--
-- Final view structure for view `medicine`
--

/*!50001 DROP VIEW IF EXISTS `medicine`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `medicine` AS select `medicine1`.`code` AS `code`,`medicine1`.`party` AS `party`,`medicine1`.`barcode` AS `barcode`,`medicine1`.`series` AS `series`,`medicine1`.`shelflife` AS `shelflife`,`medicine1`.`producer` AS `producer`,`medicine1`.`price` AS `price`,`medicine1`.`inn` AS `inn`,`medicine1`.`remainquant` AS `remainquant`,`medicine1`.`remaindatetime` AS `remaindatetime`,`medicine1`.`countrycode` AS `countrycode`,`medicine1`.`options` AS `options`,`medicine1`.`packingprice` AS `packingprice`,`medicine1`.`cquant` AS `cquant`,`medicine1`.`packquant` AS `packquant`,`medicine1`.`supplydate` AS `supplydate`,`medicine1`.`rating` AS `rating`,`medicine1`.`bonusonsale` AS `bonusonsale`,`medicine1`.`row` AS `row`,`medicine1`.`shelf` AS `shelf`,`medicine1`.`dictname` AS `dictname`,`medicine1`.`dictcode` AS `dictcode` from `medicine1` */;

--
-- Final view structure for view `menu`
--

/*!50001 DROP VIEW IF EXISTS `menu`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `menu` AS select `menu1`.`menucode` AS `menucode`,`menu1`.`menuname` AS `menuname` from `menu1` */;

--
-- Final view structure for view `menuitem`
--

/*!50001 DROP VIEW IF EXISTS `menuitem`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `menuitem` AS select `menuitem1`.`menuitemcode` AS `menuitemcode`,`menuitem1`.`menuitemorder` AS `menuitemorder`,`menuitem1`.`cmactioncode` AS `cmactioncode`,`menuitem1`.`menucode` AS `menucode` from `menuitem1` */;

--
-- Final view structure for view `mol`
--

/*!50001 DROP VIEW IF EXISTS `mol`*/;

--
-- Final view structure for view `molaccess`
--

/*!50001 DROP VIEW IF EXISTS `molaccess`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `molaccess` AS select `molaccess1`.`code` AS `code`,`molaccess1`.`shopcode` AS `shopcode`,`molaccess1`.`cashcode` AS `cashcode` from `molaccess1` */;

--
-- Final view structure for view `mop`
--

/*!50001 DROP VIEW IF EXISTS `mop`*/;

--
-- Final view structure for view `note`
--

/*!50001 DROP VIEW IF EXISTS `note`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `note` AS select `note1`.`id` AS `id`,`note1`.`name` AS `name`,`note1`.`type` AS `type`,`note1`.`triggertype` AS `triggertype`,`note1`.`saveresult` AS `saveresult`,`note1`.`template` AS `template` from `note1` */;

--
-- Final view structure for view `op`
--

/*!50001 DROP VIEW IF EXISTS `op`*/;

--
-- Final view structure for view `option`
--

/*!50001 DROP VIEW IF EXISTS `option`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `option` AS select `option1`.`idoption` AS `idoption`,`option1`.`type` AS `type`,`option1`.`text` AS `text` from `option1` */;

--
-- Final view structure for view `organization`
--

/*!50001 DROP VIEW IF EXISTS `organization`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `organization` AS select `organization1`.`organizationcode` AS `organizationcode`,`organization1`.`name` AS `name`,`organization1`.`registeredaddress` AS `registeredaddress`,`organization1`.`correspondenceaddress` AS `correspondenceaddress`,`organization1`.`ogrn` AS `ogrn`,`organization1`.`inn` AS `inn`,`organization1`.`kpp` AS `kpp`,`organization1`.`okpo` AS `okpo`,`organization1`.`operatingaccount` AS `operatingaccount`,`organization1`.`bank` AS `bank`,`organization1`.`correspondingaccount` AS `correspondingaccount`,`organization1`.`bik` AS `bik`,`organization1`.`receiver` AS `receiver`,`organization1`.`customer` AS `customer`,`organization1`.`payer` AS `payer`,`organization1`.`deliveryaddress` AS `deliveryaddress` from `organization1` */;

--
-- Final view structure for view `payforbiddance`
--

/*!50001 DROP VIEW IF EXISTS `payforbiddance`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `payforbiddance` AS select `payforbiddance1`.`valutcode` AS `valutcode`,`payforbiddance1`.`deptcode` AS `deptcode` from `payforbiddance1` */;

--
-- Final view structure for view `picklist`
--

/*!50001 DROP VIEW IF EXISTS `picklist`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `picklist` AS select `picklist1`.`code` AS `code`,`picklist1`.`name` AS `name`,`picklist1`.`image` AS `image`,`picklist1`.`parent` AS `parent`,`picklist1`.`tmccode` AS `tmccode`,`picklist1`.`itemorder` AS `itemorder` from `picklist1` */;

--
-- Final view structure for view `prices`
--

/*!50001 DROP VIEW IF EXISTS `prices`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `prices` AS select `prices1`.`barcode` AS `barcode`,`prices1`.`documentid` AS `documentid`,`prices1`.`effectivedate` AS `effectivedate`,`prices1`.`doctype` AS `doctype`,`prices1`.`price` AS `price`,`prices1`.`aspectvaluesetcode` AS `aspectvaluesetcode`,`prices1`.`minprice` AS `minprice`,`prices1`.`pricetype` AS `pricetype`,`prices1`.`effectivedateend` AS `effectivedateend`,`prices1`.`minretailprice` AS `minretailprice`,`prices1`.`packingprice` AS `packingprice` from `prices1` */;

--
-- Final view structure for view `provider`
--

/*!50001 DROP VIEW IF EXISTS `provider`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `provider` AS select `provider1`.`providerid` AS `providerid`,`provider1`.`providercode` AS `providercode`,`provider1`.`terminalid` AS `terminalid`,`provider1`.`categoryid` AS `categoryid`,`provider1`.`name` AS `name`,`provider1`.`inn` AS `inn`,`provider1`.`phone` AS `phone`,`provider1`.`address` AS `address`,`provider1`.`accountmask` AS `accountmask`,`provider1`.`minsum` AS `minsum`,`provider1`.`maxsum` AS `maxsum`,`provider1`.`bcodemask` AS `bcodemask`,`provider1`.`bcodetransform` AS `bcodetransform`,`provider1`.`inputmask` AS `inputmask`,`provider1`.`inputtransform` AS `inputtransform`,`provider1`.`accountdatamask` AS `accountdatamask`,`provider1`.`accountdatatransform` AS `accountdatatransform` from `provider1` */;

--
-- Final view structure for view `region`
--

/*!50001 DROP VIEW IF EXISTS `region`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `region` AS select `region1`.`regionid` AS `regionid`,`region1`.`regioncode` AS `regioncode`,`region1`.`agentcode` AS `agentcode`,`region1`.`name` AS `name` from `region1` */;

--
-- Final view structure for view `remain`
--

/*!50001 DROP VIEW IF EXISTS `remain`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `remain` AS select `remain1`.`remaincode` AS `remaincode`,`remain1`.`quant` AS `quant`,`remain1`.`timevalid` AS `timevalid`,`remain1`.`aspectvaluesetcode` AS `aspectvaluesetcode`,`remain1`.`goodscode` AS `goodscode` from `remain1` */;

--
-- Final view structure for view `remainbarcode`
--

/*!50001 DROP VIEW IF EXISTS `remainbarcode`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `remainbarcode` AS select `remainbarcode1`.`barcode` AS `barcode`,`remainbarcode1`.`quant` AS `quant`,`remainbarcode1`.`datetime` AS `datetime` from `remainbarcode1` */;

--
-- Final view structure for view `remaindraftbeer`
--

/*!50001 DROP VIEW IF EXISTS `remaindraftbeer`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `remaindraftbeer` AS select `remaindraftbeer1`.`markingcode` AS `markingcode`,`remaindraftbeer1`.`barcode` AS `barcode`,`remaindraftbeer1`.`name` AS `name`,`remaindraftbeer1`.`connectdate` AS `connectdate`,`remaindraftbeer1`.`expirationdate` AS `expirationdate`,`remaindraftbeer1`.`volume` AS `volume` from `remaindraftbeer1` */;

--
-- Final view structure for view `role`
--

/*!50001 DROP VIEW IF EXISTS `role`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `role` AS select `role1`.`rolecode` AS `rolecode`,`role1`.`rolename` AS `rolename`,`role1`.`cashmanagement` AS `cashmanagement` from `role1` */;

--
-- Final view structure for view `rolecmaction`
--

/*!50001 DROP VIEW IF EXISTS `rolecmaction`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `rolecmaction` AS select `rolecmaction1`.`id` AS `id`,`rolecmaction1`.`rolecode` AS `rolecode`,`rolecmaction1`.`cmactioncode` AS `cmactioncode`,`rolecmaction1`.`rule` AS `rule`,`rolecmaction1`.`documenttype` AS `documenttype` from `rolecmaction1` */;

--
-- Final view structure for view `rolecommand`
--

/*!50001 DROP VIEW IF EXISTS `rolecommand`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `rolecommand` AS select `rolecommand1`.`id` AS `id`,`rolecommand1`.`rolecode` AS `rolecode`,`rolecommand1`.`commandcode` AS `commandcode`,`rolecommand1`.`rule` AS `rule`,`rolecommand1`.`documenttype` AS `documenttype` from `rolecommand1` */;

--
-- Final view structure for view `rolerelation`
--

/*!50001 DROP VIEW IF EXISTS `rolerelation`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `rolerelation` AS select `rolerelation1`.`id` AS `id`,`rolerelation1`.`primaryrole` AS `primaryrole`,`rolerelation1`.`secondaryrole` AS `secondaryrole`,`rolerelation1`.`rule` AS `rule` from `rolerelation1` */;

--
-- Final view structure for view `roleuser`
--

/*!50001 DROP VIEW IF EXISTS `roleuser`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `roleuser` AS select `roleuser1`.`id` AS `id`,`roleuser1`.`usercode` AS `usercode`,`roleuser1`.`rolecode` AS `rolecode`,`roleuser1`.`rule` AS `rule` from `roleuser1` */;

--
-- Final view structure for view `rostat`
--

/*!50001 DROP VIEW IF EXISTS `rostat`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `rostat` AS select `rostat1`.`cashcode` AS `cashcode`,`rostat1`.`dcode` AS `dcode`,`rostat1`.`bcode` AS `bcode`,`rostat1`.`code` AS `code`,`rostat1`.`quant` AS `quant`,`rostat1`.`dt` AS `dt`,`rostat1`.`policy` AS `policy`,`rostat1`.`mode1` AS `mode1` from `rostat1` */;

--
-- Final view structure for view `sdabs`
--

/*!50001 DROP VIEW IF EXISTS `sdabs`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sdabs` AS select `sdabs1`.`disc_val` AS `disc_val`,`sdabs1`.`disc_name` AS `disc_name` from `sdabs1` */;

--
-- Final view structure for view `sdperc`
--

/*!50001 DROP VIEW IF EXISTS `sdperc`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sdperc` AS select `sdperc1`.`disc_val` AS `disc_val`,`sdperc1`.`disc_name` AS `disc_name` from `sdperc1` */;

--
-- Final view structure for view `securityweight`
--

/*!50001 DROP VIEW IF EXISTS `securityweight`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `securityweight` AS select `securityweight1`.`barcode` AS `barcode`,`securityweight1`.`weightfrom1` AS `weightfrom1`,`securityweight1`.`weightto1` AS `weightto1`,`securityweight1`.`weightfrom2` AS `weightfrom2`,`securityweight1`.`weightto2` AS `weightto2`,`securityweight1`.`weightfrom3` AS `weightfrom3`,`securityweight1`.`weightto3` AS `weightto3` from `securityweight1` */;

--
-- Final view structure for view `settings`
--

/*!50001 DROP VIEW IF EXISTS `settings`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `settings` AS select `settings1`.`name` AS `name`,`settings1`.`val` AS `val` from `settings1` */;

--
-- Final view structure for view `shop`
--

/*!50001 DROP VIEW IF EXISTS `shop`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `shop` AS select `shop1`.`code` AS `code`,`shop1`.`title` AS `title`,`shop1`.`extendedoptions` AS `extendedoptions`,`shop1`.`address` AS `address`,`shop1`.`innexcise` AS `innexcise`,`shop1`.`kppexcise` AS `kppexcise`,`shop1`.`fsraridexcise` AS `fsraridexcise`,`shop1`.`innnonexcise` AS `innnonexcise`,`shop1`.`kppnonexcise` AS `kppnonexcise`,`shop1`.`fsraridnonexcise` AS `fsraridnonexcise`,`shop1`.`vendorname` AS `vendorname`,`shop1`.`vendorlegaladdress` AS `vendorlegaladdress`,`shop1`.`vendorinn` AS `vendorinn`,`shop1`.`vendorkpp` AS `vendorkpp`,`shop1`.`shippername` AS `shippername`,`shop1`.`shipperaddress` AS `shipperaddress` from `shop1` */;

--
-- Final view structure for view `shopgrouplabels`
--

/*!50001 DROP VIEW IF EXISTS `shopgrouplabels`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `shopgrouplabels` AS select `shopgrouplabels1`.`code` AS `code`,`shopgrouplabels1`.`name` AS `name` from `shopgrouplabels1` */;

--
-- Final view structure for view `shoplabels`
--

/*!50001 DROP VIEW IF EXISTS `shoplabels`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `shoplabels` AS select `shoplabels1`.`code` AS `code`,`shoplabels1`.`name` AS `name`,`shoplabels1`.`shopgrouplabelcode` AS `shopgrouplabelcode` from `shoplabels1` */;

--
-- Final view structure for view `shoptoshoplabels`
--

/*!50001 DROP VIEW IF EXISTS `shoptoshoplabels`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `shoptoshoplabels` AS select `shoptoshoplabels1`.`shopcode` AS `shopcode`,`shoptoshoplabels1`.`shoplabelcode` AS `shoplabelcode` from `shoptoshoplabels1` */;

--
-- Final view structure for view `spindex`
--

/*!50001 DROP VIEW IF EXISTS `spindex`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `spindex` AS select `spindex1`.`ind_val` AS `ind_val`,`spindex1`.`ind_name` AS `ind_name` from `spindex1` */;

--
-- Final view structure for view `sprices`
--

/*!50001 DROP VIEW IF EXISTS `sprices`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sprices` AS select `sprices1`.`code` AS `code`,`sprices1`.`name` AS `name`,`sprices1`.`type` AS `type`,`sprices1`.`inp_mode` AS `inp_mode`,`sprices1`.`force_mode` AS `force_mode`,`sprices1`.`ext_mode` AS `ext_mode`,`sprices1`.`cmp_mode` AS `cmp_mode`,`sprices1`.`price` AS `price`,`sprices1`.`sindex` AS `sindex`,`sprices1`.`disc_perc` AS `disc_perc`,`sprices1`.`disc_abs` AS `disc_abs`,`sprices1`.`ext_proc` AS `ext_proc`,`sprices1`.`oncheck` AS `oncheck` from `sprices1` */;

--
-- Final view structure for view `supplier`
--

/*!50001 DROP VIEW IF EXISTS `supplier`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `supplier` AS select `supplier1`.`code` AS `code`,`supplier1`.`name` AS `name`,`supplier1`.`phone` AS `phone`,`supplier1`.`inn` AS `inn` from `supplier1` */;

--
-- Final view structure for view `terminal`
--

/*!50001 DROP VIEW IF EXISTS `terminal`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `terminal` AS select `terminal1`.`terminalid` AS `terminalid`,`terminal1`.`agentcode` AS `agentcode`,`terminal1`.`terminalcode` AS `terminalcode`,`terminal1`.`address` AS `address` from `terminal1` */;

--
-- Final view structure for view `tgrlink`
--

/*!50001 DROP VIEW IF EXISTS `tgrlink`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tgrlink` AS select `tgrlink1`.`bcode` AS `bcode`,`tgrlink1`.`class` AS `class`,`tgrlink1`.`sclass` AS `sclass` from `tgrlink1` */;

--
-- Final view structure for view `timeperiod`
--

/*!50001 DROP VIEW IF EXISTS `timeperiod`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timeperiod` AS select `timeperiod1`.`campaignid` AS `campaignid`,`timeperiod1`.`date_end` AS `date_end`,`timeperiod1`.`date_start` AS `date_start`,`timeperiod1`.`day_end` AS `day_end`,`timeperiod1`.`day_start` AS `day_start`,`timeperiod1`.`timeperiodid` AS `timeperiodid`,`timeperiod1`.`time_end` AS `time_end`,`timeperiod1`.`time_start` AS `time_start` from `timeperiod1` */;

--
-- Final view structure for view `timerestrict`
--

/*!50001 DROP VIEW IF EXISTS `timerestrict`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timerestrict` AS select `timerestrict1`.`timerestrictid` AS `timerestrictid`,`timerestrict1`.`alcoholpercent` AS `alcoholpercent`,`timerestrict1`.`datebeg` AS `datebeg`,`timerestrict1`.`dateend` AS `dateend`,`timerestrict1`.`daysbeg` AS `daysbeg`,`timerestrict1`.`daysend` AS `daysend`,`timerestrict1`.`timebeg` AS `timebeg`,`timerestrict1`.`timeend` AS `timeend` from `timerestrict1` */;

--
-- Final view structure for view `tmc`
--

/*!50001 DROP VIEW IF EXISTS `tmc`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmc` AS select `tmc1`.`bcode` AS `bcode`,`tmc1`.`vatcode1` AS `vatcode1`,`tmc1`.`vatcode2` AS `vatcode2`,`tmc1`.`vatcode3` AS `vatcode3`,`tmc1`.`vatcode4` AS `vatcode4`,`tmc1`.`vatcode5` AS `vatcode5`,`tmc1`.`dcode` AS `dcode`,`tmc1`.`name` AS `name`,`tmc1`.`articul` AS `articul`,`tmc1`.`cquant` AS `cquant`,`tmc1`.`measure` AS `measure`,`tmc1`.`pricetype` AS `pricetype`,`tmc1`.`price` AS `price`,`tmc1`.`minprice` AS `minprice`,`tmc1`.`valcode` AS `valcode`,`tmc1`.`quantdefault` AS `quantdefault`,`tmc1`.`quantlimit` AS `quantlimit`,`tmc1`.`ostat` AS `ostat`,`tmc1`.`links` AS `links`,`tmc1`.`quant_mode` AS `quant_mode`,`tmc1`.`bcode_mode` AS `bcode_mode`,`tmc1`.`op_mode` AS `op_mode`,`tmc1`.`dept_mode` AS `dept_mode`,`tmc1`.`price_mode` AS `price_mode`,`tmc1`.`tara_flag` AS `tara_flag`,`tmc1`.`tara_mode` AS `tara_mode`,`tmc1`.`tara_default` AS `tara_default`,`tmc1`.`unit_weight` AS `unit_weight`,`tmc1`.`code` AS `code`,`tmc1`.`aspectschemecode` AS `aspectschemecode`,`tmc1`.`aspectvaluesetcode` AS `aspectvaluesetcode`,`tmc1`.`aspectusecase` AS `aspectusecase`,`tmc1`.`aspectselectionrule` AS `aspectselectionrule`,`tmc1`.`extendetoptions` AS `extendetoptions`,`tmc1`.`groupcode` AS `groupcode`,`tmc1`.`remain` AS `remain`,`tmc1`.`remaindate` AS `remaindate`,`tmc1`.`documentquantlimit` AS `documentquantlimit`,`tmc1`.`age` AS `age`,`tmc1`.`alcoholpercent` AS `alcoholpercent`,`tmc1`.`inn` AS `inn`,`tmc1`.`kpp` AS `kpp`,`tmc1`.`alctypecode` AS `alctypecode`,`tmc1`.`manufacturercountrycode` AS `manufacturercountrycode`,`tmc1`.`paymentobject` AS `paymentobject`,`tmc1`.`loyaltymode` AS `loyaltymode`,`tmc1`.`minretailprice` AS `minretailprice`,`tmc1`.`ntin` AS `ntin`,`tmc1`.`packagecode` AS `packagecode`,`tmc1`.`ownertype` AS `ownertype` from `tmc1` */;

--
-- Final view structure for view `tmcalcocode`
--

/*!50001 DROP VIEW IF EXISTS `tmcalcocode`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcalcocode` AS select `tmcalcocode1`.`tmccode` AS `tmccode`,`tmcalcocode1`.`alcocode` AS `alcocode` from `tmcalcocode1` */;

--
-- Final view structure for view `tmccatalog`
--

/*!50001 DROP VIEW IF EXISTS `tmccatalog`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmccatalog` AS select `tmccatalog1`.`tmccode` AS `tmccode`,`tmccatalog1`.`catalogid` AS `catalogid`,`tmccatalog1`.`tmcprice` AS `tmcprice`,`tmccatalog1`.`image` AS `image`,`tmccatalog1`.`percentdiscount` AS `percentdiscount`,`tmccatalog1`.`mincount` AS `mincount`,`tmccatalog1`.`maxcount` AS `maxcount`,`tmccatalog1`.`multiplicity` AS `multiplicity` from `tmccatalog1` */;

--
-- Final view structure for view `tmcext`
--

/*!50001 DROP VIEW IF EXISTS `tmcext`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcext` AS select `tmcext1`.`bcode` AS `bcode`,`tmcext1`.`code` AS `code`,`tmcext1`.`name` AS `name` from `tmcext1` */;

--
-- Final view structure for view `tmcgroups`
--

/*!50001 DROP VIEW IF EXISTS `tmcgroups`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcgroups` AS select `tmcgroups1`.`groupcode` AS `groupcode`,`tmcgroups1`.`parentgroupcode` AS `parentgroupcode`,`tmcgroups1`.`groupname` AS `groupname` from `tmcgroups1` */;

--
-- Final view structure for view `tmckit`
--

/*!50001 DROP VIEW IF EXISTS `tmckit`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmckit` AS select `tmckit1`.`barcode` AS `barcode`,`tmckit1`.`name` AS `name` from `tmckit1` */;

--
-- Final view structure for view `tmckititem`
--

/*!50001 DROP VIEW IF EXISTS `tmckititem`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmckititem` AS select `tmckititem1`.`tmccode` AS `tmccode`,`tmckititem1`.`tmckitbarcode` AS `tmckitbarcode`,`tmckititem1`.`quantity` AS `quantity` from `tmckititem1` */;

--
-- Final view structure for view `tmclink`
--

/*!50001 DROP VIEW IF EXISTS `tmclink`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmclink` AS select `tmclink1`.`bcode` AS `bcode`,`tmclink1`.`bcodeslave` AS `bcodeslave`,`tmclink1`.`quantslave` AS `quantslave`,`tmclink1`.`trans` AS `trans` from `tmclink1` */;

--
-- Final view structure for view `tmcrequiredquantity`
--

/*!50001 DROP VIEW IF EXISTS `tmcrequiredquantity`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcrequiredquantity` AS select `tmcrequiredquantity1`.`tmccode` AS `tmccode` from `tmcrequiredquantity1` */;

--
-- Final view structure for view `tmcsalerestrict`
--

/*!50001 DROP VIEW IF EXISTS `tmcsalerestrict`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcsalerestrict` AS select `tmcsalerestrict1`.`salerestrictcode` AS `salerestrictcode`,`tmcsalerestrict1`.`tmccode` AS `tmccode`,`tmcsalerestrict1`.`datebeg` AS `datebeg`,`tmcsalerestrict1`.`dateend` AS `dateend`,`tmcsalerestrict1`.`daysbeg` AS `daysbeg`,`tmcsalerestrict1`.`daysend` AS `daysend`,`tmcsalerestrict1`.`timebeg` AS `timebeg`,`tmcsalerestrict1`.`timeend` AS `timeend` from `tmcsalerestrict1` */;

--
-- Final view structure for view `tmcsupplier`
--

/*!50001 DROP VIEW IF EXISTS `tmcsupplier`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcsupplier` AS select `tmcsupplier1`.`tmccode` AS `tmccode`,`tmcsupplier1`.`suppliercode` AS `suppliercode`,`tmcsupplier1`.`agentpaymentobject` AS `agentpaymentobject` from `tmcsupplier1` */;

--
-- Final view structure for view `tmcvisualverify`
--

/*!50001 DROP VIEW IF EXISTS `tmcvisualverify`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tmcvisualverify` AS select `tmcvisualverify1`.`tmccode` AS `tmccode` from `tmcvisualverify1` */;

--
-- Final view structure for view `tostat`
--

/*!50001 DROP VIEW IF EXISTS `tostat`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tostat` AS select `tostat1`.`dcode` AS `dcode`,`tostat1`.`bcode` AS `bcode`,`tostat1`.`code` AS `code`,`tostat1`.`quant` AS `quant`,`tostat1`.`dt` AS `dt`,`tostat1`.`cashcode` AS `cashcode` from `tostat1` */;

--
-- Final view structure for view `tprices`
--

/*!50001 DROP VIEW IF EXISTS `tprices`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tprices` AS select `tprices1`.`tindex` AS `tindex`,`tprices1`.`bcode` AS `bcode`,`tprices1`.`price` AS `price`,`tprices1`.`name` AS `name`,`tprices1`.`documentid` AS `documentid`,`tprices1`.`effectivedate` AS `effectivedate`,`tprices1`.`packingprice` AS `packingprice` from `tprices1` */;

--
-- Final view structure for view `tquick`
--

/*!50001 DROP VIEW IF EXISTS `tquick`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tquick` AS select `tquick1`.`qcode` AS `qcode`,`tquick1`.`bcode` AS `bcode`,`tquick1`.`bquant` AS `bquant` from `tquick1` */;

--
-- Final view structure for view `tr`
--

/*!50001 DROP VIEW IF EXISTS `tr`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tr` AS select `tr1`.`id` AS `id`,`tr1`.`idtype` AS `idtype`,`tr1`.`lang` AS `lang`,`tr1`.`translation` AS `translation` from `tr1` */;

--
-- Final view structure for view `units`
--

/*!50001 DROP VIEW IF EXISTS `units`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `units` AS select `units1`.`code` AS `code`,`units1`.`name` AS `name`,`units1`.`flag` AS `flag`,`units1`.`frunit` AS `frunit` from `units1` */;

--
-- Final view structure for view `valut`
--

/*!50001 DROP VIEW IF EXISTS `valut`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `valut` AS select `valut1`.`code` AS `code`,`valut1`.`stat` AS `stat`,`valut1`.`chr` AS `chr`,`valut1`.`name` AS `name`,`valut1`.`type` AS `type`,`valut1`.`rate` AS `rate`,`valut1`.`ratecb` AS `ratecb`,`valut1`.`decpoint` AS `decpoint`,`valut1`.`round` AS `round`,`valut1`.`mode` AS `mode`,`valut1`.`drawer` AS `drawer`,`valut1`.`discascheme` AS `discascheme`,`valut1`.`ishidden` AS `ishidden`,`valut1`.`operation` AS `operation`,`valut1`.`payprocmodule` AS `payprocmodule`,`valut1`.`merchantid` AS `merchantid`,`valut1`.`payprocdir` AS `payprocdir` from `valut1` */;

--
-- Final view structure for view `vat`
--

/*!50001 DROP VIEW IF EXISTS `vat`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vat` AS select `vat1`.`code` AS `code`,`vat1`.`name` AS `name`,`vat1`.`rate` AS `rate`,`vat1`.`mode` AS `mode` from `vat1` */;

--
-- Final view structure for view `verification`
--

/*!50001 DROP VIEW IF EXISTS `verification`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verification` AS select `verification1`.`idverification` AS `idverification`,`verification1`.`type` AS `type`,`verification1`.`name` AS `name`,`verification1`.`attribute` AS `attribute` from `verification1` */;


