--
-- Host: localhost    Database: GastosComunesDB
-- ------------------------------------------------------


--
-- Table structure for table `cargos`
--

CREATE TABLE `cargos` (
  `idcargos` int(11) NOT NULL AUTO_INCREMENT,
  `motivo` varchar(200) DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `anio` int(11) DEFAULT NULL,
  `mes` int(11) DEFAULT NULL,
  `fecha` datetime DEFAULT NULL,
  `observaciones` varchar(255) DEFAULT NULL,
  `departamentos_iddepartamento` int(11) NOT NULL,
  `departamentos_propiedades_rut` int(11) NOT NULL,
  PRIMARY KEY (`idcargos`,`departamentos_iddepartamento`,`departamentos_propiedades_rut`),
  KEY `fk_gastos_departamentos1_idx` (`departamentos_iddepartamento`,`departamentos_propiedades_rut`),
  CONSTRAINT `fk_gastos_departamentos1` FOREIGN KEY (`departamentos_iddepartamento`, `departamentos_propiedades_rut`) REFERENCES `departamentos` (`iddepartamento`, `propiedades_rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cargos`
--

INSERT INTO `cargos` VALUES (5,'Multa',100000,2016,3,'2016-12-06 02:23:03','ruidos molestos',1213,-6),(6,'Multa',100000,2016,3,'2016-12-06 02:23:04','ruidos molestos',1213,-6),(7,'Servicios',10000,2016,3,'2016-12-06 02:25:34','uso quincho',1212,-6);

--
-- Table structure for table `datos_maestros`
--

CREATE TABLE `datos_maestros` (
  `iddatos_maestros` int(11) NOT NULL,
  `uf` int(11) DEFAULT NULL,
  `fecha_uf` datetime DEFAULT NULL,
  PRIMARY KEY (`iddatos_maestros`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `datos_maestros`
--


--
-- Table structure for table `departamentos`
--

CREATE TABLE `departamentos` (
  `iddepartamento` int(11) NOT NULL AUTO_INCREMENT,
  `torre` varchar(45) DEFAULT NULL,
  `depto` varchar(45) DEFAULT NULL,
  `porcentaje_gc` varchar(45) DEFAULT NULL,
  `porcentaje_fr` varchar(45) DEFAULT NULL,
  `nombre_copropietario` varchar(200) DEFAULT NULL,
  `email_copropietario` varchar(200) DEFAULT NULL,
  `propiedades_rut` int(11) NOT NULL,
  `mesesVencidos` int(11) DEFAULT NULL,
  `montoMesesVencido` int(11) DEFAULT NULL,
  `montoFijo` int(11) DEFAULT NULL,
  PRIMARY KEY (`iddepartamento`,`propiedades_rut`),
  KEY `fk_departamentos_propiedades_idx` (`propiedades_rut`),
  CONSTRAINT `fk_departamentos_propiedades` FOREIGN KEY (`propiedades_rut`) REFERENCES `propiedades` (`rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1278 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `departamentos`
--

INSERT INTO `departamentos` VALUES (1094,NULL,'201','0.01239','0.05','Marisa Kausel Contador',NULL,53311123,0,0,0),(1095,NULL,'202','0.01684','0.05','Luis Soto Valpuesta',NULL,53311123,0,0,0),(1096,NULL,'203','0.01683','0.05','Ivonne Arellano Hamelin',NULL,53311123,0,0,0),(1097,NULL,'204','0.01639','0.05','Juan Galdames Schiattino',NULL,53311123,0,0,0),(1098,NULL,'301','0.01251','0.05','Carolina Pita',NULL,53311123,0,0,0),(1099,NULL,'302','0.02119','0.05','Maria De Los Angeles Perez Mardones',NULL,53311123,0,0,0),(1100,NULL,'303','0.0179','0.05','Lautaro Echeverria Recabarren',NULL,53311123,0,0,0),(1101,NULL,'304','0.01651','0.05','Juan E Mendez Martinez',NULL,53311123,0,0,0),(1102,NULL,'401','0.01244','0.05','Carla Lara Berrios',NULL,53311123,0,0,0),(1103,NULL,'402','0.01973','0.05','Erwin Kullmer Navarrete',NULL,53311123,0,0,0),(1104,NULL,'403','0.01928','0.05','Jose Miguel Alvarez Donoso',NULL,53311123,0,0,0),(1105,NULL,'404','0.01501','0.05','Inversiones B Y B Beckdorf Carlos',NULL,53311123,0,378926,0),(1106,NULL,'501','0.01243','0.05','Richard Rubilar Carrasco',NULL,53311123,0,0,0),(1107,NULL,'502','0.01827','0.05','Juan Froemel Andrade',NULL,53311123,0,0,0),(1108,NULL,'503','0.01926','0.05','Juan Leiva Buchi',NULL,53311123,0,-11628,0),(1109,NULL,'504','0.01816','0.05','Francisco Sarras Alam',NULL,53311123,0,0,0),(1110,NULL,'601','0.011','0.05','Patricio Reyes',NULL,53311123,0,136273,0),(1111,NULL,'602','0.01873','0.05','Osman Olivares Milla',NULL,53311123,0,0,0),(1112,NULL,'603','0.01946','0.05','Jorge Mayerson Kardonski',NULL,53311123,0,0,0),(1113,NULL,'604','0.01786','0.05','Rosa Simunovic Ibañez',NULL,53311123,0,0,0),(1114,NULL,'701','0.01255','0.05','Miren Igone Uriarte Plazaola',NULL,53311123,0,0,0),(1115,NULL,'702','0.01891','0.05','Nathyuszka Canelon Patiño',NULL,53311123,0,0,0),(1116,NULL,'703','0.0193','0.05','Pablo Enrique Aguilera Marin',NULL,53311123,0,0,0),(1117,NULL,'704','0.01645','0.05','Laurence Golborne Riveros',NULL,53311123,0,0,0),(1118,NULL,'801','0.01246','0.05','Dina Ortiz Fuentes',NULL,53311123,0,0,0),(1119,NULL,'802','0.01829','0.05','Danielle Reyes Cabala',NULL,53311123,0,0,0),(1120,NULL,'803','0.01933','0.05','Paula Reyes Paula Reyes',NULL,53311123,0,0,0),(1121,NULL,'804','0.01634','0.05','Rafael Garcia Lopez',NULL,53311123,0,0,0),(1122,NULL,'901','0.01255','0.05','Christian Hafelin Barrios',NULL,53311123,0,0,0),(1123,NULL,'902','0.0193','0.05','Gonzalo Rossel De La Maza',NULL,53311123,0,0,0),(1124,NULL,'903','0.01922','0.05','Carlos Stutz Neveu',NULL,53311123,0,0,0),(1125,NULL,'904','0.0165','0.05','Roberto Salazar Esperante',NULL,53311123,0,0,0),(1126,NULL,'1001','0.01244','0.05','Oscar Marcelo Butron Vaca',NULL,53311123,0,264762,0),(1127,NULL,'1002','0.01828','0.05','Ciro Ernesto Ibanez Acosta',NULL,53311123,0,-261,0),(1128,NULL,'1003','0.01948','0.05','Denise Shomaly Khashram',NULL,53311123,0,0,0),(1129,NULL,'1004','0.01647','0.05','Elfride Lam Pasten',NULL,53311123,0,0,0),(1130,NULL,'1101','0.01258','0.05','Carlos Casas Cordero',NULL,53311123,0,427402,0),(1131,NULL,'1102','0.01826','0.05','Danae Gallegos Duk',NULL,53311123,0,0,0),(1132,NULL,'1103','0.01939','0.05','Claudio Acosta Speranza',NULL,53311123,0,0,0),(1133,NULL,'1104','0.01644','0.05','Mariano Gonzalez Barahona',NULL,53311123,0,0,0),(1134,NULL,'1201','0.01424','0.05','Gustavo Metz Arndt',NULL,53311123,0,0,0),(1135,NULL,'1202','0.01822','0.05','Diego Prieto Damn',NULL,53311123,0,0,0),(1136,NULL,'1203','0.01944','0.05','Lee Min Keum Ja',NULL,53311123,0,0,0),(1137,NULL,'1204','0.01669','0.05','Pedro Leguina Eguia',NULL,53311123,0,0,0),(1138,NULL,'1301','0.01108','0.05','Elly M Gonzlez Yanez',NULL,53311123,0,0,0),(1139,NULL,'1302','0.01971','0.05','Maria Eugenia Gallardo Chavez',NULL,53311123,0,-515083,0),(1140,NULL,'1303','0.02079','0.05','Antonio Donizeti Castillo',NULL,53311123,0,0,0),(1141,NULL,'1304','0.01517','0.05','Rodrigo Chacon Coorsi',NULL,53311123,0,0,0),(1142,NULL,'1401','0.01248','0.05','Marcia Banda Garay',NULL,53311123,0,310070,0),(1143,NULL,'1402','0.01829','0.05','Alberto Calvo Montes',NULL,53311123,0,0,0),(1144,NULL,'1403','0.01999','0.05','Lim Byoung Kwon',NULL,53311123,0,0,0),(1145,NULL,'1404','0.01659','0.05','Sonia Andersen Munoz',NULL,53311123,0,0,0),(1146,NULL,'1501','0.01394','0.05','Rodolfo Vergara Silva',NULL,53311123,0,0,0),(1147,NULL,'1502','0.01534','0.05','Marta Fresia Mendoza Brule',NULL,53311123,0,0,0),(1148,NULL,'1503','0.01931','0.05','Sandra Edmund Paoa',NULL,53311123,0,0,0),(1149,NULL,'1504','0.01655','0.05','Rossana Lagos Carter',NULL,53311123,0,0,0),(1150,NULL,'1601','0.01253','0.05','Lautaro Olivares Aravena',NULL,53311123,0,145139,0),(1151,NULL,'1602','0.01684','0.05','Rossana Romanini Echeverria',NULL,53311123,0,0,0),(1152,NULL,'1603','0.01949','0.05','M Victoria Ureta Zañartu',NULL,53311123,0,0,0),(1153,NULL,'1604','0.01658','0.05','M Esperanza Garcia Vinuela',NULL,53311123,0,0,0),(1154,'453','11','0','0','Sin Nombre',NULL,-6,0,0,59660),(1155,'453','12','0','0','Sin Nombre',NULL,-6,0,0,64930),(1156,'453','21','0','0','Sin Nombre',NULL,-6,0,0,59660),(1157,'453','22','0','0','Sin Nombre',NULL,-6,0,0,64930),(1158,'453','31','0','0','Sin Nombre',NULL,-6,0,0,59660),(1159,'453','32','0','0','Sin Nombre',NULL,-6,0,0,64930),(1160,'453','41','0','0','Sin Nombre',NULL,-6,0,0,59660),(1161,'453','42','0','0','Sin Nombre',NULL,-6,0,0,64930),(1162,'455','11','0','0','Sin Nombre',NULL,-6,0,0,64930),(1163,'455','12','0','0','Sin Nombre',NULL,-6,0,0,59660),(1164,'455','21','0','0','Sin Nombre',NULL,-6,0,0,64930),(1165,'455','22','0','0','Sin Nombre',NULL,-6,0,0,59660),(1166,'455','31','0','0','Sin Nombre',NULL,-6,0,0,64930),(1167,'455','32','0','0','Sin Nombre',NULL,-6,0,0,59660),(1168,'455','41','0','0','Sin Nombre',NULL,-6,0,0,64930),(1169,'455','42','0','0','Sin Nombre',NULL,-6,0,0,59660),(1170,'457','11','0','0','Sin Nombre',NULL,-6,0,0,59660),(1171,'457','12','0','0','Sin Nombre',NULL,-6,0,0,64930),(1172,'457','21','0','0','Sin Nombre',NULL,-6,0,0,59660),(1173,'457','22','0','0','Sin Nombre',NULL,-6,0,0,64930),(1174,'457','31','0','0','Sin Nombre',NULL,-6,0,0,59660),(1175,'457','32','0','0','Sin Nombre',NULL,-6,0,0,64930),(1176,'457','41','0','0','Sin Nombre',NULL,-6,0,0,59660),(1177,'457','42','0','0','Sin Nombre',NULL,-6,0,0,64930),(1178,'459','11','0','0','Sin Nombre',NULL,-6,0,0,64930),(1179,'459','12','0','0','Sin Nombre',NULL,-6,0,0,59660),(1180,'459','21','0','0','Sin Nombre',NULL,-6,0,0,64930),(1181,'459','22','0','0','Sin Nombre',NULL,-6,0,0,59660),(1182,'459','31','0','0','Sin Nombre',NULL,-6,0,0,64930),(1183,'459','32','0','0','Sin Nombre',NULL,-6,0,0,59660),(1184,'459','41','0','0','Sin Nombre',NULL,-6,0,0,64930),(1185,'459','42','0','0','Sin Nombre',NULL,-6,0,0,59660),(1186,'573','11','0','0','Sin Nombre',NULL,-6,0,0,59660),(1187,'573','12','0','0','Sin Nombre',NULL,-6,0,0,60060),(1188,'573','21','0','0','Sin Nombre',NULL,-6,0,0,59660),(1189,'573','22','0','0','Sin Nombre',NULL,-6,0,0,60060),(1190,'573','31','0','0','Sin Nombre',NULL,-6,0,0,59660),(1191,'573','32','0','0','Sin Nombre',NULL,-6,0,0,60060),(1192,'573','41','0','0','Sin Nombre',NULL,-6,0,0,59660),(1193,'573','42','0','0','Sin Nombre',NULL,-6,0,0,60060),(1194,'575','11','0','0','Sin Nombre',NULL,-6,0,0,63440),(1195,'575','12','0','0','Sin Nombre',NULL,-6,0,0,59660),(1196,'575','21','0','0','Sin Nombre',NULL,-6,0,0,63440),(1197,'575','22','0','0','Sin Nombre',NULL,-6,0,0,59660),(1198,'575','31','0','0','Sin Nombre',NULL,-6,0,0,63440),(1199,'575','32','0','0','Sin Nombre',NULL,-6,0,0,59660),(1200,'575','41','0','0','Sin Nombre',NULL,-6,0,0,63440),(1201,'575','42','0','0','Sin Nombre',NULL,-6,0,0,59660),(1202,'577','11','0','0','Sin Nombre',NULL,-6,0,0,59660),(1203,'577','12','0','0','Sin Nombre',NULL,-6,0,0,63440),(1204,'577','21','0','0','Sin Nombre',NULL,-6,0,0,59660),(1205,'577','22','0','0','Sin Nombre',NULL,-6,0,0,63440),(1206,'577','31','0','0','Sin Nombre',NULL,-6,0,0,59660),(1207,'577','32','0','0','Sin Nombre',NULL,-6,0,0,63440),(1208,'577','41','0','0','Sin Nombre',NULL,-6,0,0,59660),(1209,'577','42','0','0','Sin Nombre',NULL,-6,0,0,63440),(1210,'579','11','0','0','Sin Nombre',NULL,-6,0,0,60060),(1211,'579','12','0','0','Sin Nombre',NULL,-6,0,0,59660),(1212,'579','21','0','0','Sin Nombre',NULL,-6,0,0,60060),(1213,'579','22','0','0','Sin Nombre',NULL,-6,0,0,59660),(1214,'579','31','0','0','Sin Nombre',NULL,-6,0,0,60060),(1215,'579','32','0','0','Sin Nombre',NULL,-6,0,0,59660),(1216,'579','41','0','0','Sin Nombre',NULL,-6,0,0,60060),(1217,'579','42','0','0','Sin Nombre',NULL,-6,0,0,59660),(1218,NULL,'201','0.01239','0.05','Marisa Kausel Contador',NULL,-8,0,0,0),(1219,NULL,'202','0.01684','0.05','Luis Soto Valpuesta',NULL,-8,0,0,0),(1220,NULL,'203','0.01683','0.05','Ivonne Arellano Hamelin',NULL,-8,0,0,0),(1221,NULL,'204','0.01639','0.05','Juan Galdames Schiattino',NULL,-8,0,0,0),(1222,NULL,'301','0.01251','0.05','Carolina Pita',NULL,-8,0,0,0),(1223,NULL,'302','0.02119','0.05','Maria De Los Angeles Perez Mardones',NULL,-8,0,0,0),(1224,NULL,'303','0.0179','0.05','Lautaro Echeverria Recabarren',NULL,-8,0,0,0),(1225,NULL,'304','0.01651','0.05','Juan E Mendez Martinez',NULL,-8,0,0,0),(1226,NULL,'401','0.01244','0.05','Carla Lara Berrios',NULL,-8,0,0,0),(1227,NULL,'402','0.01973','0.05','Erwin Kullmer Navarrete',NULL,-8,0,0,0),(1228,NULL,'403','0.01928','0.05','Jose Miguel Alvarez Donoso',NULL,-8,0,0,0),(1229,NULL,'404','0.01501','0.05','Inversiones B Y B Beckdorf Carlos',NULL,-8,0,378926,0),(1230,NULL,'501','0.01243','0.05','Richard Rubilar Carrasco',NULL,-8,0,0,0),(1231,NULL,'502','0.01827','0.05','Juan Froemel Andrade',NULL,-8,0,0,0),(1232,NULL,'503','0.01926','0.05','Juan Leiva Buchi',NULL,-8,0,-11628,0),(1233,NULL,'504','0.01816','0.05','Francisco Sarras Alam',NULL,-8,0,0,0),(1234,NULL,'601','0.011','0.05','Patricio Reyes',NULL,-8,0,136273,0),(1235,NULL,'602','0.01873','0.05','Osman Olivares Milla',NULL,-8,0,0,0),(1236,NULL,'603','0.01946','0.05','Jorge Mayerson Kardonski',NULL,-8,0,0,0),(1237,NULL,'604','0.01786','0.05','Rosa Simunovic Ibañez',NULL,-8,0,0,0),(1238,NULL,'701','0.01255','0.05','Miren Igone Uriarte Plazaola',NULL,-8,0,0,0),(1239,NULL,'702','0.01891','0.05','Nathyuszka Canelon Patiño',NULL,-8,0,0,0),(1240,NULL,'703','0.0193','0.05','Pablo Enrique Aguilera Marin',NULL,-8,0,0,0),(1241,NULL,'704','0.01645','0.05','Laurence Golborne Riveros',NULL,-8,0,0,0),(1242,NULL,'801','0.01246','0.05','Dina Ortiz Fuentes',NULL,-8,0,0,0),(1243,NULL,'802','0.01829','0.05','Danielle Reyes Cabala',NULL,-8,0,0,0),(1244,NULL,'803','0.01933','0.05','Paula Reyes Paula Reyes',NULL,-8,0,0,0),(1245,NULL,'804','0.01634','0.05','Rafael Garcia Lopez',NULL,-8,0,0,0),(1246,NULL,'901','0.01255','0.05','Christian Hafelin Barrios',NULL,-8,0,0,0),(1247,NULL,'902','0.0193','0.05','Gonzalo Rossel De La Maza',NULL,-8,0,0,0),(1248,NULL,'903','0.01922','0.05','Carlos Stutz Neveu',NULL,-8,0,0,0),(1249,NULL,'904','0.0165','0.05','Roberto Salazar Esperante',NULL,-8,0,0,0),(1250,NULL,'1001','0.01244','0.05','Oscar Marcelo Butron Vaca',NULL,-8,0,264762,0),(1251,NULL,'1002','0.01828','0.05','Ciro Ernesto Ibanez Acosta',NULL,-8,0,-261,0),(1252,NULL,'1003','0.01948','0.05','Denise Shomaly Khashram',NULL,-8,0,0,0),(1253,NULL,'1004','0.01647','0.05','Elfride Lam Pasten',NULL,-8,0,0,0),(1254,NULL,'1101','0.01258','0.05','Carlos Casas Cordero',NULL,-8,0,427402,0),(1255,NULL,'1102','0.01826','0.05','Danae Gallegos Duk',NULL,-8,0,0,0),(1256,NULL,'1103','0.01939','0.05','Claudio Acosta Speranza',NULL,-8,0,0,0),(1257,NULL,'1104','0.01644','0.05','Mariano Gonzalez Barahona',NULL,-8,0,0,0),(1258,NULL,'1201','0.01424','0.05','Gustavo Metz Arndt',NULL,-8,0,0,0),(1259,NULL,'1202','0.01822','0.05','Diego Prieto Damn',NULL,-8,0,0,0),(1260,NULL,'1203','0.01944','0.05','Lee Min Keum Ja',NULL,-8,0,0,0),(1261,NULL,'1204','0.01669','0.05','Pedro Leguina Eguia',NULL,-8,0,0,0),(1262,NULL,'1301','0.01108','0.05','Elly M Gonzlez Yanez',NULL,-8,0,0,0),(1263,NULL,'1302','0.01971','0.05','Maria Eugenia Gallardo Chavez',NULL,-8,0,-515083,0),(1264,NULL,'1303','0.02079','0.05','Antonio Donizeti Castillo',NULL,-8,0,0,0),(1265,NULL,'1304','0.01517','0.05','Rodrigo Chacon Coorsi',NULL,-8,0,0,0),(1266,NULL,'1401','0.01248','0.05','Marcia Banda Garay',NULL,-8,0,310070,0),(1267,NULL,'1402','0.01829','0.05','Alberto Calvo Montes',NULL,-8,0,0,0),(1268,NULL,'1403','0.01999','0.05','Lim Byoung Kwon',NULL,-8,0,0,0),(1269,NULL,'1404','0.01659','0.05','Sonia Andersen Munoz',NULL,-8,0,0,0),(1270,NULL,'1501','0.01394','0.05','Rodolfo Vergara Silva',NULL,-8,0,0,0),(1271,NULL,'1502','0.01534','0.05','Marta Fresia Mendoza Brule',NULL,-8,0,0,0),(1272,NULL,'1503','0.01931','0.05','Sandra Edmund Paoa',NULL,-8,0,0,0),(1273,NULL,'1504','0.01655','0.05','Rossana Lagos Carter',NULL,-8,0,0,0),(1274,NULL,'1601','0.01253','0.05','Lautaro Olivares Aravena',NULL,-8,0,145139,0),(1275,NULL,'1602','0.01684','0.05','Rossana Romanini Echeverria',NULL,-8,0,0,0),(1276,NULL,'1603','0.01949','0.05','M Victoria Ureta Zañartu',NULL,-8,0,0,0),(1277,NULL,'1604','0.01658','0.05','M Esperanza Garcia Vinuela',NULL,-8,0,0,0);

--
-- Table structure for table `encGastos`
--

CREATE TABLE `encGastos` (
  `idencGastos` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` datetime DEFAULT NULL,
  `anio` int(11) DEFAULT NULL,
  `mes` int(11) DEFAULT NULL,
  `cobroGenerado` tinyint(1) DEFAULT NULL,
  `propiedades_rut` int(11) NOT NULL,
  PRIMARY KEY (`idencGastos`,`propiedades_rut`),
  KEY `fk_encGastos_propiedades1_idx` (`propiedades_rut`),
  CONSTRAINT `fk_encGastos_propiedades1` FOREIGN KEY (`propiedades_rut`) REFERENCES `propiedades` (`rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `encGastos`
--

INSERT INTO `encGastos` VALUES (43,'2016-11-04 18:27:11',2016,11,1,56027010),(44,'2016-11-04 23:35:49',2016,11,1,56027234),(45,'2016-11-05 02:12:40',2016,11,1,-8),(46,'2016-11-05 03:16:55',2016,12,1,56027234),(47,'2016-11-07 07:00:49',2016,11,1,-6),(48,'2016-11-07 07:25:41',2016,12,1,-6),(49,'2016-11-07 07:27:26',2016,12,1,-8),(50,'2016-11-13 13:54:00',2016,3,0,-6),(51,'2016-11-13 13:55:38',2016,4,0,-6),(52,'2016-12-19 20:48:48',2016,1,0,-6),(53,'2016-12-28 18:59:26',2016,12,0,56027010);

--
-- Table structure for table `gastos`
--

CREATE TABLE `gastos` (
  `idgastos` int(11) NOT NULL AUTO_INCREMENT,
  `monto` int(11) DEFAULT NULL,
  `numero_boleta` varchar(45) DEFAULT NULL,
  `fecha` datetime DEFAULT NULL,
  `observaciones` varchar(255) DEFAULT NULL,
  `anio` int(11) DEFAULT NULL,
  `mes` int(11) DEFAULT NULL,
  `rut_proveedor` varchar(45) DEFAULT NULL,
  `nombre_proveedor` varchar(200) DEFAULT NULL,
  `tipo_gasto` varchar(45) DEFAULT NULL,
  `boleta` blob,
  `comprobante` blob,
  `encGastos_idencGastos` int(11) NOT NULL,
  `encGastos_propiedades_rut` int(11) NOT NULL,
  PRIMARY KEY (`idgastos`,`encGastos_idencGastos`,`encGastos_propiedades_rut`),
  KEY `fk_gastos_encGastos1_idx` (`encGastos_idencGastos`,`encGastos_propiedades_rut`),
  CONSTRAINT `fk_gastos_encGastos1` FOREIGN KEY (`encGastos_idencGastos`, `encGastos_propiedades_rut`) REFERENCES `encGastos` (`idencGastos`, `propiedades_rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `gastos`
--

INSERT INTO `gastos` VALUES (60,56120,'','2016-11-04 18:27:11','',2016,11,'','seguro espacios comunes','Gastos de uso o consumo','boleta','comprobante',43,56027010),(61,4444,'','2016-11-04 18:27:43','',2016,11,'','contadora','Gastos de uso o consumo','boleta','comprobante',43,56027010),(62,40000,'','2016-11-04 18:28:15','honorarios',2016,11,'','contadora','Gastos de uso o consumo','boleta','comprobante',43,56027010),(63,503745,'','2016-11-04 18:29:04','',2016,11,'','previred','Remuneraciones','boleta','comprobante',43,56027010),(64,44250,'','2016-11-04 18:40:38','bolsas de basura',2016,11,'','mil bolsas','Gastos de reparación y otros','boleta','comprobante',43,56027010),(65,6940,'','2016-11-04 18:41:22','gastos comunes y papel carta',2016,11,'','fotocopias','Gastos de reparación y otros','boleta','comprobante',43,56027010),(66,398820,'','2016-11-04 18:44:51','remuneraciones Octubre',2016,11,'','alejandro contuliano','Remuneraciones','boleta','comprobante',43,56027010),(67,351830,'','2016-11-04 18:45:18','',2016,11,'','jose cofre','Remuneraciones','boleta','comprobante',43,56027010),(68,349900,'','2016-11-04 18:45:57','',2016,11,'','camilo rojas','Remuneraciones','boleta','comprobante',43,56027010),(69,349900,'','2016-11-04 18:46:35','',2016,11,'','hernan muñoz','Remuneraciones','boleta','comprobante',43,56027010),(70,395950,'','2016-11-04 18:47:13','',2016,11,'','michael villavicencio','Remuneraciones','boleta','comprobante',43,56027010),(71,271530,'','2016-11-04 18:47:52','',2016,11,'','Wladimir Leon','','boleta','comprobante',43,56027010),(72,90000,'','2016-11-04 18:48:24','turnos domingo',2016,11,'','michael villavicencio','','boleta','comprobante',43,56027010),(73,30000,'','2016-11-04 18:49:14','',2016,11,'','americo triniti','Remuneraciones','boleta','comprobante',43,56027010),(74,100000,'','2016-11-04 18:50:01','',2016,11,'','americo triniti','Remuneraciones','boleta','comprobante',43,56027010),(75,120000,'','2016-11-04 18:50:27','',2016,11,'','americo triniti','Remuneraciones','boleta','comprobante',43,56027010),(76,1103067,'','2016-11-04 18:51:06','Finiquito',2016,11,'','felipe pizarro','Remuneraciones','boleta','comprobante',43,56027010),(77,50000,'','2016-11-04 18:52:19','',2016,11,'','Jardinero','Gastos de mantención','boleta','comprobante',43,56027010),(78,130700,'','2016-11-04 18:56:39','',2016,11,'','electricidad','Gastos de uso o consumo','boleta','comprobante',43,56027010),(79,32050,'','2016-11-04 18:57:13','',2016,11,'','aguas cordillera','Gastos de uso o consumo','boleta','comprobante',43,56027010),(80,20000,'','2016-11-04 18:57:40','',2016,11,'','cartero','Gastos de uso o consumo','boleta','comprobante',43,56027010),(81,24965,'','2016-11-04 18:58:18','',2016,11,'','office banking','Gastos de uso o consumo','boleta','comprobante',43,56027010),(90,2222,'22','2016-11-05 03:12:33','www',2016,11,'222','22','Gastos de mantención','boleta','comprobante',44,56027234),(91,222,'22','2016-11-05 03:16:55','2',2016,12,'q','2','Gastos de mantención','boleta','comprobante',46,56027234),(92,100000,'1','2016-11-05 12:21:59','Remuneracion',2016,11,'164193705','Dusty Panes','Remuneraciones','boleta','comprobante',45,-8),(94,1000000,'2341','2016-11-07 07:01:38','dsfsdf',2016,11,'','test','Gastos de reparación y otros','boleta','comprobante',47,-6),(95,10000,'123123','2016-11-07 07:02:03','asdasdqew',2016,11,'','test','Gastos de reparación y otros','boleta','comprobante',47,-6),(96,1000,'234','2016-11-07 07:25:41','test',2016,12,'','test','Gastos de reparación y otros','boleta','comprobante',48,-6),(97,10,'test','2016-11-07 07:27:26','test',2016,12,'','test','Gastos de mantención','boleta','comprobante',49,-8),(98,123123,'123','2016-11-13 13:54:00','sd',2016,3,'1','1','Gastos de mantención','boleta','comprobante',50,-6),(99,1364225,'1256132','2016-12-19 20:48:48','guhbnjszxdfcg',2016,1,'12345315','chilectra','Gastos de uso o consumo','boleta','comprobante',52,-6),(100,513552,'513321','2016-12-19 20:50:14','fghjk',2016,1,'52454','fsddssd','Gastos de reparación y otros','boleta','comprobante',52,-6),(104,13550,'9078145','2016-12-28 21:28:38','agua 3',2016,12,'96809310k','aguas cordillera','Gastos de uso o consumo','boleta','comprobante',53,56027010),(105,60100,'9078112','2016-12-28 21:31:27','agua 4',2016,12,'96809310k','aguas cordillera','Gastos de uso o consumo','boleta','comprobante',53,56027010),(106,69550,'9078111','2016-12-28 21:32:34','agua 5',2016,12,'96809310-k','aguas cordillera','Gastos de uso o consumo','boleta','comprobante',53,56027010),(107,12550,'9078110','2016-12-28 21:34:29','agua 6',2016,12,'96809310-k','aguas cordillera','Gastos de uso o consumo','boleta','comprobante',53,56027010),(108,15250,'38791416','2016-12-28 21:36:47','telefono conserjería',2016,12,'90635000-9','movistar','Gastos de uso o consumo','boleta','comprobante',53,56027010),(109,1300,'162774494','2016-12-28 21:38:30','ex chilectra 1',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(110,1550,'162774487','2016-12-28 21:39:07','ex chilectra 2',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(111,1950,'162774478','2016-12-28 21:39:50','ex chilectra 3',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(112,1650,'162774469','2016-12-28 21:40:32','ex chilectra 4',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(113,2400,'162774461','2016-12-28 21:41:08','ex chilectra 5',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(114,1050,'162774452','2016-12-28 21:41:48','ex chilectra 6',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(115,2100,'162774443','2016-12-28 21:42:41','ex chilectra 7',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(116,1200,'162774435','2016-12-28 21:43:18','ex chilectra 8',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(117,113400,'162774426','2016-12-28 21:44:06','ex chilectra 9',2016,12,'96800570-7','enel','Gastos de uso o consumo','boleta','comprobante',53,56027010),(125,50000,'','2016-12-29 01:10:08','20000 Capacitación reemplazo a J.Cofré \n30000 Movilización',2016,12,'23753691-6','Wilson Zumarán Rodríguez','Remuneraciones','boleta','comprobante',53,56027010),(126,0,'','2016-12-29 20:06:11','$39600 4 pantallas de jardín,$7130 libro de actas,$36000 reducción de acta en notaría, $4960 libro de asistencia y block de apunte,$2500 tampón conserjería,$22190 timer caja escala 455,$38280 home center,$400 estacionamiento,$1200 estacionamiento,$32750 a',2016,12,'','EGRESO 1','Gastos de uso o consumo','boleta','comprobante',53,56027010),(127,0,'','2016-12-29 20:10:45','$ 2000 cotización rotura cañería incinerador 453-21, $974 estacionamiento,$8001 bencina,$30000 arreglo e instalación interruptor escala 455, $17530 interruptor escala 455,$35000 reparación cañerría incinerador 453-21.',2016,12,'','Egraso 2','Gastos de reparación y otros','boleta','comprobante',53,56027010),(128,0,'','2016-12-29 20:19:19','$ 50000 mantención jardín, $ 60000 pintura cajas de basura 453-455.',2016,12,'','Egreso C','Gastos de mantención','boleta','comprobante',53,56027010),(129,0,'','2016-12-29 20:25:25','$17500 rep. sist. iluminación escala 455, $980 estacionamiento movistar,$974 estac. notaría, $800 copia llave bodega, $7356 homecenter,$20000 aguinaldo recolector de basura,$7790 homecenter,$15000 reparación cortadora de pasto.',2016,12,'','Egreso D','Gastos de reparación y otros','boleta','comprobante',53,56027010),(130,0,'','2016-12-29 20:26:39','$5000 legalización contrato vigente De Michael Villavicencio',2016,12,'','Egreso E','Gastos de uso o consumo','boleta','comprobante',53,56027010),(131,0,'','2016-12-29 20:31:17','$58856 pintura,$4870 art. librería tottus,$24000 notaría legalización contrato M.V.,$2450 estacionamiento notaría,$500 estacionamiento insp. del trabajo,$5000 bencina.',2016,12,'','Egreso F','Gastos de mantención','boleta','comprobante',53,56027010),(132,0,'','2016-12-29 20:32:41','$5000 arreglo farol sector 579,$20000 capacitación Joel Bejerano para reemplazo M.V.',2016,12,'','Egreso G','Gastos de reparación y otros','boleta','comprobante',53,56027010),(133,0,'','2016-12-29 20:34:04','$44250 bolsas de basura',2016,12,'','Egreso H','Gastos de mantención','boleta','comprobante',53,56027010);

--
-- Table structure for table `gastoscomunes`
--

CREATE TABLE `gastoscomunes` (
  `idgastocomunes` int(11) NOT NULL AUTO_INCREMENT,
  `fecha_pago` datetime DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `estado` varchar(50) DEFAULT NULL,
  `anio` int(11) DEFAULT NULL,
  `mes` int(11) DEFAULT NULL,
  `khipu_paymentid` varchar(45) DEFAULT NULL,
  `khipu_conciliation` datetime DEFAULT NULL,
  `departamentos_propiedades_rut` int(11) NOT NULL,
  `departamentos_iddepartamento` int(11) NOT NULL,
  `notificacion` tinyint(1) DEFAULT NULL,
  `fechaNotificacion` datetime DEFAULT NULL,
  `pagoVencido` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`idgastocomunes`,`departamentos_propiedades_rut`,`departamentos_iddepartamento`),
  KEY `fk_gastoscomunes_departamentos1_idx` (`departamentos_iddepartamento`,`departamentos_propiedades_rut`),
  CONSTRAINT `fk_gastoscomunes_departamentos1` FOREIGN KEY (`departamentos_iddepartamento`, `departamentos_propiedades_rut`) REFERENCES `departamentos` (`iddepartamento`, `propiedades_rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=523 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `gastoscomunes`
--

INSERT INTO `gastoscomunes` VALUES (83,'0000-00-00 00:00:00',12,'Pendiente',2016,11,NULL,NULL,-8,1218,NULL,NULL,NULL),(84,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1219,NULL,NULL,NULL),(85,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1220,NULL,NULL,NULL),(86,'0000-00-00 00:00:00',16,'Pendiente',2016,11,NULL,NULL,-8,1221,NULL,NULL,NULL),(87,'0000-00-00 00:00:00',13,'Pendiente',2016,11,NULL,NULL,-8,1222,NULL,NULL,NULL),(88,'0000-00-00 00:00:00',21,'Pendiente',2016,11,NULL,NULL,-8,1223,NULL,NULL,NULL),(89,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1224,NULL,NULL,NULL),(90,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1225,NULL,NULL,NULL),(91,'0000-00-00 00:00:00',12,'Pendiente',2016,11,NULL,NULL,-8,1226,NULL,NULL,NULL),(92,'0000-00-00 00:00:00',20,'Pendiente',2016,11,NULL,NULL,-8,1227,NULL,NULL,NULL),(93,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1228,NULL,NULL,NULL),(94,'0000-00-00 00:00:00',15,'Pendiente',2016,11,NULL,NULL,-8,1229,NULL,NULL,NULL),(95,'0000-00-00 00:00:00',12,'Pendiente',2016,11,NULL,NULL,-8,1230,NULL,NULL,NULL),(96,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1231,NULL,NULL,NULL),(97,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1232,NULL,NULL,NULL),(98,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1233,NULL,NULL,NULL),(99,'0000-00-00 00:00:00',11,'Pendiente',2016,11,NULL,NULL,-8,1234,NULL,NULL,NULL),(100,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1235,NULL,NULL,NULL),(101,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1236,NULL,NULL,NULL),(102,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1237,NULL,NULL,NULL),(103,'0000-00-00 00:00:00',13,'Pendiente',2016,11,NULL,NULL,-8,1238,NULL,NULL,NULL),(104,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1239,NULL,NULL,NULL),(105,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1240,NULL,NULL,NULL),(106,'0000-00-00 00:00:00',16,'Pendiente',2016,11,NULL,NULL,-8,1241,NULL,NULL,NULL),(107,'0000-00-00 00:00:00',12,'Pendiente',2016,11,NULL,NULL,-8,1242,NULL,NULL,NULL),(108,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1243,NULL,NULL,NULL),(109,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1244,NULL,NULL,NULL),(110,'0000-00-00 00:00:00',16,'Pendiente',2016,11,NULL,NULL,-8,1245,NULL,NULL,NULL),(111,'0000-00-00 00:00:00',13,'Pendiente',2016,11,NULL,NULL,-8,1246,NULL,NULL,NULL),(112,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1247,NULL,NULL,NULL),(113,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1248,NULL,NULL,NULL),(114,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1249,NULL,NULL,NULL),(115,'0000-00-00 00:00:00',12,'Pendiente',2016,11,NULL,NULL,-8,1250,NULL,NULL,NULL),(116,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1251,NULL,NULL,NULL),(117,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1252,NULL,NULL,NULL),(118,'0000-00-00 00:00:00',16,'Pendiente',2016,11,NULL,NULL,-8,1253,NULL,NULL,NULL),(119,'0000-00-00 00:00:00',13,'Pendiente',2016,11,NULL,NULL,-8,1254,NULL,NULL,NULL),(120,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1255,NULL,NULL,NULL),(121,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1256,NULL,NULL,NULL),(122,'0000-00-00 00:00:00',16,'Pendiente',2016,11,NULL,NULL,-8,1257,NULL,NULL,NULL),(123,'0000-00-00 00:00:00',14,'Pendiente',2016,11,NULL,NULL,-8,1258,NULL,NULL,NULL),(124,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1259,NULL,NULL,NULL),(125,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1260,NULL,NULL,NULL),(126,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1261,NULL,NULL,NULL),(127,'0000-00-00 00:00:00',11,'Pendiente',2016,11,NULL,NULL,-8,1262,NULL,NULL,NULL),(128,'0000-00-00 00:00:00',20,'Pendiente',2016,11,NULL,NULL,-8,1263,NULL,NULL,NULL),(129,'0000-00-00 00:00:00',21,'Pendiente',2016,11,NULL,NULL,-8,1264,NULL,NULL,NULL),(130,'0000-00-00 00:00:00',15,'Pendiente',2016,11,NULL,NULL,-8,1265,NULL,NULL,NULL),(131,'0000-00-00 00:00:00',12,'Pendiente',2016,11,NULL,NULL,-8,1266,NULL,NULL,NULL),(132,'0000-00-00 00:00:00',18,'Pendiente',2016,11,NULL,NULL,-8,1267,NULL,NULL,NULL),(133,'0000-00-00 00:00:00',20,'Pendiente',2016,11,NULL,NULL,-8,1268,NULL,NULL,NULL),(134,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1269,NULL,NULL,NULL),(135,'0000-00-00 00:00:00',14,'Pendiente',2016,11,NULL,NULL,-8,1270,NULL,NULL,NULL),(136,'0000-00-00 00:00:00',15,'Pendiente',2016,11,NULL,NULL,-8,1271,NULL,NULL,NULL),(137,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1272,NULL,NULL,NULL),(138,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1273,NULL,NULL,NULL),(139,'0000-00-00 00:00:00',13,'Pendiente',2016,11,NULL,NULL,-8,1274,NULL,NULL,NULL),(140,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1275,NULL,NULL,NULL),(141,'0000-00-00 00:00:00',19,'Pendiente',2016,11,NULL,NULL,-8,1276,NULL,NULL,NULL),(142,'0000-00-00 00:00:00',17,'Pendiente',2016,11,NULL,NULL,-8,1277,NULL,NULL,NULL),(207,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1154,NULL,NULL,NULL),(208,'0000-00-00 00:00:00',64930,'Pagado',2016,11,NULL,NULL,-6,1155,NULL,NULL,NULL),(209,'0000-00-00 00:00:00',59660,'Pagado',2016,11,NULL,NULL,-6,1156,NULL,NULL,NULL),(210,'0000-00-00 00:00:00',64930,'Pagado',2016,11,NULL,NULL,-6,1157,NULL,NULL,NULL),(211,'0000-00-00 00:00:00',59660,'Pagado',2016,11,NULL,NULL,-6,1158,NULL,NULL,NULL),(212,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1159,NULL,NULL,NULL),(213,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1160,NULL,NULL,NULL),(214,'0000-00-00 00:00:00',64930,'Pagado',2016,11,NULL,NULL,-6,1161,NULL,NULL,NULL),(215,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1162,NULL,NULL,NULL),(216,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1163,NULL,NULL,NULL),(217,'0000-00-00 00:00:00',64930,'Pagado',2016,11,NULL,NULL,-6,1164,NULL,NULL,NULL),(218,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1165,NULL,NULL,NULL),(219,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1166,NULL,NULL,NULL),(220,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1167,NULL,NULL,NULL),(221,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1168,NULL,NULL,NULL),(222,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1169,NULL,NULL,NULL),(223,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1170,NULL,NULL,NULL),(224,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1171,NULL,NULL,NULL),(225,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1172,NULL,NULL,NULL),(226,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1173,NULL,NULL,NULL),(227,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1174,NULL,NULL,NULL),(228,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1175,NULL,NULL,NULL),(229,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1176,NULL,NULL,NULL),(230,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1177,NULL,NULL,NULL),(231,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1178,NULL,NULL,NULL),(232,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1179,NULL,NULL,NULL),(233,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1180,NULL,NULL,NULL),(234,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1181,NULL,NULL,NULL),(235,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1182,NULL,NULL,NULL),(236,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1183,NULL,NULL,NULL),(237,'0000-00-00 00:00:00',64930,'Pendiente',2016,11,NULL,NULL,-6,1184,NULL,NULL,NULL),(238,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1185,NULL,NULL,NULL),(239,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1186,NULL,NULL,NULL),(240,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1187,NULL,NULL,NULL),(241,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1188,NULL,NULL,NULL),(242,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1189,NULL,NULL,NULL),(243,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1190,NULL,NULL,NULL),(244,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1191,NULL,NULL,NULL),(245,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1192,NULL,NULL,NULL),(246,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1193,NULL,NULL,NULL),(247,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1194,NULL,NULL,NULL),(248,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1195,NULL,NULL,NULL),(249,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1196,NULL,NULL,NULL),(250,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1197,NULL,NULL,NULL),(251,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1198,NULL,NULL,NULL),(252,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1199,NULL,NULL,NULL),(253,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1200,NULL,NULL,NULL),(254,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1201,NULL,NULL,NULL),(255,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1202,NULL,NULL,NULL),(256,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1203,NULL,NULL,NULL),(257,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1204,NULL,NULL,NULL),(258,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1205,NULL,NULL,NULL),(259,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1206,NULL,NULL,NULL),(260,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1207,NULL,NULL,NULL),(261,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1208,NULL,NULL,NULL),(262,'0000-00-00 00:00:00',63440,'Pendiente',2016,11,NULL,NULL,-6,1209,NULL,NULL,NULL),(263,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1210,NULL,NULL,NULL),(264,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1211,NULL,NULL,NULL),(265,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1212,NULL,NULL,NULL),(266,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1213,NULL,NULL,NULL),(267,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1214,NULL,NULL,NULL),(268,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1215,NULL,NULL,NULL),(269,'0000-00-00 00:00:00',60060,'Pendiente',2016,11,NULL,NULL,-6,1216,NULL,NULL,NULL),(270,'0000-00-00 00:00:00',59660,'Pendiente',2016,11,NULL,NULL,-6,1217,NULL,NULL,NULL),(271,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1218,NULL,NULL,NULL),(272,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1219,NULL,NULL,NULL),(273,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1220,NULL,NULL,NULL),(274,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1221,NULL,NULL,NULL),(275,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1222,NULL,NULL,NULL),(276,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1223,NULL,NULL,NULL),(277,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1224,NULL,NULL,NULL),(278,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1225,NULL,NULL,NULL),(279,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1226,NULL,NULL,NULL),(280,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1227,NULL,NULL,NULL),(281,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1228,NULL,NULL,NULL),(282,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1229,NULL,NULL,NULL),(283,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1230,NULL,NULL,NULL),(284,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1231,NULL,NULL,NULL),(285,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1232,NULL,NULL,NULL),(286,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1233,NULL,NULL,NULL),(287,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1234,NULL,NULL,NULL),(288,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1235,NULL,NULL,NULL),(289,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1236,NULL,NULL,NULL),(290,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1237,NULL,NULL,NULL),(291,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1238,NULL,NULL,NULL),(292,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1239,NULL,NULL,NULL),(293,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1240,NULL,NULL,NULL),(294,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1241,NULL,NULL,NULL),(295,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1242,NULL,NULL,NULL),(296,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1243,NULL,NULL,NULL),(297,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1244,NULL,NULL,NULL),(298,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1245,NULL,NULL,NULL),(299,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1246,NULL,NULL,NULL),(300,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1247,NULL,NULL,NULL),(301,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1248,NULL,NULL,NULL),(302,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1249,NULL,NULL,NULL),(303,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1250,NULL,NULL,NULL),(304,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1251,NULL,NULL,NULL),(305,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1252,NULL,NULL,NULL),(306,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1253,NULL,NULL,NULL),(307,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1254,NULL,NULL,NULL),(308,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1255,NULL,NULL,NULL),(309,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1256,NULL,NULL,NULL),(310,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1257,NULL,NULL,NULL),(311,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1258,NULL,NULL,NULL),(312,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1259,NULL,NULL,NULL),(313,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1260,NULL,NULL,NULL),(314,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1261,NULL,NULL,NULL),(315,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1262,NULL,NULL,NULL),(316,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1263,NULL,NULL,NULL),(317,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1264,NULL,NULL,NULL),(318,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1265,NULL,NULL,NULL),(319,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1266,NULL,NULL,NULL),(320,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1267,NULL,NULL,NULL),(321,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1268,NULL,NULL,NULL),(322,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1269,NULL,NULL,NULL),(323,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1270,NULL,NULL,NULL),(324,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1271,NULL,NULL,NULL),(325,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1272,NULL,NULL,NULL),(326,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1273,NULL,NULL,NULL),(327,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1274,NULL,NULL,NULL),(328,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1275,NULL,NULL,NULL),(329,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1276,NULL,NULL,NULL),(330,'0000-00-00 00:00:00',0,'Pendiente',2016,12,NULL,NULL,-8,1277,NULL,NULL,NULL),(331,'2016-12-06 01:41:24',59660,'Pagado',2016,12,NULL,NULL,-6,1154,NULL,NULL,NULL),(332,'2016-12-06 02:01:30',64930,'Pagado',2016,12,NULL,NULL,-6,1155,NULL,NULL,NULL),(333,'2016-12-19 21:00:45',59660,'Pagado',2016,12,NULL,NULL,-6,1156,NULL,NULL,NULL),(334,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1157,NULL,NULL,NULL),(335,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1158,NULL,NULL,NULL),(336,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1159,NULL,NULL,NULL),(337,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1160,NULL,NULL,NULL),(338,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1161,NULL,NULL,NULL),(339,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1162,NULL,NULL,NULL),(340,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1163,NULL,NULL,NULL),(341,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1164,NULL,NULL,NULL),(342,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1165,NULL,NULL,NULL),(343,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1166,NULL,NULL,NULL),(344,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1167,NULL,NULL,NULL),(345,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1168,NULL,NULL,NULL),(346,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1169,NULL,NULL,NULL),(347,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1170,NULL,NULL,NULL),(348,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1171,NULL,NULL,NULL),(349,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1172,NULL,NULL,NULL),(350,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1173,NULL,NULL,NULL),(351,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1174,NULL,NULL,NULL),(352,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1175,NULL,NULL,NULL),(353,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1176,NULL,NULL,NULL),(354,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1177,NULL,NULL,NULL),(355,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1178,NULL,NULL,NULL),(356,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1179,NULL,NULL,NULL),(357,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1180,NULL,NULL,NULL),(358,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1181,NULL,NULL,NULL),(359,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1182,NULL,NULL,NULL),(360,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1183,NULL,NULL,NULL),(361,'0000-00-00 00:00:00',64930,'Pendiente',2016,12,NULL,NULL,-6,1184,NULL,NULL,NULL),(362,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1185,NULL,NULL,NULL),(363,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1186,NULL,NULL,NULL),(364,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1187,NULL,NULL,NULL),(365,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1188,NULL,NULL,NULL),(366,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1189,NULL,NULL,NULL),(367,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1190,NULL,NULL,NULL),(368,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1191,NULL,NULL,NULL),(369,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1192,NULL,NULL,NULL),(370,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1193,NULL,NULL,NULL),(371,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1194,NULL,NULL,NULL),(372,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1195,NULL,NULL,NULL),(373,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1196,NULL,NULL,NULL),(374,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1197,NULL,NULL,NULL),(375,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1198,NULL,NULL,NULL),(376,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1199,NULL,NULL,NULL),(377,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1200,NULL,NULL,NULL),(378,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1201,NULL,NULL,NULL),(379,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1202,NULL,NULL,NULL),(380,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1203,NULL,NULL,NULL),(381,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1204,NULL,NULL,NULL),(382,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1205,NULL,NULL,NULL),(383,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1206,NULL,NULL,NULL),(384,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1207,NULL,NULL,NULL),(385,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1208,NULL,NULL,NULL),(386,'0000-00-00 00:00:00',63440,'Pendiente',2016,12,NULL,NULL,-6,1209,NULL,NULL,NULL),(387,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1210,NULL,NULL,NULL),(388,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1211,NULL,NULL,NULL),(389,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1212,NULL,NULL,NULL),(390,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1213,NULL,NULL,NULL),(391,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1214,NULL,NULL,NULL),(392,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1215,NULL,NULL,NULL),(393,'0000-00-00 00:00:00',60060,'Pendiente',2016,12,NULL,NULL,-6,1216,NULL,NULL,NULL),(394,'0000-00-00 00:00:00',59660,'Pendiente',2016,12,NULL,NULL,-6,1217,NULL,NULL,NULL);

--
-- Table structure for table `indicadores`
--

CREATE TABLE `indicadores` (
  `idindicadores` int(11) NOT NULL AUTO_INCREMENT,
  `tipo` varchar(45) DEFAULT NULL,
  `nombre` varchar(45) DEFAULT NULL,
  `valor` decimal(4,2) DEFAULT NULL,
  PRIMARY KEY (`idindicadores`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `indicadores`
--

INSERT INTO `indicadores` VALUES (1,'afp','provida',11.54),(2,'afp','capital',11.44);

--
-- Table structure for table `modulos`
--

CREATE TABLE `modulos` (
  `idmodulos` varchar(100) NOT NULL,
  `nombre` varchar(200) DEFAULT NULL,
  `href` varchar(100) DEFAULT NULL,
  `faicon` varchar(100) DEFAULT NULL,
  `url` varchar(100) DEFAULT NULL,
  `orden` int(11) DEFAULT NULL,
  PRIMARY KEY (`idmodulos`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `modulos`
--

INSERT INTO `modulos` VALUES ('CARGOS','Cargos','#cargos',NULL,'cargos',5),('COPROPIETARIOS','Departamentos','#copropietarios',NULL,'copropietarios',1),('GASTOS','Gastos Comunes','#gastos',NULL,'gastos',4),('GASTOSCOMUNES','Pagos','#gastoscomunes',NULL,'gastoscomunes',6),('REMUNERACIONES','Remuneraciones','#remuneraciones',NULL,'remuneraciones',3),('TRABAJADORES','Trabajadores','#trabajadores',NULL,'trabajadores',2);

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

CREATE TABLE `propiedades` (
  `rut` int(11) NOT NULL,
  `nombre` varchar(200) DEFAULT NULL,
  `direccion` varchar(200) DEFAULT NULL,
  `region` varchar(45) DEFAULT NULL,
  `comuna` varchar(45) DEFAULT NULL,
  `email` varchar(200) DEFAULT NULL,
  `esGastoFijo` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`rut`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `propiedades` VALUES (-8,'Comunidad del anillo','La Comarca 123','Mordor','13',NULL,0),(-6,'comunidad Puerto lindo','av los leones 123','Independencia','13',NULL,1),(1,'Alto Lo Castillo III','Av. San Juan #323','6','Machalí','altolocastillo@gmail.com',NULL),(53311123,'Edificio Estrella del Norte','Estrella del Norte 957','13','Vitacura','estrellanorte957@gmail.com',0),(56027010,'comunidad Edificio Los Militares 6782','Malmo 505','13','Las Condes','avallegabrielli@vtr.net',1),(56027234,'Comunidad Edificio Los Sargentos','Malmo 502','13','Las Condes','Sandia@propiedades.cl',NULL);

--
-- Table structure for table `remuneraciones`
--

CREATE TABLE `remuneraciones` (
  `idremuneraciones` int(11) NOT NULL AUTO_INCREMENT,
  `mes` int(11) DEFAULT NULL,
  `anio` int(11) DEFAULT NULL,
  `dias_trabajados` int(11) DEFAULT NULL,
  `sueldo_base` int(11) DEFAULT NULL,
  `valor_dias_trabajados` int(11) DEFAULT NULL,
  `gratificacion` int(11) DEFAULT NULL,
  `comisiones` int(11) DEFAULT NULL,
  `asignacion_familiar` int(11) DEFAULT NULL,
  `bonos` int(11) DEFAULT NULL,
  `horas_extras` int(11) DEFAULT NULL,
  `colacion` int(11) DEFAULT NULL,
  `movilizacion` int(11) DEFAULT NULL,
  `total_haberes` int(11) DEFAULT NULL,
  `total_descuentos` int(11) DEFAULT NULL,
  `base_imponible` int(11) DEFAULT NULL,
  `afp` varchar(45) DEFAULT NULL,
  `valor_afp` decimal(4,2) DEFAULT NULL,
  `total_afp` int(11) DEFAULT NULL,
  `isapre` varchar(45) DEFAULT NULL,
  `valor_isapre` decimal(4,2) DEFAULT NULL,
  `total_isapre` int(11) DEFAULT NULL,
  `prev_seguro_cesantia_emp` decimal(4,2) DEFAULT NULL,
  `prev_seguro_cesantia_trab` decimal(4,2) DEFAULT NULL,
  `total_seguro_cesantia_emp` int(11) DEFAULT NULL,
  `total_seguro_cesantia_trab` int(11) DEFAULT NULL,
  `descuentos` int(11) DEFAULT NULL,
  `sueldo_liquido` int(11) DEFAULT NULL,
  `fecha_borrador` datetime DEFAULT NULL,
  `fecha_pdf` datetime DEFAULT NULL,
  `pdf` blob,
  `estado` int(11) DEFAULT NULL,
  `trabajadores_rut` int(11) NOT NULL,
  `trabajadores_propiedades_rut` int(11) NOT NULL,
  PRIMARY KEY (`idremuneraciones`,`trabajadores_rut`,`trabajadores_propiedades_rut`),
  KEY `fk_remuneraciones_trabajadores1_idx` (`trabajadores_rut`,`trabajadores_propiedades_rut`),
  CONSTRAINT `fk_remuneraciones_trabajadores1` FOREIGN KEY (`trabajadores_rut`, `trabajadores_propiedades_rut`) REFERENCES `trabajadores` (`rut`, `propiedades_rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `remuneraciones`
--


--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `idroles` varchar(100) NOT NULL,
  `nombre` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`idroles`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` VALUES ('ADMINISTRADOR','administrador'),('ROOT','root');

--
-- Table structure for table `roles_modulos_acciones`
--

CREATE TABLE `roles_modulos_acciones` (
  `roles_idroles` varchar(100) NOT NULL,
  `modulos_idmodulos` varchar(100) NOT NULL,
  `ver` int(11) DEFAULT NULL,
  `agregar` int(11) DEFAULT NULL,
  `modificar` int(11) DEFAULT NULL,
  `eliminar` int(11) DEFAULT NULL,
  `notificar` int(11) DEFAULT NULL,
  PRIMARY KEY (`roles_idroles`,`modulos_idmodulos`),
  KEY `fk_roles_modulos_acciones_roles1_idx` (`roles_idroles`),
  KEY `fk_roles_modulos_acciones_modulos1` (`modulos_idmodulos`),
  CONSTRAINT `fk_roles_modulos_acciones_modulos1` FOREIGN KEY (`modulos_idmodulos`) REFERENCES `modulos` (`idmodulos`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_roles_modulos_acciones_roles1` FOREIGN KEY (`roles_idroles`) REFERENCES `roles` (`idroles`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `roles_modulos_acciones`
--

INSERT INTO `roles_modulos_acciones` VALUES ('ADMINISTRADOR','CARGOS',1,NULL,NULL,NULL,NULL),('ADMINISTRADOR','COPROPIETARIOS',1,NULL,NULL,NULL,NULL),('ADMINISTRADOR','GASTOS',1,NULL,NULL,NULL,NULL),('ADMINISTRADOR','GASTOSCOMUNES',1,NULL,NULL,NULL,NULL),('ROOT','CARGOS',1,NULL,NULL,NULL,NULL),('ROOT','COPROPIETARIOS',1,NULL,NULL,NULL,NULL),('ROOT','GASTOS',1,NULL,NULL,NULL,NULL),('ROOT','GASTOSCOMUNES',1,NULL,NULL,NULL,NULL),('ROOT','REMUNERACIONES',1,NULL,NULL,NULL,NULL),('ROOT','TRABAJADORES',1,NULL,NULL,NULL,NULL);

--
-- Table structure for table `trabajadores`
--

CREATE TABLE `trabajadores` (
  `rut` int(11) NOT NULL,
  `nombre` varchar(255) DEFAULT NULL,
  `fecha_ingreso` datetime DEFAULT NULL,
  `cargo` varchar(255) DEFAULT NULL,
  `banco` varchar(100) DEFAULT NULL,
  `numero_cuenta` varchar(100) DEFAULT NULL,
  `sueldo_base` int(11) DEFAULT NULL,
  `gratificacion` int(11) DEFAULT NULL,
  `afp` varchar(100) DEFAULT NULL,
  `isapre` varchar(100) DEFAULT NULL,
  `valor_plan_isapre` int(11) DEFAULT NULL,
  `version` int(11) NOT NULL,
  `propiedades_rut` int(11) NOT NULL,
  `inicio_contrato` datetime DEFAULT NULL,
  `termino_contrato` datetime DEFAULT NULL,
  PRIMARY KEY (`rut`,`propiedades_rut`,`version`),
  KEY `fk_trabajadores_propiedades1_idx` (`propiedades_rut`),
  CONSTRAINT `fk_trabajadores_propiedades1` FOREIGN KEY (`propiedades_rut`) REFERENCES `propiedades` (`rut`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `trabajadores`
--

INSERT INTO `trabajadores` VALUES (2,'Dusty Panes','2016-11-01 00:00:00','Conserje','Santander','4343553332',500000,200000,'Provida','Vida tres',5,1,-6,NULL,NULL),(15533936,'Felipe Venegas','0000-00-00 00:00:00','Conserje','Chile','12312312312',500000,100000,'Provida','Banmedica',2,1,-6,NULL,NULL);

--
-- Table structure for table `usuarios_propiedades`
--

CREATE TABLE `usuarios_propiedades` (
  `usuarios_idusuarios` int(11) NOT NULL,
  `propiedades_rut` int(11) NOT NULL,
  PRIMARY KEY (`usuarios_idusuarios`,`propiedades_rut`),
  KEY `fk_usuarios_propiedades_propiedades1_idx` (`propiedades_rut`),
  CONSTRAINT `fk_usuarios_propiedades_propiedades1` FOREIGN KEY (`propiedades_rut`) REFERENCES `propiedades` (`rut`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_usuarios_propiedades_usuarios1` FOREIGN KEY (`usuarios_idusuarios`) REFERENCES `usuarios` (`idusuarios`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `usuarios_propiedades`
--

INSERT INTO `usuarios_propiedades` VALUES (1,-8),(2,-8),(1,-6),(2,-6),(1,1),(1,53311123),(2,53311123),(3,53311123),(1,56027010),(2,56027010),(3,56027010),(4,56027010),(1,56027234),(2,56027234);


