INSERT INTO `erp_targox`.`rol_tarea` (`idRol`, `idTarea`, `registro_fecha_add`, `registro_user_add`, `registro_pc_add`, `registro_fecha_update`, `registro_user_update`, `registro_pc_update`, `activo`) VALUES ('1', '41', '2020-04-10 15:51:03', 'admin', '-', '2020-04-10 15:51:03', '-', '-', '1');
INSERT INTO `erp_targox`.`grupo` (`idGrupo`, `nombre`, `descripcion`, `icono`, `orden`, `registro_fecha_add`, `registro_user_add`, `registro_pc_add`, `registro_fecha_update`, `registro_user_update`, `registro_pc_update`, `activo`) VALUES ('9', 'Dashboard', 'Dashboard', 'fa fa-bar-chart-o', '1', '2020-04-19 16:56:47', 'admin', '-', '2020-04-19 16:56:47', '-', '-', '1');
DELETE FROM `erp_targox`.`grupo` WHERE (`idGrupo` = '9');
UPDATE `erp_targox`.`grupo` SET `orden` = '2' WHERE (`idGrupo` = '1');
UPDATE `erp_targox`.`grupo` SET `orden` = '3' WHERE (`idGrupo` = '2');
UPDATE `erp_targox`.`grupo` SET `orden` = '4' WHERE (`idGrupo` = '3');
UPDATE `erp_targox`.`grupo` SET `orden` = '5' WHERE (`idGrupo` = '4');
UPDATE `erp_targox`.`grupo` SET `orden` = '6' WHERE (`idGrupo` = '5');

DROP TABLE IF EXISTS `CLIENTE`;
CREATE TABLE `CLIENTE` (
  `idCliente` int(11) NOT NULL AUTO_INCREMENT,
  `idCategoria` int(11) NOT NULL,
  `idTipoCliente` int(11) DEFAULT NULL,
  `idPais` int(11) DEFAULT NULL,
  `idCiudad` int(11) DEFAULT NULL,  
  `razonSocial` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `nombreComercial` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `nombres` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `apellidoPaterno` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `apellidoMaterno` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `idTipoDocumento` int(11) NOT NULL,
  `documento` varchar(20) CHARACTER SET utf8 NOT NULL,
  `direccion` varchar(300) CHARACTER SET utf8 NOT NULL,
  `fechaNacimiento` DATE DEFAULT NULL,
  `telefono1` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `telefono2` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `telefono3` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `email` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `referencia` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `cuentaFacebook` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `cuentaInstagram` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `ocupacion` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `lugarOcupacion` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `comentario` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `calificacion` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `fechaRegistro` datetime NOT NULL,
  `usuarioRegistro` varchar(50) CHARACTER SET utf8 NOT NULL,
  `pcRegistro` varchar(50) CHARACTER SET utf8 NOT NULL,
  `fechaEdicion` datetime NOT NULL,
  `usuarioEdicion` varchar(50) CHARACTER SET utf8 NOT NULL,
  `pcEdicion` varchar(50) CHARACTER SET utf8 NOT NULL,
  `activo` int(11) NOT NULL,
  PRIMARY KEY (`idCliente`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci;

DROP TABLE IF EXISTS `CLIENTE_CONTACTO`;
CREATE TABLE `CLIENTE_CONTACTO` (
  `idClienteContacto` int(11) NOT NULL AUTO_INCREMENT,
  `idCliente` int(11) NOT NULL,
  `nombre` varchar(300) CHARACTER SET utf8 NOT NULL,
  `apePaterno` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `apeMaterno` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `cargo` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `dni` char(8) CHARACTER SET utf8 NOT NULL,
  `telefono` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `email` varchar(300) CHARACTER SET utf8 DEFAULT NULL,
  `fechaRegistro` datetime NOT NULL,
  `usuarioRegistro` varchar(50) CHARACTER SET utf8 NOT NULL,
  `pcRegistro` varchar(50) CHARACTER SET utf8 NOT NULL,
  `fechaEdicion` datetime NOT NULL,
  `usuarioEdicion` varchar(50) CHARACTER SET utf8 NOT NULL,
  `pcEdicion` varchar(50) CHARACTER SET utf8 NOT NULL,
  `activo` int(11) NOT NULL,
  PRIMARY KEY (`idClienteContacto`),
  KEY `idCliente` (`idCliente`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci;


