-- MySQL dump 10.13  Distrib 5.5.34, for Win32 (x86)
--
-- Host: localhost    Database: nsr_starparking
-- ------------------------------------------------------
-- Server version	5.5.34

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `asignacioncajas`
--

DROP TABLE IF EXISTS `asignacioncajas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asignacioncajas` (
  `idasignacion` int(11) NOT NULL AUTO_INCREMENT,
  `idcaja` int(11) NOT NULL,
  `idparqueo` int(11) NOT NULL,
  `idterminal` int(11) NOT NULL,
  PRIMARY KEY (`idasignacion`),
  KEY `FK_asignacioncajas_idparqueo` (`idparqueo`),
  KEY `FK_asignacioncajas_idcaja` (`idcaja`),
  KEY `FK_asignacioncajas_idterminal` (`idterminal`),
  CONSTRAINT `FK_asignacioncajas_idcaja` FOREIGN KEY (`idcaja`) REFERENCES `cajas` (`idcaja`),
  CONSTRAINT `FK_asignacioncajas_idparqueo` FOREIGN KEY (`idparqueo`) REFERENCES `parqueos` (`idparqueo`),
  CONSTRAINT `FK_asignacioncajas_idterminal` FOREIGN KEY (`idterminal`) REFERENCES `terminales` (`idterminal`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `asignacioncajas`
--

LOCK TABLES `asignacioncajas` WRITE;
/*!40000 ALTER TABLE `asignacioncajas` DISABLE KEYS */;
INSERT INTO `asignacioncajas` VALUES (1,1,1,1);
/*!40000 ALTER TABLE `asignacioncajas` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `asignaciondocs`
--

DROP TABLE IF EXISTS `asignaciondocs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asignaciondocs` (
  `idasignacion` int(11) NOT NULL AUTO_INCREMENT,
  `preo` tinyint(1) DEFAULT '0',
  `idcaja` int(11) NOT NULL,
  `iddocumento` int(11) NOT NULL,
  `idparqueo` int(11) DEFAULT NULL,
  PRIMARY KEY (`idasignacion`),
  KEY `FK_asignaciondocs_idcaja` (`idcaja`),
  KEY `FK_asignaciondocs_iddocumento` (`iddocumento`),
  KEY `FK_asignaciondocs_idparqueo` (`idparqueo`),
  CONSTRAINT `FK_asignaciondocs_idcaja` FOREIGN KEY (`idcaja`) REFERENCES `cajas` (`idcaja`),
  CONSTRAINT `FK_asignaciondocs_iddocumento` FOREIGN KEY (`iddocumento`) REFERENCES `documentos` (`iddocumento`),
  CONSTRAINT `FK_asignaciondocs_idparqueo` FOREIGN KEY (`idparqueo`) REFERENCES `parqueos` (`idparqueo`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `asignaciondocs`
--

LOCK TABLES `asignaciondocs` WRITE;
/*!40000 ALTER TABLE `asignaciondocs` DISABLE KEYS */;
INSERT INTO `asignaciondocs` VALUES (2,1,1,3,NULL);
/*!40000 ALTER TABLE `asignaciondocs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `asignacionprecios`
--

DROP TABLE IF EXISTS `asignacionprecios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asignacionprecios` (
  `idasignacion` int(11) NOT NULL AUTO_INCREMENT,
  `preo` tinyint(1) DEFAULT '0',
  `valor` double DEFAULT NULL,
  `idprecio` int(11) NOT NULL,
  `idservicio` int(11) NOT NULL,
  `cantidadmin` double DEFAULT NULL,
  PRIMARY KEY (`idasignacion`),
  KEY `FK_asignacionprecios_idservicio` (`idservicio`),
  KEY `FK_asignacionprecios_idprecio` (`idprecio`),
  CONSTRAINT `FK_asignacionprecios_idprecio` FOREIGN KEY (`idprecio`) REFERENCES `precios` (`idprecio`),
  CONSTRAINT `FK_asignacionprecios_idservicio` FOREIGN KEY (`idservicio`) REFERENCES `servicios` (`idservicio`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `asignacionprecios`
--

LOCK TABLES `asignacionprecios` WRITE;
/*!40000 ALTER TABLE `asignacionprecios` DISABLE KEYS */;
INSERT INTO `asignacionprecios` VALUES (1,1,5,1,1,NULL),(2,0,2,2,1,24),(3,1,500,1,2,NULL);
/*!40000 ALTER TABLE `asignacionprecios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `asignacionvehiculos`
--

DROP TABLE IF EXISTS `asignacionvehiculos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asignacionvehiculos` (
  `idasignacion` int(11) NOT NULL AUTO_INCREMENT,
  `idcliente` int(11) NOT NULL,
  `idvehiculo` int(11) NOT NULL,
  PRIMARY KEY (`idasignacion`),
  KEY `FK_asignacionvehiculos_idvehiculo` (`idvehiculo`),
  KEY `FK_asignacionvehiculos_idcliente` (`idcliente`),
  CONSTRAINT `FK_asignacionvehiculos_idcliente` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`idcliente`),
  CONSTRAINT `FK_asignacionvehiculos_idvehiculo` FOREIGN KEY (`idvehiculo`) REFERENCES `vehiculos` (`idvehiculo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `asignacionvehiculos`
--

LOCK TABLES `asignacionvehiculos` WRITE;
/*!40000 ALTER TABLE `asignacionvehiculos` DISABLE KEYS */;
/*!40000 ALTER TABLE `asignacionvehiculos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bitacora`
--

DROP TABLE IF EXISTS `bitacora`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bitacora` (
  `idbitacora` int(11) NOT NULL AUTO_INCREMENT,
  `ctype` varchar(50) DEFAULT NULL,
  `descripcion` varchar(150) DEFAULT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `identidad` int(11) DEFAULT NULL,
  `idterminal` int(11) DEFAULT NULL,
  `idusuario` int(11) NOT NULL,
  PRIMARY KEY (`idbitacora`),
  KEY `FK_bitacora_idusuario` (`idusuario`),
  KEY `FK_bitacora_idterminal` (`idterminal`),
  CONSTRAINT `FK_bitacora_idterminal` FOREIGN KEY (`idterminal`) REFERENCES `terminales` (`idterminal`),
  CONSTRAINT `FK_bitacora_idusuario` FOREIGN KEY (`idusuario`) REFERENCES `usuarios` (`idusuario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bitacora`
--

LOCK TABLES `bitacora` WRITE;
/*!40000 ALTER TABLE `bitacora` DISABLE KEYS */;
/*!40000 ALTER TABLE `bitacora` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cajas`
--

DROP TABLE IF EXISTS `cajas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cajas` (
  `idcaja` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(50) NOT NULL,
  `estado` int(11) NOT NULL,
  `tipo` int(11) DEFAULT '1',
  PRIMARY KEY (`idcaja`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cajas`
--

LOCK TABLES `cajas` WRITE;
/*!40000 ALTER TABLE `cajas` DISABLE KEYS */;
INSERT INTO `cajas` VALUES (1,'Caja 1',1,1);
/*!40000 ALTER TABLE `cajas` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `clientes`
--

DROP TABLE IF EXISTS `clientes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientes` (
  `idcliente` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(20) DEFAULT NULL,
  `direccion` varchar(100) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `empresa` varchar(75) DEFAULT NULL,
  `estado` int(11) NOT NULL,
  `nit` varchar(15) DEFAULT NULL,
  `nombre` varchar(100) NOT NULL,
  `telefono` varchar(75) DEFAULT NULL,
  PRIMARY KEY (`idcliente`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clientes`
--

LOCK TABLES `clientes` WRITE;
/*!40000 ALTER TABLE `clientes` DISABLE KEYS */;
INSERT INTO `clientes` VALUES (1,'1','Ciudad',NULL,NULL,1,'CF','Consumidor Final',NULL),(2,NULL,'',NULL,NULL,1,'123789-5','Ramiro Lopez',NULL),(3,NULL,'',NULL,NULL,1,'2199345-9','DONAL SAPON',NULL),(4,NULL,NULL,NULL,NULL,1,'456978-5','JORGE',NULL),(5,NULL,NULL,NULL,NULL,1,'784168K','PRUEBAS',NULL);
/*!40000 ALTER TABLE `clientes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `detalleventa`
--

DROP TABLE IF EXISTS `detalleventa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `detalleventa` (
  `iddetalle` int(11) NOT NULL AUTO_INCREMENT,
  `cantidad` double NOT NULL,
  `costo` double DEFAULT NULL,
  `descuento` double NOT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `orden` smallint(6) NOT NULL,
  `precio` double NOT NULL,
  `idservicio` int(11) NOT NULL,
  `idventa` int(11) NOT NULL,
  PRIMARY KEY (`iddetalle`),
  KEY `FK_detalleventa_idservicio` (`idservicio`),
  KEY `FK_detalleventa_idventa` (`idventa`),
  CONSTRAINT `FK_detalleventa_idservicio` FOREIGN KEY (`idservicio`) REFERENCES `servicios` (`idservicio`),
  CONSTRAINT `FK_detalleventa_idventa` FOREIGN KEY (`idventa`) REFERENCES `ventas` (`idventa`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `detalleventa`
--

LOCK TABLES `detalleventa` WRITE;
/*!40000 ALTER TABLE `detalleventa` DISABLE KEYS */;
INSERT INTO `detalleventa` VALUES (1,61,0,0,NULL,1,5,1,1),(2,61,0,0,NULL,1,5,1,2),(3,22,0,0,NULL,1,5,1,3),(4,25,0,0,NULL,1,5,1,4),(5,23,0,0,NULL,1,5,1,5),(8,1,0,0,NULL,1,5,1,8),(9,2,0,0,NULL,1,5,1,9),(10,5,0,0,NULL,1,5,1,10),(16,1,0,0,NULL,1,5,1,16),(17,1,0,0,NULL,1,5,1,17),(18,2,0,0,NULL,1,5,1,18),(19,2,0,0,NULL,1,5,1,19),(20,2,0,0,NULL,1,5,1,20),(21,1,0,0,NULL,1,5,1,21),(22,1,0,0,NULL,1,5,1,22),(23,1,0,0,NULL,1,5,1,23),(24,2,0,0,NULL,1,5,1,24),(25,1,0,0,NULL,1,5,1,25),(26,1,0,0,NULL,1,5,1,26),(27,1,0,0,NULL,1,5,1,27),(28,1,0,0,NULL,1,5,1,28),(29,1,0,0,NULL,1,5,1,29),(30,1,0,0,NULL,1,5,1,30);
/*!40000 ALTER TABLE `detalleventa` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `documentos`
--

DROP TABLE IF EXISTS `documentos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `documentos` (
  `iddocumento` int(11) NOT NULL AUTO_INCREMENT,
  `DTYPE` varchar(31) DEFAULT NULL,
  `correlativo` bigint(20) NOT NULL,
  `descripcion` varchar(50) NOT NULL,
  `doco` varchar(75) DEFAULT NULL,
  `estado` int(11) NOT NULL,
  `maxlines` int(11) DEFAULT NULL,
  `serie` varchar(50) DEFAULT NULL,
  `tipo` int(11) NOT NULL,
  PRIMARY KEY (`iddocumento`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `documentos`
--

LOCK TABLES `documentos` WRITE;
/*!40000 ALTER TABLE `documentos` DISABLE KEYS */;
INSERT INTO `documentos` VALUES (1,'Documentos',1,'Ticket','C:\\Users\\Fernando\\Desktop\\StarParking\\docos\\Ticket.jasper',1,NULL,'A',2),(2,'Documentos',14,'Factura','C:\\Users\\Fernando\\Desktop\\StarParking\\docos\\FacturaTk.jasper',1,NULL,'A',1),(3,'Resoluciones',11,'Factura',NULL,1,NULL,'B',1);
/*!40000 ALTER TABLE `documentos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `empresas`
--

DROP TABLE IF EXISTS `empresas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `empresas` (
  `idempresa` int(11) NOT NULL AUTO_INCREMENT,
  `estado` int(11) NOT NULL,
  `nombre` varchar(30) NOT NULL,
  PRIMARY KEY (`idempresa`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `empresas`
--

LOCK TABLES `empresas` WRITE;
/*!40000 ALTER TABLE `empresas` DISABLE KEYS */;
/*!40000 ALTER TABLE `empresas` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `grupousuarios`
--

DROP TABLE IF EXISTS `grupousuarios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `grupousuarios` (
  `idgrupo` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(30) NOT NULL,
  `reportes` varchar(100) DEFAULT NULL,
  `tipo` int(11) DEFAULT '2',
  PRIMARY KEY (`idgrupo`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `grupousuarios`
--

LOCK TABLES `grupousuarios` WRITE;
/*!40000 ALTER TABLE `grupousuarios` DISABLE KEYS */;
INSERT INTO `grupousuarios` VALUES (1,'Admin',NULL,1);
/*!40000 ALTER TABLE `grupousuarios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `movcaja`
--

DROP TABLE IF EXISTS `movcaja`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `movcaja` (
  `idmovcaja` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(100) DEFAULT NULL,
  `egreso` double NOT NULL,
  `fecha` date NOT NULL,
  `ingreso` double NOT NULL,
  `idcaja` int(11) NOT NULL,
  `idoperacion` int(11) DEFAULT NULL,
  PRIMARY KEY (`idmovcaja`),
  KEY `FK_movcaja_idoperacion` (`idoperacion`),
  KEY `FK_movcaja_idcaja` (`idcaja`),
  CONSTRAINT `FK_movcaja_idcaja` FOREIGN KEY (`idcaja`) REFERENCES `cajas` (`idcaja`),
  CONSTRAINT `FK_movcaja_idoperacion` FOREIGN KEY (`idoperacion`) REFERENCES `operacionescaja` (`idoperacion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `movcaja`
--

LOCK TABLES `movcaja` WRITE;
/*!40000 ALTER TABLE `movcaja` DISABLE KEYS */;
/*!40000 ALTER TABLE `movcaja` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `operacionescaja`
--

DROP TABLE IF EXISTS `operacionescaja`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `operacionescaja` (
  `idoperacion` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(100) DEFAULT NULL,
  `estado` int(11) DEFAULT '1',
  `fecha` date NOT NULL,
  `numero` bigint(20) DEFAULT NULL,
  `idcaja` int(11) NOT NULL,
  `iddocumento` int(11) DEFAULT NULL,
  PRIMARY KEY (`idoperacion`),
  KEY `FK_operacionescaja_idcaja` (`idcaja`),
  KEY `FK_operacionescaja_iddocumento` (`iddocumento`),
  CONSTRAINT `FK_operacionescaja_idcaja` FOREIGN KEY (`idcaja`) REFERENCES `cajas` (`idcaja`),
  CONSTRAINT `FK_operacionescaja_iddocumento` FOREIGN KEY (`iddocumento`) REFERENCES `documentos` (`iddocumento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `operacionescaja`
--

LOCK TABLES `operacionescaja` WRITE;
/*!40000 ALTER TABLE `operacionescaja` DISABLE KEYS */;
/*!40000 ALTER TABLE `operacionescaja` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `parqueos`
--

DROP TABLE IF EXISTS `parqueos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parqueos` (
  `idparqueo` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(30) NOT NULL,
  `estado` int(11) NOT NULL,
  `idempresa` int(11) DEFAULT NULL,
  PRIMARY KEY (`idparqueo`),
  KEY `FK_parqueos_idempresa` (`idempresa`),
  CONSTRAINT `FK_parqueos_idempresa` FOREIGN KEY (`idempresa`) REFERENCES `empresas` (`idempresa`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `parqueos`
--

LOCK TABLES `parqueos` WRITE;
/*!40000 ALTER TABLE `parqueos` DISABLE KEYS */;
INSERT INTO `parqueos` VALUES (1,'Parqueo Zona 1',1,NULL);
/*!40000 ALTER TABLE `parqueos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permisos`
--

DROP TABLE IF EXISTS `permisos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `permisos` (
  `idpermiso` int(11) NOT NULL AUTO_INCREMENT,
  `permiso` varchar(50) NOT NULL,
  `tipo` int(11) DEFAULT '1',
  `idgrupo` int(11) NOT NULL,
  PRIMARY KEY (`idpermiso`),
  KEY `FK_permisos_idgrupo` (`idgrupo`),
  CONSTRAINT `FK_permisos_idgrupo` FOREIGN KEY (`idgrupo`) REFERENCES `grupousuarios` (`idgrupo`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permisos`
--

LOCK TABLES `permisos` WRITE;
/*!40000 ALTER TABLE `permisos` DISABLE KEYS */;
INSERT INTO `permisos` VALUES (1,'btnPrecios',1,1),(2,'btnServicios',1,1),(3,'btnClientes',1,1),(4,'btnVehiculos',1,1),(5,'btnAsgVehiculos',1,1),(6,'btnVentas',1,1),(7,'btnCajas',1,1),(8,'btnAsgCajas',1,1),(9,'btnAsgDocs',1,1),(10,'btnIngresos1',1,1),(11,'btnEgresos1',1,1),(12,'btnGrupos',1,1),(13,'btnPermisos1',1,1),(14,'btnUsuarios',1,1),(15,'btnBackup',1,1),(16,'btnRestore',1,1),(17,'btnEmpresas',1,1),(18,'btnDocumentos',1,1),(19,'btnTerminales',1,1),(20,'btnPropiedades',1,1),(21,'btnParqueos',1,1),(22,'btnResoluciones',1,1),(23,'btnAsgRes',1,1),(24,'btnReportes',1,1),(25,'btnInformes',1,1),(26,'Ruta PV',2,1),(27,'Ruta',2,1),(28,'Ventas por Dia',2,1),(29,'Ventas por Mes',2,1),(30,'Ventas por SV',2,1);
/*!40000 ALTER TABLE `permisos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `precios`
--

DROP TABLE IF EXISTS `precios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `precios` (
  `idprecio` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(20) NOT NULL,
  `formula` varchar(75) DEFAULT NULL,
  PRIMARY KEY (`idprecio`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `precios`
--

LOCK TABLES `precios` WRITE;
/*!40000 ALTER TABLE `precios` DISABLE KEYS */;
INSERT INTO `precios` VALUES (1,'Precio 1',NULL),(2,'Precio2',NULL);
/*!40000 ALTER TABLE `precios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `propiedades`
--

DROP TABLE IF EXISTS `propiedades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `propiedades` (
  `idpropiedad` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(20) NOT NULL,
  `grupo` smallint(6) NOT NULL,
  `tipo` int(11) NOT NULL,
  `valor` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`idpropiedad`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `propiedades`
--

LOCK TABLES `propiedades` WRITE;
/*!40000 ALTER TABLE `propiedades` DISABLE KEYS */;
INSERT INTO `propiedades` VALUES (1,'empresa',1,4,'Parqueos Seguros S.A.'),(2,'decimalesp',1,1,'2'),(3,'decimalesc',1,1,'0'),(4,'version',1,1,'1809201'),(5,'dbupdate',1,1,'0'),(6,'redondeop',1,1,'0'),(7,'busqueda',1,1,'1'),(8,'resoluciones',1,1,'1'),(9,'iva',1,1,'12'),(10,'serveremoto',1,4,NULL),(11,'pathinformes',1,1,NULL),(12,'tiempoadv',1,1,'5'),(13,'tiempopag',1,1,'15'),(14,'puerto',1,1,'com2');
/*!40000 ALTER TABLE `propiedades` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `registros`
--

DROP TABLE IF EXISTS `registros`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `registros` (
  `idregistro` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(40) NOT NULL,
  `entrada` datetime DEFAULT NULL,
  `estado` int(11) NOT NULL,
  `numero` bigint(20) DEFAULT NULL,
  `salida` datetime DEFAULT NULL,
  `iddocumento` int(11) DEFAULT NULL,
  `idparqueo` int(11) DEFAULT NULL,
  `idvehiculo` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `multa` double DEFAULT NULL,
  PRIMARY KEY (`idregistro`),
  KEY `FK_registros_idparqueo` (`idparqueo`),
  KEY `FK_registros_iddocumento` (`iddocumento`),
  KEY `FK_registros_idvehiculo` (`idvehiculo`),
  CONSTRAINT `FK_registros_iddocumento` FOREIGN KEY (`iddocumento`) REFERENCES `documentos` (`iddocumento`),
  CONSTRAINT `FK_registros_idparqueo` FOREIGN KEY (`idparqueo`) REFERENCES `parqueos` (`idparqueo`),
  CONSTRAINT `FK_registros_idvehiculo` FOREIGN KEY (`idvehiculo`) REFERENCES `vehiculos` (`idvehiculo`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `registros`
--

LOCK TABLES `registros` WRITE;
/*!40000 ALTER TABLE `registros` DISABLE KEYS */;
INSERT INTO `registros` VALUES (4,'T1','2018-08-18 19:57:26',1,1,'2018-08-21 08:56:29',1,NULL,1,'2018-08-18',NULL),(5,'T2','2018-08-18 19:57:26',1,2,'2018-08-21 08:41:46',1,NULL,2,'2018-08-18',NULL),(6,'T3','2018-08-20 11:52:47',1,3,'2018-08-21 09:17:20',1,NULL,3,'2018-08-20',NULL),(7,'T4','2018-08-20 16:54:55',1,4,'2018-08-21 17:17:56',1,NULL,4,'2018-08-20',NULL),(8,'T5','2018-08-20 16:54:55',2,5,NULL,1,NULL,5,'2018-08-20',NULL),(9,'T6','2018-08-20 18:32:56',1,6,'2018-08-21 17:17:56',1,NULL,7,'2018-08-20',NULL),(10,'T7','2018-08-27 12:32:56',1,7,'2018-08-27 13:19:13',1,NULL,8,'2018-08-27',NULL),(11,'T8','2018-08-27 11:36:02',1,8,'2018-08-27 13:19:13',1,NULL,9,'2018-08-27',NULL),(12,'T9','2018-08-27 10:38:57',1,9,'2018-08-27 14:58:56',1,NULL,10,'2018-08-27',NULL),(13,'T10','2018-08-27 11:16:44',1,10,'2018-08-27 17:09:25',1,1,11,'2018-08-27',NULL),(14,'T11','2018-08-27 16:17:56',3,11,'2018-08-27 17:16:03',1,1,12,'2018-08-27',NULL),(15,'T12','2018-08-27 12:17:56',3,12,'2018-08-27 17:07:38',1,1,13,'2018-08-27',NULL),(16,'T13','2018-08-27 16:17:56',2,13,'2018-08-27 17:16:03',1,1,14,'2018-08-27',NULL),(17,'T14','2018-08-27 16:27:56',3,14,'2018-08-28 16:14:07',1,1,13,'2018-08-27',NULL),(18,'T15','2018-08-27 16:31:40',1,15,'2018-08-27 17:30:04',1,1,13,'2018-08-27',NULL),(19,'T16','2018-08-27 16:39:02',1,16,'2018-08-27 17:34:34',1,1,15,'2018-08-27',NULL),(20,'T17','2018-08-28 15:29:17',1,17,'2018-08-28 16:31:54',1,1,16,'2018-08-28',NULL),(21,'T18','2018-08-28 15:29:17',3,18,'2018-08-28 16:31:54',1,1,17,'2018-08-28',NULL),(22,'T19','2018-08-28 16:31:54',3,19,'2018-09-05 11:49:43',1,1,18,'2018-08-28',NULL),(23,'T20','2018-08-28 16:31:54',3,20,'2018-09-19 15:22:47',1,1,19,'2018-08-28',450),(24,'T21','2018-08-28 15:43:33',1,21,'2018-08-28 16:49:08',1,1,20,'2018-08-28',NULL),(25,'T22','2018-08-28 15:43:33',1,22,'2018-08-28 16:44:51',1,1,21,'2018-08-28',NULL),(26,'T23','2018-09-05 16:08:26',2,23,NULL,1,1,22,'2018-09-05',NULL),(27,'T24','2018-09-05 16:10:50',2,24,NULL,1,1,23,'2018-09-05',NULL),(28,'T25','2018-09-05 16:20:36',3,25,'2018-09-06 11:52:01',1,1,24,'2018-09-05',500),(29,'T26','2018-09-06 11:19:39',2,26,NULL,1,1,25,'2018-09-06',NULL),(30,'T27','2018-09-06 11:35:42',3,27,'2018-09-20 00:32:55',1,1,26,'2018-09-06',500),(31,'T28','2018-09-19 15:23:08',3,28,'2018-09-20 00:25:19',1,1,27,'2018-09-19',500),(32,'T29','2018-09-19 16:09:08',1,29,'2018-09-19 16:11:40',1,1,28,'2018-09-19',NULL),(33,'T30','2018-09-19 16:17:43',1,30,'2018-09-19 16:17:50',1,1,29,'2018-09-19',NULL),(34,'T31','2018-09-19 16:22:44',1,31,'2018-09-19 16:23:04',1,1,30,'2018-09-19',NULL),(35,'T32','2018-09-19 16:24:47',1,32,'2018-09-19 16:25:15',1,1,31,'2018-09-19',NULL),(36,'T33','2018-09-19 16:26:26',2,33,'2018-09-19 16:26:39',1,1,32,'2018-09-19',NULL),(37,'T34','2018-09-19 16:27:29',2,34,NULL,1,1,33,'2018-09-19',NULL),(38,'TA35','2018-09-20 00:34:41',2,35,NULL,1,1,34,'2018-09-20',NULL);
/*!40000 ALTER TABLE `registros` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `resoluciones`
--

DROP TABLE IF EXISTS `resoluciones`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `resoluciones` (
  `idresolucion` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `fechaven` date NOT NULL,
  `numerofin` bigint(20) NOT NULL,
  `numeroini` bigint(20) NOT NULL,
  `porcentaje` smallint(6) NOT NULL,
  `resolucion` varchar(50) NOT NULL,
  PRIMARY KEY (`idresolucion`),
  CONSTRAINT `FK_resoluciones_idresolucion` FOREIGN KEY (`idresolucion`) REFERENCES `documentos` (`iddocumento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `resoluciones`
--

LOCK TABLES `resoluciones` WRITE;
/*!40000 ALTER TABLE `resoluciones` DISABLE KEYS */;
INSERT INTO `resoluciones` VALUES (3,'2018-09-05','2018-10-31',20,1,25,'resolucion-2018-10');
/*!40000 ALTER TABLE `resoluciones` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `servicios`
--

DROP TABLE IF EXISTS `servicios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `servicios` (
  `idservicio` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(40) NOT NULL,
  `costo` double NOT NULL,
  `descripcion` varchar(100) NOT NULL,
  `detalle` varchar(200) DEFAULT NULL,
  `estado` int(11) NOT NULL,
  PRIMARY KEY (`idservicio`),
  UNIQUE KEY `UNQ_servicios_0` (`codigo`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `servicios`
--

LOCK TABLES `servicios` WRITE;
/*!40000 ALTER TABLE `servicios` DISABLE KEYS */;
INSERT INTO `servicios` VALUES (1,'01',0,'HORA(S) DE PARQUEO',NULL,1),(2,'02',0,'Multa',NULL,1);
/*!40000 ALTER TABLE `servicios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `terminales`
--

DROP TABLE IF EXISTS `terminales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `terminales` (
  `idterminal` int(11) NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(30) DEFAULT NULL,
  `nombre` varchar(50) NOT NULL,
  `serial` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`idterminal`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `terminales`
--

LOCK TABLES `terminales` WRITE;
/*!40000 ALTER TABLE `terminales` DISABLE KEYS */;
INSERT INTO `terminales` VALUES (1,NULL,'FeerPC',NULL);
/*!40000 ALTER TABLE `terminales` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `usuarios`
--

DROP TABLE IF EXISTS `usuarios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `usuarios` (
  `idusuario` int(11) NOT NULL AUTO_INCREMENT,
  `clave` varchar(100) NOT NULL,
  `estado` int(11) NOT NULL,
  `nombre` varchar(50) NOT NULL,
  `usuario` varchar(30) NOT NULL,
  `idgrupo` int(11) NOT NULL,
  PRIMARY KEY (`idusuario`),
  KEY `FK_usuarios_idgrupo` (`idgrupo`),
  CONSTRAINT `FK_usuarios_idgrupo` FOREIGN KEY (`idgrupo`) REFERENCES `grupousuarios` (`idgrupo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `usuarios`
--

LOCK TABLES `usuarios` WRITE;
/*!40000 ALTER TABLE `usuarios` DISABLE KEYS */;
/*!40000 ALTER TABLE `usuarios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `vehiculos`
--

DROP TABLE IF EXISTS `vehiculos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vehiculos` (
  `idvehiculo` int(11) NOT NULL AUTO_INCREMENT,
  `estado` int(11) NOT NULL,
  `placa` varchar(10) NOT NULL,
  `tipo` int(11) NOT NULL,
  PRIMARY KEY (`idvehiculo`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `vehiculos`
--

LOCK TABLES `vehiculos` WRITE;
/*!40000 ALTER TABLE `vehiculos` DISABLE KEYS */;
INSERT INTO `vehiculos` VALUES (1,1,'002CQS',1),(2,1,'151FWK',1),(3,1,'ASZ564',1),(4,1,'125IOP',1),(5,1,'T4',1),(6,1,'023TRE',1),(7,1,'112WFR',1),(8,1,'124POI',1),(9,1,'151YTG',1),(10,1,'456QWE',1),(11,1,'123POI',1),(12,1,'345ASD',1),(13,1,'P0593GPG',1),(14,1,'T8',1),(15,1,'KMRQ45',1),(16,1,'123GFE',1),(17,1,'465FED',1),(18,1,'456FED',1),(19,1,'456BCD',3),(20,1,'123456',1),(21,1,'789POI',6),(22,1,'123FED',1),(23,1,'123MLK',1),(24,1,'456DC',1),(25,1,'P',1),(26,1,'P 123NML',1),(27,1,'P 123KHG',1),(28,1,'P 123YTR',1),(29,1,'P 456POI',1),(30,1,'P 456OPI',1),(31,1,'M 123SDF',5),(32,1,'O 123LKJ',3),(33,1,'A 123OIU',4),(34,1,'P 123LKJ',1);
/*!40000 ALTER TABLE `vehiculos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `ventas`
--

DROP TABLE IF EXISTS `ventas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ventas` (
  `idventa` int(11) NOT NULL AUTO_INCREMENT,
  `estado` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `monto` double NOT NULL,
  `numero` bigint(20) DEFAULT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `idcliente` int(11) DEFAULT NULL,
  `iddocumento` int(11) DEFAULT NULL,
  `idparqueo` int(11) NOT NULL,
  `idregistro` int(11) DEFAULT NULL,
  `idusuario` int(11) DEFAULT NULL,
  `idoperacioncaja` int(11) DEFAULT NULL,
  PRIMARY KEY (`idventa`),
  KEY `FK_ventas_idparqueo` (`idparqueo`),
  KEY `FK_ventas_idcliente` (`idcliente`),
  KEY `FK_ventas_idregistro` (`idregistro`),
  KEY `FK_ventas_idusuario` (`idusuario`),
  KEY `FK_ventas_iddocumento` (`iddocumento`),
  CONSTRAINT `FK_ventas_idcliente` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`idcliente`),
  CONSTRAINT `FK_ventas_iddocumento` FOREIGN KEY (`iddocumento`) REFERENCES `documentos` (`iddocumento`),
  CONSTRAINT `FK_ventas_idparqueo` FOREIGN KEY (`idparqueo`) REFERENCES `parqueos` (`idparqueo`),
  CONSTRAINT `FK_ventas_idregistro` FOREIGN KEY (`idregistro`) REFERENCES `registros` (`idregistro`),
  CONSTRAINT `FK_ventas_idusuario` FOREIGN KEY (`idusuario`) REFERENCES `usuarios` (`idusuario`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `ventas`
--

LOCK TABLES `ventas` WRITE;
/*!40000 ALTER TABLE `ventas` DISABLE KEYS */;
INSERT INTO `ventas` VALUES (1,1,'2018-08-21',305,1,NULL,1,2,1,5,NULL,NULL),(2,1,'2018-08-21',305,2,NULL,1,2,1,4,NULL,NULL),(3,1,'2018-08-21',110,3,NULL,2,2,1,6,NULL,NULL),(4,1,'2018-08-21',125,4,NULL,1,2,1,7,NULL,NULL),(5,1,'2018-08-21',115,5,NULL,1,2,1,9,NULL,NULL),(8,1,'2018-08-27',5,6,NULL,1,2,1,10,NULL,NULL),(9,1,'2018-08-27',10,7,NULL,1,2,1,11,NULL,NULL),(10,1,'2018-08-27',25,8,NULL,1,2,1,12,NULL,NULL),(16,1,'2018-08-27',5,9,NULL,1,2,1,18,NULL,NULL),(17,1,'2018-08-27',5,10,NULL,1,2,1,19,NULL,NULL),(18,1,'2018-08-28',10,11,NULL,1,2,1,20,NULL,NULL),(19,1,'2018-08-28',10,12,NULL,5,2,1,25,NULL,NULL),(20,1,'2018-08-28',10,13,NULL,1,2,1,24,NULL,NULL),(21,0,'2018-09-09',5,1,NULL,1,3,1,NULL,NULL,NULL),(22,1,'2018-09-09',5,2,NULL,3,3,1,NULL,NULL,NULL),(23,1,'2018-09-09',5,3,NULL,1,3,1,NULL,NULL,NULL),(24,1,'2018-09-09',10,4,NULL,4,3,1,NULL,NULL,NULL),(25,1,'2018-09-09',5,5,NULL,5,3,1,NULL,NULL,NULL),(26,1,'2018-09-19',5,6,NULL,1,3,1,32,NULL,NULL),(27,1,'2018-09-19',5,7,NULL,1,3,1,33,NULL,NULL),(28,1,'2018-09-19',5,8,NULL,1,3,1,34,NULL,NULL),(29,1,'2018-09-19',5,9,NULL,5,3,1,35,NULL,NULL),(30,0,'2018-09-19',5,10,NULL,5,3,1,36,NULL,NULL);
/*!40000 ALTER TABLE `ventas` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2018-09-25 15:56:43
