/*!50001 DROP VIEW IF EXISTS `v_ingresos_brutos_gasto`*/;
/*!50001 CREATE TABLE `v_ingresos_brutos_gasto` (
  `anio` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `UNO` tinyint NOT NULL,
  `DOS` tinyint NOT NULL,
  `TRES` tinyint NOT NULL,
  `CUATRO` tinyint NOT NULL,
  `CINCO` tinyint NOT NULL,
  `SEIS` tinyint NOT NULL,
  `SIETE` tinyint NOT NULL,
  `OCHO` tinyint NOT NULL,
  `NUEVE` tinyint NOT NULL,
  `DIEZ` tinyint NOT NULL,
  `ONCE` tinyint NOT NULL,
  `DOCE` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_liquidaciones`
--

/*!50001 DROP VIEW IF EXISTS `v_liquidaciones`*/;
/*!50001 CREATE TABLE `v_liquidaciones` (
  `Idperiod_liquidations` tinyint NOT NULL,
  `apply_to` tinyint NOT NULL,
  `Status` tinyint NOT NULL,
  `IdPeriodo` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `DocumentoEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `Desde` tinyint NOT NULL,
  `Hasta` tinyint NOT NULL,
  `Periodo` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_liquidaciones_iibb`
--

/*!50001 DROP VIEW IF EXISTS `v_liquidaciones_iibb`*/;
/*!50001 CREATE TABLE `v_liquidaciones_iibb` (
  `Status` tinyint NOT NULL,
  `IdLiquidacionIIBB` tinyint NOT NULL,
  `period_liquidation_id` tinyint NOT NULL,
  `liquidador` tinyint NOT NULL,
  `IdPeriodo` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `DocumentoEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `anio` tinyint NOT NULL,
  `mes` tinyint NOT NULL,
  `Desde` tinyint NOT NULL,
  `Hasta` tinyint NOT NULL,
  `Periodo` tinyint NOT NULL,
  `Zona` tinyint NOT NULL,
  `coeficiente` tinyint NOT NULL,
  `alicuota` tinyint NOT NULL,
  `baseImponible` tinyint NOT NULL,
  `impuesto` tinyint NOT NULL,
  `saldoAnterior` tinyint NOT NULL,
  `sircreb` tinyint NOT NULL,
  `percepciones` tinyint NOT NULL,
  `retenciones` tinyint NOT NULL,
  `A_PAGAR_ANTERIOR` tinyint NOT NULL,
  `A_Pagar` tinyint NOT NULL,
  `A_Favor` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_liquidaciones_iva`
--

/*!50001 DROP VIEW IF EXISTS `v_liquidaciones_iva`*/;
/*!50001 CREATE TABLE `v_liquidaciones_iva` (
  `Status` tinyint NOT NULL,
  `IdLiquidacionIVA` tinyint NOT NULL,
  `period_liquidation_id` tinyint NOT NULL,
  `liquidador` tinyint NOT NULL,
  `IdPeriodo` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `DocumentoEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `Desde` tinyint NOT NULL,
  `Hasta` tinyint NOT NULL,
  `Periodo` tinyint NOT NULL,
  `total_debit` tinyint NOT NULL,
  `total_credit` tinyint NOT NULL,
  `previous_technical` tinyint NOT NULL,
  `previous_free_availability` tinyint NOT NULL,
  `retention_amount` tinyint NOT NULL,
  `perception_amount` tinyint NOT NULL,
  `compensation_amount` tinyint NOT NULL,
  `total_perceptions_retentions` tinyint NOT NULL,
  `free_availability_balance` tinyint NOT NULL,
  `A_PAGAR_ANTERIOR` tinyint NOT NULL,
  `A_PAGAR` tinyint NOT NULL,
  `SaldoTecnicoAFavor` tinyint NOT NULL,
  `SaldoLibreDisponibilidadAFavor` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_pdf_consultacomprobantes`
--

/*!50001 DROP VIEW IF EXISTS `v_pdf_consultacomprobantes`*/;
/*!50001 CREATE TABLE `v_pdf_consultacomprobantes` (
  `IdComprobante` tinyint NOT NULL,
  `IdTipoComprobante` tinyint NOT NULL,
  `IdProveedorCliente` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `DocumentoEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `IdPeriodo` tinyint NOT NULL,
  `Desde` tinyint NOT NULL,
  `Hasta` tinyint NOT NULL,
  `Periodo` tinyint NOT NULL,
  `anioPeriodo` tinyint NOT NULL,
  `mesPeriodo` tinyint NOT NULL,
  `IdOperacion` tinyint NOT NULL,
  `Operacion` tinyint NOT NULL,
  `Proveedor` tinyint NOT NULL,
  `TipoDocumento` tinyint NOT NULL,
  `Documento` tinyint NOT NULL,
  `Zona` tinyint NOT NULL,
  `Estado` tinyint NOT NULL,
  `Actividad` tinyint NOT NULL,
  `FechaComprobante` tinyint NOT NULL,
  `Referencia` tinyint NOT NULL,
  `TipoDeRetencion` tinyint NOT NULL,
  `TipoComprobante` tinyint NOT NULL,
  `Suc` tinyint NOT NULL,
  `Numero` tinyint NOT NULL,
  `Total` tinyint NOT NULL,
  `gravado_27` tinyint NOT NULL,
  `IVA_27` tinyint NOT NULL,
  `gravado_21` tinyint NOT NULL,
  `IVA_21` tinyint NOT NULL,
  `gravado_105` tinyint NOT NULL,
  `IVA_105` tinyint NOT NULL,
  `gravado_5` tinyint NOT NULL,
  `IVA_5` tinyint NOT NULL,
  `gravado_0` tinyint NOT NULL,
  `IVA_0` tinyint NOT NULL,
  `gravado_2_5` tinyint NOT NULL,
  `IVA_2_5` tinyint NOT NULL,
  `no_gravado` tinyint NOT NULL,
  `percepIva` tinyint NOT NULL,
  `Imps_Internos` tinyint NOT NULL,
  `Perc_IIBB` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_retenciones_ganancias`
--

/*!50001 DROP VIEW IF EXISTS `v_retenciones_ganancias`*/;
/*!50001 CREATE TABLE `v_retenciones_ganancias` (
  `IdOperacion` tinyint NOT NULL,
  `Operacion` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `DocumentoEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `anioPeriodo` tinyint NOT NULL,
  `UNO` tinyint NOT NULL,
  `DOS` tinyint NOT NULL,
  `TRES` tinyint NOT NULL,
  `CUATRO` tinyint NOT NULL,
  `CINCO` tinyint NOT NULL,
  `SEIS` tinyint NOT NULL,
  `SIETE` tinyint NOT NULL,
  `OCHO` tinyint NOT NULL,
  `NUEVE` tinyint NOT NULL,
  `DIEZ` tinyint NOT NULL,
  `ONCE` tinyint NOT NULL,
  `DOCE` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_sircreb_comp_anticipos_ganan`
--

/*!50001 DROP VIEW IF EXISTS `v_sircreb_comp_anticipos_ganan`*/;
/*!50001 CREATE TABLE `v_sircreb_comp_anticipos_ganan` (
  `IdOperacion` tinyint NOT NULL,
  `Operacion` tinyint NOT NULL,
  `IdEmpresa` tinyint NOT NULL,
  `DocumentoEmpresa` tinyint NOT NULL,
  `NombreEmpresa` tinyint NOT NULL,
  `anioPeriodo` tinyint NOT NULL,
  `UNO` tinyint NOT NULL,
  `DOS` tinyint NOT NULL,
  `TRES` tinyint NOT NULL,
  `CUATRO` tinyint NOT NULL,
  `CINCO` tinyint NOT NULL,
  `SEIS` tinyint NOT NULL,
  `SIETE` tinyint NOT NULL,
  `OCHO` tinyint NOT NULL,
  `NUEVE` tinyint NOT NULL,
  `DIEZ` tinyint NOT NULL,
  `ONCE` tinyint NOT NULL,
  `DOCE` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_vencimiento_impuestos`
--

/*!50001 DROP VIEW IF EXISTS `v_vencimiento_impuestos`*/;
/*!50001 CREATE TABLE `v_vencimiento_impuestos` (
  `idPersonVto` tinyint NOT NULL,
  `person_id` tinyint NOT NULL,
  `liquidador` tinyint NOT NULL,
  `empresa` tinyint NOT NULL,
  `cuit` tinyint NOT NULL,
  `impuesto` tinyint NOT NULL,
  `categoria` tinyint NOT NULL,
  `impuesto_id` tinyint NOT NULL,
  `categoria_imp_id` tinyint NOT NULL,
  `vencimiento` tinyint NOT NULL,
  `vto_id` tinyint NOT NULL,
  `anticipo` tinyint NOT NULL,
  `importe` tinyint NOT NULL,
  `comentario` tinyint NOT NULL,
  `mes` tinyint NOT NULL,
  `NumMes` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_vencimientosanuales`
--

/*!50001 DROP VIEW IF EXISTS `v_vencimientosanuales`*/;
/*!50001 CREATE TABLE `v_vencimientosanuales` (
  `impuesto_id` tinyint NOT NULL,
  `impuesto` tinyint NOT NULL,
  `anio` tinyint NOT NULL,
  `mes` tinyint NOT NULL,
  `dia` tinyint NOT NULL,
  `anticipo` tinyint NOT NULL,
  `status` tinyint NOT NULL,
  `grupo` tinyint NOT NULL,
  `IdFinCuit` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `ventanilla_elec`
--

CREATE TABLE `ventanilla_elec` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `idComunicacion` int(10) unsigned NOT NULL,
  `cuitDestinatario` int(10) unsigned NOT NULL,
  `fechaPublicacion` datetime DEFAULT NULL,
  `fechaVencimiento` datetime DEFAULT NULL,
  `sistemaPublicador` int(10) unsigned DEFAULT NULL,
  `sistemaPublicadorDesc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` int(10) unsigned DEFAULT NULL,
  `estadoDesc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `asunto` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prioridad` int(11) DEFAULT NULL,
  `tieneAdjunto` tinyint(1) DEFAULT NULL,
  `referencia1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `referencia2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `leida` tinyint(1) NOT NULL DEFAULT '0',
  `comentario` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ventanilla_elec_person_id_foreign` (`person_id`),
  KEY `ventanilla_elec_sistemapublicador_foreign` (`sistemaPublicador`),
  KEY `ventanilla_elec_estado_foreign` (`estado`),
  CONSTRAINT `ventanilla_elec_estado_foreign` FOREIGN KEY (`estado`) REFERENCES `ventanilla_elec_estados` (`id`),
  CONSTRAINT `ventanilla_elec_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `ventanilla_elec_sistemapublicador_foreign` FOREIGN KEY (`sistemaPublicador`) REFERENCES `ventanilla_elec_sistemas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ventanilla_elec`
--


--
-- Table structure for table `ventanilla_elec_estados`
--

CREATE TABLE `ventanilla_elec_estados` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ventanilla_elec_estados`
--

INSERT INTO `ventanilla_elec_estados` VALUES (1,'Comunicacion sin procesar - No disponible','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(2,'Comunicacion No Leida','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(3,'Comunicacion Leida','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL);

--
-- Table structure for table `ventanilla_elec_sistemas`
--

CREATE TABLE `ventanilla_elec_sistemas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ventanilla_elec_sistemas`
--

INSERT INTO `ventanilla_elec_sistemas` VALUES (1,'Sistema Ventanilla Electrónica','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(2,'Recaudacion Seguridad Social','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(3,'Devolución Iva Operaciones con Tarjetas de Crédito','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(4,'Sistema Informático Malvina','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(5,'Devolución Iva Operaciones con Tarjetas de débito','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(6,'Registración de Manifiesto','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(7,'Inducción Bienes Personales y Ganancias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(8,'Resultado de Transmisión de Manifiesto','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(9,'Concursos y Quiebras - Corte de Información','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(10,'Requerimiento de Información según punto 7 - Apartado A - Anexo III - R.G. 1361 - REAR','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(11,'Resultado de la solicitud de autorización de emisión de comprobantes electrónico','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(17,'Osiris - MovBan Acreditación de Fondos Banco Recaudador','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(18,'Osiris - MovBan Acreditación de Fondos Banco Administrador','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(19,'Osiris - MovBan Respuesta de Proceso del Cierre de Concentrador','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(22,'Osiris - MovBan Acreditación de Fondos Organismo Recaudador','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(24,'Ley 25922 - Promoción de Software','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(25,'Mi Simplificación','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(26,'Consulta de Validez de Comprobantes emitidos Electrónicamente','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(27,'SCF-Publicación de Extractos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(28,'Solicitud y consulta de CUIT de Sociedades','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(29,'Mis Facilidades','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(30,'Consulta de Validez de CAI','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(31,'SOJ Provincias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(32,'Mi Simplificación - Organismos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(33,'Transferencias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(34,'Nómina','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(35,'Procesos de padrón de aportantes','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(36,'Procesos de corrección de datos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(37,'Procesos de Información de padrón','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(38,'Procesos de actualización de opciones de obra social','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(39,'Procesos de liquidaciones especiales','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(40,'Información no periódica','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(42,'Tribunal Fiscal de la Nación - Tasa de Justicia','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(43,'ARFE - Administrador de Relaciones Factura Electrónica','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(44,'Información Tributaria','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(45,'Información Aduanera','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(47,'Monotributo para Provincias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(48,'e-Compras AFIP','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(49,'Inscripción de Sociedades','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(50,'Facturables - Monotributo','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(51,'Facturables - Autonómos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(52,'Facturables - Mis Facilidades','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL);
INSERT INTO `ventanilla_elec_sistemas` VALUES (53,'Facturables - Anticipo Ganancias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(54,'Facturables - Anticipo Bienes Personales','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(55,'Fiscalización - Cartas de porte','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(56,'Determinativa','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(57,'Información Tributaria - ONCCA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(58,'Fiscalización - Cuota Hilton','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(59,'Factuweb','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(60,'RCEL-Régimen de comprobantes de emisión electrónica','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(61,'Estadísticos / Extraciones de datos Seg.Soc.','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(62,'Información SICAM','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(63,'Entrega de Pin Inicial por Solicitud HW Token','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(64,'REEG Resoluciones DI SERE','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(65,'REEG Requerimientos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(66,'REEG Información de garantías','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(67,'REEG Comunicaciones Varias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(68,'Sistema OSIRIS','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(69,'Declaración de CBU para cobros de origen tributario, aduanero y de la seguridad social','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(70,'Transferencias no SIPA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(71,'SIM - Servicios Extraordinarios','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(72,'SIM - SEPAIMPO','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(73,'SIM - SECOEXPO','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(74,'SIM - PSAD','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(75,'SIM - CNRT','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(76,'SIM - Depositario Fiel','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(77,'SIM - Fraude Marcario','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(78,'SIM - Administración','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(79,'ONCCA ROE BLANCO','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(80,'ONCCA ROE ROJO','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(81,'Intercambio de Información de Fiscalización con Otros Organismos Públicos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(82,'SIDEINCO','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(83,'DbWebBrowser','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(84,'Archivo Generador VEPs - Efectores Agropecuarios','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(85,'SIM -  Garantías','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(86,'OFICIOS - DE SEIN','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(87,'Osiris MulAT','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(88,'MDQ (Multiple Database Query)','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(89,'Verificación de Efectores','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(90,'CGR','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(91,'Información Dir.Aduana de Buenos Aires SDG OAM','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(92,'Sarha Transferencia','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(93,'Constatación  de comprobantes CAE/CAI/CAEA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(94,'Subsidios','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(95,'Dpto.Informática de Administración','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(96,'Dpto.Informática de Administración - Comunicaciones externas','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(97,'Información Estadística Tributaria','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(98,'Depuradores','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(99,'Campaña de inducción Fideicomisos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL);
INSERT INTO `ventanilla_elec_sistemas` VALUES (100,'SICNEA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(101,'UCESCI','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(102,'Descarga de archivos para el MTEySS','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(103,'RSI - Registro de subsidios e incentivos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(104,'R.G. 3580 - Reg. De Información de Operaciones Comerciales Minoristas','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(105,'Adhesión Domicilio Fiscal Electrónico','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(106,'WSJAZA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(107,'SIRE - Retenciones Electrónicas','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(108,'Domicilio Fiscal Electrónico','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(109,'Libro de sueldos digital - Aviso de emisiÃ³n','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(110,'Sistema Registral','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(111,'Comunicaciones','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(112,'Sistema de Fiscalizaciones Aduaneras','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(113,'ROSi Consultas','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(114,'Registro Fiscal de Operadores de Granos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(115,'ROSi Consultas Clave Fiscal','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(116,'Departamento Tesorería General AFIP','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(117,'SIRADIG','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(118,'Registros Cárnicos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(119,'ITI - Impuesto a la Transferencia de Inmueble','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(120,'Opción de Anticipos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(121,'SIPER','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(122,'SIR - Sistema Integral de Recuperos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(123,'ICDB','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(124,'Sistema de Cuentas Tributarias','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(125,'Fútbol Profesional','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(126,'CCMA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(127,'RETRA','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(128,'Sinceramiento Fiscal','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(129,'Devolución RG-3420','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(130,'Requerimientos de Verificación Agencia','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(131,'Información de Sinceramiento - Comunicaciones Internas','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(132,'CTG','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(133,'IDR - Irregularidades Detectadas en Relevamientos de Personal','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(134,'Presentación Única de Balances (PUB)','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(135,'Plan Nacional de Regularización del Trabajo','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(136,'Comunicación vía Web Requerimiento electrónico','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(137,'SITA - Retiro de Mercadería bajo régimen de garantía art.453 inc. h C.A.','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(138,'Información Tributaria para Ventanilla Interna','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(139,'Régimen de información financiera de sujetos no residentes','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(140,'Mensaje de bienvenida','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(141,'Novedades','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(142,'ECSI  Exporta Simple  R.G.C. NÂ° 4049 E (Min. Producción - AFIP) - Recepción de alertas','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(144,'Información de Armonización (RG 4113)','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(145,'Puerta a Puerta. Turnos Correo','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL);
INSERT INTO `ventanilla_elec_sistemas` VALUES (146,'Mis Comprobantes - Nuestra Parte','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(147,'Sujetos no confiables','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(148,'Revocación Domicilio Fiscal Electrónico','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(149,'Pymes - Régimen de Fomento de Inversiones','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(150,'Sector granos','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(151,'Sector cárnico','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(152,'Sector lácteo','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(153,'Tus datos del Sinceramiento','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(154,'RUS - Registro Único Simplificado','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(157,'Sistema de Pagos sin DDJJ de Empleadores','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(158,'CNE - Cámara Nacional Electoral','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(159,'Procesos Automáticos - Sistema IVR','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(160,'Rechazo de plan de facilidades de pago','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(161,'ARBA - Padrón de empleadores','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(162,'Requerimientos y citaciones','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(163,'Aprobación/Rechazo de DDJJ','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(165,'Carga de Titulares de Inmuebles','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(166,'Finalización de fiscalización','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(167,'Sector granos MT','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(168,'Deuda en cuenta corriente','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(169,'Registro de CBU','2020-03-09 02:09:50','2020-03-09 02:09:50',NULL),(170,'Rechazo bancario','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(171,'Transferencias procesadas','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(172,'Transferencias informadas','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(173,'Falta de presentación de declaraciones juradas','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(174,'Habilitación a emitir comprobantes M','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(175,'Resultados de Disconformidades','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(176,'MOREO','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(177,'MOPLED','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(178,'Expedientes pagados por hospitales de autogestión','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(179,'Expedientes pagados por cancelación de deuda','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(180,'Evolución de la recaudación de DGI al día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(181,'Evolución de la recaudación de DGA al día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(182,'Evolución de la recaudación de DGA con destino ANSES al día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(183,'Evolución de la recaudación de DGI con destino ANSES al día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(184,'Distribución IIBB por todas las jurisdicciones del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(185,'Distribución IIBB por todas las jurisdicciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(186,'Distribución IIBB Santa Cruz del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(187,'Distribución IIBB San Juan del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(188,'Distribución IIBB Tucumán del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(189,'Distribución IIBB Tierra del Fuego del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(190,'Distribución IIBB La Rioja del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(191,'Distribución IIBB La Pampa del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL);
INSERT INTO `ventanilla_elec_sistemas` VALUES (192,'Distribución IIBB Ciudad de Buenos Aires del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(193,'Distribución IIBB Pcía. de Buenos Aires del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(194,'Distribución IIBB Entre Ríos del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(195,'Distribución IIBB Chaco del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(196,'Distribución IIBB Formosa del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(197,'Distribución IIBB Santiago del Estero del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(198,'Distribución IIBB Santa Fe del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(199,'Distribución IIBB San Luis del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(200,'Distribución IIBB Salta del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(201,'Distribución IIBB Rio Negro del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(202,'Distribución IIBB Neuquén del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(203,'Distribución IIBB Misiones del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(204,'Distribución IIBB Mendoza del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(205,'Distribución IIBB Jujuy del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(206,'Distribución IIBB Chubut del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(207,'Distribución IIBB Catamarca del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(208,'Distribución IIBB Corrientes del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(209,'Distribución IIBB Córdoba del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(210,'Transferencias desde cuentas AFIP al organismo del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(211,'Recaudación y Transferencias desde Cuentas AFIP al Organismo del día','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(212,'Subsidio a obras sociales Decreto 904/2016','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(213,'Indicador mínimo de trabajadores','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(214,'Novedades Pymes - Régimen de Fomento de Inversiones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(215,'Denuncias 960','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(216,'Gestión de incumplimientos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(217,'Falta de pago','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(218,'Reporte de Facturación Electrónica','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(219,'Adhesión al débito automático','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(220,'Empadronamiento SISA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(221,'Novedades SISA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(222,'Respuesta de SENASA-SISA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(223,'Agentes de retención','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(224,'Trámites, certificados y registros fiscales - aceptación','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(225,'Trámites, certificados y registros fiscales - rechazo','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(226,'Trámites, certificados y registros fiscales - resolución disconformidad','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(227,'Trámites, certificados y registros fiscales - otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(228,'Instrucción','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(229,'Prórroga de plazo','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(230,'Medidas para mejor proveer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(231,'Aperturas a prueba','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(232,'Resoluciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(233,'Recursos Art. 74 DR - resolución','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL);
INSERT INTO `ventanilla_elec_sistemas` VALUES (234,'Recursos Art. 74 DR- medidas para mejor proveer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(235,'Recursos Art. 74 DR- apertura a prueba','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(236,'Recursos Art. 74 DR - otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(237,'Recursos Art. 76 Ley 11683 - resoluciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(238,'Recursos Art. 76 Ley 11683 - medidas para mejor proveer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(239,'Recursos Art. 76 Ley 11683 - apertura a prueba','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(240,'Recursos Art. 76 Ley 11683 - otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(241,'Recursos Clausuras - resolución','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(242,'Recursos Clausuras- medidas para mejor proveer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(243,'Recursos Clausuras - apertura a prueba','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(244,'Recursos Clausuras - otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(245,'Reclamos de repetición - resolución','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(246,'Reclamos de repetición - medidas para mejor proveer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(247,'Reclamos de repetición - otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(248,'Apertura Orden de Intervención','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(249,'Finalización de Orden de Intervención','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(250,'Declaración jurada informe país por país','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(251,'Requerimiento','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(252,'Autónomos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(253,'Novedades','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(254,'Emisión de factura','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(255,'Puesta a disposición a la CNV','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(256,'Alta como empresa grande','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(257,'Alta voluntaria como empresa grande','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(258,'Información Convenio 6249/2019','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(259,'Padrón de importadores/exportadores','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(260,'Derechos de exportación de servicios','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(261,'FCE rechazada pendiente de asociación','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(262,'Comunicación sobre tu presentación digital','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(266,'Bloqueo de constancia','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(267,'SICNEA - Denuncia de Declaración Detallada','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(268,'SITA - Solicitud de pago voluntario de declaraciones inexactas','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(269,'SITA - Registro Infracción Aduanera - Declaración inexacta y otras diferencias injustificadas.','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(270,'Inducción','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(271,'Fiscalización en curso - Modificación de impuesto o período','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(272,'Actas de inspección impositivas o previsionales','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(273,'Determinación de oficio - Vista','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(274,'Determinación de oficio - Medidas para mejor proveer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(275,'Determinación de oficio - Apertura a prueba','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(276,'Determinación de oficio - Prórrogas de plazo','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(277,'Determinación de oficio - Resolución','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL);
INSERT INTO `ventanilla_elec_sistemas` VALUES (278,'Ejecución Fiscal - Sentencia','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(279,'Ejecución Fiscal - Liquidación de Deuda','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(280,'Ejecución Fiscal - Honorarios','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(281,'Ejecución Fiscal - Otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(282,'Devolución o trámite similar - Aceptación','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(283,'Devolución o trámite similar - Rechazo','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(284,'Devolución o trámite similar - Otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(285,'Intimación o liquidación','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(286,'Resolución o disposición','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(287,'Otras comunicaciones','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(288,'Libro de sueldos digital - Novedades','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(289,'SITA - Infracción Artículo 994 del C. A.','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(290,'SITA - Infracción Artículo 995 del C. A.','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(291,'SECTOR CÁRNICO ARBA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(292,'Sector Molinería','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(293,'SIRAEF-CONSEF','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(294,'Denegatoria-disconformidad CEF','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(295,'Impositiva','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(296,'Aduanera','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(297,'Previsional','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(298,'Monotributo','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(301,'Sector granos ARBA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(302,'REMITO ELECTRÓNICO LÁCTEO ARBA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(303,'Acta de inspección en línea','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(304,'Comisión Arbitral','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(315,'REMITO ELECTRÓNICO LÁCTEO AGROINDUSTRIA','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(317,'FCE transferida próxima a vencer','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(9999,'Borrados sistema 33 5 y 6 de mayo 2014','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL);

--
-- Table structure for table `ventanilla_elec_sistemas_sub_serv`
--

CREATE TABLE `ventanilla_elec_sistemas_sub_serv` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ventanilla_elec_sistema_id` int(10) unsigned NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `venta_el_sis_foreign` (`ventanilla_elec_sistema_id`),
  CONSTRAINT `venta_el_sis_foreign` FOREIGN KEY (`ventanilla_elec_sistema_id`) REFERENCES `ventanilla_elec_sistemas` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=438 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ventanilla_elec_sistemas_sub_serv`
--

INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (1,1,'commsender','commsender','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(2,1,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(3,1,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(4,1,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(5,1,'era_ventanilla','era_ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(6,1,'eventanilla-movban22','eventanilla-movban22','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(7,1,'eventanilla_fe','eventanilla_fe','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(8,1,'eventanilla_igj','eventanilla_igj','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(9,2,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(10,2,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(11,3,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(12,3,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(13,4,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(14,4,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(15,5,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(16,5,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(17,6,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(18,6,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(19,7,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(20,7,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(21,8,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(22,8,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(23,9,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(24,9,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(25,10,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(26,10,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(27,11,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(28,11,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(29,11,'eventanilla_fe','eventanilla_fe','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(30,17,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(31,17,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(32,17,'eventanilla-movban17','eventanilla-movban17','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(33,18,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(34,18,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(35,18,'eventanilla-movban18','eventanilla-movban18','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(36,19,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(37,19,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(38,19,'eventanilla-movban19','eventanilla-movban19','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(39,22,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(40,22,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(41,22,'eventanilla-movban22','eventanilla-movban22','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(42,24,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (43,24,'e-ventanilla-ley-soft','e-Ventanilla - Ley de Software','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(44,24,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(45,25,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(46,25,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(47,26,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(48,27,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(49,27,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(50,27,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(51,28,'commsender','commsender','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(52,28,'eventanilla_igj','eventanilla_igj','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(53,29,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(54,29,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(55,30,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(56,31,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(57,31,'era_ventanilla','era_ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(58,31,'soj','E-Ventanilla SOJ - Organismos Externos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(59,32,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(60,32,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(61,32,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(62,33,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(63,33,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(64,33,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(65,34,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(66,34,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(67,34,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(68,35,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(69,35,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(70,35,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(71,36,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(72,36,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(73,36,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(74,37,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(75,37,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(76,37,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(77,38,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(78,38,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(79,38,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(80,39,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(81,39,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(82,39,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(83,40,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (84,40,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(85,40,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(86,42,'e-ventanilla','e-ventanilla','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(87,42,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:51','2020-03-09 02:09:51',NULL),(88,43,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(89,43,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(90,44,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(91,44,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(92,45,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(93,45,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(94,47,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(95,47,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(96,48,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(97,48,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(98,49,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(99,49,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(100,50,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(101,50,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(102,51,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(103,51,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(104,52,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(105,52,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(106,53,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(107,53,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(108,54,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(109,54,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(110,55,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(111,55,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(112,56,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(113,57,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(114,57,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(115,58,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(116,58,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(117,59,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(118,59,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(119,60,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(120,60,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(121,61,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(122,61,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(123,61,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(124,62,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (125,62,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(126,63,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(127,63,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(128,64,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(129,64,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(130,65,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(131,65,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(132,66,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(133,66,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(134,67,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(135,67,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(136,68,'eventanilla-osirisdist','eventanilla-osirisdist','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(137,69,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(138,69,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(139,69,'era_ventanilla','era_ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(140,70,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(141,70,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(142,71,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(143,71,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(144,71,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(145,72,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(146,72,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(147,72,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(148,73,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(149,73,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(150,73,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(151,74,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(152,74,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(153,74,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(154,75,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(155,75,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(156,75,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(157,76,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(158,76,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(159,76,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(160,77,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(161,77,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(162,77,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(163,78,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(164,78,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(165,78,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(166,79,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(167,79,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (168,79,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(169,80,'commsender','commsender','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(170,80,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(171,80,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(172,81,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(173,81,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(174,82,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(175,82,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(176,83,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(177,83,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(178,84,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(179,84,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(180,85,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(181,85,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(182,86,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(183,87,'eventanilla-osirisdist','eventanilla-osirisdist','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(184,88,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(185,89,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(186,89,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(187,90,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(188,91,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(189,91,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(190,92,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(191,93,'e-ventanilla_cons_comprobantes','Constatación de Comprobantes - Envío por Lotes','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(192,94,'e-ventanilla_subsidios','e-ventanilla_subsidios','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(193,95,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(194,96,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(195,96,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(196,97,'e-ventanilla-trib-mecon-iet','e-ventanilla-trib-mecon-iet','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(197,98,'eventanilla-osirisdist','eventanilla-osirisdist','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(198,99,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(199,99,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(200,100,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(201,100,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(202,101,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(203,101,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(204,102,'e-ventanilla_fisca_empleo','e-Ventanilla - fiscalización de empleo','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(205,103,'e-ventanilla_trib_rsi','eventanilla - Sistema RSI','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(206,104,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (207,104,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(208,105,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(209,106,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(210,106,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(211,107,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(212,107,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(213,107,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(214,108,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(215,108,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(216,109,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(217,109,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(218,110,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(219,110,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(220,111,'dfe','Domicilio Fiscal Electronico','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(221,111,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(222,112,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(223,113,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(224,114,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(225,115,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(226,115,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(227,116,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(228,116,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(229,117,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(230,117,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(231,118,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(232,118,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(233,119,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(234,119,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(235,120,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(236,120,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(237,121,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(238,121,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(239,122,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(240,122,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(241,123,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(242,123,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(243,124,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(244,124,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(245,125,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(246,125,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(247,126,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (248,126,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(249,127,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(250,127,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(251,128,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(252,128,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(253,129,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(254,129,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(255,130,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(256,130,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(257,131,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(258,132,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(259,132,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(260,133,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(261,133,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(262,134,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(263,134,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(264,134,'e-ventanilla-pub','Presentación Única de Balances','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(265,135,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(266,135,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(267,136,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(268,136,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(269,137,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(270,138,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(271,139,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(272,139,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(273,140,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(274,140,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(275,141,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(276,141,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(277,142,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(278,144,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(279,144,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(280,145,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(281,145,'e-ventanilla-mobile','eVentanilla Mobile','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(282,146,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(283,147,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(284,148,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(285,149,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(286,150,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(287,151,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(288,152,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (289,153,'e-ventanilla-sinceramiento','Tus datos del Sinceramiento','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(290,154,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(291,157,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(292,158,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(293,159,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(294,160,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(295,161,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(296,162,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(297,163,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(298,165,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(299,166,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(300,167,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(301,168,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(302,169,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(303,170,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(304,171,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(305,172,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(306,173,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(307,174,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(308,175,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(309,176,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(310,177,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(311,178,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(312,178,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(313,179,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(314,179,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(315,180,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(316,181,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(317,182,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(318,183,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(319,184,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(320,185,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(321,186,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(322,187,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(323,188,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(324,189,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(325,190,'e-ventanilla','e-ventanilla','2020-03-09 02:09:52','2020-03-09 02:09:52',NULL),(326,191,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(327,192,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(328,193,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(329,194,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(330,195,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(331,196,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (332,197,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(333,198,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(334,199,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(335,200,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(336,201,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(337,202,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(338,203,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(339,204,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(340,205,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(341,206,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(342,207,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(343,208,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(344,209,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(345,210,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(346,211,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(347,212,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(348,212,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(349,213,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(350,214,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(351,215,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(352,216,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(353,217,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(354,218,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(355,219,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(356,220,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(357,221,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(358,222,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(359,223,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(360,224,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(361,225,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(362,226,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(363,227,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(364,228,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(365,229,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(366,230,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(367,231,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(368,232,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(369,233,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(370,234,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(371,235,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(372,236,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(373,237,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(374,238,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(375,239,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (376,240,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(377,241,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(378,242,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(379,243,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(380,244,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(381,245,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(382,246,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(383,247,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(384,248,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(385,249,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(386,250,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(387,251,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(388,252,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(389,253,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(390,254,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(391,255,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(392,256,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(393,257,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(394,258,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(395,259,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(396,260,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(397,261,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(398,262,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(399,266,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(400,267,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(401,268,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(402,269,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(403,270,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(404,271,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(405,272,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(406,273,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(407,274,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(408,275,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(409,276,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(410,277,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(411,278,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(412,279,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(413,280,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(414,281,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(415,282,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(416,283,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(417,284,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(418,285,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(419,286,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL);
INSERT INTO `ventanilla_elec_sistemas_sub_serv` VALUES (420,287,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(421,288,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(422,289,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(423,290,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(424,291,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(425,292,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(426,293,'e-ventanilla-int-2','e-ventanilla usuarios internos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(427,294,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(428,295,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(429,296,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(430,297,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(431,298,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(432,301,'ve-organismos','Ventanilla Electrónica Organismos','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(433,302,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(434,303,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(435,304,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(436,315,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL),(437,317,'e-ventanilla','e-ventanilla','2020-03-09 02:09:53','2020-03-09 02:09:53',NULL);

--
-- Table structure for table `vto_categoria_imp`
--

CREATE TABLE `vto_categoria_imp` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `categoria` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `importe` decimal(16,2) NOT NULL,
  `impuesto_id` int(10) unsigned NOT NULL,
  `cat_mono_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comentario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vto_categoria_imp_impuesto_id_foreign` (`impuesto_id`),
  CONSTRAINT `vto_categoria_imp_impuesto_id_foreign` FOREIGN KEY (`impuesto_id`) REFERENCES `vto_impuestos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_categoria_imp`
--

INSERT INTO `vto_categoria_imp` VALUES (1,NULL,'I',9003.60,1,NULL,'',NULL,NULL,NULL),(2,NULL,'II',12604.84,1,NULL,'',NULL,NULL,NULL),(3,NULL,'III',18007.04,1,NULL,'',NULL,NULL,NULL),(4,NULL,'IV',28811.24,1,NULL,'',NULL,NULL,NULL),(5,NULL,'V',39615.30,1,NULL,'',NULL,NULL,NULL),(6,NULL,'I´( prima)',9847.68,1,NULL,'Actividades Penosa',NULL,NULL,NULL),(7,NULL,'II´(II prima)',13786.55,1,NULL,'Actividades Penosa',NULL,NULL,NULL),(8,NULL,'III´(III prima)',19695.20,1,NULL,'Actividades Penosa',NULL,NULL,NULL),(9,NULL,'IV´(IV prima)',31512.30,1,NULL,'Actividades Penosa',NULL,NULL,NULL),(10,NULL,'V´(V prima)',43329.24,1,NULL,'Actividades Penosa',NULL,NULL,NULL),(11,NULL,'I',9003.60,1,NULL,'Afiliacion Voluntarias',NULL,NULL,NULL),(12,NULL,'I',9003.60,1,NULL,'Menores 21 años',NULL,NULL,NULL),(13,NULL,'I',7596.79,1,NULL,'Beneficio Ley Nº 24.241',NULL,NULL,NULL),(14,NULL,'I',3094.99,1,NULL,'Amas de Casa',NULL,NULL,NULL),(15,NULL,'A Servicios',496.85,2,'1','Comp. Imp',NULL,NULL,NULL),(16,NULL,'A Servicios',2689.00,2,'1','Comp. Imp + Prev.',NULL,NULL,NULL),(17,NULL,'A Servicios',2689.00,2,'1','Jubilados',NULL,NULL,NULL),(18,NULL,'A Servicios',5750.75,2,'1','Completo',NULL,NULL,NULL),(19,NULL,'A Ventas',496.85,2,'1','Comp. Imp',NULL,NULL,NULL),(20,NULL,'A Ventas',2689.00,2,'1','Comp. Imp + Prev.',NULL,NULL,NULL),(21,NULL,'A Ventas',2689.00,2,'1','Jubilados',NULL,NULL,NULL),(22,NULL,'A Ventas',5750.75,2,'1','Completo',NULL,NULL,NULL),(23,NULL,'B Servicios',957.27,2,'2','Comp. Imp',NULL,NULL,NULL),(24,NULL,'B Servicios',3368.63,2,'2','Comp. Imp + Prev.',NULL,NULL,NULL),(25,NULL,'B Servicios',3149.42,2,'2','Jubilados',NULL,NULL,NULL),(26,NULL,'B Servicios',6430.38,2,'2','Completo',NULL,NULL,NULL),(27,NULL,'B Ventas',957.27,2,'2','Comp. Imp',NULL,NULL,NULL),(28,NULL,'B Ventas',3368.63,2,'2','Comp. Imp + Prev.',NULL,NULL,NULL),(29,NULL,'B Ventas',3149.42,2,'2','Jubilados',NULL,NULL,NULL),(30,NULL,'B Ventas',6430.38,2,'2','Completo',NULL,NULL,NULL),(31,NULL,'C Servicios',1636.83,2,'3','Comp. Imp',NULL,NULL,NULL),(32,NULL,'C Servicios',4289.35,2,'3','Comp. Imp + Prev.',NULL,NULL,NULL),(33,NULL,'C Servicios',3828.98,2,'3','Jubilados',NULL,NULL,NULL),(34,NULL,'C Servicios',7351.10,2,'3','Completo',NULL,NULL,NULL),(35,NULL,'C Ventas',1512.56,2,'3','Comp. Imp',NULL,NULL,NULL),(36,NULL,'C Ventas',4165.08,2,'3','Comp. Imp + Prev.',NULL,NULL,NULL),(37,NULL,'C Ventas',3704.71,2,'3','Jubilados',NULL,NULL,NULL),(38,NULL,'C Ventas',7226.83,2,'3','Completo',NULL,NULL,NULL),(39,NULL,'D Servicios',2689.05,2,'4','Comp. Imp',NULL,NULL,NULL),(40,NULL,'D Servicios',5606.80,2,'4','Comp. Imp + Prev.',NULL,NULL,NULL),(41,NULL,'D Servicios',4881.20,2,'4','Jubilados',NULL,NULL,NULL),(42,NULL,'D Servicios',9245.06,2,'4','Completo',NULL,NULL,NULL),(43,NULL,'D Ventas',2484.46,2,'4','Comp. Imp',NULL,NULL,NULL),(44,NULL,'D Ventas',5402.21,2,'4','Comp. Imp + Prev.',NULL,NULL,NULL),(45,NULL,'D Ventas',4676.61,2,'4','Jubilados',NULL,NULL,NULL),(46,NULL,'D Ventas',9040.47,2,'4','Completo',NULL,NULL,NULL),(47,NULL,'E Servicios',5115.04,2,'5','Comp. Imp',NULL,NULL,NULL),(48,NULL,'E Servicios',8324.59,2,'5','Comp. Imp + Prev.',NULL,NULL,NULL),(49,NULL,'E Servicios',7307.19,2,'5','Jubilados',NULL,NULL,NULL),(50,NULL,'E Servicios',12776.61,2,'5','Completo',NULL,NULL,NULL),(51,NULL,'E Ventas',3967.80,2,'5','Comp. Imp',NULL,NULL,NULL),(52,NULL,'E Ventas',7177.35,2,'5','Comp. Imp + Prev.',NULL,NULL,NULL),(53,NULL,'E Ventas',6159.95,2,'5','Jubilados',NULL,NULL,NULL),(54,NULL,'E Ventas',11629.37,2,'5','Completo',NULL,NULL,NULL),(55,NULL,'F Servicios',7036.89,2,'6','Comp. Imp',NULL,NULL,NULL),(56,NULL,'F Servicios',10567.38,2,'6','Comp. Imp + Prev.',NULL,NULL,NULL),(57,NULL,'F Servicios',9229.04,2,'6','Jubilados',NULL,NULL,NULL),(58,NULL,'F Servicios',15712.40,2,'6','Completo',NULL,NULL,NULL),(59,NULL,'F Ventas',5180.81,2,'6','Comp. Imp',NULL,NULL,NULL),(60,NULL,'F Ventas',8711.30,2,'6','Comp. Imp + Prev.',NULL,NULL,NULL),(61,NULL,'F Ventas',7372.96,2,'6','Jubilados',NULL,NULL,NULL);
INSERT INTO `vto_categoria_imp` VALUES (62,NULL,'F Ventas',13856.32,2,'6','Completo',NULL,NULL,NULL),(63,NULL,'G Servicios',8951.39,2,'7','Comp. Imp',NULL,NULL,NULL),(64,NULL,'G Servicios',12834.92,2,'7','Comp. Imp + Prev.',NULL,NULL,NULL),(65,NULL,'G Servicios',11143.54,2,'7','Jubilados',NULL,NULL,NULL),(66,NULL,'G Servicios',18347.44,2,'7','Completo',NULL,NULL,NULL),(67,NULL,'G Ventas',6459.54,2,'7','Comp. Imp',NULL,NULL,NULL),(68,NULL,'G Ventas',10343.07,2,'7','Comp. Imp + Prev.',NULL,NULL,NULL),(69,NULL,'G Ventas',8651.69,2,'7','Jubilados',NULL,NULL,NULL),(70,NULL,'G Ventas',15855.59,2,'7','Completo',NULL,NULL,NULL),(71,NULL,'H Servicios',20460.26,2,'8','Comp. Imp',NULL,NULL,NULL),(72,NULL,'H Servicios',24732.14,2,'8','Comp. Imp + Prev.',NULL,NULL,NULL),(73,NULL,'H Servicios',22652.41,2,'8','Jubilados',NULL,NULL,NULL),(74,NULL,'H Servicios',31347.16,2,'8','Completo',NULL,NULL,NULL),(75,NULL,'H Ventas',15856.76,2,'8','Comp. Imp',NULL,NULL,NULL),(76,NULL,'H Ventas',20128.64,2,'8','Comp. Imp + Prev.',NULL,NULL,NULL),(77,NULL,'H Ventas',18048.91,2,'8','Jubilados',NULL,NULL,NULL),(78,NULL,'H Ventas',26743.66,2,'8','Completo',NULL,NULL,NULL),(79,NULL,'I Ventas',25575.36,2,'9','Comp. Imp',NULL,NULL,NULL),(80,NULL,'I Ventas',30274.44,2,'9','Comp. Imp + Prev.',NULL,NULL,NULL),(81,NULL,'I Ventas',27767.51,2,'9','Jubilados',NULL,NULL,NULL),(82,NULL,'I Ventas',38464.47,2,'9','Completo',NULL,NULL,NULL),(83,NULL,'J Ventas',30054.72,2,'10','Comp. Imp',NULL,NULL,NULL),(84,NULL,'J Ventas',35223.75,2,'10','Comp. Imp + Prev.',NULL,NULL,NULL),(85,NULL,'J Ventas',32246.87,2,'10','Jubilados',NULL,NULL,NULL),(86,NULL,'J Ventas',44390.28,2,'10','Completo',NULL,NULL,NULL),(87,NULL,'K Ventas',34526.76,2,'11','Comp. Imp',NULL,NULL,NULL),(88,NULL,'K Ventas',40212.63,2,'11','Comp. Imp + Prev.',NULL,NULL,NULL),(89,NULL,'K Ventas',36718.91,2,'11','Jubilados',NULL,NULL,NULL),(90,NULL,'K Ventas',50717.92,2,'11','Completo',NULL,NULL,NULL),(91,NULL,'A',3750.00,13,'1','',NULL,NULL,NULL),(92,NULL,'B',5570.00,13,'2','',NULL,NULL,NULL),(93,NULL,'C',7790.00,13,'3','',NULL,NULL,NULL),(94,NULL,'D',9670.00,13,'4','',NULL,NULL,NULL),(95,NULL,'E',11390.00,13,'5','',NULL,NULL,NULL),(96,NULL,'F',14240.00,13,'6','',NULL,NULL,NULL),(97,NULL,'G',17090.00,13,'7','',NULL,NULL,NULL),(98,NULL,'H',21150.00,13,'8','',NULL,NULL,NULL),(99,NULL,'Monotributo Social',1530.87,2,'12',NULL,'2020-02-27 02:46:40','2020-02-27 02:46:40',NULL),(100,NULL,'A Exento',5253.90,2,'1','Completo Servicios y Ventas',NULL,NULL,NULL),(101,NULL,'B Exento',5473.11,2,'2','Completo Servicios y Ventas',NULL,NULL,NULL);

--
-- Table structure for table `vto_fin_cuit`
--

CREATE TABLE `vto_fin_cuit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `grupo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numero` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `comentario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int(10) unsigned NOT NULL DEFAULT '1',
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_fin_cuit`
--

INSERT INTO `vto_fin_cuit` VALUES (1,NULL,'0 a 3','{0,1,2,3}',NULL,1,NULL),(2,NULL,'4 a 6','{4,5,6}',NULL,1,NULL),(3,NULL,'7 a 9','{7,8,9}',NULL,1,NULL),(4,NULL,'0 a 9','{0,1,2,3,4,5,6,7,8,9}',NULL,1,NULL),(5,NULL,'0 a 2','{0,1,2}',NULL,1,NULL),(6,NULL,'3 a 5','{3,4,5}',NULL,1,NULL),(7,NULL,'6 a 7','{6,7}',NULL,1,NULL),(8,NULL,'8 a 9','{8,9}',NULL,1,NULL),(9,NULL,'0 a 1','{0,1}',NULL,1,NULL),(10,NULL,'2 a 3','{2,3}',NULL,1,NULL),(11,NULL,'4 a 5','{4,5}',NULL,1,NULL),(12,NULL,'0','{0}',NULL,1,NULL),(13,NULL,'1','{1}',NULL,1,NULL),(14,NULL,'2','{2}',NULL,1,NULL),(15,NULL,'3','{3}',NULL,1,NULL),(16,NULL,'4','{4}',NULL,1,NULL),(17,NULL,'5','{5}',NULL,1,NULL),(18,NULL,'6','{6}',NULL,1,NULL),(19,NULL,'7','{7}',NULL,1,NULL),(20,NULL,'8','{8}',NULL,1,NULL),(21,NULL,'9','{9}',NULL,1,NULL),(22,NULL,'0 a 4','{0,1,2,3,4}',NULL,1,NULL),(23,NULL,'0 a 4','{5,6,7,8,9}',NULL,1,NULL);

--
-- Table structure for table `vto_imp_fin_cuit`
--

CREATE TABLE `vto_imp_fin_cuit` (
  `idImpFinCuit` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `impuesto_id` int(10) unsigned NOT NULL,
  `finCuit_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`idImpFinCuit`),
  KEY `vto_imp_fin_cuit_impuesto_id_foreign` (`impuesto_id`),
  KEY `vto_imp_fin_cuit_fincuit_id_foreign` (`finCuit_id`),
  CONSTRAINT `vto_imp_fin_cuit_fincuit_id_foreign` FOREIGN KEY (`finCuit_id`) REFERENCES `vto_fin_cuit` (`id`),
  CONSTRAINT `vto_imp_fin_cuit_impuesto_id_foreign` FOREIGN KEY (`impuesto_id`) REFERENCES `vto_impuestos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=135 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_imp_fin_cuit`
--

INSERT INTO `vto_imp_fin_cuit` VALUES (1,NULL,1,1,NULL,NULL,NULL),(2,NULL,1,2,NULL,NULL,NULL),(3,NULL,1,3,NULL,NULL,NULL),(5,NULL,2,4,NULL,NULL,NULL),(6,NULL,3,1,NULL,NULL,NULL),(7,NULL,3,2,NULL,NULL,NULL),(8,NULL,3,3,NULL,NULL,NULL),(9,NULL,4,1,NULL,NULL,NULL),(10,NULL,4,2,NULL,NULL,NULL),(11,NULL,4,3,NULL,NULL,NULL),(12,NULL,5,1,NULL,NULL,NULL),(13,NULL,5,2,NULL,NULL,NULL),(14,NULL,5,3,NULL,NULL,NULL),(15,NULL,6,5,NULL,NULL,NULL),(16,NULL,6,6,NULL,NULL,NULL),(17,NULL,6,7,NULL,NULL,NULL),(18,NULL,6,8,NULL,NULL,NULL),(19,NULL,7,9,NULL,NULL,NULL),(20,NULL,7,10,NULL,NULL,NULL),(21,NULL,7,11,NULL,NULL,NULL),(22,NULL,7,7,NULL,NULL,NULL),(23,NULL,7,8,NULL,NULL,NULL),(24,NULL,8,1,NULL,NULL,NULL),(25,NULL,8,2,NULL,NULL,NULL),(26,NULL,8,3,NULL,NULL,NULL),(27,NULL,9,1,NULL,NULL,NULL),(28,NULL,9,2,NULL,NULL,NULL),(29,NULL,9,3,NULL,NULL,NULL),(30,NULL,10,1,NULL,NULL,NULL),(31,NULL,10,2,NULL,NULL,NULL),(32,NULL,10,3,NULL,NULL,NULL),(33,NULL,11,9,NULL,NULL,NULL),(34,NULL,11,10,NULL,NULL,NULL),(35,NULL,11,11,NULL,NULL,NULL),(36,NULL,11,7,NULL,NULL,NULL),(37,NULL,11,8,NULL,NULL,NULL),(38,NULL,12,12,NULL,NULL,NULL),(39,NULL,12,13,NULL,NULL,NULL),(40,NULL,12,14,NULL,NULL,NULL),(41,NULL,12,15,NULL,NULL,NULL),(42,NULL,12,16,NULL,NULL,NULL),(43,NULL,12,17,NULL,NULL,NULL),(44,NULL,12,18,NULL,NULL,NULL),(45,NULL,12,19,NULL,NULL,NULL),(46,NULL,12,20,NULL,NULL,NULL),(47,NULL,12,21,NULL,NULL,NULL),(48,NULL,13,9,NULL,NULL,NULL),(49,NULL,13,10,NULL,NULL,NULL),(50,NULL,13,11,NULL,NULL,NULL),(51,NULL,13,7,NULL,NULL,NULL),(52,NULL,13,8,NULL,NULL,NULL),(53,NULL,14,4,NULL,NULL,NULL),(54,NULL,40,22,'2020-01-08 19:28:09','2020-01-08 19:28:09',NULL),(55,NULL,40,23,'2020-01-08 19:28:09','2020-01-08 19:28:09',NULL),(56,NULL,41,4,'2020-01-12 02:52:43','2020-01-12 02:52:43',NULL),(57,NULL,42,1,NULL,NULL,NULL),(58,NULL,42,2,NULL,NULL,NULL),(59,NULL,42,3,NULL,NULL,NULL),(63,NULL,44,9,NULL,NULL,NULL),(64,NULL,44,10,NULL,NULL,NULL),(65,NULL,44,11,NULL,NULL,NULL),(66,NULL,44,7,NULL,NULL,NULL),(67,NULL,44,8,NULL,NULL,NULL),(68,NULL,45,5,NULL,NULL,NULL),(69,NULL,45,6,NULL,NULL,NULL),(70,NULL,45,7,NULL,NULL,NULL),(71,NULL,45,8,NULL,NULL,NULL),(72,NULL,46,5,NULL,NULL,NULL),(73,NULL,46,6,NULL,NULL,NULL),(74,NULL,46,7,NULL,NULL,NULL),(75,NULL,46,8,NULL,NULL,NULL),(76,NULL,47,5,NULL,NULL,NULL),(77,NULL,47,6,NULL,NULL,NULL),(78,NULL,47,7,NULL,NULL,NULL),(79,NULL,47,8,NULL,NULL,NULL),(80,NULL,48,5,NULL,NULL,NULL),(81,NULL,48,6,NULL,NULL,NULL),(82,NULL,48,7,NULL,NULL,NULL),(83,NULL,48,8,NULL,NULL,NULL),(84,NULL,49,9,NULL,NULL,NULL),(85,NULL,49,10,NULL,NULL,NULL),(86,NULL,49,11,NULL,NULL,NULL),(87,NULL,49,7,NULL,NULL,NULL),(88,NULL,49,8,NULL,NULL,NULL),(89,NULL,50,9,NULL,NULL,NULL),(90,NULL,50,10,NULL,NULL,NULL),(91,NULL,50,11,NULL,NULL,NULL),(92,NULL,50,7,NULL,NULL,NULL),(93,NULL,50,8,NULL,NULL,NULL),(94,NULL,51,5,NULL,NULL,NULL),(95,NULL,51,6,NULL,NULL,NULL),(96,NULL,51,7,NULL,NULL,NULL),(97,NULL,51,8,NULL,NULL,NULL),(98,NULL,52,7,NULL,NULL,NULL),(99,NULL,52,8,NULL,NULL,NULL),(100,NULL,52,9,NULL,NULL,NULL),(101,NULL,52,10,NULL,NULL,NULL),(102,NULL,52,11,NULL,NULL,NULL),(103,NULL,53,4,NULL,NULL,NULL),(104,NULL,54,4,NULL,NULL,NULL),(105,NULL,55,1,NULL,NULL,NULL),(106,NULL,55,2,NULL,NULL,NULL),(107,NULL,55,3,NULL,NULL,NULL),(108,NULL,56,1,NULL,NULL,NULL),(109,NULL,56,2,NULL,NULL,NULL),(110,NULL,56,3,NULL,NULL,NULL),(111,NULL,57,5,NULL,NULL,NULL),(112,NULL,57,6,NULL,NULL,NULL),(113,NULL,57,7,NULL,NULL,NULL),(114,NULL,57,8,NULL,NULL,NULL),(115,NULL,58,9,NULL,NULL,NULL),(116,NULL,58,10,NULL,NULL,NULL),(117,NULL,58,11,NULL,NULL,NULL),(118,NULL,58,7,NULL,NULL,NULL),(119,NULL,58,8,NULL,NULL,NULL),(120,NULL,59,5,NULL,NULL,NULL),(121,NULL,59,6,NULL,NULL,NULL),(122,NULL,59,7,NULL,NULL,NULL),(123,NULL,59,8,NULL,NULL,NULL),(124,NULL,60,5,NULL,NULL,NULL),(125,NULL,60,6,NULL,NULL,NULL),(126,NULL,60,7,NULL,NULL,NULL),(127,NULL,60,8,NULL,NULL,NULL),(128,NULL,61,5,NULL,NULL,NULL),(129,NULL,61,6,NULL,NULL,NULL),(130,NULL,61,7,NULL,NULL,NULL);
INSERT INTO `vto_imp_fin_cuit` VALUES (131,NULL,61,8,NULL,NULL,NULL),(132,NULL,62,1,NULL,NULL,NULL),(133,NULL,62,2,NULL,NULL,NULL),(134,NULL,62,3,NULL,NULL,NULL);

--
-- Table structure for table `vto_impuestos`
--

CREATE TABLE `vto_impuestos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `name` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `order` int(11) DEFAULT NULL,
  `observaciones` varchar(180) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int(10) unsigned NOT NULL DEFAULT '1',
  `show_in_estado_liq` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_impuestos`
--

INSERT INTO `vto_impuestos` VALUES (1,NULL,'Autonomos',NULL,NULL,1,0,NULL,NULL,NULL),(2,NULL,'Monotributo',NULL,NULL,1,0,NULL,NULL,NULL),(3,NULL,'SICOSS',NULL,NULL,1,0,NULL,NULL,NULL),(4,NULL,'Ganancias Sociedades',NULL,NULL,1,0,NULL,NULL,NULL),(5,NULL,'Ganancia Minima Presunta',NULL,NULL,1,0,NULL,NULL,NULL),(6,NULL,'Convenio Multilateral - DDJJ',NULL,NULL,1,0,NULL,NULL,NULL),(7,NULL,'IVA',NULL,NULL,1,0,NULL,NULL,NULL),(8,NULL,'SICORE / SIRE - DDJJ 2° Quincena',NULL,NULL,1,1,NULL,'2023-01-04 15:26:26',NULL),(9,NULL,'Ganancia Personas Humanas',NULL,NULL,1,0,NULL,NULL,NULL),(10,NULL,'Participaciones Societarias',NULL,NULL,1,0,NULL,NULL,NULL),(11,NULL,'IIBB SICOL - DDJJ',NULL,NULL,1,0,NULL,NULL,NULL),(12,NULL,'IIBB ARBA - DDJJ',NULL,NULL,1,0,NULL,NULL,NULL),(13,NULL,'IIBB Regimen Simplificado',NULL,NULL,1,0,NULL,NULL,NULL),(14,NULL,'Servicio Domestico',NULL,NULL,1,0,NULL,NULL,NULL),(15,NULL,'Ganancia Pers. Hum. Anticipos',NULL,NULL,1,0,NULL,NULL,NULL),(16,NULL,'Ganancia Sociedades Anticipos',NULL,NULL,1,0,NULL,NULL,NULL),(17,NULL,'Bienes Personales',NULL,NULL,1,0,NULL,NULL,NULL),(18,NULL,'Bienes Personales Anticipos',NULL,NULL,1,0,NULL,NULL,NULL),(19,NULL,'Monotributo - Recategorizacion',NULL,NULL,1,0,NULL,NULL,NULL),(20,NULL,'IIBB SICOL - Anual',NULL,NULL,1,0,NULL,NULL,NULL),(21,NULL,'IIBB ARBA - Anual',NULL,NULL,1,0,NULL,NULL,NULL),(22,NULL,'Convenio Multilateral - Anual',NULL,NULL,1,0,NULL,NULL,NULL),(23,NULL,'IVA - CITI - Regimen Informativo',NULL,NULL,1,0,NULL,NULL,NULL),(24,NULL,'Sindicato - AOTRA (Textil)',NULL,NULL,1,0,NULL,NULL,NULL),(25,NULL,'Sindicato - Sind. Emp. Comercio',NULL,NULL,1,0,NULL,NULL,NULL),(26,NULL,'Sindicato - FAECYS',NULL,NULL,1,0,NULL,NULL,NULL),(27,NULL,'Sindicato - La Estrella',NULL,NULL,1,0,NULL,NULL,NULL),(28,NULL,'Sindicato - INACAP',NULL,NULL,1,0,NULL,NULL,NULL),(29,NULL,'Sindicato - FATSA (Sanidad)',NULL,NULL,1,0,NULL,NULL,NULL),(30,NULL,'Sindicato - ATSA (Sanidad)',NULL,NULL,1,0,NULL,NULL,NULL),(31,NULL,'Sindicato - Guincheros (Gruas)',NULL,NULL,1,0,NULL,NULL,NULL),(32,NULL,'Sindicato - UOCRA (Construccion)',NULL,NULL,1,0,NULL,NULL,NULL),(33,NULL,'Sindicato - SOCAYA (Caucho)',NULL,NULL,1,0,NULL,NULL,NULL),(34,NULL,'Sindicato - UETSYL (Tintoreros - Lavaderos)',NULL,NULL,1,0,NULL,NULL,NULL),(35,NULL,'Sindicato - Papeleros',NULL,NULL,1,0,NULL,NULL,NULL),(36,NULL,'Sindicato - Camioneros',NULL,NULL,1,0,NULL,NULL,NULL),(37,NULL,'Sindicato - Pastas',NULL,NULL,1,0,NULL,NULL,NULL),(38,NULL,'Sindicato - UOM',NULL,NULL,1,0,NULL,NULL,NULL),(39,NULL,'Honorarios Contables',NULL,NULL,1,0,NULL,NULL,NULL),(40,NULL,'IIBB Cordoba',NULL,NULL,1,0,'2020-01-08 19:28:09','2020-01-08 19:28:09',NULL),(41,NULL,'IIBB Cordoba-Reg Simp',NULL,NULL,1,0,'2020-01-12 02:52:43','2020-01-12 02:52:43',NULL),(42,NULL,'Seguridad e Higiene',NULL,NULL,1,1,'2020-05-28 08:53:14','2020-06-05 10:27:03',NULL),(44,NULL,'IIBB Corrientes - DDJJ Mensual',NULL,NULL,1,0,'2021-02-08 03:52:58','2021-02-08 03:52:58',NULL),(45,NULL,'IIBB Santa Fe - DDJJ Mensual',NULL,NULL,1,0,'2021-02-08 03:52:59','2021-02-08 03:52:59',NULL),(46,NULL,'IIBB Santa Fe - DDJJ Anual',NULL,NULL,1,0,'2021-02-08 03:52:59','2021-02-08 03:52:59',NULL),(47,NULL,'DREI Santa Fe - DDJJ Mensual',NULL,NULL,1,0,'2021-02-08 03:52:59','2021-02-08 03:52:59',NULL),(48,NULL,'IIBB Santa Fe - DDJJ Anual',NULL,NULL,1,0,'2021-02-08 03:52:59','2021-02-08 03:52:59',NULL),(49,NULL,'IIBB Entre Rios - DDJJ Mensual',NULL,NULL,1,0,'2021-02-08 03:53:00','2021-02-08 03:53:00',NULL),(50,NULL,'Profesionales Liberales Entre Rios',NULL,NULL,1,0,'2021-02-08 03:53:00','2021-02-08 03:53:00',NULL),(51,NULL,'IIBB Rio Negro - DDJJ Mensual',NULL,NULL,1,0,'2021-02-08 03:53:01','2021-02-08 03:53:01',NULL),(52,NULL,'IIBB Neuquen - DDJJ Mensual',NULL,NULL,1,0,'2021-02-08 03:53:01','2021-02-08 03:53:01',NULL),(53,NULL,'IIBB Corrientes - DDJJ Anual',NULL,NULL,1,0,'2021-02-08 03:53:01','2021-02-08 03:53:01',NULL),(54,NULL,'DDJJ Anual Manifestacion de Ganado Corrientes',NULL,NULL,1,0,'2021-02-08 03:53:01','2021-02-08 03:53:01',NULL);
INSERT INTO `vto_impuestos` VALUES (55,NULL,'Sindicato - UTEDYC',NULL,NULL,1,0,'2021-02-08 03:53:02','2021-02-08 03:53:02',NULL),(56,NULL,'SIRADIG',NULL,NULL,1,0,'2021-02-08 20:15:47','2021-02-08 20:15:47',NULL),(57,NULL,'IIBB Santa Fe - Reg. Simplificado',NULL,NULL,1,0,'2021-02-09 17:14:44','2021-02-09 17:14:44',NULL),(58,NULL,'IIBB La Rioja - DDJJ Mensual',NULL,NULL,1,0,'2021-07-26 19:08:22','2021-07-26 19:08:22',NULL),(59,NULL,'IIBB Santa Cruz - DDJJ Mensual',NULL,NULL,1,0,'2022-02-11 16:32:31','2022-02-11 16:32:31',NULL),(60,NULL,'IIBB Santa Cruz - DDJJ Anual',NULL,NULL,1,0,'2022-02-11 16:32:31','2022-02-11 16:32:31',NULL),(61,NULL,'IIBB Mendoza - DDJJ Mensual',NULL,NULL,1,0,'2022-04-20 08:06:55','2022-04-20 08:06:55',NULL),(62,NULL,'SICORE / SIRE - PAGO 1° Quincena',NULL,NULL,1,0,'2023-01-04 15:26:26','2023-01-04 15:26:26',NULL);

--
-- Table structure for table `vto_person_impuesto`
--

CREATE TABLE `vto_person_impuesto` (
  `idPersonVto` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `impuesto_id` int(10) unsigned NOT NULL,
  `categoria_imp_id` int(10) unsigned DEFAULT NULL,
  `vto_id` int(10) unsigned NOT NULL,
  `importe` decimal(16,2) NOT NULL,
  `comentario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`idPersonVto`),
  KEY `vto_person_impuesto_person_id_foreign` (`person_id`),
  KEY `vto_person_impuesto_impuesto_id_foreign` (`impuesto_id`),
  KEY `vto_person_impuesto_categoria_imp_id_foreign` (`categoria_imp_id`),
  KEY `vto_person_impuesto_vto_id_foreign` (`vto_id`),
  CONSTRAINT `vto_person_impuesto_categoria_imp_id_foreign` FOREIGN KEY (`categoria_imp_id`) REFERENCES `vto_categoria_imp` (`id`),
  CONSTRAINT `vto_person_impuesto_impuesto_id_foreign` FOREIGN KEY (`impuesto_id`) REFERENCES `vto_impuestos` (`id`),
  CONSTRAINT `vto_person_impuesto_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `vto_person_impuesto_vto_id_foreign` FOREIGN KEY (`vto_id`) REFERENCES `vto_vencimiento` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_person_impuesto`
--


--
-- Table structure for table `vto_person_impuestos_creados`
--

CREATE TABLE `vto_person_impuestos_creados` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned DEFAULT NULL,
  `impuesto` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vencimiento` date DEFAULT NULL,
  `importe` decimal(16,2) NOT NULL,
  `anticipo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vto_person_impuestos_creados_person_id_foreign` (`person_id`),
  CONSTRAINT `vto_person_impuestos_creados_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_person_impuestos_creados`
--


--
-- Table structure for table `vto_vencimiento`
--

CREATE TABLE `vto_vencimiento` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `anio` int(11) NOT NULL,
  `mes` int(11) NOT NULL,
  `dia` int(11) NOT NULL,
  `impuesto_id` int(10) unsigned NOT NULL,
  `finCuit_id` int(10) unsigned NOT NULL,
  `anticipo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comentario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int(10) unsigned NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vto_vencimiento_impuesto_id_foreign` (`impuesto_id`),
  KEY `vto_vencimiento_fincuit_id_foreign` (`finCuit_id`),
  CONSTRAINT `vto_vencimiento_fincuit_id_foreign` FOREIGN KEY (`finCuit_id`) REFERENCES `vto_fin_cuit` (`id`),
  CONSTRAINT `vto_vencimiento_impuesto_id_foreign` FOREIGN KEY (`impuesto_id`) REFERENCES `vto_impuestos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2009 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `vto_vencimiento`
--

INSERT INTO `vto_vencimiento` VALUES (1,NULL,2023,1,5,1,1,'12',NULL,1,NULL,NULL,NULL),(2,NULL,2023,1,6,1,2,'12',NULL,1,NULL,NULL,NULL),(3,NULL,2023,1,9,1,3,'12',NULL,1,NULL,NULL,NULL),(4,NULL,2023,2,6,1,1,'1',NULL,1,NULL,NULL,NULL),(5,NULL,2023,2,7,1,2,'1',NULL,1,NULL,NULL,NULL),(6,NULL,2023,2,8,1,3,'1',NULL,1,NULL,NULL,NULL),(7,NULL,2023,3,6,1,1,'2',NULL,1,NULL,NULL,NULL),(8,NULL,2023,3,7,1,2,'2',NULL,1,NULL,NULL,NULL),(9,NULL,2023,3,8,1,3,'2',NULL,1,NULL,NULL,NULL),(10,NULL,2023,4,5,1,1,'3',NULL,1,NULL,NULL,NULL),(11,NULL,2023,4,6,1,2,'3',NULL,1,NULL,NULL,NULL),(12,NULL,2023,4,10,1,3,'3',NULL,1,NULL,NULL,NULL),(13,NULL,2023,5,5,1,1,'4',NULL,1,NULL,NULL,NULL),(14,NULL,2023,5,8,1,2,'4',NULL,1,NULL,NULL,NULL),(15,NULL,2023,5,9,1,3,'4',NULL,1,NULL,NULL,NULL),(16,NULL,2023,6,5,1,1,'5',NULL,1,NULL,NULL,NULL),(17,NULL,2023,6,6,1,2,'5',NULL,1,NULL,NULL,NULL),(18,NULL,2023,6,7,1,3,'5',NULL,1,NULL,NULL,NULL),(19,NULL,2023,7,5,1,1,'6',NULL,1,NULL,NULL,NULL),(20,NULL,2023,7,6,1,2,'6',NULL,1,NULL,NULL,NULL),(21,NULL,2023,7,7,1,3,'6',NULL,1,NULL,NULL,NULL),(22,NULL,2023,8,7,1,1,'7',NULL,1,NULL,NULL,NULL),(23,NULL,2023,8,8,1,2,'7',NULL,1,NULL,NULL,NULL),(24,NULL,2023,8,9,1,3,'7',NULL,1,NULL,NULL,NULL),(25,NULL,2023,9,5,1,1,'8',NULL,1,NULL,NULL,NULL),(26,NULL,2023,9,6,1,2,'8',NULL,1,NULL,NULL,NULL),(27,NULL,2023,9,7,1,3,'8',NULL,1,NULL,NULL,NULL),(28,NULL,2023,10,5,1,1,'9',NULL,1,NULL,NULL,NULL),(29,NULL,2023,10,6,1,2,'9',NULL,1,NULL,NULL,NULL),(30,NULL,2023,10,9,1,3,'9',NULL,1,NULL,NULL,NULL),(31,NULL,2023,11,6,1,1,'10',NULL,1,NULL,NULL,NULL),(32,NULL,2023,11,7,1,2,'10',NULL,1,NULL,NULL,NULL),(33,NULL,2023,11,8,1,3,'10',NULL,1,NULL,NULL,NULL),(34,NULL,2023,12,5,1,1,'11',NULL,1,NULL,NULL,NULL),(35,NULL,2023,12,6,1,2,'11',NULL,1,NULL,NULL,NULL),(36,NULL,2023,12,7,1,3,'11',NULL,1,NULL,NULL,NULL),(37,NULL,2023,1,20,2,4,'1',NULL,1,NULL,NULL,NULL),(38,NULL,2023,2,22,2,4,'2',NULL,1,NULL,NULL,NULL),(39,NULL,2023,3,20,2,4,'3',NULL,1,NULL,NULL,NULL),(40,NULL,2023,4,20,2,4,'4',NULL,1,NULL,NULL,NULL),(41,NULL,2023,5,22,2,4,'5',NULL,1,NULL,NULL,NULL),(42,NULL,2023,6,21,2,4,'6',NULL,1,NULL,NULL,NULL),(43,NULL,2023,7,20,2,4,'7',NULL,1,NULL,NULL,NULL),(44,NULL,2023,8,22,2,4,'8',NULL,1,NULL,NULL,NULL),(45,NULL,2023,9,20,2,4,'9',NULL,1,NULL,NULL,NULL),(46,NULL,2023,10,20,2,4,'10',NULL,1,NULL,NULL,NULL),(47,NULL,2023,11,21,2,4,'11',NULL,1,NULL,NULL,NULL),(48,NULL,2023,12,20,2,4,'12',NULL,1,NULL,NULL,NULL),(49,NULL,2023,1,20,19,4,'Recategorizacion',NULL,1,NULL,NULL,NULL),(50,NULL,2023,1,9,3,1,'12',NULL,1,NULL,NULL,NULL),(51,NULL,2023,1,10,3,2,'12',NULL,1,NULL,NULL,NULL),(52,NULL,2023,1,11,3,3,'12',NULL,1,NULL,NULL,NULL),(53,NULL,2023,2,9,3,1,'1',NULL,1,NULL,NULL,NULL),(54,NULL,2023,2,10,3,2,'1',NULL,1,NULL,NULL,NULL),(55,NULL,2023,2,13,3,3,'1',NULL,1,NULL,NULL,NULL),(56,NULL,2023,3,9,3,1,'2',NULL,1,NULL,NULL,NULL),(57,NULL,2023,3,10,3,2,'2',NULL,1,NULL,NULL,NULL),(58,NULL,2023,3,13,3,3,'2',NULL,1,NULL,NULL,NULL),(59,NULL,2023,4,10,3,1,'3',NULL,1,NULL,NULL,NULL),(60,NULL,2023,4,11,3,2,'3',NULL,1,NULL,NULL,NULL),(61,NULL,2023,4,12,3,3,'3',NULL,1,NULL,NULL,NULL),(62,NULL,2023,5,9,3,1,'4',NULL,1,NULL,NULL,NULL),(63,NULL,2023,5,10,3,2,'4',NULL,1,NULL,NULL,NULL),(64,NULL,2023,5,11,3,3,'4',NULL,1,NULL,NULL,NULL),(65,NULL,2023,6,9,3,1,'5',NULL,1,NULL,NULL,NULL),(66,NULL,2023,6,12,3,2,'5',NULL,1,NULL,NULL,NULL),(67,NULL,2023,6,13,3,3,'5',NULL,1,NULL,NULL,NULL),(68,NULL,2023,7,10,3,1,'6',NULL,1,NULL,NULL,NULL),(69,NULL,2023,7,11,3,2,'6',NULL,1,NULL,NULL,NULL),(70,NULL,2023,7,12,3,3,'6',NULL,1,NULL,NULL,NULL),(71,NULL,2023,8,9,3,1,'7',NULL,1,NULL,NULL,NULL),(72,NULL,2023,8,10,3,2,'7',NULL,1,NULL,NULL,NULL),(73,NULL,2023,8,11,3,3,'7',NULL,1,NULL,NULL,NULL),(74,NULL,2023,9,11,3,1,'8',NULL,1,NULL,NULL,NULL),(75,NULL,2023,9,12,3,2,'8',NULL,1,NULL,NULL,NULL),(76,NULL,2023,9,13,3,3,'8',NULL,1,NULL,NULL,NULL),(77,NULL,2023,10,9,3,1,'9',NULL,1,NULL,NULL,NULL),(78,NULL,2023,10,10,3,2,'9',NULL,1,NULL,NULL,NULL),(79,NULL,2023,10,11,3,3,'9',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (80,NULL,2023,11,9,3,1,'10',NULL,1,NULL,NULL,NULL),(81,NULL,2023,11,10,3,2,'10',NULL,1,NULL,NULL,NULL),(82,NULL,2023,11,13,3,3,'10',NULL,1,NULL,NULL,NULL),(83,NULL,2023,12,11,3,1,'11',NULL,1,NULL,NULL,NULL),(84,NULL,2023,12,12,3,2,'11',NULL,1,NULL,NULL,NULL),(85,NULL,2023,12,13,3,3,'11',NULL,1,NULL,NULL,NULL),(86,NULL,2023,1,9,24,1,'12',NULL,1,NULL,NULL,NULL),(87,NULL,2023,1,10,24,2,'12',NULL,1,NULL,NULL,NULL),(88,NULL,2023,1,11,24,3,'12',NULL,1,NULL,NULL,NULL),(89,NULL,2023,2,9,24,1,'1',NULL,1,NULL,NULL,NULL),(90,NULL,2023,2,10,24,2,'1',NULL,1,NULL,NULL,NULL),(91,NULL,2023,2,13,24,3,'1',NULL,1,NULL,NULL,NULL),(92,NULL,2023,3,9,24,1,'2',NULL,1,NULL,NULL,NULL),(93,NULL,2023,3,10,24,2,'2',NULL,1,NULL,NULL,NULL),(94,NULL,2023,3,13,24,3,'2',NULL,1,NULL,NULL,NULL),(95,NULL,2023,4,10,24,1,'3',NULL,1,NULL,NULL,NULL),(96,NULL,2023,4,11,24,2,'3',NULL,1,NULL,NULL,NULL),(97,NULL,2023,4,12,24,3,'3',NULL,1,NULL,NULL,NULL),(98,NULL,2023,5,9,24,1,'4',NULL,1,NULL,NULL,NULL),(99,NULL,2023,5,10,24,2,'4',NULL,1,NULL,NULL,NULL),(100,NULL,2023,5,11,24,3,'4',NULL,1,NULL,NULL,NULL),(101,NULL,2023,6,9,24,1,'5',NULL,1,NULL,NULL,NULL),(102,NULL,2023,6,12,24,2,'5',NULL,1,NULL,NULL,NULL),(103,NULL,2023,6,13,24,3,'5',NULL,1,NULL,NULL,NULL),(104,NULL,2023,7,10,24,1,'6',NULL,1,NULL,NULL,NULL),(105,NULL,2023,7,11,24,2,'6',NULL,1,NULL,NULL,NULL),(106,NULL,2023,7,12,24,3,'6',NULL,1,NULL,NULL,NULL),(107,NULL,2023,8,9,24,1,'7',NULL,1,NULL,NULL,NULL),(108,NULL,2023,8,10,24,2,'7',NULL,1,NULL,NULL,NULL),(109,NULL,2023,8,11,24,3,'7',NULL,1,NULL,NULL,NULL),(110,NULL,2023,9,11,24,1,'8',NULL,1,NULL,NULL,NULL),(111,NULL,2023,9,12,24,2,'8',NULL,1,NULL,NULL,NULL),(112,NULL,2023,9,13,24,3,'8',NULL,1,NULL,NULL,NULL),(113,NULL,2023,10,9,24,1,'9',NULL,1,NULL,NULL,NULL),(114,NULL,2023,10,10,24,2,'9',NULL,1,NULL,NULL,NULL),(115,NULL,2023,10,11,24,3,'9',NULL,1,NULL,NULL,NULL),(116,NULL,2023,11,9,24,1,'10',NULL,1,NULL,NULL,NULL),(117,NULL,2023,11,10,24,2,'10',NULL,1,NULL,NULL,NULL),(118,NULL,2023,11,13,24,3,'10',NULL,1,NULL,NULL,NULL),(119,NULL,2023,12,11,24,1,'11',NULL,1,NULL,NULL,NULL),(120,NULL,2023,12,12,24,2,'11',NULL,1,NULL,NULL,NULL),(121,NULL,2023,12,13,24,3,'11',NULL,1,NULL,NULL,NULL),(122,NULL,2023,1,9,25,1,'12',NULL,1,NULL,NULL,NULL),(123,NULL,2023,1,10,25,2,'12',NULL,1,NULL,NULL,NULL),(124,NULL,2023,1,11,25,3,'12',NULL,1,NULL,NULL,NULL),(125,NULL,2023,2,9,25,1,'1',NULL,1,NULL,NULL,NULL),(126,NULL,2023,2,10,25,2,'1',NULL,1,NULL,NULL,NULL),(127,NULL,2023,2,13,25,3,'1',NULL,1,NULL,NULL,NULL),(128,NULL,2023,3,9,25,1,'2',NULL,1,NULL,NULL,NULL),(129,NULL,2023,3,10,25,2,'2',NULL,1,NULL,NULL,NULL),(130,NULL,2023,3,13,25,3,'2',NULL,1,NULL,NULL,NULL),(131,NULL,2023,4,10,25,1,'3',NULL,1,NULL,NULL,NULL),(132,NULL,2023,4,11,25,2,'3',NULL,1,NULL,NULL,NULL),(133,NULL,2023,4,12,25,3,'3',NULL,1,NULL,NULL,NULL),(134,NULL,2023,5,9,25,1,'4',NULL,1,NULL,NULL,NULL),(135,NULL,2023,5,10,25,2,'4',NULL,1,NULL,NULL,NULL),(136,NULL,2023,5,11,25,3,'4',NULL,1,NULL,NULL,NULL),(137,NULL,2023,6,9,25,1,'5',NULL,1,NULL,NULL,NULL),(138,NULL,2023,6,12,25,2,'5',NULL,1,NULL,NULL,NULL),(139,NULL,2023,6,13,25,3,'5',NULL,1,NULL,NULL,NULL),(140,NULL,2023,7,10,25,1,'6',NULL,1,NULL,NULL,NULL),(141,NULL,2023,7,11,25,2,'6',NULL,1,NULL,NULL,NULL),(142,NULL,2023,7,12,25,3,'6',NULL,1,NULL,NULL,NULL),(143,NULL,2023,8,9,25,1,'7',NULL,1,NULL,NULL,NULL),(144,NULL,2023,8,10,25,2,'7',NULL,1,NULL,NULL,NULL),(145,NULL,2023,8,11,25,3,'7',NULL,1,NULL,NULL,NULL),(146,NULL,2023,9,11,25,1,'8',NULL,1,NULL,NULL,NULL),(147,NULL,2023,9,12,25,2,'8',NULL,1,NULL,NULL,NULL),(148,NULL,2023,9,13,25,3,'8',NULL,1,NULL,NULL,NULL),(149,NULL,2023,10,9,25,1,'9',NULL,1,NULL,NULL,NULL),(150,NULL,2023,10,10,25,2,'9',NULL,1,NULL,NULL,NULL),(151,NULL,2023,10,11,25,3,'9',NULL,1,NULL,NULL,NULL),(152,NULL,2023,11,9,25,1,'10',NULL,1,NULL,NULL,NULL),(153,NULL,2023,11,10,25,2,'10',NULL,1,NULL,NULL,NULL),(154,NULL,2023,11,13,25,3,'10',NULL,1,NULL,NULL,NULL),(155,NULL,2023,12,11,25,1,'11',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (156,NULL,2023,12,12,25,2,'11',NULL,1,NULL,NULL,NULL),(157,NULL,2023,12,13,25,3,'11',NULL,1,NULL,NULL,NULL),(158,NULL,2023,1,9,26,1,'12',NULL,1,NULL,NULL,NULL),(159,NULL,2023,1,10,26,2,'12',NULL,1,NULL,NULL,NULL),(160,NULL,2023,1,11,26,3,'12',NULL,1,NULL,NULL,NULL),(161,NULL,2023,2,9,26,1,'1',NULL,1,NULL,NULL,NULL),(162,NULL,2023,2,10,26,2,'1',NULL,1,NULL,NULL,NULL),(163,NULL,2023,2,13,26,3,'1',NULL,1,NULL,NULL,NULL),(164,NULL,2023,3,9,26,1,'2',NULL,1,NULL,NULL,NULL),(165,NULL,2023,3,10,26,2,'2',NULL,1,NULL,NULL,NULL),(166,NULL,2023,3,13,26,3,'2',NULL,1,NULL,NULL,NULL),(167,NULL,2023,4,10,26,1,'3',NULL,1,NULL,NULL,NULL),(168,NULL,2023,4,11,26,2,'3',NULL,1,NULL,NULL,NULL),(169,NULL,2023,4,12,26,3,'3',NULL,1,NULL,NULL,NULL),(170,NULL,2023,5,9,26,1,'4',NULL,1,NULL,NULL,NULL),(171,NULL,2023,5,10,26,2,'4',NULL,1,NULL,NULL,NULL),(172,NULL,2023,5,11,26,3,'4',NULL,1,NULL,NULL,NULL),(173,NULL,2023,6,9,26,1,'5',NULL,1,NULL,NULL,NULL),(174,NULL,2023,6,12,26,2,'5',NULL,1,NULL,NULL,NULL),(175,NULL,2023,6,13,26,3,'5',NULL,1,NULL,NULL,NULL),(176,NULL,2023,7,10,26,1,'6',NULL,1,NULL,NULL,NULL),(177,NULL,2023,7,11,26,2,'6',NULL,1,NULL,NULL,NULL),(178,NULL,2023,7,12,26,3,'6',NULL,1,NULL,NULL,NULL),(179,NULL,2023,8,9,26,1,'7',NULL,1,NULL,NULL,NULL),(180,NULL,2023,8,10,26,2,'7',NULL,1,NULL,NULL,NULL),(181,NULL,2023,8,11,26,3,'7',NULL,1,NULL,NULL,NULL),(182,NULL,2023,9,11,26,1,'8',NULL,1,NULL,NULL,NULL),(183,NULL,2023,9,12,26,2,'8',NULL,1,NULL,NULL,NULL),(184,NULL,2023,9,13,26,3,'8',NULL,1,NULL,NULL,NULL),(185,NULL,2023,10,9,26,1,'9',NULL,1,NULL,NULL,NULL),(186,NULL,2023,10,10,26,2,'9',NULL,1,NULL,NULL,NULL),(187,NULL,2023,10,11,26,3,'9',NULL,1,NULL,NULL,NULL),(188,NULL,2023,11,9,26,1,'10',NULL,1,NULL,NULL,NULL),(189,NULL,2023,11,10,26,2,'10',NULL,1,NULL,NULL,NULL),(190,NULL,2023,11,13,26,3,'10',NULL,1,NULL,NULL,NULL),(191,NULL,2023,12,11,26,1,'11',NULL,1,NULL,NULL,NULL),(192,NULL,2023,12,12,26,2,'11',NULL,1,NULL,NULL,NULL),(193,NULL,2023,12,13,26,3,'11',NULL,1,NULL,NULL,NULL),(194,NULL,2023,1,9,27,1,'12',NULL,1,NULL,NULL,NULL),(195,NULL,2023,1,10,27,2,'12',NULL,1,NULL,NULL,NULL),(196,NULL,2023,1,11,27,3,'12',NULL,1,NULL,NULL,NULL),(197,NULL,2023,2,9,27,1,'1',NULL,1,NULL,NULL,NULL),(198,NULL,2023,2,10,27,2,'1',NULL,1,NULL,NULL,NULL),(199,NULL,2023,2,13,27,3,'1',NULL,1,NULL,NULL,NULL),(200,NULL,2023,3,9,27,1,'2',NULL,1,NULL,NULL,NULL),(201,NULL,2023,3,10,27,2,'2',NULL,1,NULL,NULL,NULL),(202,NULL,2023,3,13,27,3,'2',NULL,1,NULL,NULL,NULL),(203,NULL,2023,4,10,27,1,'3',NULL,1,NULL,NULL,NULL),(204,NULL,2023,4,11,27,2,'3',NULL,1,NULL,NULL,NULL),(205,NULL,2023,4,12,27,3,'3',NULL,1,NULL,NULL,NULL),(206,NULL,2023,5,9,27,1,'4',NULL,1,NULL,NULL,NULL),(207,NULL,2023,5,10,27,2,'4',NULL,1,NULL,NULL,NULL),(208,NULL,2023,5,11,27,3,'4',NULL,1,NULL,NULL,NULL),(209,NULL,2023,6,9,27,1,'5',NULL,1,NULL,NULL,NULL),(210,NULL,2023,6,12,27,2,'5',NULL,1,NULL,NULL,NULL),(211,NULL,2023,6,13,27,3,'5',NULL,1,NULL,NULL,NULL),(212,NULL,2023,7,10,27,1,'6',NULL,1,NULL,NULL,NULL),(213,NULL,2023,7,11,27,2,'6',NULL,1,NULL,NULL,NULL),(214,NULL,2023,7,12,27,3,'6',NULL,1,NULL,NULL,NULL),(215,NULL,2023,8,9,27,1,'7',NULL,1,NULL,NULL,NULL),(216,NULL,2023,8,10,27,2,'7',NULL,1,NULL,NULL,NULL),(217,NULL,2023,8,11,27,3,'7',NULL,1,NULL,NULL,NULL),(218,NULL,2023,9,11,27,1,'8',NULL,1,NULL,NULL,NULL),(219,NULL,2023,9,12,27,2,'8',NULL,1,NULL,NULL,NULL),(220,NULL,2023,9,13,27,3,'8',NULL,1,NULL,NULL,NULL),(221,NULL,2023,10,9,27,1,'9',NULL,1,NULL,NULL,NULL),(222,NULL,2023,10,10,27,2,'9',NULL,1,NULL,NULL,NULL),(223,NULL,2023,10,11,27,3,'9',NULL,1,NULL,NULL,NULL),(224,NULL,2023,11,9,27,1,'10',NULL,1,NULL,NULL,NULL),(225,NULL,2023,11,10,27,2,'10',NULL,1,NULL,NULL,NULL),(226,NULL,2023,11,13,27,3,'10',NULL,1,NULL,NULL,NULL),(227,NULL,2023,12,11,27,1,'11',NULL,1,NULL,NULL,NULL),(228,NULL,2023,12,12,27,2,'11',NULL,1,NULL,NULL,NULL),(229,NULL,2023,12,13,27,3,'11',NULL,1,NULL,NULL,NULL),(230,NULL,2023,1,9,28,1,'12',NULL,1,NULL,NULL,NULL),(231,NULL,2023,1,10,28,2,'12',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (232,NULL,2023,1,11,28,3,'12',NULL,1,NULL,NULL,NULL),(233,NULL,2023,2,9,28,1,'1',NULL,1,NULL,NULL,NULL),(234,NULL,2023,2,10,28,2,'1',NULL,1,NULL,NULL,NULL),(235,NULL,2023,2,13,28,3,'1',NULL,1,NULL,NULL,NULL),(236,NULL,2023,3,9,28,1,'2',NULL,1,NULL,NULL,NULL),(237,NULL,2023,3,10,28,2,'2',NULL,1,NULL,NULL,NULL),(238,NULL,2023,3,13,28,3,'2',NULL,1,NULL,NULL,NULL),(239,NULL,2023,4,10,28,1,'3',NULL,1,NULL,NULL,NULL),(240,NULL,2023,4,11,28,2,'3',NULL,1,NULL,NULL,NULL),(241,NULL,2023,4,12,28,3,'3',NULL,1,NULL,NULL,NULL),(242,NULL,2023,5,9,28,1,'4',NULL,1,NULL,NULL,NULL),(243,NULL,2023,5,10,28,2,'4',NULL,1,NULL,NULL,NULL),(244,NULL,2023,5,11,28,3,'4',NULL,1,NULL,NULL,NULL),(245,NULL,2023,6,9,28,1,'5',NULL,1,NULL,NULL,NULL),(246,NULL,2023,6,12,28,2,'5',NULL,1,NULL,NULL,NULL),(247,NULL,2023,6,13,28,3,'5',NULL,1,NULL,NULL,NULL),(248,NULL,2023,7,10,28,1,'6',NULL,1,NULL,NULL,NULL),(249,NULL,2023,7,11,28,2,'6',NULL,1,NULL,NULL,NULL),(250,NULL,2023,7,12,28,3,'6',NULL,1,NULL,NULL,NULL),(251,NULL,2023,8,9,28,1,'7',NULL,1,NULL,NULL,NULL),(252,NULL,2023,8,10,28,2,'7',NULL,1,NULL,NULL,NULL),(253,NULL,2023,8,11,28,3,'7',NULL,1,NULL,NULL,NULL),(254,NULL,2023,9,11,28,1,'8',NULL,1,NULL,NULL,NULL),(255,NULL,2023,9,12,28,2,'8',NULL,1,NULL,NULL,NULL),(256,NULL,2023,9,13,28,3,'8',NULL,1,NULL,NULL,NULL),(257,NULL,2023,10,9,28,1,'9',NULL,1,NULL,NULL,NULL),(258,NULL,2023,10,10,28,2,'9',NULL,1,NULL,NULL,NULL),(259,NULL,2023,10,11,28,3,'9',NULL,1,NULL,NULL,NULL),(260,NULL,2023,11,9,28,1,'10',NULL,1,NULL,NULL,NULL),(261,NULL,2023,11,10,28,2,'10',NULL,1,NULL,NULL,NULL),(262,NULL,2023,11,13,28,3,'10',NULL,1,NULL,NULL,NULL),(263,NULL,2023,12,11,28,1,'11',NULL,1,NULL,NULL,NULL),(264,NULL,2023,12,12,28,2,'11',NULL,1,NULL,NULL,NULL),(265,NULL,2023,12,13,28,3,'11',NULL,1,NULL,NULL,NULL),(266,NULL,2023,1,9,29,1,'12',NULL,1,NULL,NULL,NULL),(267,NULL,2023,1,10,29,2,'12',NULL,1,NULL,NULL,NULL),(268,NULL,2023,1,11,29,3,'12',NULL,1,NULL,NULL,NULL),(269,NULL,2023,2,9,29,1,'1',NULL,1,NULL,NULL,NULL),(270,NULL,2023,2,10,29,2,'1',NULL,1,NULL,NULL,NULL),(271,NULL,2023,2,13,29,3,'1',NULL,1,NULL,NULL,NULL),(272,NULL,2023,3,9,29,1,'2',NULL,1,NULL,NULL,NULL),(273,NULL,2023,3,10,29,2,'2',NULL,1,NULL,NULL,NULL),(274,NULL,2023,3,13,29,3,'2',NULL,1,NULL,NULL,NULL),(275,NULL,2023,4,10,29,1,'3',NULL,1,NULL,NULL,NULL),(276,NULL,2023,4,11,29,2,'3',NULL,1,NULL,NULL,NULL),(277,NULL,2023,4,12,29,3,'3',NULL,1,NULL,NULL,NULL),(278,NULL,2023,5,9,29,1,'4',NULL,1,NULL,NULL,NULL),(279,NULL,2023,5,10,29,2,'4',NULL,1,NULL,NULL,NULL),(280,NULL,2023,5,11,29,3,'4',NULL,1,NULL,NULL,NULL),(281,NULL,2023,6,9,29,1,'5',NULL,1,NULL,NULL,NULL),(282,NULL,2023,6,12,29,2,'5',NULL,1,NULL,NULL,NULL),(283,NULL,2023,6,13,29,3,'5',NULL,1,NULL,NULL,NULL),(284,NULL,2023,7,10,29,1,'6',NULL,1,NULL,NULL,NULL),(285,NULL,2023,7,11,29,2,'6',NULL,1,NULL,NULL,NULL),(286,NULL,2023,7,12,29,3,'6',NULL,1,NULL,NULL,NULL),(287,NULL,2023,8,9,29,1,'7',NULL,1,NULL,NULL,NULL),(288,NULL,2023,8,10,29,2,'7',NULL,1,NULL,NULL,NULL),(289,NULL,2023,8,11,29,3,'7',NULL,1,NULL,NULL,NULL),(290,NULL,2023,9,11,29,1,'8',NULL,1,NULL,NULL,NULL),(291,NULL,2023,9,12,29,2,'8',NULL,1,NULL,NULL,NULL),(292,NULL,2023,9,13,29,3,'8',NULL,1,NULL,NULL,NULL),(293,NULL,2023,10,9,29,1,'9',NULL,1,NULL,NULL,NULL),(294,NULL,2023,10,10,29,2,'9',NULL,1,NULL,NULL,NULL),(295,NULL,2023,10,11,29,3,'9',NULL,1,NULL,NULL,NULL),(296,NULL,2023,11,9,29,1,'10',NULL,1,NULL,NULL,NULL),(297,NULL,2023,11,10,29,2,'10',NULL,1,NULL,NULL,NULL),(298,NULL,2023,11,13,29,3,'10',NULL,1,NULL,NULL,NULL),(299,NULL,2023,12,11,29,1,'11',NULL,1,NULL,NULL,NULL),(300,NULL,2023,12,12,29,2,'11',NULL,1,NULL,NULL,NULL),(301,NULL,2023,12,13,29,3,'11',NULL,1,NULL,NULL,NULL),(302,NULL,2023,1,9,30,1,'12',NULL,1,NULL,NULL,NULL),(303,NULL,2023,1,10,30,2,'12',NULL,1,NULL,NULL,NULL),(304,NULL,2023,1,11,30,3,'12',NULL,1,NULL,NULL,NULL),(305,NULL,2023,2,9,30,1,'1',NULL,1,NULL,NULL,NULL),(306,NULL,2023,2,10,30,2,'1',NULL,1,NULL,NULL,NULL),(307,NULL,2023,2,13,30,3,'1',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (308,NULL,2023,3,9,30,1,'2',NULL,1,NULL,NULL,NULL),(309,NULL,2023,3,10,30,2,'2',NULL,1,NULL,NULL,NULL),(310,NULL,2023,3,13,30,3,'2',NULL,1,NULL,NULL,NULL),(311,NULL,2023,4,10,30,1,'3',NULL,1,NULL,NULL,NULL),(312,NULL,2023,4,11,30,2,'3',NULL,1,NULL,NULL,NULL),(313,NULL,2023,4,12,30,3,'3',NULL,1,NULL,NULL,NULL),(314,NULL,2023,5,9,30,1,'4',NULL,1,NULL,NULL,NULL),(315,NULL,2023,5,10,30,2,'4',NULL,1,NULL,NULL,NULL),(316,NULL,2023,5,11,30,3,'4',NULL,1,NULL,NULL,NULL),(317,NULL,2023,6,9,30,1,'5',NULL,1,NULL,NULL,NULL),(318,NULL,2023,6,12,30,2,'5',NULL,1,NULL,NULL,NULL),(319,NULL,2023,6,13,30,3,'5',NULL,1,NULL,NULL,NULL),(320,NULL,2023,7,10,30,1,'6',NULL,1,NULL,NULL,NULL),(321,NULL,2023,7,11,30,2,'6',NULL,1,NULL,NULL,NULL),(322,NULL,2023,7,12,30,3,'6',NULL,1,NULL,NULL,NULL),(323,NULL,2023,8,9,30,1,'7',NULL,1,NULL,NULL,NULL),(324,NULL,2023,8,10,30,2,'7',NULL,1,NULL,NULL,NULL),(325,NULL,2023,8,11,30,3,'7',NULL,1,NULL,NULL,NULL),(326,NULL,2023,9,11,30,1,'8',NULL,1,NULL,NULL,NULL),(327,NULL,2023,9,12,30,2,'8',NULL,1,NULL,NULL,NULL),(328,NULL,2023,9,13,30,3,'8',NULL,1,NULL,NULL,NULL),(329,NULL,2023,10,9,30,1,'9',NULL,1,NULL,NULL,NULL),(330,NULL,2023,10,10,30,2,'9',NULL,1,NULL,NULL,NULL),(331,NULL,2023,10,11,30,3,'9',NULL,1,NULL,NULL,NULL),(332,NULL,2023,11,9,30,1,'10',NULL,1,NULL,NULL,NULL),(333,NULL,2023,11,10,30,2,'10',NULL,1,NULL,NULL,NULL),(334,NULL,2023,11,13,30,3,'10',NULL,1,NULL,NULL,NULL),(335,NULL,2023,12,11,30,1,'11',NULL,1,NULL,NULL,NULL),(336,NULL,2023,12,12,30,2,'11',NULL,1,NULL,NULL,NULL),(337,NULL,2023,12,13,30,3,'11',NULL,1,NULL,NULL,NULL),(338,NULL,2023,1,9,31,1,'12',NULL,1,NULL,NULL,NULL),(339,NULL,2023,1,10,31,2,'12',NULL,1,NULL,NULL,NULL),(340,NULL,2023,1,11,31,3,'12',NULL,1,NULL,NULL,NULL),(341,NULL,2023,2,9,31,1,'1',NULL,1,NULL,NULL,NULL),(342,NULL,2023,2,10,31,2,'1',NULL,1,NULL,NULL,NULL),(343,NULL,2023,2,13,31,3,'1',NULL,1,NULL,NULL,NULL),(344,NULL,2023,3,9,31,1,'2',NULL,1,NULL,NULL,NULL),(345,NULL,2023,3,10,31,2,'2',NULL,1,NULL,NULL,NULL),(346,NULL,2023,3,13,31,3,'2',NULL,1,NULL,NULL,NULL),(347,NULL,2023,4,10,31,1,'3',NULL,1,NULL,NULL,NULL),(348,NULL,2023,4,11,31,2,'3',NULL,1,NULL,NULL,NULL),(349,NULL,2023,4,12,31,3,'3',NULL,1,NULL,NULL,NULL),(350,NULL,2023,5,9,31,1,'4',NULL,1,NULL,NULL,NULL),(351,NULL,2023,5,10,31,2,'4',NULL,1,NULL,NULL,NULL),(352,NULL,2023,5,11,31,3,'4',NULL,1,NULL,NULL,NULL),(353,NULL,2023,6,9,31,1,'5',NULL,1,NULL,NULL,NULL),(354,NULL,2023,6,12,31,2,'5',NULL,1,NULL,NULL,NULL),(355,NULL,2023,6,13,31,3,'5',NULL,1,NULL,NULL,NULL),(356,NULL,2023,7,10,31,1,'6',NULL,1,NULL,NULL,NULL),(357,NULL,2023,7,11,31,2,'6',NULL,1,NULL,NULL,NULL),(358,NULL,2023,7,12,31,3,'6',NULL,1,NULL,NULL,NULL),(359,NULL,2023,8,9,31,1,'7',NULL,1,NULL,NULL,NULL),(360,NULL,2023,8,10,31,2,'7',NULL,1,NULL,NULL,NULL),(361,NULL,2023,8,11,31,3,'7',NULL,1,NULL,NULL,NULL),(362,NULL,2023,9,11,31,1,'8',NULL,1,NULL,NULL,NULL),(363,NULL,2023,9,12,31,2,'8',NULL,1,NULL,NULL,NULL),(364,NULL,2023,9,13,31,3,'8',NULL,1,NULL,NULL,NULL),(365,NULL,2023,10,9,31,1,'9',NULL,1,NULL,NULL,NULL),(366,NULL,2023,10,10,31,2,'9',NULL,1,NULL,NULL,NULL),(367,NULL,2023,10,11,31,3,'9',NULL,1,NULL,NULL,NULL),(368,NULL,2023,11,9,31,1,'10',NULL,1,NULL,NULL,NULL),(369,NULL,2023,11,10,31,2,'10',NULL,1,NULL,NULL,NULL),(370,NULL,2023,11,13,31,3,'10',NULL,1,NULL,NULL,NULL),(371,NULL,2023,12,11,31,1,'11',NULL,1,NULL,NULL,NULL),(372,NULL,2023,12,12,31,2,'11',NULL,1,NULL,NULL,NULL),(373,NULL,2023,12,13,31,3,'11',NULL,1,NULL,NULL,NULL),(374,NULL,2023,1,9,32,1,'12',NULL,1,NULL,NULL,NULL),(375,NULL,2023,1,10,32,2,'12',NULL,1,NULL,NULL,NULL),(376,NULL,2023,1,11,32,3,'12',NULL,1,NULL,NULL,NULL),(377,NULL,2023,2,9,32,1,'1',NULL,1,NULL,NULL,NULL),(378,NULL,2023,2,10,32,2,'1',NULL,1,NULL,NULL,NULL),(379,NULL,2023,2,13,32,3,'1',NULL,1,NULL,NULL,NULL),(380,NULL,2023,3,9,32,1,'2',NULL,1,NULL,NULL,NULL),(381,NULL,2023,3,10,32,2,'2',NULL,1,NULL,NULL,NULL),(382,NULL,2023,3,13,32,3,'2',NULL,1,NULL,NULL,NULL),(383,NULL,2023,4,10,32,1,'3',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (384,NULL,2023,4,11,32,2,'3',NULL,1,NULL,NULL,NULL),(385,NULL,2023,4,12,32,3,'3',NULL,1,NULL,NULL,NULL),(386,NULL,2023,5,9,32,1,'4',NULL,1,NULL,NULL,NULL),(387,NULL,2023,5,10,32,2,'4',NULL,1,NULL,NULL,NULL),(388,NULL,2023,5,11,32,3,'4',NULL,1,NULL,NULL,NULL),(389,NULL,2023,6,9,32,1,'5',NULL,1,NULL,NULL,NULL),(390,NULL,2023,6,12,32,2,'5',NULL,1,NULL,NULL,NULL),(391,NULL,2023,6,13,32,3,'5',NULL,1,NULL,NULL,NULL),(392,NULL,2023,7,10,32,1,'6',NULL,1,NULL,NULL,NULL),(393,NULL,2023,7,11,32,2,'6',NULL,1,NULL,NULL,NULL),(394,NULL,2023,7,12,32,3,'6',NULL,1,NULL,NULL,NULL),(395,NULL,2023,8,9,32,1,'7',NULL,1,NULL,NULL,NULL),(396,NULL,2023,8,10,32,2,'7',NULL,1,NULL,NULL,NULL),(397,NULL,2023,8,11,32,3,'7',NULL,1,NULL,NULL,NULL),(398,NULL,2023,9,11,32,1,'8',NULL,1,NULL,NULL,NULL),(399,NULL,2023,9,12,32,2,'8',NULL,1,NULL,NULL,NULL),(400,NULL,2023,9,13,32,3,'8',NULL,1,NULL,NULL,NULL),(401,NULL,2023,10,9,32,1,'9',NULL,1,NULL,NULL,NULL),(402,NULL,2023,10,10,32,2,'9',NULL,1,NULL,NULL,NULL),(403,NULL,2023,10,11,32,3,'9',NULL,1,NULL,NULL,NULL),(404,NULL,2023,11,9,32,1,'10',NULL,1,NULL,NULL,NULL),(405,NULL,2023,11,10,32,2,'10',NULL,1,NULL,NULL,NULL),(406,NULL,2023,11,13,32,3,'10',NULL,1,NULL,NULL,NULL),(407,NULL,2023,12,11,32,1,'11',NULL,1,NULL,NULL,NULL),(408,NULL,2023,12,12,32,2,'11',NULL,1,NULL,NULL,NULL),(409,NULL,2023,12,13,32,3,'11',NULL,1,NULL,NULL,NULL),(410,NULL,2023,1,9,33,1,'12',NULL,1,NULL,NULL,NULL),(411,NULL,2023,1,10,33,2,'12',NULL,1,NULL,NULL,NULL),(412,NULL,2023,1,11,33,3,'12',NULL,1,NULL,NULL,NULL),(413,NULL,2023,2,9,33,1,'1',NULL,1,NULL,NULL,NULL),(414,NULL,2023,2,10,33,2,'1',NULL,1,NULL,NULL,NULL),(415,NULL,2023,2,13,33,3,'1',NULL,1,NULL,NULL,NULL),(416,NULL,2023,3,9,33,1,'2',NULL,1,NULL,NULL,NULL),(417,NULL,2023,3,10,33,2,'2',NULL,1,NULL,NULL,NULL),(418,NULL,2023,3,13,33,3,'2',NULL,1,NULL,NULL,NULL),(419,NULL,2023,4,10,33,1,'3',NULL,1,NULL,NULL,NULL),(420,NULL,2023,4,11,33,2,'3',NULL,1,NULL,NULL,NULL),(421,NULL,2023,4,12,33,3,'3',NULL,1,NULL,NULL,NULL),(422,NULL,2023,5,9,33,1,'4',NULL,1,NULL,NULL,NULL),(423,NULL,2023,5,10,33,2,'4',NULL,1,NULL,NULL,NULL),(424,NULL,2023,5,11,33,3,'4',NULL,1,NULL,NULL,NULL),(425,NULL,2023,6,9,33,1,'5',NULL,1,NULL,NULL,NULL),(426,NULL,2023,6,12,33,2,'5',NULL,1,NULL,NULL,NULL),(427,NULL,2023,6,13,33,3,'5',NULL,1,NULL,NULL,NULL),(428,NULL,2023,7,10,33,1,'6',NULL,1,NULL,NULL,NULL),(429,NULL,2023,7,11,33,2,'6',NULL,1,NULL,NULL,NULL),(430,NULL,2023,7,12,33,3,'6',NULL,1,NULL,NULL,NULL),(431,NULL,2023,8,9,33,1,'7',NULL,1,NULL,NULL,NULL),(432,NULL,2023,8,10,33,2,'7',NULL,1,NULL,NULL,NULL),(433,NULL,2023,8,11,33,3,'7',NULL,1,NULL,NULL,NULL),(434,NULL,2023,9,11,33,1,'8',NULL,1,NULL,NULL,NULL),(435,NULL,2023,9,12,33,2,'8',NULL,1,NULL,NULL,NULL),(436,NULL,2023,9,13,33,3,'8',NULL,1,NULL,NULL,NULL),(437,NULL,2023,10,9,33,1,'9',NULL,1,NULL,NULL,NULL),(438,NULL,2023,10,10,33,2,'9',NULL,1,NULL,NULL,NULL),(439,NULL,2023,10,11,33,3,'9',NULL,1,NULL,NULL,NULL),(440,NULL,2023,11,9,33,1,'10',NULL,1,NULL,NULL,NULL),(441,NULL,2023,11,10,33,2,'10',NULL,1,NULL,NULL,NULL),(442,NULL,2023,11,13,33,3,'10',NULL,1,NULL,NULL,NULL),(443,NULL,2023,12,11,33,1,'11',NULL,1,NULL,NULL,NULL),(444,NULL,2023,12,12,33,2,'11',NULL,1,NULL,NULL,NULL),(445,NULL,2023,12,13,33,3,'11',NULL,1,NULL,NULL,NULL),(446,NULL,2023,1,9,34,1,'12',NULL,1,NULL,NULL,NULL),(447,NULL,2023,1,10,34,2,'12',NULL,1,NULL,NULL,NULL),(448,NULL,2023,1,11,34,3,'12',NULL,1,NULL,NULL,NULL),(449,NULL,2023,2,9,34,1,'1',NULL,1,NULL,NULL,NULL),(450,NULL,2023,2,10,34,2,'1',NULL,1,NULL,NULL,NULL),(451,NULL,2023,2,13,34,3,'1',NULL,1,NULL,NULL,NULL),(452,NULL,2023,3,9,34,1,'2',NULL,1,NULL,NULL,NULL),(453,NULL,2023,3,10,34,2,'2',NULL,1,NULL,NULL,NULL),(454,NULL,2023,3,13,34,3,'2',NULL,1,NULL,NULL,NULL),(455,NULL,2023,4,10,34,1,'3',NULL,1,NULL,NULL,NULL),(456,NULL,2023,4,11,34,2,'3',NULL,1,NULL,NULL,NULL),(457,NULL,2023,4,12,34,3,'3',NULL,1,NULL,NULL,NULL),(458,NULL,2023,5,9,34,1,'4',NULL,1,NULL,NULL,NULL),(459,NULL,2023,5,10,34,2,'4',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (460,NULL,2023,5,11,34,3,'4',NULL,1,NULL,NULL,NULL),(461,NULL,2023,6,9,34,1,'5',NULL,1,NULL,NULL,NULL),(462,NULL,2023,6,12,34,2,'5',NULL,1,NULL,NULL,NULL),(463,NULL,2023,6,13,34,3,'5',NULL,1,NULL,NULL,NULL),(464,NULL,2023,7,10,34,1,'6',NULL,1,NULL,NULL,NULL),(465,NULL,2023,7,11,34,2,'6',NULL,1,NULL,NULL,NULL),(466,NULL,2023,7,12,34,3,'6',NULL,1,NULL,NULL,NULL),(467,NULL,2023,8,9,34,1,'7',NULL,1,NULL,NULL,NULL),(468,NULL,2023,8,10,34,2,'7',NULL,1,NULL,NULL,NULL),(469,NULL,2023,8,11,34,3,'7',NULL,1,NULL,NULL,NULL),(470,NULL,2023,9,11,34,1,'8',NULL,1,NULL,NULL,NULL),(471,NULL,2023,9,12,34,2,'8',NULL,1,NULL,NULL,NULL),(472,NULL,2023,9,13,34,3,'8',NULL,1,NULL,NULL,NULL),(473,NULL,2023,10,9,34,1,'9',NULL,1,NULL,NULL,NULL),(474,NULL,2023,10,10,34,2,'9',NULL,1,NULL,NULL,NULL),(475,NULL,2023,10,11,34,3,'9',NULL,1,NULL,NULL,NULL),(476,NULL,2023,11,9,34,1,'10',NULL,1,NULL,NULL,NULL),(477,NULL,2023,11,10,34,2,'10',NULL,1,NULL,NULL,NULL),(478,NULL,2023,11,13,34,3,'10',NULL,1,NULL,NULL,NULL),(479,NULL,2023,12,11,34,1,'11',NULL,1,NULL,NULL,NULL),(480,NULL,2023,12,12,34,2,'11',NULL,1,NULL,NULL,NULL),(481,NULL,2023,12,13,34,3,'11',NULL,1,NULL,NULL,NULL),(482,NULL,2023,1,9,35,1,'12',NULL,1,NULL,NULL,NULL),(483,NULL,2023,1,10,35,2,'12',NULL,1,NULL,NULL,NULL),(484,NULL,2023,1,11,35,3,'12',NULL,1,NULL,NULL,NULL),(485,NULL,2023,2,9,35,1,'1',NULL,1,NULL,NULL,NULL),(486,NULL,2023,2,10,35,2,'1',NULL,1,NULL,NULL,NULL),(487,NULL,2023,2,13,35,3,'1',NULL,1,NULL,NULL,NULL),(488,NULL,2023,3,9,35,1,'2',NULL,1,NULL,NULL,NULL),(489,NULL,2023,3,10,35,2,'2',NULL,1,NULL,NULL,NULL),(490,NULL,2023,3,13,35,3,'2',NULL,1,NULL,NULL,NULL),(491,NULL,2023,4,10,35,1,'3',NULL,1,NULL,NULL,NULL),(492,NULL,2023,4,11,35,2,'3',NULL,1,NULL,NULL,NULL),(493,NULL,2023,4,12,35,3,'3',NULL,1,NULL,NULL,NULL),(494,NULL,2023,5,9,35,1,'4',NULL,1,NULL,NULL,NULL),(495,NULL,2023,5,10,35,2,'4',NULL,1,NULL,NULL,NULL),(496,NULL,2023,5,11,35,3,'4',NULL,1,NULL,NULL,NULL),(497,NULL,2023,6,9,35,1,'5',NULL,1,NULL,NULL,NULL),(498,NULL,2023,6,12,35,2,'5',NULL,1,NULL,NULL,NULL),(499,NULL,2023,6,13,35,3,'5',NULL,1,NULL,NULL,NULL),(500,NULL,2023,7,10,35,1,'6',NULL,1,NULL,NULL,NULL),(501,NULL,2023,7,11,35,2,'6',NULL,1,NULL,NULL,NULL),(502,NULL,2023,7,12,35,3,'6',NULL,1,NULL,NULL,NULL),(503,NULL,2023,8,9,35,1,'7',NULL,1,NULL,NULL,NULL),(504,NULL,2023,8,10,35,2,'7',NULL,1,NULL,NULL,NULL),(505,NULL,2023,8,11,35,3,'7',NULL,1,NULL,NULL,NULL),(506,NULL,2023,9,11,35,1,'8',NULL,1,NULL,NULL,NULL),(507,NULL,2023,9,12,35,2,'8',NULL,1,NULL,NULL,NULL),(508,NULL,2023,9,13,35,3,'8',NULL,1,NULL,NULL,NULL),(509,NULL,2023,10,9,35,1,'9',NULL,1,NULL,NULL,NULL),(510,NULL,2023,10,10,35,2,'9',NULL,1,NULL,NULL,NULL),(511,NULL,2023,10,11,35,3,'9',NULL,1,NULL,NULL,NULL),(512,NULL,2023,11,9,35,1,'10',NULL,1,NULL,NULL,NULL),(513,NULL,2023,11,10,35,2,'10',NULL,1,NULL,NULL,NULL),(514,NULL,2023,11,13,35,3,'10',NULL,1,NULL,NULL,NULL),(515,NULL,2023,12,11,35,1,'11',NULL,1,NULL,NULL,NULL),(516,NULL,2023,12,12,35,2,'11',NULL,1,NULL,NULL,NULL),(517,NULL,2023,12,13,35,3,'11',NULL,1,NULL,NULL,NULL),(518,NULL,2023,1,9,36,1,'12',NULL,1,NULL,NULL,NULL),(519,NULL,2023,1,10,36,2,'12',NULL,1,NULL,NULL,NULL),(520,NULL,2023,1,11,36,3,'12',NULL,1,NULL,NULL,NULL),(521,NULL,2023,2,9,36,1,'1',NULL,1,NULL,NULL,NULL),(522,NULL,2023,2,10,36,2,'1',NULL,1,NULL,NULL,NULL),(523,NULL,2023,2,13,36,3,'1',NULL,1,NULL,NULL,NULL),(524,NULL,2023,3,9,36,1,'2',NULL,1,NULL,NULL,NULL),(525,NULL,2023,3,10,36,2,'2',NULL,1,NULL,NULL,NULL),(526,NULL,2023,3,13,36,3,'2',NULL,1,NULL,NULL,NULL),(527,NULL,2023,4,10,36,1,'3',NULL,1,NULL,NULL,NULL),(528,NULL,2023,4,11,36,2,'3',NULL,1,NULL,NULL,NULL),(529,NULL,2023,4,12,36,3,'3',NULL,1,NULL,NULL,NULL),(530,NULL,2023,5,9,36,1,'4',NULL,1,NULL,NULL,NULL),(531,NULL,2023,5,10,36,2,'4',NULL,1,NULL,NULL,NULL),(532,NULL,2023,5,11,36,3,'4',NULL,1,NULL,NULL,NULL),(533,NULL,2023,6,9,36,1,'5',NULL,1,NULL,NULL,NULL),(534,NULL,2023,6,12,36,2,'5',NULL,1,NULL,NULL,NULL),(535,NULL,2023,6,13,36,3,'5',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (536,NULL,2023,7,10,36,1,'6',NULL,1,NULL,NULL,NULL),(537,NULL,2023,7,11,36,2,'6',NULL,1,NULL,NULL,NULL),(538,NULL,2023,7,12,36,3,'6',NULL,1,NULL,NULL,NULL),(539,NULL,2023,8,9,36,1,'7',NULL,1,NULL,NULL,NULL),(540,NULL,2023,8,10,36,2,'7',NULL,1,NULL,NULL,NULL),(541,NULL,2023,8,11,36,3,'7',NULL,1,NULL,NULL,NULL),(542,NULL,2023,9,11,36,1,'8',NULL,1,NULL,NULL,NULL),(543,NULL,2023,9,12,36,2,'8',NULL,1,NULL,NULL,NULL),(544,NULL,2023,9,13,36,3,'8',NULL,1,NULL,NULL,NULL),(545,NULL,2023,10,9,36,1,'9',NULL,1,NULL,NULL,NULL),(546,NULL,2023,10,10,36,2,'9',NULL,1,NULL,NULL,NULL),(547,NULL,2023,10,11,36,3,'9',NULL,1,NULL,NULL,NULL),(548,NULL,2023,11,9,36,1,'10',NULL,1,NULL,NULL,NULL),(549,NULL,2023,11,10,36,2,'10',NULL,1,NULL,NULL,NULL),(550,NULL,2023,11,13,36,3,'10',NULL,1,NULL,NULL,NULL),(551,NULL,2023,12,11,36,1,'11',NULL,1,NULL,NULL,NULL),(552,NULL,2023,12,12,36,2,'11',NULL,1,NULL,NULL,NULL),(553,NULL,2023,12,13,36,3,'11',NULL,1,NULL,NULL,NULL),(554,NULL,2023,1,9,37,1,'12',NULL,1,NULL,NULL,NULL),(555,NULL,2023,1,10,37,2,'12',NULL,1,NULL,NULL,NULL),(556,NULL,2023,1,11,37,3,'12',NULL,1,NULL,NULL,NULL),(557,NULL,2023,2,9,37,1,'1',NULL,1,NULL,NULL,NULL),(558,NULL,2023,2,10,37,2,'1',NULL,1,NULL,NULL,NULL),(559,NULL,2023,2,13,37,3,'1',NULL,1,NULL,NULL,NULL),(560,NULL,2023,3,9,37,1,'2',NULL,1,NULL,NULL,NULL),(561,NULL,2023,3,10,37,2,'2',NULL,1,NULL,NULL,NULL),(562,NULL,2023,3,13,37,3,'2',NULL,1,NULL,NULL,NULL),(563,NULL,2023,4,10,37,1,'3',NULL,1,NULL,NULL,NULL),(564,NULL,2023,4,11,37,2,'3',NULL,1,NULL,NULL,NULL),(565,NULL,2023,4,12,37,3,'3',NULL,1,NULL,NULL,NULL),(566,NULL,2023,5,9,37,1,'4',NULL,1,NULL,NULL,NULL),(567,NULL,2023,5,10,37,2,'4',NULL,1,NULL,NULL,NULL),(568,NULL,2023,5,11,37,3,'4',NULL,1,NULL,NULL,NULL),(569,NULL,2023,6,9,37,1,'5',NULL,1,NULL,NULL,NULL),(570,NULL,2023,6,12,37,2,'5',NULL,1,NULL,NULL,NULL),(571,NULL,2023,6,13,37,3,'5',NULL,1,NULL,NULL,NULL),(572,NULL,2023,7,10,37,1,'6',NULL,1,NULL,NULL,NULL),(573,NULL,2023,7,11,37,2,'6',NULL,1,NULL,NULL,NULL),(574,NULL,2023,7,12,37,3,'6',NULL,1,NULL,NULL,NULL),(575,NULL,2023,8,9,37,1,'7',NULL,1,NULL,NULL,NULL),(576,NULL,2023,8,10,37,2,'7',NULL,1,NULL,NULL,NULL),(577,NULL,2023,8,11,37,3,'7',NULL,1,NULL,NULL,NULL),(578,NULL,2023,9,11,37,1,'8',NULL,1,NULL,NULL,NULL),(579,NULL,2023,9,12,37,2,'8',NULL,1,NULL,NULL,NULL),(580,NULL,2023,9,13,37,3,'8',NULL,1,NULL,NULL,NULL),(581,NULL,2023,10,9,37,1,'9',NULL,1,NULL,NULL,NULL),(582,NULL,2023,10,10,37,2,'9',NULL,1,NULL,NULL,NULL),(583,NULL,2023,10,11,37,3,'9',NULL,1,NULL,NULL,NULL),(584,NULL,2023,11,9,37,1,'10',NULL,1,NULL,NULL,NULL),(585,NULL,2023,11,10,37,2,'10',NULL,1,NULL,NULL,NULL),(586,NULL,2023,11,13,37,3,'10',NULL,1,NULL,NULL,NULL),(587,NULL,2023,12,11,37,1,'11',NULL,1,NULL,NULL,NULL),(588,NULL,2023,12,12,37,2,'11',NULL,1,NULL,NULL,NULL),(589,NULL,2023,12,13,37,3,'11',NULL,1,NULL,NULL,NULL),(590,NULL,2023,1,13,4,1,'Año 2022',NULL,1,NULL,NULL,NULL),(591,NULL,2023,1,16,4,2,'Año 2022',NULL,1,NULL,NULL,NULL),(592,NULL,2023,1,17,4,3,'Año 2022',NULL,1,NULL,NULL,NULL),(593,NULL,2023,2,13,4,1,'Año 2022',NULL,1,NULL,NULL,NULL),(594,NULL,2023,2,14,4,2,'Año 2022',NULL,1,NULL,NULL,NULL),(595,NULL,2023,2,15,4,3,'Año 2022',NULL,1,NULL,NULL,NULL),(596,NULL,2023,3,13,4,1,'Año 2022',NULL,1,NULL,NULL,NULL),(597,NULL,2023,3,14,4,2,'Año 2022',NULL,1,NULL,NULL,NULL),(598,NULL,2023,3,15,4,3,'Año 2022',NULL,1,NULL,NULL,NULL),(599,NULL,2023,4,13,4,1,'Año 2022',NULL,1,NULL,NULL,NULL),(600,NULL,2023,4,14,4,2,'Año 2022',NULL,1,NULL,NULL,NULL),(601,NULL,2023,4,17,4,3,'Año 2022',NULL,1,NULL,NULL,NULL),(602,NULL,2023,5,15,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(603,NULL,2023,5,16,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(604,NULL,2023,5,17,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(605,NULL,2023,6,13,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(606,NULL,2023,6,14,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(607,NULL,2023,6,15,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(608,NULL,2023,7,13,4,1,'Año 2023',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (609,NULL,2023,7,14,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(610,NULL,2023,7,17,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(611,NULL,2023,8,14,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(612,NULL,2023,8,15,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(613,NULL,2023,8,16,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(614,NULL,2023,9,13,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(615,NULL,2023,9,14,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(616,NULL,2023,9,15,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(617,NULL,2023,10,17,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(618,NULL,2023,10,18,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(619,NULL,2023,10,19,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(620,NULL,2023,11,13,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(621,NULL,2023,11,14,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(622,NULL,2023,11,15,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(623,NULL,2023,12,13,4,1,'Año 2023',NULL,1,NULL,NULL,NULL),(624,NULL,2023,12,14,4,2,'Año 2023',NULL,1,NULL,NULL,NULL),(625,NULL,2023,12,15,4,3,'Año 2023',NULL,1,NULL,NULL,NULL),(626,NULL,2023,1,13,16,1,'',NULL,1,NULL,NULL,NULL),(627,NULL,2023,1,16,16,2,'',NULL,1,NULL,NULL,NULL),(628,NULL,2023,1,17,16,3,'',NULL,1,NULL,NULL,NULL),(629,NULL,2023,2,13,16,1,'',NULL,1,NULL,NULL,NULL),(630,NULL,2023,2,14,16,2,'',NULL,1,NULL,NULL,NULL),(631,NULL,2023,2,15,16,3,'',NULL,1,NULL,NULL,NULL),(632,NULL,2023,3,13,16,1,'',NULL,1,NULL,NULL,NULL),(633,NULL,2023,3,14,16,2,'',NULL,1,NULL,NULL,NULL),(634,NULL,2023,3,15,16,3,'',NULL,1,NULL,NULL,NULL),(635,NULL,2023,4,13,16,1,'',NULL,1,NULL,NULL,NULL),(636,NULL,2023,4,14,16,2,'',NULL,1,NULL,NULL,NULL),(637,NULL,2023,4,17,16,3,'',NULL,1,NULL,NULL,NULL),(638,NULL,2023,5,15,16,1,'',NULL,1,NULL,NULL,NULL),(639,NULL,2023,5,16,16,2,'',NULL,1,NULL,NULL,NULL),(640,NULL,2023,5,17,16,3,'',NULL,1,NULL,NULL,NULL),(641,NULL,2023,6,13,16,1,'',NULL,1,NULL,NULL,NULL),(642,NULL,2023,6,14,16,2,'',NULL,1,NULL,NULL,NULL),(643,NULL,2023,6,15,16,3,'',NULL,1,NULL,NULL,NULL),(644,NULL,2023,7,13,16,1,'',NULL,1,NULL,NULL,NULL),(645,NULL,2023,7,14,16,2,'',NULL,1,NULL,NULL,NULL),(646,NULL,2023,7,17,16,3,'',NULL,1,NULL,NULL,NULL),(647,NULL,2023,8,14,16,1,'',NULL,1,NULL,NULL,NULL),(648,NULL,2023,8,15,16,2,'',NULL,1,NULL,NULL,NULL),(649,NULL,2023,8,16,16,3,'',NULL,1,NULL,NULL,NULL),(650,NULL,2023,9,13,16,1,'',NULL,1,NULL,NULL,NULL),(651,NULL,2023,9,14,16,2,'',NULL,1,NULL,NULL,NULL),(652,NULL,2023,9,15,16,3,'',NULL,1,NULL,NULL,NULL),(653,NULL,2023,10,17,16,1,'',NULL,1,NULL,NULL,NULL),(654,NULL,2023,10,18,16,2,'',NULL,1,NULL,NULL,NULL),(655,NULL,2023,10,19,16,3,'',NULL,1,NULL,NULL,NULL),(656,NULL,2023,11,13,16,1,'',NULL,1,NULL,NULL,NULL),(657,NULL,2023,11,14,16,2,'',NULL,1,NULL,NULL,NULL),(658,NULL,2023,11,15,16,3,'',NULL,1,NULL,NULL,NULL),(659,NULL,2023,12,13,16,1,'',NULL,1,NULL,NULL,NULL),(660,NULL,2023,12,14,16,2,'',NULL,1,NULL,NULL,NULL),(661,NULL,2023,12,15,16,3,'',NULL,1,NULL,NULL,NULL),(662,NULL,1999,1,0,5,1,'',NULL,1,NULL,NULL,NULL),(663,NULL,1999,1,0,5,2,'',NULL,1,NULL,NULL,NULL),(664,NULL,1999,1,0,5,3,'',NULL,1,NULL,NULL,NULL),(665,NULL,1999,2,0,5,1,'',NULL,1,NULL,NULL,NULL),(666,NULL,1999,2,0,5,2,'',NULL,1,NULL,NULL,NULL),(667,NULL,1999,2,0,5,3,'',NULL,1,NULL,NULL,NULL),(668,NULL,1999,3,0,5,1,'',NULL,1,NULL,NULL,NULL),(669,NULL,1999,3,0,5,2,'',NULL,1,NULL,NULL,NULL),(670,NULL,1999,3,0,5,3,'',NULL,1,NULL,NULL,NULL),(671,NULL,1999,4,0,5,1,'',NULL,1,NULL,NULL,NULL),(672,NULL,1999,4,0,5,2,'',NULL,1,NULL,NULL,NULL),(673,NULL,1999,4,0,5,3,'',NULL,1,NULL,NULL,NULL),(674,NULL,1999,5,0,5,1,'',NULL,1,NULL,NULL,NULL),(675,NULL,1999,5,0,5,2,'',NULL,1,NULL,NULL,NULL),(676,NULL,1999,5,0,5,3,'',NULL,1,NULL,NULL,NULL),(677,NULL,1999,6,0,5,1,'',NULL,1,NULL,NULL,NULL),(678,NULL,1999,6,0,5,2,'',NULL,1,NULL,NULL,NULL),(679,NULL,1999,6,0,5,3,'',NULL,1,NULL,NULL,NULL),(680,NULL,1999,7,0,5,1,'',NULL,1,NULL,NULL,NULL),(681,NULL,1999,7,0,5,2,'',NULL,1,NULL,NULL,NULL),(682,NULL,1999,7,0,5,3,'',NULL,1,NULL,NULL,NULL),(683,NULL,1999,8,0,5,1,'',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (684,NULL,1999,8,0,5,2,'',NULL,1,NULL,NULL,NULL),(685,NULL,1999,8,0,5,3,'',NULL,1,NULL,NULL,NULL),(686,NULL,1999,9,0,5,1,'',NULL,1,NULL,NULL,NULL),(687,NULL,1999,9,0,5,2,'',NULL,1,NULL,NULL,NULL),(688,NULL,1999,9,0,5,3,'',NULL,1,NULL,NULL,NULL),(689,NULL,1999,10,0,5,1,'',NULL,1,NULL,NULL,NULL),(690,NULL,1999,10,0,5,2,'',NULL,1,NULL,NULL,NULL),(691,NULL,1999,10,0,5,3,'',NULL,1,NULL,NULL,NULL),(692,NULL,1999,11,0,5,1,'',NULL,1,NULL,NULL,NULL),(693,NULL,1999,11,0,5,2,'',NULL,1,NULL,NULL,NULL),(694,NULL,1999,11,0,5,3,'',NULL,1,NULL,NULL,NULL),(695,NULL,1999,12,0,5,1,'',NULL,1,NULL,NULL,NULL),(696,NULL,1999,12,0,5,2,'',NULL,1,NULL,NULL,NULL),(697,NULL,1999,12,0,5,3,'',NULL,1,NULL,NULL,NULL),(698,NULL,2023,1,16,6,5,'12',NULL,1,NULL,NULL,NULL),(699,NULL,2023,1,17,6,6,'12',NULL,1,NULL,NULL,NULL),(700,NULL,2023,1,18,6,7,'12',NULL,1,NULL,NULL,NULL),(701,NULL,2023,1,19,6,8,'12',NULL,1,NULL,NULL,NULL),(702,NULL,2023,2,15,6,5,'1',NULL,1,NULL,NULL,NULL),(703,NULL,2023,2,16,6,6,'1',NULL,1,NULL,NULL,NULL),(704,NULL,2023,2,17,6,7,'1',NULL,1,NULL,NULL,NULL),(705,NULL,2023,2,22,6,8,'1',NULL,1,NULL,NULL,NULL),(706,NULL,2023,3,15,6,5,'2',NULL,1,NULL,NULL,NULL),(707,NULL,2023,3,16,6,6,'2',NULL,1,NULL,NULL,NULL),(708,NULL,2023,3,17,6,7,'2',NULL,1,NULL,NULL,NULL),(709,NULL,2023,3,20,6,8,'2',NULL,1,NULL,NULL,NULL),(710,NULL,2023,4,17,6,5,'3',NULL,1,NULL,NULL,NULL),(711,NULL,2023,4,18,6,6,'3',NULL,1,NULL,NULL,NULL),(712,NULL,2023,4,19,6,7,'3',NULL,1,NULL,NULL,NULL),(713,NULL,2023,4,20,6,8,'3',NULL,1,NULL,NULL,NULL),(714,NULL,2023,5,15,6,5,'4',NULL,1,NULL,NULL,NULL),(715,NULL,2023,5,16,6,6,'4',NULL,1,NULL,NULL,NULL),(716,NULL,2023,5,17,6,7,'4',NULL,1,NULL,NULL,NULL),(717,NULL,2023,5,18,6,8,'4',NULL,1,NULL,NULL,NULL),(718,NULL,2023,6,15,6,5,'5',NULL,1,NULL,NULL,NULL),(719,NULL,2023,6,16,6,6,'5',NULL,1,NULL,NULL,NULL),(720,NULL,2023,6,21,6,7,'5',NULL,1,NULL,NULL,NULL),(721,NULL,2023,6,22,6,8,'5',NULL,1,NULL,NULL,NULL),(722,NULL,2023,7,17,6,5,'6',NULL,1,NULL,NULL,NULL),(723,NULL,2023,7,18,6,6,'6',NULL,1,NULL,NULL,NULL),(724,NULL,2023,7,19,6,7,'6',NULL,1,NULL,NULL,NULL),(725,NULL,2023,7,20,6,8,'6',NULL,1,NULL,NULL,NULL),(726,NULL,2023,8,15,6,5,'7',NULL,1,NULL,NULL,NULL),(727,NULL,2023,8,16,6,6,'7',NULL,1,NULL,NULL,NULL),(728,NULL,2023,8,17,6,7,'7',NULL,1,NULL,NULL,NULL),(729,NULL,2023,8,18,6,8,'7',NULL,1,NULL,NULL,NULL),(730,NULL,2023,9,15,6,5,'8',NULL,1,NULL,NULL,NULL),(731,NULL,2023,9,18,6,6,'8',NULL,1,NULL,NULL,NULL),(732,NULL,2023,9,19,6,7,'8',NULL,1,NULL,NULL,NULL),(733,NULL,2023,9,20,6,8,'8',NULL,1,NULL,NULL,NULL),(734,NULL,2023,10,17,6,5,'9',NULL,1,NULL,NULL,NULL),(735,NULL,2023,10,18,6,6,'9',NULL,1,NULL,NULL,NULL),(736,NULL,2023,10,19,6,7,'9',NULL,1,NULL,NULL,NULL),(737,NULL,2023,10,20,6,8,'9',NULL,1,NULL,NULL,NULL),(738,NULL,2023,11,15,6,5,'10',NULL,1,NULL,NULL,NULL),(739,NULL,2023,11,16,6,6,'10',NULL,1,NULL,NULL,NULL),(740,NULL,2023,11,17,6,7,'10',NULL,1,NULL,NULL,NULL),(741,NULL,2023,11,21,6,8,'10',NULL,1,NULL,NULL,NULL),(742,NULL,2023,12,15,6,5,'11',NULL,1,NULL,NULL,NULL),(743,NULL,2023,12,18,6,6,'11',NULL,1,NULL,NULL,NULL),(744,NULL,2023,12,19,6,7,'11',NULL,1,NULL,NULL,NULL),(745,NULL,2023,12,20,6,8,'11',NULL,1,NULL,NULL,NULL),(746,NULL,2023,5,15,22,5,'Anual',NULL,1,NULL,NULL,NULL),(747,NULL,2023,1,18,7,9,'12',NULL,1,NULL,NULL,NULL),(748,NULL,2023,1,19,7,10,'12',NULL,1,NULL,NULL,NULL),(749,NULL,2023,1,20,7,11,'12',NULL,1,NULL,NULL,NULL),(750,NULL,2023,1,23,7,7,'12',NULL,1,NULL,NULL,NULL),(751,NULL,2023,1,24,7,8,'12',NULL,1,NULL,NULL,NULL),(752,NULL,2023,2,22,7,9,'1',NULL,1,NULL,NULL,NULL),(753,NULL,2023,2,23,7,10,'1',NULL,1,NULL,NULL,NULL),(754,NULL,2023,2,24,7,11,'1',NULL,1,NULL,NULL,NULL),(755,NULL,2023,2,27,7,7,'1',NULL,1,NULL,NULL,NULL),(756,NULL,2023,2,28,7,8,'1',NULL,1,NULL,NULL,NULL),(757,NULL,2023,3,20,7,9,'2',NULL,1,NULL,NULL,NULL),(758,NULL,2023,3,21,7,10,'2',NULL,1,NULL,NULL,NULL),(759,NULL,2023,3,22,7,11,'2',NULL,1,NULL,NULL,NULL),(760,NULL,2023,3,23,7,7,'2',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (761,NULL,2023,3,27,7,8,'2',NULL,1,NULL,NULL,NULL),(762,NULL,2023,4,18,7,9,'3',NULL,1,NULL,NULL,NULL),(763,NULL,2023,4,19,7,10,'3',NULL,1,NULL,NULL,NULL),(764,NULL,2023,4,20,7,11,'3',NULL,1,NULL,NULL,NULL),(765,NULL,2023,4,21,7,7,'3',NULL,1,NULL,NULL,NULL),(766,NULL,2023,4,24,7,8,'3',NULL,1,NULL,NULL,NULL),(767,NULL,2023,5,18,7,9,'4',NULL,1,NULL,NULL,NULL),(768,NULL,2023,5,19,7,10,'4',NULL,1,NULL,NULL,NULL),(769,NULL,2023,5,22,7,11,'4',NULL,1,NULL,NULL,NULL),(770,NULL,2023,5,23,7,7,'4',NULL,1,NULL,NULL,NULL),(771,NULL,2023,5,24,7,8,'4',NULL,1,NULL,NULL,NULL),(772,NULL,2023,6,21,7,9,'5',NULL,1,NULL,NULL,NULL),(773,NULL,2023,6,22,7,10,'5',NULL,1,NULL,NULL,NULL),(774,NULL,2023,6,23,7,11,'5',NULL,1,NULL,NULL,NULL),(775,NULL,2023,6,26,7,7,'5',NULL,1,NULL,NULL,NULL),(776,NULL,2023,6,27,7,8,'5',NULL,1,NULL,NULL,NULL),(777,NULL,2023,7,18,7,9,'6',NULL,1,NULL,NULL,NULL),(778,NULL,2023,7,19,7,10,'6',NULL,1,NULL,NULL,NULL),(779,NULL,2023,7,20,7,11,'6',NULL,1,NULL,NULL,NULL),(780,NULL,2023,7,21,7,7,'6',NULL,1,NULL,NULL,NULL),(781,NULL,2023,7,24,7,8,'6',NULL,1,NULL,NULL,NULL),(782,NULL,2023,8,18,7,9,'7',NULL,1,NULL,NULL,NULL),(783,NULL,2023,8,22,7,10,'7',NULL,1,NULL,NULL,NULL),(784,NULL,2023,8,23,7,11,'7',NULL,1,NULL,NULL,NULL),(785,NULL,2023,8,24,7,7,'7',NULL,1,NULL,NULL,NULL),(786,NULL,2023,8,25,7,8,'7',NULL,1,NULL,NULL,NULL),(787,NULL,2023,9,18,7,9,'8',NULL,1,NULL,NULL,NULL),(788,NULL,2023,9,19,7,10,'8',NULL,1,NULL,NULL,NULL),(789,NULL,2023,9,20,7,11,'8',NULL,1,NULL,NULL,NULL),(790,NULL,2023,9,21,7,7,'8',NULL,1,NULL,NULL,NULL),(791,NULL,2023,9,22,7,8,'8',NULL,1,NULL,NULL,NULL),(792,NULL,2023,10,18,7,9,'9',NULL,1,NULL,NULL,NULL),(793,NULL,2023,10,19,7,10,'9',NULL,1,NULL,NULL,NULL),(794,NULL,2023,10,20,7,11,'9',NULL,1,NULL,NULL,NULL),(795,NULL,2023,10,23,7,7,'9',NULL,1,NULL,NULL,NULL),(796,NULL,2023,10,24,7,8,'9',NULL,1,NULL,NULL,NULL),(797,NULL,2023,11,21,7,9,'10',NULL,1,NULL,NULL,NULL),(798,NULL,2023,11,22,7,10,'10',NULL,1,NULL,NULL,NULL),(799,NULL,2023,11,23,7,11,'10',NULL,1,NULL,NULL,NULL),(800,NULL,2023,11,24,7,7,'10',NULL,1,NULL,NULL,NULL),(801,NULL,2023,11,27,7,8,'10',NULL,1,NULL,NULL,NULL),(802,NULL,2023,12,18,7,9,'11',NULL,1,NULL,NULL,NULL),(803,NULL,2023,12,19,7,10,'11',NULL,1,NULL,NULL,NULL),(804,NULL,2023,12,20,7,11,'11',NULL,1,NULL,NULL,NULL),(805,NULL,2023,12,21,7,7,'11',NULL,1,NULL,NULL,NULL),(806,NULL,2023,12,22,7,8,'11',NULL,1,NULL,NULL,NULL),(807,NULL,2023,1,18,23,9,'12',NULL,1,NULL,NULL,NULL),(808,NULL,2023,1,19,23,10,'12',NULL,1,NULL,NULL,NULL),(809,NULL,2023,1,20,23,11,'12',NULL,1,NULL,NULL,NULL),(810,NULL,2023,1,23,23,7,'12',NULL,1,NULL,NULL,NULL),(811,NULL,2023,1,24,23,8,'12',NULL,1,NULL,NULL,NULL),(812,NULL,2023,2,22,23,9,'1',NULL,1,NULL,NULL,NULL),(813,NULL,2023,2,23,23,10,'1',NULL,1,NULL,NULL,NULL),(814,NULL,2023,2,24,23,11,'1',NULL,1,NULL,NULL,NULL),(815,NULL,2023,2,27,23,7,'1',NULL,1,NULL,NULL,NULL),(816,NULL,2023,2,28,23,8,'1',NULL,1,NULL,NULL,NULL),(817,NULL,2023,3,20,23,9,'2',NULL,1,NULL,NULL,NULL),(818,NULL,2023,3,21,23,10,'2',NULL,1,NULL,NULL,NULL),(819,NULL,2023,3,22,23,11,'2',NULL,1,NULL,NULL,NULL),(820,NULL,2023,3,23,23,7,'2',NULL,1,NULL,NULL,NULL),(821,NULL,2023,3,27,23,8,'2',NULL,1,NULL,NULL,NULL),(822,NULL,2023,4,18,23,9,'3',NULL,1,NULL,NULL,NULL),(823,NULL,2023,4,19,23,10,'3',NULL,1,NULL,NULL,NULL),(824,NULL,2023,4,20,23,11,'3',NULL,1,NULL,NULL,NULL),(825,NULL,2023,4,21,23,7,'3',NULL,1,NULL,NULL,NULL),(826,NULL,2023,4,24,23,8,'3',NULL,1,NULL,NULL,NULL),(827,NULL,2023,5,18,23,9,'4',NULL,1,NULL,NULL,NULL),(828,NULL,2023,5,19,23,10,'4',NULL,1,NULL,NULL,NULL),(829,NULL,2023,5,22,23,11,'4',NULL,1,NULL,NULL,NULL),(830,NULL,2023,5,23,23,7,'4',NULL,1,NULL,NULL,NULL),(831,NULL,2023,5,24,23,8,'4',NULL,1,NULL,NULL,NULL),(832,NULL,2023,6,21,23,9,'5',NULL,1,NULL,NULL,NULL),(833,NULL,2023,6,22,23,10,'5',NULL,1,NULL,NULL,NULL),(834,NULL,2023,6,23,23,11,'5',NULL,1,NULL,NULL,NULL),(835,NULL,2023,6,26,23,7,'5',NULL,1,NULL,NULL,NULL),(836,NULL,2023,6,27,23,8,'5',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (837,NULL,2023,7,18,23,9,'6',NULL,1,NULL,NULL,NULL),(838,NULL,2023,7,19,23,10,'6',NULL,1,NULL,NULL,NULL),(839,NULL,2023,7,20,23,11,'6',NULL,1,NULL,NULL,NULL),(840,NULL,2023,7,21,23,7,'6',NULL,1,NULL,NULL,NULL),(841,NULL,2023,7,24,23,8,'6',NULL,1,NULL,NULL,NULL),(842,NULL,2023,8,18,23,9,'7',NULL,1,NULL,NULL,NULL),(843,NULL,2023,8,22,23,10,'7',NULL,1,NULL,NULL,NULL),(844,NULL,2023,8,23,23,11,'7',NULL,1,NULL,NULL,NULL),(845,NULL,2023,8,24,23,7,'7',NULL,1,NULL,NULL,NULL),(846,NULL,2023,8,25,23,8,'7',NULL,1,NULL,NULL,NULL),(847,NULL,2023,9,18,23,9,'8',NULL,1,NULL,NULL,NULL),(848,NULL,2023,9,19,23,10,'8',NULL,1,NULL,NULL,NULL),(849,NULL,2023,9,20,23,11,'8',NULL,1,NULL,NULL,NULL),(850,NULL,2023,9,21,23,7,'8',NULL,1,NULL,NULL,NULL),(851,NULL,2023,9,22,23,8,'8',NULL,1,NULL,NULL,NULL),(852,NULL,2023,10,18,23,9,'9',NULL,1,NULL,NULL,NULL),(853,NULL,2023,10,19,23,10,'9',NULL,1,NULL,NULL,NULL),(854,NULL,2023,10,20,23,11,'9',NULL,1,NULL,NULL,NULL),(855,NULL,2023,10,23,23,7,'9',NULL,1,NULL,NULL,NULL),(856,NULL,2023,10,24,23,8,'9',NULL,1,NULL,NULL,NULL),(857,NULL,2023,11,21,23,9,'10',NULL,1,NULL,NULL,NULL),(858,NULL,2023,11,22,23,10,'10',NULL,1,NULL,NULL,NULL),(859,NULL,2023,11,23,23,11,'10',NULL,1,NULL,NULL,NULL),(860,NULL,2023,11,24,23,7,'10',NULL,1,NULL,NULL,NULL),(861,NULL,2023,11,27,23,8,'10',NULL,1,NULL,NULL,NULL),(862,NULL,2023,12,18,23,9,'11',NULL,1,NULL,NULL,NULL),(863,NULL,2023,12,19,23,10,'11',NULL,1,NULL,NULL,NULL),(864,NULL,2023,12,20,23,11,'11',NULL,1,NULL,NULL,NULL),(865,NULL,2023,12,21,23,7,'11',NULL,1,NULL,NULL,NULL),(866,NULL,2023,12,22,23,8,'11',NULL,1,NULL,NULL,NULL),(867,NULL,2023,1,9,8,1,'12',NULL,1,NULL,NULL,NULL),(868,NULL,2023,1,10,8,2,'12',NULL,1,NULL,NULL,NULL),(869,NULL,2023,1,11,8,3,'12',NULL,1,NULL,NULL,NULL),(870,NULL,2023,2,9,8,1,'1',NULL,1,NULL,NULL,NULL),(871,NULL,2023,2,10,8,2,'1',NULL,1,NULL,NULL,NULL),(872,NULL,2023,2,13,8,3,'1',NULL,1,NULL,NULL,NULL),(873,NULL,2023,3,9,8,1,'2',NULL,1,NULL,NULL,NULL),(874,NULL,2023,3,10,8,2,'2',NULL,1,NULL,NULL,NULL),(875,NULL,2023,3,13,8,3,'2',NULL,1,NULL,NULL,NULL),(876,NULL,2023,4,10,8,1,'3',NULL,1,NULL,NULL,NULL),(877,NULL,2023,4,11,8,2,'3',NULL,1,NULL,NULL,NULL),(878,NULL,2023,4,12,8,3,'3',NULL,1,NULL,NULL,NULL),(879,NULL,2023,5,9,8,1,'4',NULL,1,NULL,NULL,NULL),(880,NULL,2023,5,10,8,2,'4',NULL,1,NULL,NULL,NULL),(881,NULL,2023,5,11,8,3,'4',NULL,1,NULL,NULL,NULL),(882,NULL,2023,6,9,8,1,'5',NULL,1,NULL,NULL,NULL),(883,NULL,2023,6,12,8,2,'5',NULL,1,NULL,NULL,NULL),(884,NULL,2023,6,13,8,3,'5',NULL,1,NULL,NULL,NULL),(885,NULL,2023,7,10,8,1,'6',NULL,1,NULL,NULL,NULL),(886,NULL,2023,7,11,8,2,'6',NULL,1,NULL,NULL,NULL),(887,NULL,2023,7,12,8,3,'6',NULL,1,NULL,NULL,NULL),(888,NULL,2023,8,9,8,1,'7',NULL,1,NULL,NULL,NULL),(889,NULL,2023,8,10,8,2,'7',NULL,1,NULL,NULL,NULL),(890,NULL,2023,8,11,8,3,'7',NULL,1,NULL,NULL,NULL),(891,NULL,2023,9,11,8,1,'8',NULL,1,NULL,NULL,NULL),(892,NULL,2023,9,12,8,2,'8',NULL,1,NULL,NULL,NULL),(893,NULL,2023,9,13,8,3,'8',NULL,1,NULL,NULL,NULL),(894,NULL,2023,10,9,8,1,'9',NULL,1,NULL,NULL,NULL),(895,NULL,2023,10,10,8,2,'9',NULL,1,NULL,NULL,NULL),(896,NULL,2023,10,11,8,3,'9',NULL,1,NULL,NULL,NULL),(897,NULL,2023,11,9,8,1,'10',NULL,1,NULL,NULL,NULL),(898,NULL,2023,11,10,8,2,'10',NULL,1,NULL,NULL,NULL),(899,NULL,2023,11,13,8,3,'10',NULL,1,NULL,NULL,NULL),(900,NULL,2023,12,11,8,1,'11',NULL,1,NULL,NULL,NULL),(901,NULL,2023,12,12,8,2,'11',NULL,1,NULL,NULL,NULL),(902,NULL,2023,12,13,8,3,'11',NULL,1,NULL,NULL,NULL),(903,NULL,2023,6,12,9,1,'',NULL,1,NULL,NULL,NULL),(904,NULL,2023,6,13,9,2,'',NULL,1,NULL,NULL,NULL),(905,NULL,2023,6,14,9,3,'',NULL,1,NULL,NULL,NULL),(906,NULL,2023,6,12,17,1,'',NULL,1,NULL,NULL,NULL),(907,NULL,2023,6,13,17,2,'',NULL,1,NULL,NULL,NULL),(908,NULL,2023,6,14,17,3,'',NULL,1,NULL,NULL,NULL),(909,NULL,2023,7,28,10,1,'',NULL,1,NULL,NULL,NULL),(910,NULL,2023,7,31,10,2,'',NULL,1,NULL,NULL,NULL),(911,NULL,2023,8,1,10,3,'',NULL,1,NULL,NULL,NULL),(912,NULL,2024,1,15,11,9,'12',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (913,NULL,2024,1,16,11,10,'12',NULL,1,NULL,NULL,NULL),(914,NULL,2024,1,17,11,11,'12',NULL,1,NULL,NULL,NULL),(915,NULL,2024,1,18,11,7,'12',NULL,1,NULL,NULL,NULL),(916,NULL,2024,1,19,11,8,'12',NULL,1,NULL,NULL,NULL),(917,NULL,2023,2,13,11,9,'1',NULL,1,NULL,NULL,NULL),(918,NULL,2023,2,14,11,10,'1',NULL,1,NULL,NULL,NULL),(919,NULL,2023,2,15,11,11,'1',NULL,1,NULL,NULL,NULL),(920,NULL,2023,2,16,11,7,'1',NULL,1,NULL,NULL,NULL),(921,NULL,2023,2,17,11,8,'1',NULL,1,NULL,NULL,NULL),(922,NULL,2023,3,13,11,9,'2',NULL,1,NULL,NULL,NULL),(923,NULL,2023,3,14,11,10,'2',NULL,1,NULL,NULL,NULL),(924,NULL,2023,3,15,11,11,'2',NULL,1,NULL,NULL,NULL),(925,NULL,2023,3,16,11,7,'2',NULL,1,NULL,NULL,NULL),(926,NULL,2023,3,17,11,8,'2',NULL,1,NULL,NULL,NULL),(927,NULL,2023,4,11,11,9,'3',NULL,1,NULL,NULL,NULL),(928,NULL,2023,4,12,11,10,'3',NULL,1,NULL,NULL,NULL),(929,NULL,2023,4,13,11,11,'3',NULL,1,NULL,NULL,NULL),(930,NULL,2023,4,14,11,7,'3',NULL,1,NULL,NULL,NULL),(931,NULL,2023,4,17,11,8,'3',NULL,1,NULL,NULL,NULL),(932,NULL,2023,5,15,11,9,'4',NULL,1,NULL,NULL,NULL),(933,NULL,2023,5,16,11,10,'4',NULL,1,NULL,NULL,NULL),(934,NULL,2023,5,17,11,11,'4',NULL,1,NULL,NULL,NULL),(935,NULL,2023,5,18,11,7,'4',NULL,1,NULL,NULL,NULL),(936,NULL,2023,5,19,11,8,'4',NULL,1,NULL,NULL,NULL),(937,NULL,2023,6,12,11,9,'5',NULL,1,NULL,NULL,NULL),(938,NULL,2023,6,13,11,10,'5',NULL,1,NULL,NULL,NULL),(939,NULL,2023,6,14,11,11,'5',NULL,1,NULL,NULL,NULL),(940,NULL,2023,6,15,11,7,'5',NULL,1,NULL,NULL,NULL),(941,NULL,2023,6,16,11,8,'5',NULL,1,NULL,NULL,NULL),(942,NULL,2023,7,11,11,9,'6',NULL,1,NULL,NULL,NULL),(943,NULL,2023,7,12,11,10,'6',NULL,1,NULL,NULL,NULL),(944,NULL,2023,7,13,11,11,'6',NULL,1,NULL,NULL,NULL),(945,NULL,2023,7,14,11,7,'6',NULL,1,NULL,NULL,NULL),(946,NULL,2023,7,15,11,8,'6',NULL,1,NULL,NULL,NULL),(947,NULL,2023,8,11,11,9,'7',NULL,1,NULL,NULL,NULL),(948,NULL,2023,8,14,11,10,'7',NULL,1,NULL,NULL,NULL),(949,NULL,2023,8,15,11,11,'7',NULL,1,NULL,NULL,NULL),(950,NULL,2023,8,16,11,7,'7',NULL,1,NULL,NULL,NULL),(951,NULL,2023,8,18,11,8,'7',NULL,1,NULL,NULL,NULL),(952,NULL,2023,9,11,11,9,'8',NULL,1,NULL,NULL,NULL),(953,NULL,2023,9,12,11,10,'8',NULL,1,NULL,NULL,NULL),(954,NULL,2023,9,13,11,11,'8',NULL,1,NULL,NULL,NULL),(955,NULL,2023,9,14,11,7,'8',NULL,1,NULL,NULL,NULL),(956,NULL,2023,9,15,11,8,'8',NULL,1,NULL,NULL,NULL),(957,NULL,2023,10,11,11,9,'9',NULL,1,NULL,NULL,NULL),(958,NULL,2023,10,12,11,10,'9',NULL,1,NULL,NULL,NULL),(959,NULL,2023,10,17,11,11,'9',NULL,1,NULL,NULL,NULL),(960,NULL,2023,10,18,11,7,'9',NULL,1,NULL,NULL,NULL),(961,NULL,2023,10,19,11,8,'9',NULL,1,NULL,NULL,NULL),(962,NULL,2023,11,13,11,9,'10',NULL,1,NULL,NULL,NULL),(963,NULL,2023,11,14,11,10,'10',NULL,1,NULL,NULL,NULL),(964,NULL,2023,11,15,11,11,'10',NULL,1,NULL,NULL,NULL),(965,NULL,2023,11,16,11,7,'10',NULL,1,NULL,NULL,NULL),(966,NULL,2023,11,17,11,8,'10',NULL,1,NULL,NULL,NULL),(967,NULL,2023,12,11,11,9,'11',NULL,1,NULL,NULL,NULL),(968,NULL,2023,12,12,11,10,'11',NULL,1,NULL,NULL,NULL),(969,NULL,2023,12,13,11,11,'11',NULL,1,NULL,NULL,NULL),(970,NULL,2023,12,14,11,7,'11',NULL,1,NULL,NULL,NULL),(971,NULL,2023,12,15,11,8,'11',NULL,1,NULL,NULL,NULL),(972,NULL,2018,8,21,20,9,'Anual',NULL,0,NULL,NULL,NULL),(973,NULL,2018,8,22,20,10,'Anual',NULL,0,NULL,NULL,NULL),(974,NULL,2018,8,23,20,11,'Anual',NULL,0,NULL,NULL,NULL),(975,NULL,2018,8,24,20,7,'Anual',NULL,0,NULL,NULL,NULL),(976,NULL,2018,8,27,20,8,'Anual',NULL,0,NULL,NULL,NULL),(977,NULL,2023,2,22,12,12,'1',NULL,1,NULL,NULL,NULL),(978,NULL,2023,2,23,12,13,'1',NULL,1,NULL,NULL,NULL),(979,NULL,2023,2,24,12,14,'1',NULL,1,NULL,NULL,NULL),(980,NULL,2023,2,27,12,15,'1',NULL,1,NULL,NULL,NULL),(981,NULL,2023,2,28,12,16,'1',NULL,1,NULL,NULL,NULL),(982,NULL,2023,2,1,12,17,'1',NULL,1,NULL,NULL,NULL),(983,NULL,2023,3,2,12,18,'1',NULL,1,NULL,NULL,NULL),(984,NULL,2023,3,3,12,19,'1',NULL,1,NULL,NULL,NULL),(985,NULL,2023,3,6,12,20,'1',NULL,1,NULL,NULL,NULL),(986,NULL,2023,3,7,12,21,'1',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (987,NULL,2023,3,20,12,12,'2',NULL,1,NULL,NULL,NULL),(988,NULL,2023,3,21,12,13,'2',NULL,1,NULL,NULL,NULL),(989,NULL,2023,3,22,12,14,'2',NULL,1,NULL,NULL,NULL),(990,NULL,2023,3,23,12,15,'2',NULL,1,NULL,NULL,NULL),(991,NULL,2023,2,27,12,16,'2',NULL,1,NULL,NULL,NULL),(992,NULL,2023,3,28,12,17,'2',NULL,1,NULL,NULL,NULL),(993,NULL,2023,3,29,12,18,'2',NULL,1,NULL,NULL,NULL),(994,NULL,2023,3,30,12,19,'2',NULL,1,NULL,NULL,NULL),(995,NULL,2023,3,31,12,20,'2',NULL,1,NULL,NULL,NULL),(996,NULL,2023,4,3,12,21,'2',NULL,1,NULL,NULL,NULL),(997,NULL,2023,4,18,12,12,'3',NULL,1,NULL,NULL,NULL),(998,NULL,2023,4,19,12,13,'3',NULL,1,NULL,NULL,NULL),(999,NULL,2023,4,20,12,14,'3',NULL,1,NULL,NULL,NULL),(1000,NULL,2023,4,21,12,15,'3',NULL,1,NULL,NULL,NULL),(1001,NULL,2023,4,24,12,16,'3',NULL,1,NULL,NULL,NULL),(1002,NULL,2023,4,25,12,17,'3',NULL,1,NULL,NULL,NULL),(1003,NULL,2023,4,26,12,18,'3',NULL,1,NULL,NULL,NULL),(1004,NULL,2023,4,27,12,19,'3',NULL,1,NULL,NULL,NULL),(1005,NULL,2023,4,28,12,20,'3',NULL,1,NULL,NULL,NULL),(1006,NULL,2023,4,2,12,21,'3',NULL,1,NULL,NULL,NULL),(1007,NULL,2023,5,18,12,12,'4',NULL,1,NULL,NULL,NULL),(1008,NULL,2023,5,19,12,13,'4',NULL,1,NULL,NULL,NULL),(1009,NULL,2023,5,22,12,14,'4',NULL,1,NULL,NULL,NULL),(1010,NULL,2023,5,23,12,15,'4',NULL,1,NULL,NULL,NULL),(1011,NULL,2023,5,24,12,16,'4',NULL,1,NULL,NULL,NULL),(1012,NULL,2023,5,29,12,17,'4',NULL,1,NULL,NULL,NULL),(1013,NULL,2023,5,30,12,18,'4',NULL,1,NULL,NULL,NULL),(1014,NULL,2023,5,31,12,19,'4',NULL,1,NULL,NULL,NULL),(1015,NULL,2023,5,1,12,20,'4',NULL,1,NULL,NULL,NULL),(1016,NULL,2023,6,2,12,21,'4',NULL,1,NULL,NULL,NULL),(1017,NULL,2023,6,21,12,12,'5',NULL,1,NULL,NULL,NULL),(1018,NULL,2023,6,22,12,13,'5',NULL,1,NULL,NULL,NULL),(1019,NULL,2023,6,23,12,14,'5',NULL,1,NULL,NULL,NULL),(1020,NULL,2023,6,26,12,15,'5',NULL,1,NULL,NULL,NULL),(1021,NULL,2023,6,27,12,16,'5',NULL,1,NULL,NULL,NULL),(1022,NULL,2023,6,28,12,17,'5',NULL,1,NULL,NULL,NULL),(1023,NULL,2023,6,29,12,18,'5',NULL,1,NULL,NULL,NULL),(1024,NULL,2023,6,30,12,19,'5',NULL,1,NULL,NULL,NULL),(1025,NULL,2023,7,3,12,20,'5',NULL,1,NULL,NULL,NULL),(1026,NULL,2023,7,4,12,21,'5',NULL,1,NULL,NULL,NULL),(1027,NULL,2023,7,18,12,12,'6',NULL,1,NULL,NULL,NULL),(1028,NULL,2023,7,19,12,13,'6',NULL,1,NULL,NULL,NULL),(1029,NULL,2023,7,20,12,14,'6',NULL,1,NULL,NULL,NULL),(1030,NULL,2023,7,21,12,15,'6',NULL,1,NULL,NULL,NULL),(1031,NULL,2023,7,24,12,16,'6',NULL,1,NULL,NULL,NULL),(1032,NULL,2023,7,25,12,17,'6',NULL,1,NULL,NULL,NULL),(1033,NULL,2023,7,26,12,18,'6',NULL,1,NULL,NULL,NULL),(1034,NULL,2023,7,27,12,19,'6',NULL,1,NULL,NULL,NULL),(1035,NULL,2023,7,28,12,20,'6',NULL,1,NULL,NULL,NULL),(1036,NULL,2023,7,31,12,21,'6',NULL,1,NULL,NULL,NULL),(1037,NULL,2023,8,18,12,12,'7',NULL,1,NULL,NULL,NULL),(1038,NULL,2023,8,22,12,13,'7',NULL,1,NULL,NULL,NULL),(1039,NULL,2023,8,23,12,14,'7',NULL,1,NULL,NULL,NULL),(1040,NULL,2023,8,24,12,15,'7',NULL,1,NULL,NULL,NULL),(1041,NULL,2023,8,25,12,16,'7',NULL,1,NULL,NULL,NULL),(1042,NULL,2023,8,28,12,17,'7',NULL,1,NULL,NULL,NULL),(1043,NULL,2023,8,29,12,18,'7',NULL,1,NULL,NULL,NULL),(1044,NULL,2023,8,30,12,19,'7',NULL,1,NULL,NULL,NULL),(1045,NULL,2023,8,31,12,20,'7',NULL,1,NULL,NULL,NULL),(1046,NULL,2023,8,1,12,21,'7',NULL,1,NULL,NULL,NULL),(1047,NULL,2023,9,18,12,12,'8',NULL,1,NULL,NULL,NULL),(1048,NULL,2023,9,19,12,13,'8',NULL,1,NULL,NULL,NULL),(1049,NULL,2023,9,20,12,14,'8',NULL,1,NULL,NULL,NULL),(1050,NULL,2023,9,21,12,15,'8',NULL,1,NULL,NULL,NULL),(1051,NULL,2023,9,22,12,16,'8',NULL,1,NULL,NULL,NULL),(1052,NULL,2023,9,25,12,17,'8',NULL,1,NULL,NULL,NULL),(1053,NULL,2023,9,26,12,18,'8',NULL,1,NULL,NULL,NULL),(1054,NULL,2023,9,27,12,19,'8',NULL,1,NULL,NULL,NULL),(1055,NULL,2023,9,28,12,20,'8',NULL,1,NULL,NULL,NULL),(1056,NULL,2023,9,29,12,21,'8',NULL,1,NULL,NULL,NULL),(1057,NULL,2023,10,18,12,12,'9',NULL,1,NULL,NULL,NULL),(1058,NULL,2023,10,19,12,13,'9',NULL,1,NULL,NULL,NULL),(1059,NULL,2023,10,23,12,14,'9',NULL,1,NULL,NULL,NULL),(1060,NULL,2023,10,24,12,15,'9',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1061,NULL,2023,10,25,12,16,'9',NULL,1,NULL,NULL,NULL),(1062,NULL,2023,10,26,12,17,'9',NULL,1,NULL,NULL,NULL),(1063,NULL,2023,10,27,12,18,'9',NULL,1,NULL,NULL,NULL),(1064,NULL,2023,10,30,12,19,'9',NULL,1,NULL,NULL,NULL),(1065,NULL,2023,10,31,12,20,'9',NULL,1,NULL,NULL,NULL),(1066,NULL,2023,10,1,12,21,'9',NULL,1,NULL,NULL,NULL),(1067,NULL,2023,11,21,12,12,'10',NULL,1,NULL,NULL,NULL),(1068,NULL,2023,11,22,12,13,'10',NULL,1,NULL,NULL,NULL),(1069,NULL,2023,11,23,12,14,'10',NULL,1,NULL,NULL,NULL),(1070,NULL,2023,11,24,12,15,'10',NULL,1,NULL,NULL,NULL),(1071,NULL,2023,11,27,12,16,'10',NULL,1,NULL,NULL,NULL),(1072,NULL,2023,11,28,12,17,'10',NULL,1,NULL,NULL,NULL),(1073,NULL,2023,11,29,12,18,'10',NULL,1,NULL,NULL,NULL),(1074,NULL,2023,11,30,12,19,'10',NULL,1,NULL,NULL,NULL),(1075,NULL,2023,12,1,12,20,'10',NULL,1,NULL,NULL,NULL),(1076,NULL,2023,12,4,12,21,'10',NULL,1,NULL,NULL,NULL),(1077,NULL,2023,12,18,12,12,'11',NULL,1,NULL,NULL,NULL),(1078,NULL,2023,12,19,12,13,'11',NULL,1,NULL,NULL,NULL),(1079,NULL,2023,12,20,12,14,'11',NULL,1,NULL,NULL,NULL),(1080,NULL,2023,12,21,12,15,'11',NULL,1,NULL,NULL,NULL),(1081,NULL,2023,12,22,12,16,'11',NULL,1,NULL,NULL,NULL),(1082,NULL,2023,12,26,12,17,'11',NULL,1,NULL,NULL,NULL),(1083,NULL,2023,12,27,12,18,'11',NULL,1,NULL,NULL,NULL),(1084,NULL,2023,12,28,12,19,'11',NULL,1,NULL,NULL,NULL),(1085,NULL,2023,12,29,12,20,'11',NULL,1,NULL,NULL,NULL),(1086,NULL,2023,12,2,12,21,'11',NULL,1,NULL,NULL,NULL),(1087,NULL,2024,1,18,12,12,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1088,NULL,2024,1,19,12,13,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1089,NULL,2024,1,22,12,14,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1090,NULL,2024,1,23,12,15,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1091,NULL,2024,1,24,12,16,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1092,NULL,2024,1,25,12,17,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1093,NULL,2024,1,26,12,18,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1094,NULL,2024,1,29,12,19,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1095,NULL,2024,1,30,12,20,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1096,NULL,2024,1,31,12,21,'Anticipo 12 Año 2023',NULL,1,NULL,NULL,NULL),(1097,NULL,2023,4,10,21,12,'Anual',NULL,1,NULL,NULL,NULL),(1098,NULL,2023,4,11,21,13,'Anual',NULL,1,NULL,NULL,NULL),(1099,NULL,2023,4,12,21,14,'Anual',NULL,1,NULL,NULL,NULL),(1100,NULL,2023,4,13,21,15,'Anual',NULL,1,NULL,NULL,NULL),(1101,NULL,2023,4,14,21,16,'Anual',NULL,1,NULL,NULL,NULL),(1102,NULL,2023,4,17,21,17,'Anual',NULL,1,NULL,NULL,NULL),(1103,NULL,2023,4,18,21,18,'Anual',NULL,1,NULL,NULL,NULL),(1104,NULL,2023,4,19,21,19,'Anual',NULL,1,NULL,NULL,NULL),(1105,NULL,2023,4,20,21,20,'Anual',NULL,1,NULL,NULL,NULL),(1106,NULL,2023,4,21,21,21,'Anual',NULL,1,NULL,NULL,NULL),(1107,NULL,2023,1,17,13,9,'Cuota 6',NULL,1,NULL,NULL,NULL),(1108,NULL,2023,1,18,13,10,'Cuota 6',NULL,1,NULL,NULL,NULL),(1109,NULL,2023,1,19,13,11,'Cuota 6',NULL,1,NULL,NULL,NULL),(1110,NULL,2023,1,20,13,7,'Cuota 6',NULL,1,NULL,NULL,NULL),(1111,NULL,2023,1,23,13,8,'Cuota 6',NULL,1,NULL,NULL,NULL),(1112,NULL,2023,3,17,13,9,'Cuota 1',NULL,1,NULL,NULL,NULL),(1113,NULL,2023,3,20,13,10,'Cuota 1',NULL,1,NULL,NULL,NULL),(1114,NULL,2023,3,21,13,11,'Cuota 1',NULL,1,NULL,NULL,NULL),(1115,NULL,2023,3,22,13,7,'Cuota 1',NULL,1,NULL,NULL,NULL),(1116,NULL,2023,3,23,13,8,'Cuota 1',NULL,1,NULL,NULL,NULL),(1117,NULL,2023,5,17,13,9,'Cuota 2',NULL,1,NULL,NULL,NULL),(1118,NULL,2023,5,18,13,10,'Cuota 2',NULL,1,NULL,NULL,NULL),(1119,NULL,2023,5,19,13,11,'Cuota 2',NULL,1,NULL,NULL,NULL),(1120,NULL,2023,5,22,13,7,'Cuota 2',NULL,1,NULL,NULL,NULL),(1121,NULL,2023,5,23,13,8,'Cuota 2',NULL,1,NULL,NULL,NULL),(1122,NULL,2023,7,17,13,9,'Cuota 3',NULL,1,NULL,NULL,NULL),(1123,NULL,2023,7,18,13,10,'Cuota 3',NULL,1,NULL,NULL,NULL),(1124,NULL,2023,7,19,13,11,'Cuota 3',NULL,1,NULL,NULL,NULL),(1125,NULL,2023,7,20,13,7,'Cuota 3',NULL,1,NULL,NULL,NULL),(1126,NULL,2023,7,21,13,8,'Cuota 3',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1127,NULL,2023,9,18,13,9,'Cuota 4',NULL,1,NULL,NULL,NULL),(1128,NULL,2023,9,19,13,10,'Cuota 4',NULL,1,NULL,NULL,NULL),(1129,NULL,2023,9,20,13,11,'Cuota 4',NULL,1,NULL,NULL,NULL),(1130,NULL,2023,9,21,13,7,'Cuota 4',NULL,1,NULL,NULL,NULL),(1131,NULL,2023,9,22,13,8,'Cuota 4',NULL,1,NULL,NULL,NULL),(1132,NULL,2023,11,17,13,9,'Cuota 5',NULL,1,NULL,NULL,NULL),(1133,NULL,2023,11,21,13,10,'Cuota 5',NULL,1,NULL,NULL,NULL),(1134,NULL,2023,11,22,13,11,'Cuota 5',NULL,1,NULL,NULL,NULL),(1135,NULL,2023,11,23,13,7,'Cuota 5',NULL,1,NULL,NULL,NULL),(1136,NULL,2023,11,24,13,8,'Cuota 5',NULL,1,NULL,NULL,NULL),(1137,NULL,2023,1,10,14,4,'1',NULL,1,NULL,NULL,NULL),(1138,NULL,2023,2,10,14,4,'2',NULL,1,NULL,NULL,NULL),(1139,NULL,2023,3,10,14,4,'3',NULL,1,NULL,NULL,NULL),(1140,NULL,2023,4,10,14,4,'4',NULL,1,NULL,NULL,NULL),(1141,NULL,2023,5,10,14,4,'5',NULL,1,NULL,NULL,NULL),(1142,NULL,2023,6,12,14,4,'6',NULL,1,NULL,NULL,NULL),(1143,NULL,2023,7,10,14,4,'7',NULL,1,NULL,NULL,NULL),(1144,NULL,2023,8,10,14,4,'8',NULL,1,NULL,NULL,NULL),(1145,NULL,2023,9,11,14,4,'9',NULL,1,NULL,NULL,NULL),(1146,NULL,2023,10,10,14,4,'10',NULL,1,NULL,NULL,NULL),(1147,NULL,2023,11,10,14,4,'11',NULL,1,NULL,NULL,NULL),(1148,NULL,2023,12,11,14,4,'12',NULL,1,NULL,NULL,NULL),(1149,NULL,2023,2,13,15,1,'Anticipo 4 año 2022',NULL,1,NULL,NULL,NULL),(1150,NULL,2023,2,14,15,2,'Anticipo 4 año 2022',NULL,1,NULL,NULL,NULL),(1151,NULL,2023,2,15,15,3,'Anticipo 4 año 2022',NULL,1,NULL,NULL,NULL),(1152,NULL,2023,4,13,15,1,'Anticipo 5 año 2022',NULL,1,NULL,NULL,NULL),(1153,NULL,2023,4,14,15,2,'Anticipo 5 año 2022',NULL,1,NULL,NULL,NULL),(1154,NULL,2023,4,17,15,3,'Anticipo 5 año 2022',NULL,1,NULL,NULL,NULL),(1155,NULL,2023,8,14,15,1,'Anticipo 1 año 2023',NULL,1,NULL,NULL,NULL),(1156,NULL,2023,8,15,15,2,'Anticipo 1 año 2023',NULL,1,NULL,NULL,NULL),(1157,NULL,2023,8,16,15,3,'Anticipo 1 año 2023',NULL,1,NULL,NULL,NULL),(1158,NULL,2023,10,17,15,1,'Anticipo 2 año 2023',NULL,1,NULL,NULL,NULL),(1159,NULL,2023,10,18,15,2,'Anticipo 2 año 2023',NULL,1,NULL,NULL,NULL),(1160,NULL,2023,10,19,15,3,'Anticipo 2 año 2023',NULL,1,NULL,NULL,NULL),(1161,NULL,2023,12,15,15,1,'Anticipo 3 año 2023',NULL,1,NULL,NULL,NULL),(1162,NULL,2023,12,13,15,2,'Anticipo 3 año 2023',NULL,1,NULL,NULL,NULL),(1163,NULL,2023,12,14,15,3,'Anticipo 3 año 2023',NULL,1,NULL,NULL,NULL),(1164,NULL,2023,2,13,18,1,'Anticipo 4 año 2022',NULL,1,NULL,NULL,NULL),(1165,NULL,2023,2,14,18,2,'Anticipo 4 año 2022',NULL,1,NULL,NULL,NULL),(1166,NULL,2023,2,15,18,3,'Anticipo 4 año 2022',NULL,1,NULL,NULL,NULL),(1167,NULL,2023,4,13,18,1,'Anticipo 5 año 2022',NULL,1,NULL,NULL,NULL),(1168,NULL,2023,4,14,18,2,'Anticipo 5 año 2022',NULL,1,NULL,NULL,NULL),(1169,NULL,2023,4,17,18,3,'Anticipo 5 año 2022',NULL,1,NULL,NULL,NULL),(1170,NULL,2023,8,14,18,1,'Anticipo 1 año 2023',NULL,1,NULL,NULL,NULL),(1171,NULL,2023,8,15,18,2,'Anticipo 1 año 2023',NULL,1,NULL,NULL,NULL),(1172,NULL,2023,8,16,18,3,'Anticipo 1 año 2023',NULL,1,NULL,NULL,NULL),(1173,NULL,2023,10,17,18,1,'Anticipo 2 año 2023',NULL,1,NULL,NULL,NULL),(1174,NULL,2023,10,18,18,2,'Anticipo 2 año 2023',NULL,1,NULL,NULL,NULL),(1175,NULL,2023,10,19,18,3,'Anticipo 2 año 2023',NULL,1,NULL,NULL,NULL),(1176,NULL,2023,12,15,18,1,'Anticipo 3 año 2023',NULL,1,NULL,NULL,NULL),(1177,NULL,2023,12,13,18,2,'Anticipo 3 año 2023',NULL,1,NULL,NULL,NULL),(1178,NULL,2023,12,14,18,3,'Anticipo 3 año 2023',NULL,1,NULL,NULL,NULL),(1179,NULL,2023,1,10,39,4,'Honorarios Diciembre',NULL,1,NULL,NULL,NULL),(1180,NULL,2023,2,10,39,4,'Honorarios Enero',NULL,1,NULL,NULL,NULL),(1181,NULL,2023,3,10,39,4,'Honorarios Febrero',NULL,1,NULL,NULL,NULL),(1182,NULL,2023,4,10,39,4,'Honorarios Marzo',NULL,1,NULL,NULL,NULL),(1183,NULL,2023,5,10,39,4,'Honorarios Abril',NULL,1,NULL,NULL,NULL),(1184,NULL,2023,6,10,39,4,'Honorarios Mayo',NULL,1,NULL,NULL,NULL),(1185,NULL,2023,7,10,39,4,'Honorarios Junio',NULL,1,NULL,NULL,NULL),(1186,NULL,2023,8,10,39,4,'Honorarios Julio',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1187,NULL,2023,9,10,39,4,'Honorarios Agosto',NULL,1,NULL,NULL,NULL),(1188,NULL,2023,10,10,39,4,'Honorarios Septiembre',NULL,1,NULL,NULL,NULL),(1189,NULL,2023,11,10,39,4,'Honorarios Octubre',NULL,1,NULL,NULL,NULL),(1190,NULL,2023,12,10,39,4,'Honorarios Noviembre',NULL,1,NULL,NULL,NULL),(1191,NULL,2021,2,17,40,22,'Febrero',NULL,1,NULL,NULL,NULL),(1192,NULL,2021,2,18,40,23,'Febrero',NULL,1,NULL,NULL,NULL),(1193,NULL,2021,3,16,40,22,'Marzo',NULL,1,NULL,NULL,NULL),(1194,NULL,2021,3,17,40,23,'Marzo',NULL,1,NULL,NULL,NULL),(1195,NULL,2021,4,16,40,22,'Abril',NULL,1,NULL,NULL,NULL),(1196,NULL,2021,4,17,40,23,'Abril',NULL,1,NULL,NULL,NULL),(1197,NULL,2021,5,18,40,22,'Mayo',NULL,1,NULL,NULL,NULL),(1198,NULL,2021,5,19,40,23,'Mayo',NULL,1,NULL,NULL,NULL),(1199,NULL,2021,6,16,40,22,'Junio',NULL,1,NULL,NULL,NULL),(1200,NULL,2021,6,17,40,23,'Junio',NULL,1,NULL,NULL,NULL),(1201,NULL,2021,7,16,40,22,'Julio',NULL,1,NULL,NULL,NULL),(1202,NULL,2021,7,17,40,23,'Julio',NULL,1,NULL,NULL,NULL),(1203,NULL,2021,8,18,40,22,'Agosto',NULL,1,NULL,NULL,NULL),(1204,NULL,2021,8,19,40,23,'Agosto',NULL,1,NULL,NULL,NULL),(1205,NULL,2021,9,16,40,22,'Septiembre',NULL,1,NULL,NULL,NULL),(1206,NULL,2021,9,17,40,23,'Septiembre',NULL,1,NULL,NULL,NULL),(1207,NULL,2021,10,16,40,22,'Octubre',NULL,1,NULL,NULL,NULL),(1208,NULL,2021,10,19,40,23,'Octubre',NULL,1,NULL,NULL,NULL),(1209,NULL,2021,11,16,40,22,'Noviembre',NULL,1,NULL,NULL,NULL),(1210,NULL,2021,11,17,40,23,'Noviembre',NULL,1,NULL,NULL,NULL),(1211,NULL,2021,1,20,41,4,'Enero',NULL,1,NULL,NULL,NULL),(1212,NULL,2021,2,20,41,4,'Febrero',NULL,1,NULL,NULL,NULL),(1213,NULL,2021,3,20,41,4,'Marzo',NULL,1,NULL,NULL,NULL),(1214,NULL,2021,4,20,41,4,'Abril',NULL,1,NULL,NULL,NULL),(1215,NULL,2021,5,20,41,4,'Mayo',NULL,1,NULL,NULL,NULL),(1216,NULL,2021,6,22,41,4,'Junio',NULL,1,NULL,NULL,NULL),(1217,NULL,2021,7,20,41,4,'Julio',NULL,1,NULL,NULL,NULL),(1218,NULL,2021,8,20,41,4,'Agosto',NULL,1,NULL,NULL,NULL),(1219,NULL,2021,9,21,41,4,'Septiembre',NULL,1,NULL,NULL,NULL),(1220,NULL,2021,10,20,41,4,'Octubre',NULL,1,NULL,NULL,NULL),(1221,NULL,2021,11,20,41,4,'Noviembre',NULL,1,NULL,NULL,NULL),(1222,NULL,2021,12,21,41,4,'Diciembre',NULL,1,NULL,NULL,NULL),(1223,NULL,2020,1,9,42,1,'12',NULL,1,NULL,NULL,NULL),(1224,NULL,2020,1,10,42,2,'12',NULL,1,NULL,NULL,NULL),(1225,NULL,2020,1,13,42,3,'12',NULL,1,NULL,NULL,NULL),(1226,NULL,2020,2,9,42,1,'1',NULL,1,NULL,NULL,NULL),(1227,NULL,2020,2,10,42,2,'1',NULL,1,NULL,NULL,NULL),(1228,NULL,2020,2,13,42,3,'1',NULL,1,NULL,NULL,NULL),(1229,NULL,2020,3,9,42,1,'2',NULL,1,NULL,NULL,NULL),(1230,NULL,2020,3,10,42,2,'2',NULL,1,NULL,NULL,NULL),(1231,NULL,2020,3,13,42,3,'2',NULL,1,NULL,NULL,NULL),(1232,NULL,2020,4,9,42,1,'3',NULL,1,NULL,NULL,NULL),(1233,NULL,2020,4,10,42,2,'3',NULL,1,NULL,NULL,NULL),(1234,NULL,2020,4,13,42,3,'3',NULL,1,NULL,NULL,NULL),(1235,NULL,2020,5,9,42,1,'4',NULL,1,NULL,NULL,NULL),(1236,NULL,2020,5,10,42,2,'4',NULL,1,NULL,NULL,NULL),(1237,NULL,2020,5,13,42,3,'4',NULL,1,NULL,NULL,NULL),(1238,NULL,2020,6,9,42,1,'5',NULL,1,NULL,NULL,NULL),(1239,NULL,2020,6,10,42,2,'5',NULL,1,NULL,NULL,NULL),(1240,NULL,2020,6,13,42,3,'5',NULL,1,NULL,NULL,NULL),(1241,NULL,2020,7,9,42,1,'6',NULL,1,NULL,NULL,NULL),(1242,NULL,2020,7,10,42,2,'6',NULL,1,NULL,NULL,NULL),(1243,NULL,2020,7,13,42,3,'6',NULL,1,NULL,NULL,NULL),(1244,NULL,2020,8,9,42,1,'7',NULL,1,NULL,NULL,NULL),(1245,NULL,2020,8,10,42,2,'7',NULL,1,NULL,NULL,NULL),(1246,NULL,2020,8,13,42,3,'7',NULL,1,NULL,NULL,NULL),(1247,NULL,2020,9,9,42,1,'8',NULL,1,NULL,NULL,NULL),(1248,NULL,2020,9,10,42,2,'8',NULL,1,NULL,NULL,NULL),(1249,NULL,2020,9,13,42,3,'8',NULL,1,NULL,NULL,NULL),(1250,NULL,2020,10,9,42,1,'9',NULL,1,NULL,NULL,NULL),(1251,NULL,2020,10,10,42,2,'9',NULL,1,NULL,NULL,NULL),(1252,NULL,2020,10,13,42,3,'9',NULL,1,NULL,NULL,NULL),(1253,NULL,2020,11,9,42,1,'10',NULL,1,NULL,NULL,NULL),(1254,NULL,2020,11,10,42,2,'10',NULL,1,NULL,NULL,NULL),(1255,NULL,2020,11,13,42,3,'10',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1256,NULL,2020,12,9,42,1,'11',NULL,1,NULL,NULL,NULL),(1257,NULL,2020,12,10,42,2,'11',NULL,1,NULL,NULL,NULL),(1258,NULL,2020,12,13,42,3,'11',NULL,1,NULL,NULL,NULL),(1295,NULL,2022,2,17,44,9,'ENERO',NULL,1,NULL,NULL,NULL),(1296,NULL,2022,2,18,44,10,'ENERO',NULL,1,NULL,NULL,NULL),(1297,NULL,2022,2,19,44,11,'ENERO',NULL,1,NULL,NULL,NULL),(1298,NULL,2022,2,20,44,7,'ENERO',NULL,1,NULL,NULL,NULL),(1299,NULL,2022,2,15,44,8,'ENERO',NULL,1,NULL,NULL,NULL),(1300,NULL,2022,3,17,44,9,'FEBRERO',NULL,1,NULL,NULL,NULL),(1301,NULL,2022,3,18,44,10,'FEBRERO',NULL,1,NULL,NULL,NULL),(1302,NULL,2022,3,22,44,11,'FEBRERO',NULL,1,NULL,NULL,NULL),(1303,NULL,2022,3,23,44,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1304,NULL,2022,3,15,44,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1305,NULL,2022,4,16,44,9,'MARZO',NULL,1,NULL,NULL,NULL),(1306,NULL,2022,4,19,44,10,'MARZO',NULL,1,NULL,NULL,NULL),(1307,NULL,2022,4,20,44,11,'MARZO',NULL,1,NULL,NULL,NULL),(1308,NULL,2022,4,21,44,7,'MARZO',NULL,1,NULL,NULL,NULL),(1309,NULL,2022,4,13,44,8,'MARZO',NULL,1,NULL,NULL,NULL),(1310,NULL,2022,5,16,44,9,'ABRIL',NULL,1,NULL,NULL,NULL),(1311,NULL,2022,5,17,44,10,'ABRIL',NULL,1,NULL,NULL,NULL),(1312,NULL,2022,5,18,44,11,'ABRIL',NULL,1,NULL,NULL,NULL),(1313,NULL,2022,5,19,44,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1314,NULL,2023,5,13,44,8,'ABRIL',NULL,1,NULL,NULL,NULL),(1315,NULL,2023,6,16,44,9,'MAYO',NULL,1,NULL,NULL,NULL),(1316,NULL,2023,6,17,44,10,'MAYO',NULL,1,NULL,NULL,NULL),(1317,NULL,2023,6,18,44,11,'MAYO',NULL,1,NULL,NULL,NULL),(1318,NULL,2023,6,19,44,7,'MAYO',NULL,1,NULL,NULL,NULL),(1319,NULL,2024,1,15,44,8,'MAYO',NULL,1,NULL,NULL,NULL),(1320,NULL,2024,1,16,44,9,'JUNIO',NULL,1,NULL,NULL,NULL),(1321,NULL,2024,1,17,44,10,'JUNIO',NULL,1,NULL,NULL,NULL),(1322,NULL,2024,1,18,44,11,'JUNIO',NULL,1,NULL,NULL,NULL),(1323,NULL,2023,2,15,44,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1324,NULL,2023,2,16,44,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1325,NULL,2023,2,17,44,9,'JULIO',NULL,1,NULL,NULL,NULL),(1326,NULL,2023,2,22,44,10,'JULIO',NULL,1,NULL,NULL,NULL),(1327,NULL,2023,3,15,44,11,'JULIO',NULL,1,NULL,NULL,NULL),(1328,NULL,2023,3,16,44,7,'JULIO',NULL,1,NULL,NULL,NULL),(1329,NULL,2023,3,17,44,8,'JULIO',NULL,1,NULL,NULL,NULL),(1330,NULL,2023,3,20,44,9,'AGOSTO',NULL,1,NULL,NULL,NULL),(1331,NULL,2023,4,17,44,10,'AGOSTO',NULL,1,NULL,NULL,NULL),(1332,NULL,2023,4,18,44,11,'AGOSTO',NULL,1,NULL,NULL,NULL),(1333,NULL,2023,4,19,44,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1334,NULL,2023,4,20,44,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1335,NULL,2023,5,15,44,9,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1336,NULL,2023,5,16,44,10,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1337,NULL,2023,5,17,44,11,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1338,NULL,2023,5,18,44,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1339,NULL,2023,6,15,44,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1340,NULL,2023,6,16,44,9,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1341,NULL,2023,6,21,44,10,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1342,NULL,2023,6,22,44,11,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1343,NULL,2023,7,17,44,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1344,NULL,2023,7,18,44,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1345,NULL,2023,7,19,44,9,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1346,NULL,2023,7,20,44,10,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1347,NULL,2023,8,15,44,11,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1348,NULL,2023,8,16,44,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1349,NULL,2023,8,17,44,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1350,NULL,2023,8,18,44,9,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1351,NULL,2023,9,15,44,10,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1352,NULL,2023,9,18,44,11,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1353,NULL,2023,9,19,44,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1354,NULL,2023,9,20,44,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1355,NULL,2023,10,17,45,5,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1356,NULL,2023,10,18,45,6,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1357,NULL,2023,10,19,45,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1358,NULL,2023,10,20,45,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1359,NULL,2023,11,15,45,5,'ENERO',NULL,1,NULL,NULL,NULL),(1360,NULL,2023,11,16,45,6,'ENERO',NULL,1,NULL,NULL,NULL),(1361,NULL,2023,11,17,45,7,'ENERO',NULL,1,NULL,NULL,NULL),(1362,NULL,2023,11,21,45,8,'ENERO',NULL,1,NULL,NULL,NULL),(1363,NULL,2023,12,15,45,5,'FEBRERO',NULL,1,NULL,NULL,NULL),(1364,NULL,2023,12,18,45,6,'FEBRERO',NULL,1,NULL,NULL,NULL),(1365,NULL,2023,12,19,45,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1366,NULL,2023,12,20,45,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1367,NULL,2023,8,22,45,5,'MARZO',NULL,1,NULL,NULL,NULL),(1368,NULL,2023,8,23,45,6,'MARZO',NULL,1,NULL,NULL,NULL),(1369,NULL,2023,8,24,45,7,'MARZO',NULL,1,NULL,NULL,NULL),(1370,NULL,2023,8,25,45,8,'MARZO',NULL,1,NULL,NULL,NULL),(1371,NULL,2020,5,15,45,5,'ABRIL',NULL,1,NULL,NULL,NULL),(1372,NULL,2020,5,18,45,6,'ABRIL',NULL,1,NULL,NULL,NULL),(1373,NULL,2020,5,19,45,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1374,NULL,2020,5,20,45,8,'ABRIL',NULL,1,NULL,NULL,NULL),(1375,NULL,2020,6,16,45,5,'MAYO',NULL,1,NULL,NULL,NULL),(1376,NULL,2020,6,17,45,6,'MAYO',NULL,1,NULL,NULL,NULL),(1377,NULL,2020,6,18,45,7,'MAYO',NULL,1,NULL,NULL,NULL),(1378,NULL,2020,6,19,45,8,'MAYO',NULL,1,NULL,NULL,NULL),(1379,NULL,2020,7,15,45,5,'JUNIO',NULL,1,NULL,NULL,NULL),(1380,NULL,2020,7,16,45,6,'JUNIO',NULL,1,NULL,NULL,NULL),(1381,NULL,2020,7,17,45,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1382,NULL,2020,7,20,45,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1383,NULL,2020,8,18,45,5,'JULIO',NULL,1,NULL,NULL,NULL),(1384,NULL,2020,8,19,45,6,'JULIO',NULL,1,NULL,NULL,NULL),(1385,NULL,2020,8,20,45,7,'JULIO',NULL,1,NULL,NULL,NULL),(1386,NULL,2020,8,21,45,8,'JULIO',NULL,1,NULL,NULL,NULL),(1387,NULL,2020,9,15,45,5,'AGOSTO',NULL,1,NULL,NULL,NULL),(1388,NULL,2020,9,16,45,6,'AGOSTO',NULL,1,NULL,NULL,NULL),(1389,NULL,2020,9,17,45,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1390,NULL,2020,9,18,45,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1391,NULL,2020,10,15,45,5,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1392,NULL,2020,10,16,45,6,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1393,NULL,2020,10,19,45,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1394,NULL,2020,10,20,45,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1395,NULL,2020,11,16,45,5,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1396,NULL,2020,11,17,45,6,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1397,NULL,2020,11,18,45,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1398,NULL,2020,11,19,45,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1399,NULL,2020,12,15,45,5,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1400,NULL,2020,12,16,45,6,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1401,NULL,2020,12,17,45,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1402,NULL,2020,12,18,45,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1403,NULL,2020,8,24,46,5,'ANUAL',NULL,1,NULL,NULL,NULL),(1404,NULL,2020,8,25,46,6,'ANUAL',NULL,1,NULL,NULL,NULL),(1405,NULL,2020,8,26,46,7,'ANUAL',NULL,1,NULL,NULL,NULL),(1406,NULL,2020,8,27,46,8,'ANUAL',NULL,1,NULL,NULL,NULL),(1407,NULL,2020,1,15,47,5,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1408,NULL,2020,1,16,47,6,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1409,NULL,2020,1,17,47,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1410,NULL,2020,1,20,47,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1411,NULL,2020,2,17,47,5,'ENERO',NULL,1,NULL,NULL,NULL),(1412,NULL,2020,2,18,47,6,'ENERO',NULL,1,NULL,NULL,NULL),(1413,NULL,2020,2,19,47,7,'ENERO',NULL,1,NULL,NULL,NULL),(1414,NULL,2020,2,20,47,8,'ENERO',NULL,1,NULL,NULL,NULL),(1415,NULL,2020,3,16,47,5,'FEBRERO',NULL,1,NULL,NULL,NULL),(1416,NULL,2020,3,17,47,6,'FEBRERO',NULL,1,NULL,NULL,NULL),(1417,NULL,2020,3,18,47,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1418,NULL,2020,3,19,47,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1419,NULL,2020,4,15,47,5,'MARZO',NULL,1,NULL,NULL,NULL),(1420,NULL,2020,4,16,47,6,'MARZO',NULL,1,NULL,NULL,NULL),(1421,NULL,2020,4,17,47,7,'MARZO',NULL,1,NULL,NULL,NULL),(1422,NULL,2020,4,20,47,8,'MARZO',NULL,1,NULL,NULL,NULL),(1423,NULL,2020,5,15,47,5,'ABRIL',NULL,1,NULL,NULL,NULL),(1424,NULL,2020,5,18,47,6,'ABRIL',NULL,1,NULL,NULL,NULL),(1425,NULL,2020,5,19,47,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1426,NULL,2020,5,20,47,8,'ABRIL',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1427,NULL,2020,6,16,47,5,'MAYO',NULL,1,NULL,NULL,NULL),(1428,NULL,2020,6,17,47,6,'MAYO',NULL,1,NULL,NULL,NULL),(1429,NULL,2020,6,18,47,7,'MAYO',NULL,1,NULL,NULL,NULL),(1430,NULL,2020,6,19,47,8,'MAYO',NULL,1,NULL,NULL,NULL),(1431,NULL,2020,7,15,47,5,'JUNIO',NULL,1,NULL,NULL,NULL),(1432,NULL,2020,7,16,47,6,'JUNIO',NULL,1,NULL,NULL,NULL),(1433,NULL,2020,7,17,47,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1434,NULL,2020,7,20,47,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1435,NULL,2020,8,18,47,5,'JULIO',NULL,1,NULL,NULL,NULL),(1436,NULL,2020,8,19,47,6,'JULIO',NULL,1,NULL,NULL,NULL),(1437,NULL,2020,8,20,47,7,'JULIO',NULL,1,NULL,NULL,NULL),(1438,NULL,2020,8,21,47,8,'JULIO',NULL,1,NULL,NULL,NULL),(1439,NULL,2020,9,15,47,5,'AGOSTO',NULL,1,NULL,NULL,NULL),(1440,NULL,2020,9,16,47,6,'AGOSTO',NULL,1,NULL,NULL,NULL),(1441,NULL,2020,9,17,47,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1442,NULL,2020,9,18,47,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1443,NULL,2020,10,15,47,5,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1444,NULL,2020,10,16,47,6,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1445,NULL,2020,10,19,47,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1446,NULL,2020,10,20,47,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1447,NULL,2020,11,16,47,5,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1448,NULL,2020,11,17,47,6,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1449,NULL,2020,11,18,47,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1450,NULL,2020,11,19,47,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1451,NULL,2020,12,15,47,5,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1452,NULL,2020,12,16,47,6,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1453,NULL,2020,12,17,47,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1454,NULL,2020,12,18,47,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1455,NULL,2020,8,24,48,5,'ANUAL',NULL,1,NULL,NULL,NULL),(1456,NULL,2020,8,25,48,6,'ANUAL',NULL,1,NULL,NULL,NULL),(1457,NULL,2020,8,26,48,7,'ANUAL',NULL,1,NULL,NULL,NULL),(1458,NULL,2020,8,27,48,8,'ANUAL',NULL,1,NULL,NULL,NULL),(1459,NULL,2020,1,20,49,9,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1460,NULL,2020,1,21,49,10,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1461,NULL,2020,1,22,49,11,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1462,NULL,2020,1,23,49,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1463,NULL,2020,1,24,49,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1464,NULL,2020,2,18,49,9,'ENERO',NULL,1,NULL,NULL,NULL),(1465,NULL,2020,2,19,49,10,'ENERO',NULL,1,NULL,NULL,NULL),(1466,NULL,2020,2,20,49,11,'ENERO',NULL,1,NULL,NULL,NULL),(1467,NULL,2020,2,21,49,7,'ENERO',NULL,1,NULL,NULL,NULL),(1468,NULL,2020,2,26,49,8,'ENERO',NULL,1,NULL,NULL,NULL),(1469,NULL,2020,3,18,49,9,'FEBRERO',NULL,1,NULL,NULL,NULL),(1470,NULL,2020,3,19,49,10,'FEBRERO',NULL,1,NULL,NULL,NULL),(1471,NULL,2020,3,20,49,11,'FEBRERO',NULL,1,NULL,NULL,NULL),(1472,NULL,2020,3,21,49,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1473,NULL,2020,3,26,49,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1474,NULL,2020,4,20,49,9,'MARZO',NULL,1,NULL,NULL,NULL),(1475,NULL,2020,4,21,49,10,'MARZO',NULL,1,NULL,NULL,NULL),(1476,NULL,2020,4,22,49,11,'MARZO',NULL,1,NULL,NULL,NULL),(1477,NULL,2020,4,23,49,7,'MARZO',NULL,1,NULL,NULL,NULL),(1478,NULL,2020,4,24,49,8,'MARZO',NULL,1,NULL,NULL,NULL),(1479,NULL,2020,5,18,49,9,'ABRIL',NULL,1,NULL,NULL,NULL),(1480,NULL,2020,5,19,49,10,'ABRIL',NULL,1,NULL,NULL,NULL),(1481,NULL,2020,5,20,49,11,'ABRIL',NULL,1,NULL,NULL,NULL),(1482,NULL,2020,5,21,49,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1483,NULL,2020,5,22,49,8,'ABRIL',NULL,1,NULL,NULL,NULL),(1484,NULL,2020,6,18,49,9,'MAYO',NULL,1,NULL,NULL,NULL),(1485,NULL,2020,6,19,49,10,'MAYO',NULL,1,NULL,NULL,NULL),(1486,NULL,2020,6,22,49,11,'MAYO',NULL,1,NULL,NULL,NULL),(1487,NULL,2020,6,23,49,7,'MAYO',NULL,1,NULL,NULL,NULL),(1488,NULL,2020,6,24,49,8,'MAYO',NULL,1,NULL,NULL,NULL),(1489,NULL,2020,7,20,49,9,'JUNIO',NULL,1,NULL,NULL,NULL),(1490,NULL,2020,7,21,49,10,'JUNIO',NULL,1,NULL,NULL,NULL),(1491,NULL,2023,7,15,49,11,'JUNIO',NULL,1,NULL,NULL,NULL),(1492,NULL,2023,7,16,49,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1493,NULL,2023,7,17,49,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1494,NULL,2023,8,22,49,9,'JULIO',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1495,NULL,2023,8,15,49,10,'JULIO',NULL,1,NULL,NULL,NULL),(1496,NULL,2023,8,16,49,11,'JULIO',NULL,1,NULL,NULL,NULL),(1497,NULL,2023,8,17,49,7,'JULIO',NULL,1,NULL,NULL,NULL),(1498,NULL,2023,8,20,49,8,'JULIO',NULL,1,NULL,NULL,NULL),(1499,NULL,2023,9,17,49,9,'AGOSTO',NULL,1,NULL,NULL,NULL),(1500,NULL,2023,9,18,49,10,'AGOSTO',NULL,1,NULL,NULL,NULL),(1501,NULL,2023,9,19,49,11,'AGOSTO',NULL,1,NULL,NULL,NULL),(1502,NULL,2023,9,20,49,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1503,NULL,2023,9,15,49,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1504,NULL,2023,10,16,49,9,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1505,NULL,2023,10,17,49,10,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1506,NULL,2023,10,18,49,11,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1507,NULL,2023,10,15,49,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1508,NULL,2023,10,16,49,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1509,NULL,2023,11,21,49,9,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1510,NULL,2023,11,22,49,10,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1511,NULL,2023,11,17,49,11,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1512,NULL,2023,11,18,49,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1513,NULL,2023,11,19,49,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1514,NULL,2023,12,20,49,9,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1515,NULL,2023,12,15,49,10,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1516,NULL,2023,12,16,49,11,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1517,NULL,2023,12,17,49,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1518,NULL,2023,12,18,49,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1519,NULL,2023,1,15,50,9,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1520,NULL,2023,1,18,50,10,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1521,NULL,2023,1,19,50,11,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1522,NULL,2023,1,20,50,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1523,NULL,2023,1,17,50,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1524,NULL,2023,2,18,50,9,'ENERO',NULL,1,NULL,NULL,NULL),(1525,NULL,2023,2,19,50,10,'ENERO',NULL,1,NULL,NULL,NULL),(1526,NULL,2023,2,20,50,11,'ENERO',NULL,1,NULL,NULL,NULL),(1527,NULL,2023,2,15,50,7,'ENERO',NULL,1,NULL,NULL,NULL),(1528,NULL,2023,2,16,50,8,'ENERO',NULL,1,NULL,NULL,NULL),(1529,NULL,2023,3,17,50,9,'FEBRERO',NULL,1,NULL,NULL,NULL),(1530,NULL,2023,3,21,50,10,'FEBRERO',NULL,1,NULL,NULL,NULL),(1531,NULL,2023,3,15,50,11,'FEBRERO',NULL,1,NULL,NULL,NULL),(1532,NULL,2023,3,18,50,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1533,NULL,2023,3,19,50,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1534,NULL,2023,4,20,50,9,'MARZO',NULL,1,NULL,NULL,NULL),(1535,NULL,2020,4,21,50,10,'MARZO',NULL,1,NULL,NULL,NULL),(1536,NULL,2020,4,22,50,11,'MARZO',NULL,1,NULL,NULL,NULL),(1537,NULL,2020,4,23,50,7,'MARZO',NULL,1,NULL,NULL,NULL),(1538,NULL,2020,4,24,50,8,'MARZO',NULL,1,NULL,NULL,NULL),(1539,NULL,2020,5,18,50,9,'ABRIL',NULL,1,NULL,NULL,NULL),(1540,NULL,2020,5,19,50,10,'ABRIL',NULL,1,NULL,NULL,NULL),(1541,NULL,2020,5,20,50,11,'ABRIL',NULL,1,NULL,NULL,NULL),(1542,NULL,2020,5,21,50,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1543,NULL,2020,5,22,50,8,'ABRIL',NULL,1,NULL,NULL,NULL),(1544,NULL,2020,6,18,50,9,'MAYO',NULL,1,NULL,NULL,NULL),(1545,NULL,2020,6,19,50,10,'MAYO',NULL,1,NULL,NULL,NULL),(1546,NULL,2020,6,22,50,11,'MAYO',NULL,1,NULL,NULL,NULL),(1547,NULL,2020,6,23,50,7,'MAYO',NULL,1,NULL,NULL,NULL),(1548,NULL,2020,6,24,50,8,'MAYO',NULL,1,NULL,NULL,NULL),(1549,NULL,2020,7,20,50,9,'JUNIO',NULL,1,NULL,NULL,NULL),(1550,NULL,2020,7,21,50,10,'JUNIO',NULL,1,NULL,NULL,NULL),(1551,NULL,2020,7,22,50,11,'JUNIO',NULL,1,NULL,NULL,NULL),(1552,NULL,2020,7,23,50,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1553,NULL,2020,7,24,50,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1554,NULL,2020,8,18,50,9,'JULIO',NULL,1,NULL,NULL,NULL),(1555,NULL,2020,8,19,50,10,'JULIO',NULL,1,NULL,NULL,NULL),(1556,NULL,2020,8,20,50,11,'JULIO',NULL,1,NULL,NULL,NULL),(1557,NULL,2020,8,21,50,7,'JULIO',NULL,1,NULL,NULL,NULL),(1558,NULL,2020,8,24,50,8,'JULIO',NULL,1,NULL,NULL,NULL),(1559,NULL,2020,9,18,50,9,'AGOSTO',NULL,1,NULL,NULL,NULL),(1560,NULL,2020,9,21,50,10,'AGOSTO',NULL,1,NULL,NULL,NULL),(1561,NULL,2020,9,22,50,11,'AGOSTO',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1562,NULL,2020,9,23,50,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1563,NULL,2020,9,24,50,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1564,NULL,2020,10,19,50,9,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1565,NULL,2020,10,20,50,10,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1566,NULL,2020,10,21,50,11,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1567,NULL,2020,10,22,50,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1568,NULL,2020,10,23,50,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1569,NULL,2020,11,18,50,9,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1570,NULL,2020,11,19,50,10,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1571,NULL,2020,11,20,50,11,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1572,NULL,2020,11,24,50,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1573,NULL,2020,11,25,50,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1574,NULL,2020,12,18,50,9,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1575,NULL,2020,12,21,50,10,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1576,NULL,2020,12,22,50,11,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1577,NULL,2020,12,23,50,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1578,NULL,2020,12,28,50,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1579,NULL,2020,2,17,51,5,'1',NULL,1,NULL,NULL,NULL),(1580,NULL,2020,2,18,51,6,'1',NULL,1,NULL,NULL,NULL),(1581,NULL,2020,2,19,51,7,'1',NULL,1,NULL,NULL,NULL),(1582,NULL,2020,2,20,51,8,'1',NULL,1,NULL,NULL,NULL),(1583,NULL,2020,3,16,51,5,'2',NULL,1,NULL,NULL,NULL),(1584,NULL,2020,3,17,51,6,'2',NULL,1,NULL,NULL,NULL),(1585,NULL,2020,3,18,51,7,'2',NULL,1,NULL,NULL,NULL),(1586,NULL,2020,3,19,51,8,'2',NULL,1,NULL,NULL,NULL),(1587,NULL,2020,4,15,51,5,'3',NULL,1,NULL,NULL,NULL),(1588,NULL,2020,4,16,51,6,'3',NULL,1,NULL,NULL,NULL),(1589,NULL,2020,4,17,51,7,'3',NULL,1,NULL,NULL,NULL),(1590,NULL,2020,4,20,51,8,'3',NULL,1,NULL,NULL,NULL),(1591,NULL,2020,5,15,51,5,'4',NULL,1,NULL,NULL,NULL),(1592,NULL,2020,5,18,51,6,'4',NULL,1,NULL,NULL,NULL),(1593,NULL,2020,5,19,51,7,'4',NULL,1,NULL,NULL,NULL),(1594,NULL,2020,5,20,51,8,'4',NULL,1,NULL,NULL,NULL),(1595,NULL,2020,6,16,51,5,'5',NULL,1,NULL,NULL,NULL),(1596,NULL,2020,6,17,51,6,'5',NULL,1,NULL,NULL,NULL),(1597,NULL,2020,6,18,51,7,'5',NULL,1,NULL,NULL,NULL),(1598,NULL,2020,6,19,51,8,'5',NULL,1,NULL,NULL,NULL),(1599,NULL,2020,7,15,51,5,'6',NULL,1,NULL,NULL,NULL),(1600,NULL,2020,7,16,51,6,'6',NULL,1,NULL,NULL,NULL),(1601,NULL,2020,7,17,51,7,'6',NULL,1,NULL,NULL,NULL),(1602,NULL,2020,7,20,51,8,'6',NULL,1,NULL,NULL,NULL),(1603,NULL,2020,8,18,51,5,'7',NULL,1,NULL,NULL,NULL),(1604,NULL,2020,8,19,51,6,'7',NULL,1,NULL,NULL,NULL),(1605,NULL,2020,8,20,51,7,'7',NULL,1,NULL,NULL,NULL),(1606,NULL,2020,8,21,51,8,'7',NULL,1,NULL,NULL,NULL),(1607,NULL,2020,9,15,51,5,'8',NULL,1,NULL,NULL,NULL),(1608,NULL,2020,9,16,51,6,'8',NULL,1,NULL,NULL,NULL),(1609,NULL,2020,9,17,51,7,'8',NULL,1,NULL,NULL,NULL),(1610,NULL,2020,9,18,51,8,'8',NULL,1,NULL,NULL,NULL),(1611,NULL,2020,10,15,51,5,'9',NULL,1,NULL,NULL,NULL),(1612,NULL,2020,10,16,51,6,'9',NULL,1,NULL,NULL,NULL),(1613,NULL,2020,10,19,51,7,'9',NULL,1,NULL,NULL,NULL),(1614,NULL,2020,10,20,51,8,'9',NULL,1,NULL,NULL,NULL),(1615,NULL,2020,11,16,51,5,'10',NULL,1,NULL,NULL,NULL),(1616,NULL,2020,11,17,51,6,'10',NULL,1,NULL,NULL,NULL),(1617,NULL,2020,11,18,51,7,'10',NULL,1,NULL,NULL,NULL),(1618,NULL,2020,11,19,51,8,'10',NULL,1,NULL,NULL,NULL),(1619,NULL,2020,12,15,51,5,'11',NULL,1,NULL,NULL,NULL),(1620,NULL,2020,12,16,51,6,'11',NULL,1,NULL,NULL,NULL),(1621,NULL,2020,12,17,51,7,'11',NULL,1,NULL,NULL,NULL),(1622,NULL,2020,12,18,51,8,'11',NULL,1,NULL,NULL,NULL),(1623,NULL,2021,1,15,51,5,'12',NULL,1,NULL,NULL,NULL),(1624,NULL,2021,1,18,51,6,'12',NULL,1,NULL,NULL,NULL),(1625,NULL,2021,1,19,51,7,'12',NULL,1,NULL,NULL,NULL),(1626,NULL,2021,1,20,51,8,'12',NULL,1,NULL,NULL,NULL),(1627,NULL,2020,2,18,52,9,'ENERO',NULL,1,NULL,NULL,NULL),(1628,NULL,2020,2,19,52,10,'ENERO',NULL,1,NULL,NULL,NULL),(1629,NULL,2020,2,20,52,11,'ENERO',NULL,1,NULL,NULL,NULL),(1630,NULL,2020,2,21,52,7,'ENERO',NULL,1,NULL,NULL,NULL),(1631,NULL,2020,2,26,52,8,'ENERO',NULL,1,NULL,NULL,NULL),(1632,NULL,2020,3,18,52,9,'FEBRERO',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1633,NULL,2020,3,19,52,10,'FEBRERO',NULL,1,NULL,NULL,NULL),(1634,NULL,2020,3,20,52,11,'FEBRERO',NULL,1,NULL,NULL,NULL),(1635,NULL,2020,3,25,52,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1636,NULL,2020,3,26,52,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1637,NULL,2020,4,20,52,9,'MARZO',NULL,1,NULL,NULL,NULL),(1638,NULL,2020,4,21,52,10,'MARZO',NULL,1,NULL,NULL,NULL),(1639,NULL,2020,4,22,52,11,'MARZO',NULL,1,NULL,NULL,NULL),(1640,NULL,2020,4,23,52,7,'MARZO',NULL,1,NULL,NULL,NULL),(1641,NULL,2020,4,24,52,8,'MARZO',NULL,1,NULL,NULL,NULL),(1642,NULL,2020,5,18,52,9,'ABRIL',NULL,1,NULL,NULL,NULL),(1643,NULL,2020,5,19,52,10,'ABRIL',NULL,1,NULL,NULL,NULL),(1644,NULL,2020,5,20,52,11,'ABRIL',NULL,1,NULL,NULL,NULL),(1645,NULL,2020,5,21,52,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1646,NULL,2020,5,22,52,8,'ABRIL',NULL,1,NULL,NULL,NULL),(1647,NULL,2020,6,18,52,9,'MAYO',NULL,1,NULL,NULL,NULL),(1648,NULL,2020,6,19,52,10,'MAYO',NULL,1,NULL,NULL,NULL),(1649,NULL,2020,6,22,52,11,'MAYO',NULL,1,NULL,NULL,NULL),(1650,NULL,2020,6,23,52,7,'MAYO',NULL,1,NULL,NULL,NULL),(1651,NULL,2020,6,24,52,8,'MAYO',NULL,1,NULL,NULL,NULL),(1652,NULL,2020,7,20,52,9,'JUNIO',NULL,1,NULL,NULL,NULL),(1653,NULL,2020,7,21,52,10,'JUNIO',NULL,1,NULL,NULL,NULL),(1654,NULL,2020,7,22,52,11,'JUNIO',NULL,1,NULL,NULL,NULL),(1655,NULL,2020,7,23,52,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1656,NULL,2020,7,24,52,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1657,NULL,2020,8,18,52,9,'JULIO',NULL,1,NULL,NULL,NULL),(1658,NULL,2020,8,19,52,10,'JULIO',NULL,1,NULL,NULL,NULL),(1659,NULL,2020,8,20,52,11,'JULIO',NULL,1,NULL,NULL,NULL),(1660,NULL,2020,8,21,52,7,'JULIO',NULL,1,NULL,NULL,NULL),(1661,NULL,2020,8,24,52,8,'JULIO',NULL,1,NULL,NULL,NULL),(1662,NULL,2020,9,18,52,9,'AGOSTO',NULL,1,NULL,NULL,NULL),(1663,NULL,2020,9,21,52,10,'AGOSTO',NULL,1,NULL,NULL,NULL),(1664,NULL,2020,9,22,52,11,'AGOSTO',NULL,1,NULL,NULL,NULL),(1665,NULL,2020,9,23,52,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1666,NULL,2020,9,24,52,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1667,NULL,2020,10,19,52,9,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1668,NULL,2020,10,20,52,10,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1669,NULL,2020,10,21,52,11,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1670,NULL,2020,10,22,52,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1671,NULL,2020,10,23,52,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1672,NULL,2020,11,18,52,9,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1673,NULL,2020,11,19,52,10,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1674,NULL,2020,11,20,52,11,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1675,NULL,2020,11,24,52,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1676,NULL,2020,11,25,52,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1677,NULL,2020,12,18,52,9,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1678,NULL,2020,12,21,52,10,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1679,NULL,2020,12,22,52,11,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1680,NULL,2020,12,23,52,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1681,NULL,2020,12,24,52,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1682,NULL,2021,1,18,52,9,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1683,NULL,2021,1,19,52,10,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1684,NULL,2021,1,20,52,11,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1685,NULL,2021,1,21,52,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1686,NULL,2021,1,22,52,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1687,NULL,2021,4,30,53,4,NULL,NULL,1,NULL,NULL,NULL),(1688,NULL,2021,3,31,54,4,NULL,NULL,1,NULL,NULL,NULL),(1689,NULL,2021,1,11,55,1,'12',NULL,1,NULL,NULL,NULL),(1690,NULL,2021,1,12,55,2,'12',NULL,1,NULL,NULL,NULL),(1691,NULL,2021,1,23,55,3,'12',NULL,1,NULL,NULL,NULL),(1692,NULL,2021,2,9,55,1,'1',NULL,1,NULL,NULL,NULL),(1693,NULL,2021,2,10,55,2,'1',NULL,1,NULL,NULL,NULL),(1694,NULL,2021,2,11,55,3,'1',NULL,1,NULL,NULL,NULL),(1695,NULL,2021,3,9,55,1,'2',NULL,1,NULL,NULL,NULL),(1696,NULL,2021,3,10,55,2,'2',NULL,1,NULL,NULL,NULL),(1697,NULL,2021,3,1,55,3,'2',NULL,1,NULL,NULL,NULL),(1698,NULL,2021,4,9,55,1,'3',NULL,1,NULL,NULL,NULL),(1699,NULL,2021,4,12,55,2,'3',NULL,1,NULL,NULL,NULL),(1700,NULL,2021,4,13,55,3,'3',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1701,NULL,2021,5,10,55,1,'4',NULL,1,NULL,NULL,NULL),(1702,NULL,2021,5,11,55,2,'4',NULL,1,NULL,NULL,NULL),(1703,NULL,2021,5,12,55,3,'4',NULL,1,NULL,NULL,NULL),(1704,NULL,2021,6,9,55,1,'5',NULL,1,NULL,NULL,NULL),(1705,NULL,2021,6,10,55,2,'5',NULL,1,NULL,NULL,NULL),(1706,NULL,2021,6,11,55,3,'5',NULL,1,NULL,NULL,NULL),(1707,NULL,2021,7,12,55,1,'6',NULL,1,NULL,NULL,NULL),(1708,NULL,2021,7,13,55,2,'6',NULL,1,NULL,NULL,NULL),(1709,NULL,2021,7,14,55,3,'6',NULL,1,NULL,NULL,NULL),(1710,NULL,2021,8,9,55,1,'7',NULL,1,NULL,NULL,NULL),(1711,NULL,2021,8,10,55,2,'7',NULL,1,NULL,NULL,NULL),(1712,NULL,2021,8,11,55,3,'7',NULL,1,NULL,NULL,NULL),(1713,NULL,2021,9,9,55,1,'8',NULL,1,NULL,NULL,NULL),(1714,NULL,2021,9,10,55,2,'8',NULL,1,NULL,NULL,NULL),(1715,NULL,2021,9,13,55,3,'8',NULL,1,NULL,NULL,NULL),(1716,NULL,2021,10,12,55,1,'9',NULL,1,NULL,NULL,NULL),(1717,NULL,2021,10,13,55,2,'9',NULL,1,NULL,NULL,NULL),(1718,NULL,2021,10,14,55,3,'9',NULL,1,NULL,NULL,NULL),(1719,NULL,2021,11,9,55,1,'10',NULL,1,NULL,NULL,NULL),(1720,NULL,2021,11,10,55,2,'10',NULL,1,NULL,NULL,NULL),(1721,NULL,2021,11,11,55,3,'10',NULL,1,NULL,NULL,NULL),(1722,NULL,2021,12,9,55,1,'11',NULL,1,NULL,NULL,NULL),(1723,NULL,2021,12,10,55,2,'11',NULL,1,NULL,NULL,NULL),(1724,NULL,2021,12,13,55,3,'11',NULL,1,NULL,NULL,NULL),(1725,NULL,2024,1,15,56,1,'12',NULL,1,NULL,NULL,NULL),(1726,NULL,2024,1,16,56,2,'12',NULL,1,NULL,NULL,NULL),(1727,NULL,2024,1,17,56,3,'12',NULL,1,NULL,NULL,NULL),(1728,NULL,2024,1,18,56,1,'1',NULL,1,NULL,NULL,NULL),(1729,NULL,2023,2,15,56,2,'1',NULL,1,NULL,NULL,NULL),(1730,NULL,2023,2,16,56,3,'1',NULL,1,NULL,NULL,NULL),(1731,NULL,2023,2,17,56,1,'2',NULL,1,NULL,NULL,NULL),(1732,NULL,2023,2,22,56,2,'2',NULL,1,NULL,NULL,NULL),(1733,NULL,2023,3,15,56,3,'2',NULL,1,NULL,NULL,NULL),(1734,NULL,2023,3,16,56,1,'3',NULL,1,NULL,NULL,NULL),(1735,NULL,2023,3,17,56,2,'3',NULL,1,NULL,NULL,NULL),(1736,NULL,2023,3,20,56,3,'3',NULL,1,NULL,NULL,NULL),(1737,NULL,2023,4,17,56,1,'4',NULL,1,NULL,NULL,NULL),(1738,NULL,2023,4,18,56,2,'4',NULL,1,NULL,NULL,NULL),(1739,NULL,2023,4,19,56,3,'4',NULL,1,NULL,NULL,NULL),(1740,NULL,2023,4,20,56,1,'5',NULL,1,NULL,NULL,NULL),(1741,NULL,2023,5,15,56,2,'5',NULL,1,NULL,NULL,NULL),(1742,NULL,2023,5,16,56,3,'5',NULL,1,NULL,NULL,NULL),(1743,NULL,2023,5,17,56,1,'6',NULL,1,NULL,NULL,NULL),(1744,NULL,2023,5,18,56,2,'6',NULL,1,NULL,NULL,NULL),(1745,NULL,2023,6,15,56,3,'6',NULL,1,NULL,NULL,NULL),(1746,NULL,2023,6,16,56,1,'7',NULL,1,NULL,NULL,NULL),(1747,NULL,2023,6,21,56,2,'7',NULL,1,NULL,NULL,NULL),(1748,NULL,2023,6,22,56,3,'7',NULL,1,NULL,NULL,NULL),(1749,NULL,2023,7,17,56,1,'8',NULL,1,NULL,NULL,NULL),(1750,NULL,2023,7,18,56,2,'8',NULL,1,NULL,NULL,NULL),(1751,NULL,2023,7,19,56,3,'8',NULL,1,NULL,NULL,NULL),(1752,NULL,2023,7,20,56,1,'9',NULL,1,NULL,NULL,NULL),(1753,NULL,2023,8,15,56,2,'9',NULL,1,NULL,NULL,NULL),(1754,NULL,2023,8,16,56,3,'9',NULL,1,NULL,NULL,NULL),(1755,NULL,2023,8,17,56,1,'10',NULL,1,NULL,NULL,NULL),(1756,NULL,2023,8,18,56,2,'10',NULL,1,NULL,NULL,NULL),(1757,NULL,2023,9,15,56,3,'10',NULL,1,NULL,NULL,NULL),(1758,NULL,2023,9,18,56,1,'11',NULL,1,NULL,NULL,NULL),(1759,NULL,2023,9,19,56,2,'11',NULL,1,NULL,NULL,NULL),(1760,NULL,2023,9,20,56,3,'11',NULL,1,NULL,NULL,NULL),(1761,NULL,2023,10,17,57,5,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1762,NULL,2023,10,18,57,6,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1763,NULL,2023,10,19,57,7,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1764,NULL,2023,10,20,57,8,'DICIEMBRE',NULL,1,NULL,NULL,NULL),(1765,NULL,2023,11,15,57,5,'ENERO',NULL,1,NULL,NULL,NULL),(1766,NULL,2023,11,16,57,6,'ENERO',NULL,1,NULL,NULL,NULL),(1767,NULL,2023,11,17,57,7,'ENERO',NULL,1,NULL,NULL,NULL),(1768,NULL,2023,11,21,57,8,'ENERO',NULL,1,NULL,NULL,NULL),(1769,NULL,2023,12,15,57,5,'FEBRERO',NULL,1,NULL,NULL,NULL),(1770,NULL,2023,12,18,57,6,'FEBRERO',NULL,1,NULL,NULL,NULL),(1771,NULL,2023,12,19,57,7,'FEBRERO',NULL,1,NULL,NULL,NULL),(1772,NULL,2023,12,20,57,8,'FEBRERO',NULL,1,NULL,NULL,NULL),(1773,NULL,2021,4,15,57,5,'MARZO',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1774,NULL,2021,4,16,57,6,'MARZO',NULL,1,NULL,NULL,NULL),(1775,NULL,2021,4,17,57,7,'MARZO',NULL,1,NULL,NULL,NULL),(1776,NULL,2021,4,20,57,8,'MARZO',NULL,1,NULL,NULL,NULL),(1777,NULL,2021,5,15,57,5,'ABRIL',NULL,1,NULL,NULL,NULL),(1778,NULL,2021,5,18,57,6,'ABRIL',NULL,1,NULL,NULL,NULL),(1779,NULL,2021,5,19,57,7,'ABRIL',NULL,1,NULL,NULL,NULL),(1780,NULL,2021,5,20,57,8,'ABRIL',NULL,1,NULL,NULL,NULL),(1781,NULL,2021,6,16,57,5,'MAYO',NULL,1,NULL,NULL,NULL),(1782,NULL,2021,6,17,57,6,'MAYO',NULL,1,NULL,NULL,NULL),(1783,NULL,2021,6,18,57,7,'MAYO',NULL,1,NULL,NULL,NULL),(1784,NULL,2021,6,19,57,8,'MAYO',NULL,1,NULL,NULL,NULL),(1785,NULL,2021,7,15,57,5,'JUNIO',NULL,1,NULL,NULL,NULL),(1786,NULL,2021,7,16,57,6,'JUNIO',NULL,1,NULL,NULL,NULL),(1787,NULL,2021,7,17,57,7,'JUNIO',NULL,1,NULL,NULL,NULL),(1788,NULL,2021,7,20,57,8,'JUNIO',NULL,1,NULL,NULL,NULL),(1789,NULL,2021,8,18,57,5,'JULIO',NULL,1,NULL,NULL,NULL),(1790,NULL,2021,8,19,57,6,'JULIO',NULL,1,NULL,NULL,NULL),(1791,NULL,2021,8,20,57,7,'JULIO',NULL,1,NULL,NULL,NULL),(1792,NULL,2021,8,21,57,8,'JULIO',NULL,1,NULL,NULL,NULL),(1793,NULL,2021,9,15,57,5,'AGOSTO',NULL,1,NULL,NULL,NULL),(1794,NULL,2021,9,16,57,6,'AGOSTO',NULL,1,NULL,NULL,NULL),(1795,NULL,2021,9,17,57,7,'AGOSTO',NULL,1,NULL,NULL,NULL),(1796,NULL,2021,9,18,57,8,'AGOSTO',NULL,1,NULL,NULL,NULL),(1797,NULL,2021,10,15,57,5,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1798,NULL,2021,10,16,57,6,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1799,NULL,2021,10,19,57,7,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1800,NULL,2021,10,20,57,8,'SEPTIEMBRE',NULL,1,NULL,NULL,NULL),(1801,NULL,2021,11,16,57,5,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1802,NULL,2021,11,17,57,6,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1803,NULL,2021,11,18,57,7,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1804,NULL,2021,11,19,57,8,'OCTUBRE',NULL,1,NULL,NULL,NULL),(1805,NULL,2021,12,15,57,5,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1806,NULL,2021,12,16,57,6,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1807,NULL,2021,12,17,57,7,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1808,NULL,2021,12,18,57,8,'NOVIEMBRE',NULL,1,NULL,NULL,NULL),(1809,NULL,2021,1,20,58,9,'Diciembre',NULL,1,NULL,NULL,NULL),(1810,NULL,2021,1,21,58,10,'Diciembre',NULL,1,NULL,NULL,NULL),(1811,NULL,2021,1,24,58,11,'Diciembre',NULL,1,NULL,NULL,NULL),(1812,NULL,2021,1,25,58,7,'Diciembre',NULL,1,NULL,NULL,NULL),(1813,NULL,2021,1,26,58,8,'Diciembre',NULL,1,NULL,NULL,NULL),(1814,NULL,2021,2,22,58,9,'Enero',NULL,1,NULL,NULL,NULL),(1815,NULL,2021,2,23,58,10,'Enero',NULL,1,NULL,NULL,NULL),(1816,NULL,2021,2,24,58,11,'Enero',NULL,1,NULL,NULL,NULL),(1817,NULL,2021,2,25,58,7,'Enero',NULL,1,NULL,NULL,NULL),(1818,NULL,2021,2,26,58,8,'Enero',NULL,1,NULL,NULL,NULL),(1819,NULL,2021,3,22,58,9,'Febrero',NULL,1,NULL,NULL,NULL),(1820,NULL,2021,3,23,58,10,'Febrero',NULL,1,NULL,NULL,NULL),(1821,NULL,2021,3,25,58,11,'Febrero',NULL,1,NULL,NULL,NULL),(1822,NULL,2021,3,26,58,7,'Febrero',NULL,1,NULL,NULL,NULL),(1823,NULL,2021,3,29,58,8,'Febrero',NULL,1,NULL,NULL,NULL),(1824,NULL,2021,4,20,58,9,'Marzo',NULL,1,NULL,NULL,NULL),(1825,NULL,2021,4,21,58,10,'Marzo',NULL,1,NULL,NULL,NULL),(1826,NULL,2021,4,22,58,11,'Marzo',NULL,1,NULL,NULL,NULL),(1827,NULL,2021,4,23,58,7,'Marzo',NULL,1,NULL,NULL,NULL),(1828,NULL,2021,4,26,58,8,'Marzo',NULL,1,NULL,NULL,NULL),(1829,NULL,2021,5,19,58,9,'Abril',NULL,1,NULL,NULL,NULL),(1830,NULL,2021,5,21,58,10,'Abril',NULL,1,NULL,NULL,NULL),(1831,NULL,2021,5,26,58,11,'Abril',NULL,1,NULL,NULL,NULL),(1832,NULL,2021,5,27,58,7,'Abril',NULL,1,NULL,NULL,NULL),(1833,NULL,2023,7,20,58,8,'Abril',NULL,1,NULL,NULL,NULL),(1834,NULL,2021,6,22,58,9,'Mayo',NULL,1,NULL,NULL,NULL),(1835,NULL,2021,6,23,58,10,'Mayo',NULL,1,NULL,NULL,NULL),(1836,NULL,2021,6,25,58,11,'Mayo',NULL,1,NULL,NULL,NULL),(1837,NULL,2021,6,28,58,7,'Mayo',NULL,1,NULL,NULL,NULL),(1838,NULL,2021,6,29,58,8,'Mayo',NULL,1,NULL,NULL,NULL),(1839,NULL,2021,7,20,58,9,'Junio',NULL,1,NULL,NULL,NULL),(1840,NULL,2021,7,21,58,10,'Junio',NULL,1,NULL,NULL,NULL),(1841,NULL,2021,7,22,58,11,'Junio',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1842,NULL,2021,7,23,58,7,'Junio',NULL,1,NULL,NULL,NULL),(1843,NULL,2021,7,26,58,8,'Junio',NULL,1,NULL,NULL,NULL),(1844,NULL,2021,8,20,58,9,'Julio',NULL,1,NULL,NULL,NULL),(1845,NULL,2021,8,23,58,10,'Julio',NULL,1,NULL,NULL,NULL),(1846,NULL,2021,8,24,58,11,'Julio',NULL,1,NULL,NULL,NULL),(1847,NULL,2021,8,25,58,7,'Julio',NULL,1,NULL,NULL,NULL),(1848,NULL,2021,8,26,58,8,'Julio',NULL,1,NULL,NULL,NULL),(1849,NULL,2021,9,20,58,9,'Agosto',NULL,1,NULL,NULL,NULL),(1850,NULL,2021,9,21,58,10,'Agosto',NULL,1,NULL,NULL,NULL),(1851,NULL,2021,9,22,58,11,'Agosto',NULL,1,NULL,NULL,NULL),(1852,NULL,2021,9,23,58,7,'Agosto',NULL,1,NULL,NULL,NULL),(1853,NULL,2021,9,24,58,8,'Agosto',NULL,1,NULL,NULL,NULL),(1854,NULL,2021,10,20,58,9,'Septiembre',NULL,1,NULL,NULL,NULL),(1855,NULL,2021,10,21,58,10,'Septiembre',NULL,1,NULL,NULL,NULL),(1856,NULL,2021,10,22,58,11,'Septiembre',NULL,1,NULL,NULL,NULL),(1857,NULL,2021,10,25,58,7,'Septiembre',NULL,1,NULL,NULL,NULL),(1858,NULL,2021,10,26,58,8,'Septiembre',NULL,1,NULL,NULL,NULL),(1859,NULL,2021,11,23,58,9,'Octubre',NULL,1,NULL,NULL,NULL),(1860,NULL,2021,11,24,58,10,'Octubre',NULL,1,NULL,NULL,NULL),(1861,NULL,2021,11,25,58,11,'Octubre',NULL,1,NULL,NULL,NULL),(1862,NULL,2021,11,26,58,7,'Octubre',NULL,1,NULL,NULL,NULL),(1863,NULL,2021,11,29,58,8,'Octubre',NULL,1,NULL,NULL,NULL),(1864,NULL,2021,12,20,58,9,'Noviembre',NULL,1,NULL,NULL,NULL),(1865,NULL,2021,12,21,58,10,'Noviembre',NULL,1,NULL,NULL,NULL),(1866,NULL,2021,12,22,58,11,'Noviembre',NULL,1,NULL,NULL,NULL),(1867,NULL,2021,12,23,58,7,'Noviembre',NULL,1,NULL,NULL,NULL),(1868,NULL,2021,12,27,58,8,'Noviembre',NULL,1,NULL,NULL,NULL),(1869,NULL,2022,7,20,19,4,'Recategorizacion 2',NULL,1,NULL,NULL,NULL),(1870,NULL,2022,1,17,59,5,'Diciembre',NULL,1,NULL,NULL,NULL),(1871,NULL,2022,1,18,59,6,'Diciembre',NULL,1,NULL,NULL,NULL),(1872,NULL,2022,1,19,59,7,'Diciembre',NULL,1,NULL,NULL,NULL),(1873,NULL,2022,1,20,59,8,'Diciembre',NULL,1,NULL,NULL,NULL),(1874,NULL,2022,2,15,59,5,'Enero',NULL,1,NULL,NULL,NULL),(1875,NULL,2022,2,16,59,6,'Enero',NULL,1,NULL,NULL,NULL),(1876,NULL,2022,2,17,59,7,'Enero',NULL,1,NULL,NULL,NULL),(1877,NULL,2022,2,18,59,8,'Enero',NULL,1,NULL,NULL,NULL),(1878,NULL,2022,3,15,59,5,'Febrero',NULL,1,NULL,NULL,NULL),(1879,NULL,2022,3,16,59,6,'Febrero',NULL,1,NULL,NULL,NULL),(1880,NULL,2022,3,17,59,7,'Febrero',NULL,1,NULL,NULL,NULL),(1881,NULL,2022,3,18,59,8,'Febrero',NULL,1,NULL,NULL,NULL),(1882,NULL,2022,4,18,59,5,'Marzo',NULL,1,NULL,NULL,NULL),(1883,NULL,2022,4,19,59,6,'Marzo',NULL,1,NULL,NULL,NULL),(1884,NULL,2022,4,20,59,7,'Marzo',NULL,1,NULL,NULL,NULL),(1885,NULL,2022,4,21,59,8,'Marzo',NULL,1,NULL,NULL,NULL),(1886,NULL,2022,5,16,59,5,'Abril',NULL,1,NULL,NULL,NULL),(1887,NULL,2022,5,17,59,6,'Abril',NULL,1,NULL,NULL,NULL),(1888,NULL,2022,5,18,59,7,'Abril',NULL,1,NULL,NULL,NULL),(1889,NULL,2022,5,19,59,8,'Abril',NULL,1,NULL,NULL,NULL),(1890,NULL,2022,6,15,59,5,'Mayo',NULL,1,NULL,NULL,NULL),(1891,NULL,2022,6,16,59,6,'Mayo',NULL,1,NULL,NULL,NULL),(1892,NULL,2022,6,21,59,7,'Mayo',NULL,1,NULL,NULL,NULL),(1893,NULL,2022,6,22,59,8,'Mayo',NULL,1,NULL,NULL,NULL),(1894,NULL,2022,7,15,59,5,'Junio',NULL,1,NULL,NULL,NULL),(1895,NULL,2022,7,18,59,6,'Junio',NULL,1,NULL,NULL,NULL),(1896,NULL,2022,7,19,59,7,'Junio',NULL,1,NULL,NULL,NULL),(1897,NULL,2022,7,20,59,8,'Junio',NULL,1,NULL,NULL,NULL),(1898,NULL,2022,8,16,59,5,'Julio',NULL,1,NULL,NULL,NULL),(1899,NULL,2022,8,17,59,6,'Julio',NULL,1,NULL,NULL,NULL),(1900,NULL,2022,8,18,59,7,'Julio',NULL,1,NULL,NULL,NULL),(1901,NULL,2022,8,19,59,8,'Julio',NULL,1,NULL,NULL,NULL),(1902,NULL,2022,9,15,59,5,'Agosto',NULL,1,NULL,NULL,NULL),(1903,NULL,2022,9,16,59,6,'Agosto',NULL,1,NULL,NULL,NULL),(1904,NULL,2022,9,19,59,7,'Agosto',NULL,1,NULL,NULL,NULL),(1905,NULL,2022,9,20,59,8,'Agosto',NULL,1,NULL,NULL,NULL),(1906,NULL,2022,10,17,59,5,'Septiembre',NULL,1,NULL,NULL,NULL),(1907,NULL,2022,10,18,59,6,'Septiembre',NULL,1,NULL,NULL,NULL),(1908,NULL,2022,10,19,59,7,'Septiembre',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1909,NULL,2022,10,20,59,8,'Septiembre',NULL,1,NULL,NULL,NULL),(1910,NULL,2022,11,15,59,5,'Octubre',NULL,1,NULL,NULL,NULL),(1911,NULL,2022,11,16,59,6,'Octubre',NULL,1,NULL,NULL,NULL),(1912,NULL,2022,11,17,59,7,'Octubre',NULL,1,NULL,NULL,NULL),(1913,NULL,2022,11,18,59,8,'Octubre',NULL,1,NULL,NULL,NULL),(1914,NULL,2022,12,15,59,5,'Noviembre',NULL,1,NULL,NULL,NULL),(1915,NULL,2022,12,16,59,6,'Noviembre',NULL,1,NULL,NULL,NULL),(1916,NULL,2022,12,19,59,7,'Noviembre',NULL,1,NULL,NULL,NULL),(1917,NULL,2022,12,20,59,8,'Noviembre',NULL,1,NULL,NULL,NULL),(1918,NULL,2022,5,16,60,5,'DDJJ Anual',NULL,1,NULL,NULL,NULL),(1919,NULL,2022,5,17,60,5,'DDJJ Anual',NULL,1,NULL,NULL,NULL),(1920,NULL,2022,5,18,60,6,'DDJJ Anual',NULL,1,NULL,NULL,NULL),(1921,NULL,2022,5,19,60,7,'DDJJ Anual',NULL,1,NULL,NULL,NULL),(1922,NULL,2022,2,17,61,5,'Enero',NULL,1,NULL,NULL,NULL),(1923,NULL,2022,2,18,61,6,'Enero',NULL,1,NULL,NULL,NULL),(1924,NULL,2022,2,21,61,7,'Enero',NULL,1,NULL,NULL,NULL),(1925,NULL,2022,2,22,61,8,'Enero',NULL,1,NULL,NULL,NULL),(1926,NULL,2022,3,16,61,5,'Febrero',NULL,1,NULL,NULL,NULL),(1927,NULL,2022,3,17,61,6,'Febrero',NULL,1,NULL,NULL,NULL),(1928,NULL,2022,3,18,61,7,'Febrero',NULL,1,NULL,NULL,NULL),(1929,NULL,2022,3,21,61,8,'Febrero',NULL,1,NULL,NULL,NULL),(1930,NULL,2022,4,18,61,5,'Marzo',NULL,1,NULL,NULL,NULL),(1931,NULL,2022,4,19,61,6,'Marzo',NULL,1,NULL,NULL,NULL),(1932,NULL,2022,4,20,61,7,'Marzo',NULL,1,NULL,NULL,NULL),(1933,NULL,2022,4,21,61,8,'Marzo',NULL,1,NULL,NULL,NULL),(1934,NULL,2022,5,17,61,5,'Abril',NULL,1,NULL,NULL,NULL),(1935,NULL,2022,5,19,61,6,'Abril',NULL,1,NULL,NULL,NULL),(1936,NULL,2022,5,20,61,7,'Abril',NULL,1,NULL,NULL,NULL),(1937,NULL,2022,5,23,61,8,'Abril',NULL,1,NULL,NULL,NULL),(1938,NULL,2022,6,21,61,5,'Mayo',NULL,1,NULL,NULL,NULL),(1939,NULL,2022,6,22,61,6,'Mayo',NULL,1,NULL,NULL,NULL),(1940,NULL,2022,6,23,61,7,'Mayo',NULL,1,NULL,NULL,NULL),(1941,NULL,2022,6,24,61,8,'Mayo',NULL,1,NULL,NULL,NULL),(1942,NULL,2022,7,18,61,5,'Junio',NULL,1,NULL,NULL,NULL),(1943,NULL,2022,7,19,61,6,'Junio',NULL,1,NULL,NULL,NULL),(1944,NULL,2022,7,20,61,7,'Junio',NULL,1,NULL,NULL,NULL),(1945,NULL,2022,7,21,61,8,'Junio',NULL,1,NULL,NULL,NULL),(1946,NULL,2022,8,16,61,5,'Julio',NULL,1,NULL,NULL,NULL),(1947,NULL,2022,8,17,61,6,'Julio',NULL,1,NULL,NULL,NULL),(1948,NULL,2022,8,18,61,7,'Julio',NULL,1,NULL,NULL,NULL),(1949,NULL,2022,8,19,61,8,'Julio',NULL,1,NULL,NULL,NULL),(1950,NULL,2022,9,19,61,5,'Agosto',NULL,1,NULL,NULL,NULL),(1951,NULL,2022,9,20,61,6,'Agosto',NULL,1,NULL,NULL,NULL),(1952,NULL,2022,9,21,61,7,'Agosto',NULL,1,NULL,NULL,NULL),(1953,NULL,2022,9,22,61,8,'Agosto',NULL,1,NULL,NULL,NULL),(1954,NULL,2022,10,17,61,5,'Septiembre',NULL,1,NULL,NULL,NULL),(1955,NULL,2022,10,18,61,6,'Septiembre',NULL,1,NULL,NULL,NULL),(1956,NULL,2022,10,19,61,7,'Septiembre',NULL,1,NULL,NULL,NULL),(1957,NULL,2022,10,20,61,8,'Septiembre',NULL,1,NULL,NULL,NULL),(1958,NULL,2022,11,16,61,5,'Octubre',NULL,1,NULL,NULL,NULL),(1959,NULL,2022,11,17,61,6,'Octubre',NULL,1,NULL,NULL,NULL),(1960,NULL,2022,11,18,61,7,'Octubre',NULL,1,NULL,NULL,NULL),(1961,NULL,2022,11,22,61,8,'Octubre',NULL,1,NULL,NULL,NULL),(1962,NULL,2022,12,19,61,5,'Noviembre',NULL,1,NULL,NULL,NULL),(1963,NULL,2022,12,20,61,6,'Noviembre',NULL,1,NULL,NULL,NULL),(1964,NULL,2022,12,21,61,7,'Noviembre',NULL,1,NULL,NULL,NULL),(1965,NULL,2022,12,22,61,8,'Noviembre',NULL,1,NULL,NULL,NULL),(1966,NULL,2023,1,17,61,5,'Diciembre',NULL,1,NULL,NULL,NULL),(1967,NULL,2023,1,18,61,6,'Diciembre',NULL,1,NULL,NULL,NULL),(1968,NULL,2023,1,19,61,7,'Diciembre',NULL,1,NULL,NULL,NULL),(1969,NULL,2023,1,20,61,8,'Diciembre',NULL,1,NULL,NULL,NULL),(1970,NULL,2023,5,16,22,6,'Anual',NULL,1,NULL,NULL,NULL),(1971,NULL,2023,5,17,22,7,'Anual',NULL,1,NULL,NULL,NULL),(1972,NULL,2023,5,18,22,8,'Anual',NULL,1,NULL,NULL,NULL),(1973,NULL,2023,1,23,62,1,'12',NULL,1,NULL,NULL,NULL),(1974,NULL,2023,1,24,62,2,'12',NULL,1,NULL,NULL,NULL),(1975,NULL,2023,1,25,62,3,'12',NULL,1,NULL,NULL,NULL);
INSERT INTO `vto_vencimiento` VALUES (1976,NULL,2023,2,22,62,1,'1',NULL,1,NULL,NULL,NULL),(1977,NULL,2023,2,23,62,2,'1',NULL,1,NULL,NULL,NULL),(1978,NULL,2023,2,24,62,3,'1',NULL,1,NULL,NULL,NULL),(1979,NULL,2023,3,21,62,1,'2',NULL,1,NULL,NULL,NULL),(1980,NULL,2023,3,22,62,2,'2',NULL,1,NULL,NULL,NULL),(1981,NULL,2023,3,23,62,3,'2',NULL,1,NULL,NULL,NULL),(1982,NULL,2023,4,21,62,1,'3',NULL,1,NULL,NULL,NULL),(1983,NULL,2023,4,24,62,2,'3',NULL,1,NULL,NULL,NULL),(1984,NULL,2023,4,25,62,3,'3',NULL,1,NULL,NULL,NULL),(1985,NULL,2023,5,22,62,1,'4',NULL,1,NULL,NULL,NULL),(1986,NULL,2023,5,23,62,2,'4',NULL,1,NULL,NULL,NULL),(1987,NULL,2023,5,24,62,3,'4',NULL,1,NULL,NULL,NULL),(1988,NULL,2023,6,21,62,1,'5',NULL,1,NULL,NULL,NULL),(1989,NULL,2023,6,22,62,2,'5',NULL,1,NULL,NULL,NULL),(1990,NULL,2023,6,23,62,3,'5',NULL,1,NULL,NULL,NULL),(1991,NULL,2023,7,21,62,1,'6',NULL,1,NULL,NULL,NULL),(1992,NULL,2023,7,24,62,2,'6',NULL,1,NULL,NULL,NULL),(1993,NULL,2023,7,25,62,3,'6',NULL,1,NULL,NULL,NULL),(1994,NULL,2023,8,22,62,1,'7',NULL,1,NULL,NULL,NULL),(1995,NULL,2023,8,23,62,2,'7',NULL,1,NULL,NULL,NULL),(1996,NULL,2023,8,24,62,3,'7',NULL,1,NULL,NULL,NULL),(1997,NULL,2023,9,21,62,1,'8',NULL,1,NULL,NULL,NULL),(1998,NULL,2023,9,22,62,2,'8',NULL,1,NULL,NULL,NULL),(1999,NULL,2023,9,25,62,3,'8',NULL,1,NULL,NULL,NULL),(2000,NULL,2023,10,23,62,1,'9',NULL,1,NULL,NULL,NULL),(2001,NULL,2023,10,24,62,2,'9',NULL,1,NULL,NULL,NULL),(2002,NULL,2023,10,25,62,3,'9',NULL,1,NULL,NULL,NULL),(2003,NULL,2023,11,21,62,1,'10',NULL,1,NULL,NULL,NULL),(2004,NULL,2023,11,22,62,2,'10',NULL,1,NULL,NULL,NULL),(2005,NULL,2023,11,23,62,3,'10',NULL,1,NULL,NULL,NULL),(2006,NULL,2023,12,20,62,1,'11',NULL,1,NULL,NULL,NULL),(2007,NULL,2023,12,21,62,2,'11',NULL,1,NULL,NULL,NULL),(2008,NULL,2023,12,22,62,3,'11',NULL,1,NULL,NULL,NULL);

--
-- Table structure for table `zones`
--

CREATE TABLE `zones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sifere_coef` decimal(16,2) DEFAULT '0.00',
  `iibb_aliquot` decimal(16,2) DEFAULT '0.00',
  `iibb_perception_id` int(10) unsigned DEFAULT NULL,
  `retention_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sircreb_plan_cuenta_id` int(10) unsigned NOT NULL DEFAULT '1',
  `codigo_cm` int(11) NOT NULL DEFAULT '0',
  `codigo_afip` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `zones_name_unique` (`name`),
  KEY `zones_sircreb_plan_cuenta_id_foreign` (`sircreb_plan_cuenta_id`),
  CONSTRAINT `zones_sircreb_plan_cuenta_id_foreign` FOREIGN KEY (`sircreb_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zones`
--

INSERT INTO `zones` VALUES (1,'Córdoba',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','10',281,904,'3'),(2,'Corrientes',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','20',282,905,'4'),(3,'Chaco',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','26',279,906,'16'),(4,'Chubut',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','29',280,907,'17'),(5,'Entre Ríos',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','30',283,908,'5'),(6,'Formosa',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','35',284,909,'18'),(7,'Jujuy',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','37',285,910,'6'),(8,'La Pampa',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','38',286,911,'21'),(9,'La Rioja',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','47',287,912,'8'),(10,'Mendoza',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','49',288,913,'7'),(11,'Misiones',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','51',289,914,'19'),(12,'Neuquén',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','56',290,915,'20'),(13,'Río Negro',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','57',292,916,'22'),(14,'Salta',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','62',293,917,'9'),(15,'San Juan',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','64',294,918,'10'),(16,'San Luis',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','66',295,919,'11'),(17,'Santa Cruz',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','69',296,920,'23'),(18,'Santa Fe',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','70',297,921,'12'),(19,'Santiago del Estero',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','76',298,922,'13'),(20,'Tierra del Fuego',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','83',299,923,'24'),(21,'Tucuman',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','85',300,924,'14'),(22,'Capital Federal',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','01',277,901,'0'),(23,'Buenos Aires',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','02',276,902,'1'),(24,'Catamarca',0.00,0.00,NULL,NULL,NULL,'2022-02-10 10:43:17','09',278,903,'2'),(25,'Pascua Lama',0.00,0.00,NULL,NULL,NULL,NULL,'E3',291,0,NULL);

--
-- Dumping routines for database 'db23-29813557-4'
--
/*!50003 DROP PROCEDURE IF EXISTS `anticipos_ganancias` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `anticipos_ganancias`(anioUno int,anioDos int,anioTres int,anioCuatro int,
anioCinco int,anioSeis int,anioSiete int,anioOcho int,anioNueve int,anioDiez int,anioOnce int,anioDoce int,mesUno int,
mesDos int,mesTres int,mesCuatro int,mesCinco int,mesSeis int,mesSiete int,mesOcho int,mesNueve int,mesDiez int,
mesOnce int,mesDoce int, person_id int)
BEGIN

    SELECT 
        `types`.`id` AS `IdOperacion`,
        `types`.`name` AS `Operacion`,
        `receipts`.`person_id_owner` AS `IdEmpresa`,
        `b`.`document` AS `DocumentoEmpresa`,
        `b`.`field_name1` AS `NombreEmpresa`,
        SUM((CASE
            WHEN (`p`.`year` = anioUno) AND (`p`.`period_number` = mesUno) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `UNO`,
        SUM((CASE
            WHEN (`p`.`year` = anioDos) AND (`p`.`period_number` = mesDos) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `DOS`,
        SUM((CASE
            WHEN (`p`.`year` = anioTres) AND (`p`.`period_number` = mesTres) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `TRES`,
        SUM((CASE
            WHEN (`p`.`year` = anioCuatro) AND (`p`.`period_number` = mesCuatro) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `CUATRO`,
        SUM((CASE
            WHEN (`p`.`year` = anioCinco) AND (`p`.`period_number` = mesCinco) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `CINCO`,
        SUM((CASE
            WHEN (`p`.`year` = anioSeis) AND (`p`.`period_number` = mesSeis) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `SEIS`,
        SUM((CASE
            WHEN (`p`.`year` = anioSiete) AND (`p`.`period_number` = mesSiete) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `SIETE`,
        SUM((CASE
            WHEN (`p`.`year` = anioOcho) AND (`p`.`period_number` = mesOcho) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `OCHO`,
        SUM((CASE
            WHEN (`p`.`year` = anioNueve) AND (`p`.`period_number` = mesNueve) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `NUEVE`,
        SUM((CASE
            WHEN (`p`.`year` = anioDiez) AND (`p`.`period_number` = mesDiez) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `DIEZ`,
        SUM((CASE
            WHEN (`p`.`year` = anioOnce) AND (`p`.`period_number` = mesOnce) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `ONCE`,
        SUM((CASE
            WHEN (`p`.`year` = anioDoce) AND (`p`.`period_number` = mesDoce) THEN `receipts`.`amount`
            ELSE 0
        END)) AS `DOCE`
    FROM
        (((((`receipts`
        LEFT JOIN `persons` `b` ON ((`receipts`.`person_id_owner` = `b`.`id`)))
        LEFT JOIN `periods` `p` ON ((`receipts`.`period_id` = `p`.`id`)))
        LEFT JOIN `status` ON ((`receipts`.`status_id` = `status`.`id`)))
        LEFT JOIN `persons` ON ((`receipts`.`person_id_relationed` = `persons`.`id`)))
        LEFT JOIN `types` ON ((`receipts`.`type_id` = `types`.`id`)))
    WHERE
        (`types`.`id` IN (4 , 5, 6))
        and receipts.deleted_at is null
        and  `receipts`.`person_id_owner`= person_id
    GROUP BY `types`.`id` , `types`.`name` , `receipts`.`person_id_owner` , `b`.`document` , `b`.`field_name1`
    ORDER BY `types`.`id` , `receipts`.`person_id_owner`

;

  END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `asiento_sueldo` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `asiento_sueldo`(anioUno int,anioDos int,anioTres int,anioCuatro int,anioCinco int,
        anioSeis int,anioSiete int,anioOcho int,anioNueve int,anioDiez int,anioOnce int,anioDoce int,mesUno int,mesDos int,mesTres int,mesCuatro int,mesCinco int,mesSeis int,mesSiete int,mesOcho int,mesNueve int,mesDiez int,
        mesOnce int,mesDoce int, person_id int)
BEGIN
            
            SELECT
    `bld`.`person_id` AS `person_id`,
    `p`.`field_name1` AS `empresa`,
    SUM((CASE
             WHEN
                     (`periods`.`year` = anioUno)
                     AND (`periods`.`period_number` = mesUno)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `UNO`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioDos)
                     AND (`periods`.`period_number` = mesDos)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `DOS`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioTres)
                     AND (`periods`.`period_number` = mesTres)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `TRES`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioCuatro)
                     AND (`periods`.`period_number` = mesCuatro)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `CUATRO`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioCinco)
                     AND (`periods`.`period_number` = mesCinco)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `CINCO`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioSeis)
                     AND (`periods`.`period_number` = mesSeis)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `SEIS`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioSiete)
                     AND (`periods`.`period_number` = mesSiete)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `SIETE`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioOcho)
                     AND (`periods`.`period_number` = mesOcho)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `OCHO`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioNueve)
                     AND (`periods`.`period_number` = mesNueve)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `NUEVE`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioDiez)
                     AND (`periods`.`period_number` = mesDiez)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `DIEZ`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioOnce)
                     AND (`periods`.`period_number` = mesOnce)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `ONCE`,

    SUM((CASE
             WHEN
                     (`periods`.`year` = anioDoce)
                     AND (`periods`.`period_number` = mesDoce)
                 THEN
                 (CASE
                      WHEN
                          ((`pc`.`id` = 110)
                              OR (`pc`.`id` = 111)
                              OR (`pc`.`id` = 112))
                          THEN
                          `bld`.`monto`
                     END)
        END)) AS `DOCE`

FROM
    (((((`balance_libro_details` `bld`
        LEFT JOIN `conta_tipo_saldos` `ts` ON ((`bld`.`saldo_id` = `ts`.`id`)))
        LEFT JOIN `persons` `p` ON ((`bld`.`person_id` = `p`.`id`)))
        LEFT JOIN `periods` ON ((`bld`.`period_id` = `periods`.`id`)))
        LEFT JOIN `conta_tipo_asientos` `ta` ON ((`bld`.`conta_tipo_asiento_id` = `ta`.`id`)))
        LEFT JOIN `conta_plan_cuenta` `pc` ON ((`bld`.`plan_cuenta_id` = `pc`.`id`)))

where `bld`.deleted_at is null
	and `bld`.`person_id` = person_id

GROUP BY `bld`.`person_id` , `p`.`field_name1`;
        
        
          END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `assingFromPeriodsPerson` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `assingFromPeriodsPerson`(from_year int, from_month int, personId int)
BEGIN
          declare done int default 0;
          declare counter int default 0;
          declare endYear, initialMonth, person_ids, endMonth int;
          declare code_period varchar(20);
          DECLARE currents CURSOR FOR
            SELECT case when min(code) is not null then min(code) else pc.liquidation_start_period end as code, pc.person_id
              FROM person_configurations pc
              left join periods pd on pc.person_id = pd.person_id
              where pc.liquidation_start_period is not null
               and pc.person_id = personId
              GROUP BY person_id, pc.liquidation_start_period
          ;

          DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;

          insert into log_debug (function_name, message, date) VALUES('assingFromPeriodsPerson', concat('ejecutando funcion'), now() );

          OPEN currents;
          REPEAT
            FETCH currents INTO code_period, person_ids;

            IF NOT done THEN
            set counter = 1;
            set endYear = CAST(SUBSTRING(code_period,1,4) AS SIGNED);
            set endMonth = 0;

            insert into log_debug (function_name, message, date) VALUES('assingFromPeriodsPerson', concat('Iterando cada empresa, Empres id->', person_ids,', periodo->', code_period), now() );


             while from_year <= endYear do
                insert into log_debug (function_name, message, date) VALUES('assingFromPeriodsPerson', concat('While de empresa, from_year->', from_year,', initialMonth->', initialMonth, ', contador->', counter), now() );

                set initialMonth = from_month;
                if(from_year!=endYear) then
                    set endMonth = 12;
                else
                    set endMonth = CAST(SUBSTRING(code_period,6,LENGTH(code_period)) AS SIGNED) -1;
                end if;
                
                if(counter!=1)then
                    set initialMonth = 1;
                else
                    set initialMonth = from_month;
                end if;

               insert Into periods (code, year, period_number, date_from, date_to, person_id)
                 select concat(from_year, '-', lpad(m.month, 2, '0')), from_year, m.month,
                  concat(from_year, '-', m.month, '-01'), concat(from_year, m.date_to),
                  p.id from persons p, months m
                  where p.id = person_ids
                  and (m.month >= initialMonth and m.month <= endMonth)
                   order by 2,3;
               set from_year = from_year + 1;
               set counter = counter +1;
             END WHILE;
            END IF;

          UNTIL done END REPEAT;

          CLOSE currents;
        END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `assingMorePeriods` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `assingMorePeriods`(to_year int)
BEGIN
          declare done int default 0;
          declare counter int default 0;
          declare end_year, initial_month, person_ids, endMonth int;
          declare code_period varchar(20);
          DECLARE currents CURSOR FOR
        	SELECT case when max(code) is not null then max(code) else pc.liquidation_start_period end as code, pc.person_id
        	  FROM person_configurations pc
        	  left join periods pd on pc.person_id = pd.person_id
              where pc.liquidation_start_period is not null
              GROUP BY person_id, pc.liquidation_start_period
          ;

          DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;

          insert into log_debug (function_name, message, date) VALUES('assingMorePeriods', concat('ejecutando funcion'), now() );

          OPEN currents;
          REPEAT
            FETCH currents INTO code_period, person_ids;

            IF NOT done THEN
        	set counter = 0;
        	set end_year = CAST(SUBSTRING(code_period,1,4) AS SIGNED);
            set initial_month = CAST(SUBSTRING(code_period,6,LENGTH(code_period)) AS SIGNED) + 1;

            insert into log_debug (function_name, message, date) VALUES('assingMorePeriods', concat('Iterando cada empresa, Empres id->', person_ids,', periodo->', code_period), now() );


        	 while end_year <= to_year do
        		insert into log_debug (function_name, message, date) VALUES('assingMorePeriods', concat('While de empresa, year->', end_year,', initial_month->', initial_month, ', contador->', counter), now() );

        		IF counter > 0 then set initial_month = 1; end if;
        		set endMonth = 12;

               insert Into periods (code, year, period_number, date_from, date_to, person_id)
                 select concat(end_year, '-', lpad(m.month, 2, '0')), end_year, m.month,
                  concat(end_year, '-', m.month, '-01'), concat(end_year, m.date_to),
                  p.id from persons p, months m
                  where p.id = person_ids
                  and (m.month >= initial_month and m.month <= endMonth)
                   order by 2,3;
               set end_year = end_year + 1;
               set counter = counter +1;
        	 END WHILE;
            END IF;

          UNTIL done END REPEAT;

          CLOSE currents;
        END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `assingPeriodsToAllBusiness` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `assingPeriodsToAllBusiness`(from_code varchar(7), to_code varchar(7))
BEGIN
          declare done int default 0;
          declare counter int default 0;
          declare end_year, from_year, to_year, to_month, initial_month, person_ids, endMonth int;
          declare code_period varchar(20);
          DECLARE currents CURSOR FOR
        	SELECT case when max(code) is not null then max(code) else pc.liquidation_start_period end as code, pc.person_id
        	  FROM person_configurations pc
        	  left join periods pd on pc.person_id = pd.person_id
              where pc.liquidation_start_period is not null
              GROUP BY person_id, pc.liquidation_start_period
          ;

          DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;

          insert into log_debug (function_name, message, date) VALUES('assingPeriodsToBusiness', concat('ejecutando funcion'), now() );

          OPEN currents;
          REPEAT
            FETCH currents INTO code_period, person_ids;

            IF NOT done THEN
        	set counter = 0;
        	set end_year = CAST(SUBSTRING(code_period,1,4) AS SIGNED);

            set from_year = CAST(SUBSTRING(from_code,1,4) AS SIGNED);
            
            set initial_month = CAST(SUBSTRING(from_code,6,2) AS SIGNED);

            set to_month = CAST(SUBSTRING(to_code,6,2) AS SIGNED);
            set to_year = CAST(SUBSTRING(to_code,1,4) AS SIGNED);

            

        	 while from_year <= to_year do
             
        	 

        		IF counter > 0 then
					set initial_month = 1;
				end if;

                if from_year < to_year then
					set endMonth = 12;
				else
					set endMonth = to_month;
                end if;

                insert into log_debug (function_name, message, date) VALUES('assingPeriodsToBusiness'
                  , concat('While de empresa, year->', from_year,', initial_month->', initial_month, ', endMonth->', endMonth, ', contador->', counter)
                  , now() );

               insert Into periods (code, year, period_number, date_from, date_to, person_id)

                  select t1.code, t1.year, t1.month, t1.day_from, t1.day_to, t1.person_id
					from
					(select concat(from_year, '-', lpad(m.month, 2, '0')) as code, from_year as year, m.month,
					  concat(from_year, '-', m.month, '-01') as day_from, concat(from_year, m.date_to) as day_to,
					  p.id as person_id, concat(p.id, from_year, '-', lpad(m.month, 2, '0')) as pcodigo
					  from persons p, months m
					  where p.id = person_ids
					  and (m.month >= initial_month and m.month <= endMonth) ) as t1
					   where t1.pcodigo not in
					   (select concat(pe.person_id, pe.code) from periods as pe where person_id=person_ids and year=from_year )

                   order by 2,3;
               set from_year = from_year + 1;
               
               set counter = counter +1;
        	 END WHILE;
            END IF;

          UNTIL done END REPEAT;

          CLOSE currents;
        END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `assingPeriodsToBusiness` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `assingPeriodsToBusiness`(from_code varchar(7), to_code varchar(7), Pperson_id int)
BEGIN
          declare done int default 0;
          declare counter int default 0;
          declare end_year, from_year, to_year, to_month, initial_month, person_ids, endMonth int;
          declare code_period varchar(20);
          DECLARE currents CURSOR FOR
        	SELECT case when max(code) is not null then max(code) else pc.liquidation_start_period end as code, pc.person_id
        	  FROM person_configurations pc
        	  left join periods pd on pc.person_id = pd.person_id
              where pc.liquidation_start_period is not null
              and pd.person_id = Pperson_id
              GROUP BY person_id, pc.liquidation_start_period
          ;

          DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;

          insert into log_debug (function_name, message, date) VALUES('assingPeriodsToBusiness', concat('ejecutando funcion'), now() );

          OPEN currents;
          REPEAT
            FETCH currents INTO code_period, person_ids;

            IF NOT done THEN
        	set counter = 0;
        	set end_year = CAST(SUBSTRING(code_period,1,4) AS SIGNED);

            set from_year = CAST(SUBSTRING(from_code,1,4) AS SIGNED);
            
            set initial_month = CAST(SUBSTRING(from_code,6,2) AS SIGNED);

            set to_month = CAST(SUBSTRING(to_code,6,2) AS SIGNED);
            set to_year = CAST(SUBSTRING(to_code,1,4) AS SIGNED);

            

        	 while from_year <= to_year do
             
        	 

        		IF counter > 0 then set initial_month = 1; end if;

                if from_year < to_year then set endMonth = 12; else set endMonth = to_month; end if;
                insert into log_debug (function_name, message, date) VALUES('assingPeriodsToBusiness'
                  , concat('While de empresa, year->', from_year,', initial_month->', initial_month, ', endMonth->', endMonth, ', contador->', counter)
                  , now() );
               insert Into periods (code, year, period_number, date_from, date_to, person_id)
                  select t1.code, t1.year, t1.month, t1.day_from, t1.day_to, t1.person_id
					from
					(select concat(from_year, '-', lpad(m.month, 2, '0')) as code, from_year as year, m.month,
					  concat(from_year, '-', m.month, '-01') as day_from, concat(from_year, m.date_to) as day_to,
					  p.id as person_id, concat(p.id, from_year, '-', lpad(m.month, 2, '0')) as pcodigo
					  from persons p, months m
					  where p.id = person_ids
					  and (m.month >= initial_month and m.month <= endMonth) ) as t1
					   where t1.pcodigo not in
					   (select concat(pe.person_id, pe.code) from periods as pe where person_id=person_ids and year=from_year )
                   order by 2,3;
               set from_year = from_year + 1;
               
               set counter = counter +1;
        	 END WHILE;
            END IF;
          UNTIL done END REPEAT;
          CLOSE currents;
        END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreacionUsuarioEmpresa` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `CreacionUsuarioEmpresa`(
            in usuario varchar(100),
            in email varchar(100),
            in person_id varchar(100),
            in parent_person_id varchar(100)
            )
BEGIN

            START TRANSACTION;

            
            insert into tusers (loginUser, claveUser, emailUser, user_type_id)
            values (usuario, "$2y$10$STkVOGUoqFuysS6UTcIU5udWXGfivahbCF4Fou7lLGPORBsiyctG.", email, 2);

            
            insert into tusermodules (idUser, idModule)
            select u.idUser, m.idModule
            from tusers u, tmodules m
            where u.loginUser= usuario
            and m.idModule in (16,19,21,26,27);

            
            insert into user_persons (user_id, person_id,parent_person_id)
            select u.idUser, p.id, parent_person_id
            from tusers u, persons p
            where u.loginUser= usuario
            and p.id = person_id;
            

            COMMIT;

            END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `cta_cte_cliente` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `cta_cte_cliente`(person_id Int)
BEGIN
SELECT
        `cta`.`id` as `id_cta_cte`,
        `ta`.`id` AS `tipo_asiento_id`,
        `conta_t_a`.`nombre` AS `operacion`,
        `cta`.`saldo_id` AS `saldo_id`,
        `cta`.`comentario` AS `comentario`,
        `cta`.`person_id`,
        `cta`.`person_id_relationed`,
        `periods`.`id` as `period_id`,
        `periods`.`code` as `periodo_code`,
        `ta`.`nombre` AS `asiento`,
        `cta`.`cta_cte_tesoreria_cuenta_id` AS `cuenta_tesoreria_id`,
        `cta_tesoreria`.`nombre` AS `cuenta`,
        `cta`.`fecha` AS `fecha`,
        `p`.`field_name1` AS `empresa_titular`,
        `p`.`document` AS `empresa_titular_cuit`,
        `zone_titular`.`name` AS `empresa_titular_zone`,
        `zone_titular`.`id` AS `empresa_titular_zone_id`,
        `per_rela`.`field_name1` AS `empresa_relacionada`,
        `per_rela`.`document` AS `empresa_relacionada_cuit`,
        `per_rela`.`address` AS `empresa_relacionada_direccion`,
        `per_rela`.`address` AS `empresa_relacionada_direccion`,
        `zone_rela`.`name` AS `empresa_relacionada_zone`,
        `zone_rela`.`id` AS `empresa_relacionada_zone_id`,
        `cta`.`file`,
        (CASE
            WHEN (`cta`.`saldo_id` = 1) THEN `cta`.`total`
            ELSE 0
        END) AS `DEBE`,
        (CASE
            WHEN (`cta`.`saldo_id` = 2) THEN `cta`.`total`
            ELSE 0
        END) AS `HABER`,
        `cta`.`total`
    FROM `cta_cte_cliente` `cta`
        JOIN `conta_tipo_saldos` `ts` ON `cta`.`saldo_id` = `ts`.`id`
        JOIN `persons` `p` ON `cta`.`person_id` = `p`.`id`
        JOIN `persons` `per_rela` ON `cta`.`person_id_relationed` = `per_rela`.`id`
        JOIN `periods` ON `cta`.`period_id` = `periods`.`id`
        LEFT JOIN `zones` `zone_titular` ON `p`.`zone_id` = `zone_titular`.`id`
        LEFT JOIN `zones` `zone_rela` ON `per_rela`.`zone_id` = `zone_rela`.`id`
        JOIN `conta_tipo_asientos` `ta` ON `cta`.`tipo_asiento_id` = `ta`.`id`
        JOIN `cta_cte_tesoreria_cuentas` `cta_tesoreria` ON `cta`.`cta_cte_tesoreria_cuenta_id` = `cta_tesoreria`.`id`
        JOIN `conta_tipo_asientos` `conta_t_a` ON `cta`.`tipo_asiento_id` = `conta_t_a`.`id`
    
    WHERE
        `cta`.`person_id` = person_id
        and (`cta`.tipo_asiento_id = 20 or `cta`.tipo_asiento_id = 21 )
        
    ORDER BY `cta`.`id` , `cta`.`id` , `cta`.`saldo_id` , `p`.`field_name1`;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `delete_liquidation_status1` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `delete_liquidation_status1`()
BEGIN
    
    
    delete from period_liquidation_iva_details where period_liquidation_id in
    (
      SELECT id from
        (
        select * FROM period_liquidations where status =1
        ) foo
    );

    
    delete FROM period_liquidation_iva where period_liquidation_id in
    (
      SELECT id FROM period_liquidations where status =1
    );

    
    delete FROM period_liquidation_details where period_liquidation_id in
    (
    SELECT id FROM period_liquidations where status =1
    );

    
    delete FROM period_liquidations where status =1;

  END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `iibb_gasto` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `iibb_gasto`(anioUno int,anioDos int,anioTres int,anioCuatro int,anioCinco int,
        anioSeis int,anioSiete int,anioOcho int,anioNueve int,anioDiez int,anioOnce int,anioDoce int,mesUno int,mesDos int,
        mesTres int,mesCuatro int,mesCinco int,mesSeis int,mesSiete int,mesOcho int,mesNueve int,mesDiez int,
        mesOnce int,mesDoce int, person_id int)
BEGIN
        
            SELECT 
        `pld`.`person_id` AS `IdEmpresa`,
        `b`.`field_name1` AS `NombreEmpresa`,
                        SUM((CASE
                    WHEN 
                        (`p`.`year` = anioUno)
                        AND (`p`.`period_number` = mesUno)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `UNO`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioDos)
                        AND (`p`.`period_number` = mesDos)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `DOS`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioTres)
                        AND (`p`.`period_number` = mesTres)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `TRES`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioCuatro)
                        AND (`p`.`period_number` = mesCuatro)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `CUATRO`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioCinco)
                        AND (`p`.`period_number` = mesCinco)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `CINCO`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioSeis)
                        AND (`p`.`period_number` = mesSeis)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `SEIS`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioSiete)
                        AND (`p`.`period_number` = mesSiete)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `SIETE`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioOcho)
                        AND (`p`.`period_number` = mesOcho)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `OCHO`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioNueve)
                        AND (`p`.`period_number` = mesNueve)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `NUEVE`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioDiez)
                        AND (`p`.`period_number` = mesDiez)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `DIEZ`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioOnce)
                        AND (`p`.`period_number` = mesOnce)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `ONCE`,
                SUM((CASE
                    WHEN 
                        (`p`.`year` = anioDoce)
                        AND (`p`.`period_number` = mesDoce)
                            THEN `pld`.`tax_amount`
                    ELSE 0
                END)) AS `DOCE`

    FROM
        (((((((`period_liquidation_details` `pld`
        LEFT JOIN `persons` `b` ON ((`pld`.`person_id` = `b`.`id`)))
        LEFT JOIN `person_liquidators` ON ((`b`.`id` = `person_liquidators`.`person_id`)))
        LEFT JOIN `liquidators` ON ((`person_liquidators`.`liquidator_id` = `liquidators`.`id`)))
        LEFT JOIN `person_configurations` ON ((`pld`.`person_id` = `person_configurations`.`person_id`)))
        LEFT JOIN `periods` `p` ON ((`pld`.`period_id` = `p`.`id`)))
        LEFT JOIN `period_liquidations` `pl` ON ((`pld`.`period_liquidation_id` = `pl`.`id`)))
        LEFT JOIN `zones` `z` ON ((`pld`.`zone_id` = `z`.`id`)))
    WHERE
        `pld`.person_id = person_id
    ORDER BY `p`.`code` , `b`.`field_name1`;
          END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `liquidacionesIIBB` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `liquidacionesIIBB`(person_id int)
BEGIN
        
            SELECT 
                `pl`.`status` AS `Status`,
                `pld`.`id` AS `IdLiquidacionIIBB`,
                `pld`.`period_liquidation_id` AS `period_liquidation_id`,
                `liquidators`.`name` AS `liquidador`,
                `pld`.`period_id` AS `IdPeriodo`,
                `pld`.`person_id` AS `IdEmpresa`,
                `b`.`document` AS `DocumentoEmpresa`,
                `b`.`field_name1` AS `NombreEmpresa`,
                `p`.`year` AS `anio`,
                `p`.`period_number` AS `mes`,
                `p`.`date_from` AS `Desde`,
                `p`.`date_to` AS `Hasta`,
                `p`.`code` AS `Periodo`,
                `z`.`name` AS `Zona`,
                `pld`.`coef` AS `coeficiente`,
                `pld`.`aliquot` AS `alicuota`,
                `pld`.`base_amount` AS `baseImponible`,
                `pld`.`tax_amount` AS `impuesto`,
                `pld`.`previous_period_balance` AS `saldoAnterior`,
                `pld`.`sircreb_amount` AS `sircreb`,
                `pld`.`perception_amount` AS `percepciones`,
                `pld`.`retention_amount` AS `retenciones`,
                (SELECT 
                        `plia`.`negative_amount`
                    FROM
                        `period_liquidation_details` `plia`
                    WHERE
                        ((`pld`.`zone_id` = `plia`.`zone_id`)
                            AND (`plia`.`period_id` = (SELECT 
                                `pa`.`id`
                            FROM
                                `periods` `pa`
                            WHERE
                                ((`pa`.`person_id` = `b`.`id`)
                                    AND (`pa`.`period_number` = (CASE
                                    WHEN (`p`.`period_number` > 1) THEN (`p`.`period_number` - 1)
                                    ELSE 12
                                END))
                                    AND (`pa`.`year` = (CASE
                                    WHEN (`p`.`period_number` = 1) THEN (`p`.`year` - 1)
                                    ELSE `p`.`year`
                                END))))))) AS `A_PAGAR_ANTERIOR`,
                `pld`.`negative_amount` AS `A_Pagar`,
                `pld`.`positive_amount` AS `A_Favor`
            FROM
                (((((((`period_liquidation_details` `pld`
                LEFT JOIN `persons` `b` ON ((`pld`.`person_id` = `b`.`id`)))
                LEFT JOIN `person_liquidators` ON ((`b`.`id` = `person_liquidators`.`person_id`)))
                LEFT JOIN `liquidators` ON ((`person_liquidators`.`liquidator_id` = `liquidators`.`id`)))
                LEFT JOIN `person_configurations` ON ((`pld`.`person_id` = `person_configurations`.`person_id`)))
                LEFT JOIN `periods` `p` ON ((`pld`.`period_id` = `p`.`id`)))
                LEFT JOIN `period_liquidations` `pl` ON ((`pld`.`period_liquidation_id` = `pl`.`id`)))
                LEFT JOIN `zones` `z` ON ((`pld`.`zone_id` = `z`.`id`)))
            WHERE
                `pld`.`person_id` = person_id
            ORDER BY  `p`.`date_from` desc , `b`.`field_name1`;
        
        END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `liquidacionesIVA` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `liquidacionesIVA`(person_id Int)
BEGIN

SELECT 
        `pl`.`status` AS `Status`,
        `period_liquidation_iva`.`id` AS `IdLiquidacionIVA`,
        `period_liquidation_iva`.`period_liquidation_id` AS `period_liquidation_id`,
        `liquidators`.`name` AS `liquidador`,
        `period_liquidation_iva`.`period_id` AS `IdPeriodo`,
        `period_liquidation_iva`.`person_id` AS `IdEmpresa`,
        `b`.`document` AS `DocumentoEmpresa`,
        `b`.`field_name1` AS `NombreEmpresa`,
        `p`.`date_from` AS `Desde`,
        `p`.`date_to` AS `Hasta`,
        `p`.`code` AS `Periodo`,
        `period_liquidation_iva`.`total_debit` AS `total_debit`,
        `period_liquidation_iva`.`total_credit` AS `total_credit`,
        `period_liquidation_iva`.`previous_technical` AS `previous_technical`,
        `period_liquidation_iva`.`previous_free_availability` AS `previous_free_availability`,
        `period_liquidation_iva`.`retention_amount` AS `retention_amount`,
        `period_liquidation_iva`.`perception_amount` AS `perception_amount`,
        `period_liquidation_iva`.`compensation_amount` AS `compensation_amount`,
        `period_liquidation_iva`.`total_perceptions_retentions` AS `total_perceptions_retentions`,
        `period_liquidation_iva`.`free_availability_balance` AS `free_availability_balance`,
        (SELECT 
                (CASE
                        WHEN ISNULL(`plia`.`negative_amount`) THEN 0
                        ELSE `plia`.`negative_amount`
                    END)
            FROM
                `period_liquidation_iva` `plia`
            WHERE
                (`plia`.`period_id` = (SELECT 
                        `p`.`id`
                    FROM
                        `periods` `p`
                    WHERE
                        ((`p`.`person_id` = `b`.`id`)
                            AND (`p`.`period_number` = (CASE
                            WHEN (`p`.`period_number` > 1) THEN (`p`.`period_number` - 1)
                            ELSE 12
                        END))
                            AND (`p`.`year` = (CASE
                            WHEN (`p`.`period_number` = 1) THEN (`p`.`year` - 1)
                            ELSE `p`.`year`
                        END)))))) AS `A_PAGAR_ANTERIOR`,
        `period_liquidation_iva`.`negative_amount` AS `A_PAGAR`,
        `period_liquidation_iva`.`positive_amount` AS `SaldoTecnicoAFavor`,
        `period_liquidation_iva`.`total_free_availability` AS `SaldoLibreDisponibilidadAFavor`
    FROM
        ((((((`period_liquidation_iva`
        LEFT JOIN `persons` `b` ON ((`period_liquidation_iva`.`person_id` = `b`.`id`)))
        LEFT JOIN `periods` `p` ON ((`period_liquidation_iva`.`period_id` = `p`.`id`)))
        LEFT JOIN `period_liquidations` `pl` ON ((`period_liquidation_iva`.`period_liquidation_id` = `pl`.`id`)))
        LEFT JOIN `person_liquidators` ON ((`b`.`id` = `person_liquidators`.`person_id`)))
        LEFT JOIN `liquidators` ON ((`person_liquidators`.`liquidator_id` = `liquidators`.`id`)))
        LEFT JOIN `person_configurations` ON ((`period_liquidation_iva`.`person_id` = `person_configurations`.`person_id`)))
    WHERE
        `period_liquidation_iva`.`person_id` = person_id
    ORDER BY `p`.`date_from` desc , `b`.`field_name1`;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `liquidacionHijasIIBB` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `liquidacionHijasIIBB`(to_year int, to_month int, madre_id int)
BEGIN
  	declare done int default 0;
  	declare personId, yearPeriod, monthPeriod, zoneId, periodId int;
  	declare positiveAmount, negativeAmount, baseAmount, sircrebAmount, retentionAmount, perceptionAmount, previousPeriodBalance decimal(20,2) default 0;
      declare taxValue, resultValue decimal(20,2) default 0.00;
      declare sifereCoef, iibbAliquot decimal(8,4) default 0.00;
  	declare periodCode, personName varchar(200);
      declare difPerson, difPeriod int default 0;
      declare prevYear, prevMonth, balanceFinal int default 0;
      declare confSettleV int default 0;
      declare posEqu, negEqu, baseEqu decimal(20,2) default 0.00;

       DECLARE currents CURSOR FOR

       select pz.person_id, pe.field_name1, p.code, p.year, p.period_number, pz.zone_id, p.id as period_id, pz.sifere_coef, pz.iibb_aliquot,
   		sum(case when tr.credit=0 and r.type_id=1 and rt.taxable_iibb=2 and r.zone_id=pz.zone_id
   		 and rt.tax_id<1000 then rt.amount else 0 end) as positive_amount,
   		sum(case when tr.credit=1 and r.type_id=1 and rt.taxable_iibb=2 and r.zone_id=pz.zone_id
   		 and rt.tax_id<1000 then rt.amount else 0 end) as negative_amount,
   		sum(case when tr.credit=0 and r.type_id=1 and rt.taxable_iibb=2 and r.zone_id=pz.zone_id
   		 and rt.tax_id<1000 then rt.amount when tr.credit=1 and r.type_id=1 and
   		rt.taxable_iibb=2 and r.zone_id=pz.zone_id and rt.tax_id<1000 then - rt.amount else 0 end) as base_amount,
   		sum(case when r.type_id=4 and r.zone_id=pz.zone_id then r.amount else 0 end) as sircreb_amount,
   		sum(case when r.type_id=3 and ret.zone_id = pz.zone_id then r.amount else 0 end) as retention_amount,
   		sum(case when r.type_id=2 and rt.tax_id>1000 and ot.section='iibb'
   		 and ot.zone_id = pz.zone_id then rt.amount else 0 end) as perception_amount,
   		(select case when positive_amount>0 then positive_amount else 0 end as positive_amount
   		from period_liquidation_details pa  where pa.zone_id=pz.zone_id
   		and pa.period_id = (
   			select id from periods where year = prevYear and period_number = prevMonth
   				and person_id = pz.person_id
               )  ) as previous_period_balance
   		from person_zones as pz
   		 inner join periods as p on pz.person_id = p.person_id and year = to_year and period_number = to_month
   		 inner join persons as pe on pz.person_id = pe.id
 			 inner join person_configurations pc on p.person_id = pc.person_id and pc.obligation_iibb in (2,3,4) and active =2
   		 left join receipts as r on r.person_id_owner = pz.person_id and r.status_id = '1'
   		 left join retention_types as ret on ret.id = r.retention_type_id
   		 left join receipt_types as tr on r.type_receipt_id = tr.id
   		 left join receipt_taxes as rt on r.id = rt.receipt_id
   		 left join other_taxes as ot on rt.tax_id = ot.id
   		 where exists ( select person_id  from user_persons up where pz.person_id = up.person_id
   			and parent_person_id = madre_id)
        and not exists (select id from period_liquidations pl where pz.person_id = pl.person_id and p.id = pl.period_id and apply_to='iibb')
   		 group by 1,2,3,4,5,6,7,8,9
   		 order by 1,2,3,4,5,6,7,8,9;


  		DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;

  		insert into log_debug (function_name, message, date) VALUES('liquidacion_hijas_iibb', concat('inicio de la ejecucion de la funcion'), now() );

  		OPEN currents;
  			set resultValue := 0.00;
  			IF to_month>1 THEN
  				set prevYear := to_year;
  				set prevMonth := to_month-1;
  			ELSE
  				set prevYear := to_year-1;
  				set prevMonth := 12;
  			END IF;
  			REPEAT

              FETCH currents INTO personId, personName, periodCode, yearPeriod, monthPeriod, zoneId, periodId, sifereCoef, iibbAliquot,
  			positiveAmount, negativeAmount, baseAmount, sircrebAmount, retentionAmount, perceptionAmount, previousPeriodBalance;

              

  			select settle_calc_by_coef into confSettleV from person_configurations where person_id = personId;

  			


  			
              IF (confSettleV = 1) THEN
  			  select sum(case when tr.credit=0 and r.type_id=1 and rt.taxable_iibb=2 and rt.tax_id<1000 then rt.amount else 0 end) as positive,
                  sum(case when tr.credit=1 and r.type_id=1 and rt.taxable_iibb=2 and rt.tax_id<1000 then rt.amount else 0 end) as negative,
                  sum(case when tr.credit=0 and r.type_id=1 and rt.taxable_iibb=2	and rt.tax_id<1000 then rt.amount when tr.credit=1 and r.type_id=1 and
  				rt.taxable_iibb=2 and rt.tax_id<1000 then - rt.amount else 0 end) as base
                  into posEqu, negEqu, baseEqu
                  from `receipts` as `r`
                   left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id`
                   left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id`
                   left join `retention_types` as `ret` on `ret`.`id` = `r`.`retention_type_id`
  				 where `r`.`person_id_owner` = personId and r.period_id = periodId
  				  and exists (select person_id from person_zones pz where pz.person_id = r.person_id_owner)
                    and `r`.`status_id` = '1' limit 1;

  				

  			  set baseAmount := (IF (baseEqu > 0, baseEqu, baseAmount));

              END IF;

  			 set taxValue := (baseAmount * sifereCoef * (iibbAliquot/100));
               set previousPeriodBalance := (IF (previousPeriodBalance > 0, previousPeriodBalance, 0.00));
               
               
              set resultValue := taxValue - (previousPeriodBalance + sircrebAmount + retentionAmount + perceptionAmount);
  			
               set negativeAmount := (IF (resultValue > 0, resultValue, 0.00));
               set positiveAmount := (IF (resultValue < 0 , resultValue*(-1) ,0.00));
               set balanceFinal := (IF (positiveAmount > 0 , 1 ,2));


  			

              IF NOT done THEN
  			  IF previousPeriodBalance is null THEN
  				set previousPeriodBalance:=0;
  			  END IF;

  			  IF difPerson <> personId and difPeriod <> periodId THEN

  				set difPerson := personId;
  				set difPeriod := periodId;

  				 insert into period_liquidations (apply_to, period_id, person_id, status, created_at, updated_at)
  				 values ('iibb', periodId, personId, 1, now(), now());

  			  END IF;

                insert into period_liquidation_details (`period_liquidation_id`,`period_id`,`person_id`,`zone_id`,`coef`,`aliquot`,`base_amount`,`tax_amount`,
  				`previous_period_balance`,`sircreb_amount`,`perception_amount`,`retention_amount`,`positive_amount`,`negative_amount`,`balance`,`created_at`,`updated_at`)
  				select pl.id, periodId, personId, zoneId, sifereCoef, iibbAliquot, baseAmount, taxValue, previousPeriodBalance, sircrebAmount, perceptionAmount,
  					retentionAmount, positiveAmount, negativeAmount, balanceFinal, now(), now()
                  from period_liquidations pl where apply_to = 'iibb' and period_id = periodId and person_id = personId;


  			END IF;



  			UNTIL done END REPEAT;

  	  CLOSE currents;
  	insert into log_debug (function_name, message, date) VALUES('liquidacion_hijas_iibb', concat('fin de la ejecucion de la funcion'), now() );
  END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `liquidacionHijasIVA` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `liquidacionHijasIVA`(to_year int, to_month int, madre_id int)
BEGIN
	declare cantidad, paso int default 0;
    declare done boolean default false;
	declare personId, activityId, periodId int;
	declare ordrV, typeV, originV, taxId, percentIva, taxabledAmount decimal(20,2) default 0;
    declare taxName varchar(100) default '';
    declare taxValue, resultValue, debitValue, creditValue  decimal(20,2) default 0.00;
    declare sifereCoef, iibbAliquot decimal(8,4) default 0.00;
	declare periodCode, personName varchar(200);
    declare difPerson int default 0;
    declare prevYear, prevMonth, prevPeriodId int default 0;
    declare preVtechnical, preVfree_availability, technicalV decimal(20,2) default 0.00;
    declare retentionV, perceptionV, compensationV, totalRPV, freeAvBalV, negativeV, positiveV, totalFAV  decimal(20,2) default 0.00;
    declare periodLiquidationId, periodLiquidationIvaId int default 0;

     DECLARE currents CURSOR FOR

     select up.person_id, pa.activity_id, p.id as period_id,
 			sum(case when r.type_id=2 and tr.credit=0 and rt.tax_id<1000
 			then (rt.amount*st.percent_iva)/100 else 0 end) as creditValue,
 			sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000
 			then (rt.amount*st.percent_iva)/100 else 0 end) as debitValue
 			from
 			  user_persons up
 			 inner join person_activities as pa on pa.person_id = up.person_id
 			 inner join periods p on up.person_id = p.person_id
 				and year = to_year and period_number = to_month and p.person_id = pa.person_id
			 inner join person_configurations pc on p.person_id = pc.person_id and pc.obligation_iva=1  and active =2
 			 left join receipts as r on  r.status_id = '1' and r.period_id = p.id
 			 left join receipt_types as tr on r.type_receipt_id = tr.id
 			 left join receipt_taxes as rt on r.id = rt.receipt_id
 			 left join system_taxes as st on st.id=rt.tax_id
 			 where up.parent_person_id = madre_id
 			 
         and not exists (select id from period_liquidations pl where p.person_id = pl.person_id and p.id = pl.period_id and apply_to='iva')
 			 group by 1,2,3

 			 order by 1,2,3, 4 desc;


		
		

		insert into log_debug (function_name, message, date) VALUES('liquidacion_hijas_iva', concat('inicio de la ejecucion de la funcion'), now() );

		OPEN currents;
			select FOUND_ROWS() into cantidad ;

           

			IF to_month>1 THEN
				set prevYear := to_year;
				set prevMonth := to_month-1;
			ELSE
				set prevYear := to_year-1;
				set prevMonth := 12;
			END IF;

            WHILE paso < cantidad DO
           

            FETCH currents INTO personId, activityId, periodId, creditValue, debitValue;

            IF NOT done THEN
				set paso := paso +1;

			
            set prevPeriodId := null;
			select id into prevPeriodId from periods p
                    where p.person_id = personId
                    and year = prevYear and period_number = prevMonth;

			

            IF(prevPeriodId is not null) THEN
			
             select positive_amount, total_free_availability  INTO preVtechnical, preVfree_availability
				from period_liquidation_iva where person_id = personId and period_id=prevPeriodId;
            END IF;



			  set preVtechnical := (IF (preVtechnical is not null, preVtechnical, 0.00));
              set preVfree_availability := (IF (preVfree_availability is not null, preVfree_availability, 0.00));


			  

				 insert into period_liquidations (apply_to, period_id, person_id, status, created_at, updated_at)
				 values ('iva', periodId, personId, 1, now(), now());
                 SET periodLiquidationId = LAST_INSERT_ID();


              
				   set preVtechnical = If(preVtechnical is not null, preVtechnical, 0);
				   set technicalV = (creditValue + preVtechnical - debitValue);
				   set preVfree_availability = If(preVfree_availability is not null, preVfree_availability, 0);

				   set retentionV := If (retentionV is not null, retentionV, 0);
				   set perceptionV := If (perceptionV is not null, perceptionV, 0);
				   set compensationV := If (compensationV is not null, compensationV, 0);
				   set totalRPV := (retentionV + perceptionV);
				   set freeAvBalV := totalRPV + preVfree_availability - compensationV;

				   set negativeV := IF(technicalV+freeAvBalV>0, 0, (technicalV+freeAvBalV)*(-1));
				   set positiveV := IF(technicalV>0, technicalV, 0);
				   set totalFAV := IF((technicalV+freeAvBalV>0), IF ((technicalV>0), freeAvBalV, (technicalV+freeAvBalV)) , 0);

                 insert into period_liquidation_iva (period_id, person_id, period_liquidation_id, created_at, updated_at
					, total_debit, total_credit, previous_technical, technical_balance, previous_free_availability
					, retention_amount, perception_amount, compensation_amount, total_perceptions_retentions, free_availability_balance
					, negative_amount, positive_amount, total_free_availability)
				 values (periodId, personId, periodLiquidationId, now(), now()
					, debitValue, creditValue, preVtechnical, technicalV, preVfree_availability
                    , retentionV, perceptionV, compensationV, totalRPV, freeAvBalV
                    , negativeV, positiveV, totalFAV);
                 SET periodLiquidationIvaId = LAST_INSERT_ID();


            


             insert into period_liquidation_iva_details (period_liquidation_id,period_liquidation_iva_id,period_id,
				person_id, activity_id, type, tax_id, taxabled_amount, iva_amount, created_at, updated_at, ordr)

				(select periodLiquidationId, periodLiquidationIvaId, periodId, personId
					, pa.activity_id, 2 as type, st.id,
					sum(case when r.type_id=2 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) as taxabled_amount,
					(sum(case when r.type_id=2 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) * st.percent_iva) / 100 as tax_value, now(), now(), 6 as ordr
					from `system_taxes` as `st` cross join `person_activities` as `pa` left join `receipts` as `r` on `r`.`period_id` = periodID and `r`.`status_id` = '1' left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id` left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id` where `pa`.`person_id` = personId group by 1,2,3,4,5,6,7,10,11,12)
                    union
				(select periodLiquidationId, periodLiquidationIvaId, periodId, personId
					, pa.activity_id, 1 as type, st.id,
					sum(case when r.type_id=2 and tr.credit=1 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) as taxabled_amount,
                    (sum(case when r.type_id=2 and tr.credit=1 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) * st.percent_iva) / 100 as tax_value, now(), now(), 4 as ordr
					from `system_taxes` as `st` cross join `person_activities` as `pa` left join `receipts` as `r` on `r`.`period_id` = periodId and `r`.`status_id` = '1' left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id` left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id` where `pa`.`person_id` = personId group by 1,2,3,4,5,6,7,10,11,12)
                    union
				(select periodLiquidationId, periodLiquidationIvaId, periodId, personId
					, pa.activity_id, 2 as type, st.id,
					sum(case when r.type_id=1 and tr.credit=1 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) as taxabled_amount,
                    (sum(case when r.type_id=1 and tr.credit=1 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) * st.percent_iva) /100 as tax_value, now(), now(), 5 as ordr
					from `system_taxes` as `st` cross join `person_activities` as `pa` left join `receipts` as `r` on `r`.`period_id` = periodId and `r`.`status_id` = '1' left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id` left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id` where `pa`.`person_id` = personId group by 1,2,3,4,5,6,7,10,11,12)
					union
				(select periodLiquidationId, periodLiquidationIvaId, periodId, personId
					, pa.activity_id, 1 as type, st.id,
					sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) as taxabled_amount,
                    (sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) * st.percent_iva) / 100 as tax_value, now(), now(), 1 as ordr
					from `system_taxes` as `st` cross join `person_activities` as `pa` left join `receipts` as `r` on `r`.`period_id` = periodId and `r`.`status_id` = '1' left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id` and `tr`.`agroup_iva_module` = '1' left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id` where `pa`.`person_id` = personId and `st`.`id` not in ('6', '7') group by 1,2,3,4,5,6,7,10,11,12)
                    union
				(select periodLiquidationId, periodLiquidationIvaId, periodId, personId
					, pa.activity_id, 1 as type, st.id,
					sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) as taxabled_amount,
                    (sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) * st.percent_iva) / 100 as tax_value, now(), now(), 2 as ordr
					from `system_taxes` as `st` cross join `person_activities` as `pa` left join `receipts` as `r` on `r`.`period_id` = periodId and `r`.`status_id` = '1' left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id` and `tr`.`agroup_iva_module` = '2' left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id` where `pa`.`person_id` = personId and `st`.`id` not in ('6', '7') group by 1,2,3,4,5,6,7,10,11,12)
                    union
				(select  periodLiquidationId, periodLiquidationIvaId, periodId, personId
					, pa.activity_id, 1 as type, st.id,
					sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) as taxabled_amount,
                    (sum(case when r.type_id=1 and tr.credit=0 and rt.tax_id<1000 and st.id=rt.tax_id
					then rt.amount else 0 end) * st.percent_iva) / 100 as tax_value, now(), now(), 3 as ordr
					from `system_taxes` as `st` cross join `person_activities` as `pa` left join `receipts` as `r` on `r`.`period_id` = periodId and `r`.`status_id` = '1' left join `receipt_types` as `tr` on `r`.`type_receipt_id` = `tr`.`id` left join `receipt_taxes` as `rt` on `r`.`id` = `rt`.`receipt_id` where `pa`.`person_id` = personId and `st`.`id` in ('6', '7') group by 1,2,3,4,5,6,7,10,11,12)
				order by 12, 6

					;

				END IF;



			
            END WHILE;

	  CLOSE currents;
	insert into log_debug (function_name, message, date) VALUES('liquidacion_hijas_iva', concat('fin de la ejecucion de la funcion'), now() );
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `monotributistas` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `monotributistas`(operacion int,anioUno int,anioDos int,anioTres int,anioCuatro int,anioCinco int,anioSeis int,anioSiete int,anioOcho int,anioNueve int,anioDiez int,anioOnce int,anioDoce int,mesUno int,mesDos int,mesTres int,mesCuatro int,mesCinco int,mesSeis int,mesSiete int,mesOcho int,
        mesNueve int,mesDiez int,mesOnce int,mesDoce int, person_id varchar(50))
BEGIN
        
            SELECT 
                `types`.`id` AS `IdOperacion`,
                `types`.`name` AS `Operacion`,
                `receipts`.`person_id_owner` AS `person_id`,
                `b`.`document` AS `cuit`,
                `b`.`field_name1` AS `empresa`,
                vpi.impuesto_id,vpi.importe,m.categoria,m.facAnual,
                
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioUno)
                        AND (`p`.`period_number` = mesUno)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `UNO`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioDos)
                        AND (`p`.`period_number` = mesDos)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `DOS`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioTres)
                        AND (`p`.`period_number` = mesTres)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `TRES`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioCuatro)
                        AND (`p`.`period_number` = mesCuatro)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `CUATRO`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioCinco)
                        AND (`p`.`period_number` = mesCinco)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `CINCO`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioSeis)
                        AND (`p`.`period_number` = mesSeis)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `SEIS`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioSiete)
                        AND (`p`.`period_number` = mesSiete)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `SIETE`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioOcho)
                        AND (`p`.`period_number` = mesOcho)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `OCHO`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioNueve)
                        AND (`p`.`period_number` = mesNueve)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `NUEVE`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioDiez)
                        AND (`p`.`period_number` = mesDiez)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `DIEZ`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioOnce)
                        AND (`p`.`period_number` = mesOnce)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `ONCE`,
                SUM((CASE
                    WHEN
                        (`vpi`.`vto_id` = 37)
                        AND (`p`.`year` = anioDoce)
                        AND (`p`.`period_number` = mesDoce)
                    THEN
                        ((CASE
                            WHEN (`receipts`.`type_receipt_id` = 9) THEN -(1)
                            ELSE 1
                        END) * `receipts`.`amount`)
                    ELSE 0
                END)) AS `DOCE`
            FROM
                `receipts`
                LEFT JOIN `persons` `b` ON `receipts`.`person_id_owner` = `b`.`id`
                LEFT JOIN `periods` `p` ON `receipts`.`period_id` = `p`.`id`
                LEFT JOIN `receipt_types` ON `receipts`.`type_receipt_id` = `receipt_types`.`id`
                LEFT JOIN `status` ON `receipts`.`status_id` = `status`.`id`
                LEFT JOIN `persons` ON `receipts`.`person_id_relationed` = `persons`.`id`
                LEFT JOIN `types` ON `receipts`.`type_id` = `types`.`id`
                
                join vto_person_impuesto as vpi on b.id= vpi.person_id
                inner join vto_categoria_imp as vci on vpi.categoria_imp_id = vci.id
                inner join categorias_monotributo as m on vci.cat_mono_id = m.id
                
            WHERE receipts.type_id = operacion 
                and vpi.impuesto_id = 2
                and receipts.person_id_owner like person_id
                and receipts.deleted_at is null
                
            group by 1,2,3,4,5,6,7,8,9
            ORDER BY empresa;
             END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `procedureComprobantes` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `procedureComprobantes`(
          in operacion varchar(35),
          in periodoID varchar(35),
          in periodo varchar(20),
          in empresa varchar(20),
          in date_from varchar(20),
          in date_to varchar(20)
        )
BEGIN

        SELECT
   receipts.id as IdComprobante,
     persons.id as IdProveedorCliente,
     receipts.person_id_owner as IdEmpresa,
     b.document as DocumentoEmpresa,
     b.field_name1 as NombreEmpresa,
     periods.id as IdPeriodo,
   periods.date_from as Desde,
     periods.date_to as Hasta,
   periods.code as Periodo,
     types.name as Operacion,
   persons.field_name1 as Proveedor,
     persons.document_type as TipoDocumento,
     persons.document as Documento,
     zones.name as Zona,
     status.name as Estado,
     activities.name as Actividad,
     receipts.receipt_date as FechaComprobante,
     receipts.reference as Referencia,
     retention_types.name as TipoDeRetencion,
     receipt_types.name as TipoComprobante,
     receipts.code_ticket as Suc,
     receipts.number as Numero,
     receipts.amount as Total,
   sum(case when receipt_taxes.tax_id=3 then (receipt_taxes.amount) else 0 end) as gravado_27,
   sum(case when receipt_taxes.tax_id=3 then (receipt_taxes.tax_amount) else 0 end) as IVA_27,
     sum(case when receipt_taxes.tax_id=2 then (receipt_taxes.amount) else 0 end) as gravado_21,
   sum(case when receipt_taxes.tax_id=2 then (receipt_taxes.tax_amount) else 0 end) as IVA_21,
   sum(case when receipt_taxes.tax_id=1 then (receipt_taxes.amount) else 0 end) as gravado_105,
   sum(case when receipt_taxes.tax_id=1 then (receipt_taxes.tax_amount) else 0 end) as IVA_105,
     sum(case when receipt_taxes.tax_id=5 then (receipt_taxes.amount) else 0 end) as gravado_5,
   sum(case when receipt_taxes.tax_id=5 then (receipt_taxes.tax_amount) else 0 end) as IVA_5,
     sum(case when receipt_taxes.tax_id=6 then (receipt_taxes.amount) else 0 end) as gravado_0,
   sum(case when receipt_taxes.tax_id=6 then (receipt_taxes.tax_amount) else 0 end) as IVA_0,
     sum(case when receipt_taxes.tax_id=4 then (receipt_taxes.amount) else 0 end) as gravado_2_5,
   sum(case when receipt_taxes.tax_id=4 then (receipt_taxes.tax_amount) else 0 end) as IVA_2_5,
     sum(case when receipt_taxes.tax_id=7 then (receipt_taxes.amount) else 0 end) as no_gravado,
     sum(case when receipt_taxes.tax_id=1000 then (receipt_taxes.amount) else 0 end) as percepIva,
     sum(case when receipt_taxes.tax_id=1001 then (receipt_taxes.amount) else 0 end) as Imps_Internos,
   sum(case when receipt_taxes.tax_id=1002 then (receipt_taxes.amount) else 0 end) as Imp_Gasoil,
   sum(case when receipt_taxes.tax_id=1003 then (receipt_taxes.amount) else 0 end) as Imp_Hidricos,
   sum(case when receipt_taxes.tax_id=1004 then (receipt_taxes.amount) else 0 end) as ITC,
   sum(case when receipt_taxes.tax_id=1005 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Buenos_Aires,
   sum(case when receipt_taxes.tax_id=1006 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Capital_Federal,
   sum(case when receipt_taxes.tax_id=1007 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Catamarca,
   sum(case when receipt_taxes.tax_id=1008 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Chaco,
   sum(case when receipt_taxes.tax_id=1009 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Chubut,
   sum(case when receipt_taxes.tax_id=1010 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Cordoba,
   sum(case when receipt_taxes.tax_id=1011 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Corrientes,
   sum(case when receipt_taxes.tax_id=1012 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Entre_Rios,
   sum(case when receipt_taxes.tax_id=1013 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Formosa,
   sum(case when receipt_taxes.tax_id=1014 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Jujuy,
   sum(case when receipt_taxes.tax_id=1015 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_La_Pampa,
   sum(case when receipt_taxes.tax_id=1016 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_La_Rioja,
   sum(case when receipt_taxes.tax_id=1017 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Mendoza,
   sum(case when receipt_taxes.tax_id=1018 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Misiones,
   sum(case when receipt_taxes.tax_id=1019 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Neuquen,
   sum(case when receipt_taxes.tax_id=1020 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Pascua_Lama,
   sum(case when receipt_taxes.tax_id=1021 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Rio_Negro,
   sum(case when receipt_taxes.tax_id=1022 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Salta,
   sum(case when receipt_taxes.tax_id=1023 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_San_Juan,
   sum(case when receipt_taxes.tax_id=1024 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_San_Luis,
   sum(case when receipt_taxes.tax_id=1025 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Santa_Cruz,
   sum(case when receipt_taxes.tax_id=1026 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Santa_Fe,
   sum(case when receipt_taxes.tax_id=1027 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Santiago_del_Estero,
   sum(case when receipt_taxes.tax_id=1028 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Tierra_del_Fuego,
   sum(case when receipt_taxes.tax_id=1029 then (receipt_taxes.amount) else 0 end) as Perc_IIBB_Tucuman

 from receipts
 left join persons as b on receipts.person_id_owner = b.id
 left join periods on receipts.period_id = periods.id
 left join receipt_types on receipts.type_receipt_id = receipt_types.id
 left join retention_types on receipts.retention_type_id =retention_types.id
 left join status on receipts.status_id = status.id
 left join persons on receipts.person_id_relationed = persons.id
 left join receipt_taxes on receipts.id = receipt_taxes.receipt_id
 left join zones on receipts.zone_id = zones.id
 left join activities on receipts.activity_id = activities.id
 left join types on receipts.type_id = types.id
 left join system_taxes on  receipt_taxes.tax_id = system_taxes.id
 left join other_taxes on  receipt_taxes.tax_id = other_taxes.id

 where 	receipts.type_id LIKE operacion
   and periods.id LIKE '%'
     and periods.code LIKE periodo
   and receipts.person_id_owner LIKE empresa
   and periods.date_from LIKE '%'
     and periods.date_to LIKE '%'

 group by  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
 order by Periodo,persons.document, code_ticket,number
        ;
        END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `procedure_eliminar_comprobantes_masivamente` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `procedure_eliminar_comprobantes_masivamente`(

in operacion varchar(35),
in empresa varchar(20),
in desde date,
in hasta date

)
BEGIN


DELETE from receipt_taxes where id IN
    (
    SELECT * FROM
        (
        SELECT receipt_taxes.id as eliminar
        FROM receipt_taxes
        WHERE receipt_taxes.receipt_id IN
            (
            
            SELECT IdComprobante
                from
                (
               
                SELECT
                    receipts.id as IdComprobante,
                    persons.id as IdProveedorCliente,
                    receipts.person_id_owner as Empresa,
                    periods.id as IdPeriodo,
                    periods.date_from as Desde,
                    periods.date_to as Hasta,
                    periods.code as Periodo,
                    types.name as Operacion,
                    persons.field_name1 as Proveedor,
                    receipts.number as Numero,
                    receipt_taxes.id as IDreceipt_taxes

                from receipts
                left join periods on receipts.period_id = periods.id
                left join receipt_types on receipts.type_receipt_id = receipt_types.id
                left join retention_types on receipts.retention_type_id =retention_types.id
                left join status on receipts.status_id = status.id
                left join persons on receipts.person_id_relationed = persons.id
                left join receipt_taxes on receipts.id = receipt_taxes.receipt_id
                left join zones on receipts.zone_id = zones.id
                left join activities on receipts.activity_id = activities.id
                left join types on receipts.type_id = types.id
                left join system_taxes on  receipt_taxes.tax_id = system_taxes.id
                left join other_taxes on  receipt_taxes.tax_id = other_taxes.id

                where   receipts.type_id LIKE operacion
                    and receipts.person_id_owner LIKE empresa
                    and periods.date_from between desde and hasta

                group by  1,2,3,4,5,6,7,8,9,10,11
                )foo
            )
        )
        as tablanueva
    );


        DELETE from receipts where id IN
            (
            
            SELECT IdComprobante
                from
                (
               
                SELECT
                    receipts.id as IdComprobante,
                    persons.id as IdProveedorCliente,
                    receipts.person_id_owner as Empresa,
                    periods.id as IdPeriodo,
                    periods.date_from as Desde,
                    periods.date_to as Hasta,
                    periods.code as Periodo,
                    types.name as Operacion,
                    persons.field_name1 as Proveedor,
                    receipts.number as Numero,
                    receipt_taxes.id as IDreceipt_taxes

                from receipts
                left join periods on receipts.period_id = periods.id
                left join receipt_types on receipts.type_receipt_id = receipt_types.id
                left join retention_types on receipts.retention_type_id =retention_types.id
                left join status on receipts.status_id = status.id
                left join persons on receipts.person_id_relationed = persons.id
                left join receipt_taxes on receipts.id = receipt_taxes.receipt_id
                left join zones on receipts.zone_id = zones.id
                left join activities on receipts.activity_id = activities.id
                left join types on receipts.type_id = types.id
                left join system_taxes on  receipt_taxes.tax_id = system_taxes.id
                left join other_taxes on  receipt_taxes.tax_id = other_taxes.id

                where   receipts.type_id LIKE operacion
                    and receipts.person_id_owner LIKE empresa
                    and periods.date_from between desde and hasta

                group by  1,2,3,4,5,6,7,8,9,10,11
                )foo
            )
    ;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `proyecGanancias` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `proyecGanancias`(anioUno int,anioDos int,anioTres int,anioCuatro int,anioCinco int,anioSeis int,anioSiete int,anioOcho int,anioNueve int,anioDiez int,anioOnce int,anioDoce int,mesUno int,mesDos int,mesTres int,mesCuatro int,mesCinco int,mesSeis int,mesSiete int,mesOcho int,mesNueve int,mesDiez int,mesOnce int,mesDoce int,person_id int)
BEGIN
            SELECT 
                `types`.`id` AS `IdOperacion`,
                `types`.`name` AS `Operacion`,
                `receipts`.`person_id_owner` AS `IdEmpresa`,
                `b`.`document` AS `DocumentoEmpresa`,
                `b`.`field_name1` AS `NombreEmpresa`,
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioUno)
                            AND (`p`.`period_number` = mesUno))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'UNO',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioDos)
                            AND (`p`.`period_number` = mesDos))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'DOS',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioTres)
                            AND (`p`.`period_number` = mesTres))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'TRES',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioCuatro)
                            AND (`p`.`period_number` = mesCuatro))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'CUATRO',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioCinco)
                            AND (`p`.`period_number` = mesCinco))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'CINCO',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioSeis)
                            AND (`p`.`period_number` = mesSeis))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'SEIS',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioSiete)
                            AND (`p`.`period_number` = mesSiete))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'SIETE',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioOcho)
                            AND (`p`.`period_number` = mesOcho))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'OCHO',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioNueve)
                            AND (`p`.`period_number` = mesNueve))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'NUEVE',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioDiez)
                            AND (`p`.`period_number` = mesDiez))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'DIEZ',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioOnce)
                            AND (`p`.`period_number` = mesOnce))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'ONCE',
        
                SUM((CASE
                    WHEN
                        (((`receipt_taxes`.`tax_id` = 3)
                            OR (`receipt_taxes`.`tax_id` = 2)
                            OR (`receipt_taxes`.`tax_id` = 1)
                            OR (`receipt_taxes`.`tax_id` = 7)
                            OR (`receipt_taxes`.`tax_id` = 6)
                            OR (`receipt_taxes`.`tax_id` = 5)
                            OR (`receipt_taxes`.`tax_id` = 4))
                            AND (`p`.`year` = anioDoce)
                            AND (`p`.`period_number` = mesDoce))
                    THEN
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * `receipt_taxes`.`amount`)
                    ELSE 0
                END)) AS 'DOCE'
                
            FROM
                (((((((((`receipts`
                LEFT JOIN `persons` `b` ON ((`receipts`.`person_id_owner` = `b`.`id`)))
                LEFT JOIN `periods` `p` ON ((`receipts`.`period_id` = `p`.`id`)))
                LEFT JOIN `receipt_types` ON ((`receipts`.`type_receipt_id` = `receipt_types`.`id`)))
                LEFT JOIN `status` ON ((`receipts`.`status_id` = `status`.`id`)))
                LEFT JOIN `persons` ON ((`receipts`.`person_id_relationed` = `persons`.`id`)))
                LEFT JOIN `receipt_taxes` ON ((`receipts`.`id` = `receipt_taxes`.`receipt_id`)))
                LEFT JOIN `types` ON ((`receipts`.`type_id` = `types`.`id`)))
                LEFT JOIN `system_taxes` ON ((`receipt_taxes`.`tax_id` = `system_taxes`.`id`)))
                LEFT JOIN `other_taxes` ON ((`receipt_taxes`.`tax_id` = `other_taxes`.`id`)))
            WHERE `receipts`.`person_id_owner` = person_id
                and (`types`.`id` IN (1 , 2))
            GROUP BY `types`.`id` , `types`.`name` , `receipts`.`person_id_owner` , `b`.`document` , `b`.`field_name1`
            ORDER BY `types`.`id` , `p`.`year` , `receipts`.`person_id_owner`
            
            ;
        
        
          END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `receiptsForTXTIIBB` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `receiptsForTXTIIBB`(person_id int,
        IdTipoComprobante int,IdPeriodo int)
BEGIN
                SELECT 
                        `receipts`.`id` AS `IdComprobante`,
                        `receipts`.`type_id` AS `IdTipoComprobante`,
                        `persons`.`id` AS `IdProveedorCliente`,
                        `receipts`.`person_id_owner` AS `IdEmpresa`,
                        `b`.`document` AS `DocumentoEmpresa`,
                        `b`.`field_name1` AS `NombreEmpresa`,
                        `p`.`id` AS `IdPeriodo`,
                        `p`.`date_from` AS `Desde`,
                        `p`.`date_to` AS `Hasta`,
                        `p`.`code` AS `Periodo`,
                        `p`.`year` AS `anioPeriodo`,
                        `p`.`period_number` AS `mesPeriodo`,
                        `types`.`id` AS `IdOperacion`,
                        `types`.`name` AS `Operacion`,
                        `persons`.`field_name1` AS `Proveedor`,
                        `persons`.`document_type` AS `TipoDocumento`,
                        `persons`.`document` AS `Documento`,
                        `zones`.`name` AS `Zona`,
                        `status`.`name` AS `Estado`,
                        `activities`.`name` AS `Actividad`,
                        DATE_FORMAT(`receipts`.`receipt_date`,'%d/%m/%Y') AS FechaComprobante,
                        `receipts`.`reference` AS `Referencia`,
                        `retention_types`.`name` AS `TipoDeRetencion`,
                        `receipt_types`.`name` AS `TipoComprobante`,
                        `receipts`.`code_ticket` AS `Suc`,
                        `receipts`.`number` AS `Numero`,
                        (CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(`receipts`.`amount`)
                            ELSE `receipts`.`amount`
                        END) AS `Total`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 3) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `gravado_27`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 3) THEN `receipt_taxes`.`tax_amount`
                            ELSE 0
                        END))) AS `IVA_27`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 2) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `gravado_21`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 2) THEN `receipt_taxes`.`tax_amount`
                            ELSE 0
                        END))) AS `IVA_21`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `gravado_105`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1) THEN `receipt_taxes`.`tax_amount`
                            ELSE 0
                        END))) AS `IVA_105`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 5) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `gravado_5`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 5) THEN `receipt_taxes`.`tax_amount`
                            ELSE 0
                        END))) AS `IVA_5`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 6) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `gravado_0`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 6) THEN `receipt_taxes`.`tax_amount`
                            ELSE 0
                        END))) AS `IVA_0`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 4) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `gravado_2_5`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 4) THEN `receipt_taxes`.`tax_amount`
                            ELSE 0
                        END))) AS `IVA_2_5`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 7) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `no_gravado`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1000) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `percepIva`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1001) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Imps_Internos`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1002) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Imp_Gasoil`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1003) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Imp_Hidricos`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1004) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `ITC`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1005) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Buenos_Aires`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1006) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Capital_Federal`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1007) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Catamarca`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1008) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Chaco`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1009) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Chubut`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1010) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Cordoba`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1011) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Corrientes`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1012) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Entre_Rios`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1013) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Formosa`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1014) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Jujuy`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1015) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_La_Pampa`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1016) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_La_Rioja`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1017) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Mendoza`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1018) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Misiones`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1019) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Neuquen`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1020) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Pascua_Lama`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1021) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Rio_Negro`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1022) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Salta`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1023) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_San_Juan`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1024) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_San_Luis`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1025) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Santa_Cruz`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1026) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Santa_Fe`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1027) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Santiago_del_Estero`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1028) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Tierra_del_Fuego`,
                        ((CASE
                            WHEN (`receipt_types`.`credit` = 1) THEN -(1)
                            ELSE 1
                        END) * SUM((CASE
                            WHEN (`receipt_taxes`.`tax_id` = 1029) THEN `receipt_taxes`.`amount`
                            ELSE 0
                        END))) AS `Perc_IIBB_Tucuman`
                    FROM
                        ((((((((((((`receipts`
                        LEFT JOIN `persons` `b` ON ((`receipts`.`person_id_owner` = `b`.`id`)))
                        LEFT JOIN `periods` `p` ON ((`receipts`.`period_id` = `p`.`id`)))
                        LEFT JOIN `receipt_types` ON ((`receipts`.`type_receipt_id` = `receipt_types`.`id`)))
                        LEFT JOIN `retention_types` ON ((`receipts`.`retention_type_id` = `retention_types`.`id`)))
                        LEFT JOIN `status` ON ((`receipts`.`status_id` = `status`.`id`)))
                        LEFT JOIN `persons` ON ((`receipts`.`person_id_relationed` = `persons`.`id`)))
                        LEFT JOIN `receipt_taxes` ON ((`receipts`.`id` = `receipt_taxes`.`receipt_id`)))
                        LEFT JOIN `zones` ON ((`receipts`.`zone_id` = `zones`.`id`)))
                        LEFT JOIN `activities` ON ((`receipts`.`activity_id` = `activities`.`id`)))
                        LEFT JOIN `types` ON ((`receipts`.`type_id` = `types`.`id`)))
                        LEFT JOIN `system_taxes` ON ((`receipt_taxes`.`tax_id` = `system_taxes`.`id`)))
                        LEFT JOIN `other_taxes` ON ((`receipt_taxes`.`tax_id` = `other_taxes`.`id`)))
                        where `receipts`.`person_id_owner` = person_id
                        and  `receipts`.`type_id` = IdTipoComprobante
                        and `receipts`.`period_id` = IdPeriodo
                    GROUP BY `receipts`.`id` , `receipts`.`type_id` , `persons`.`id` , `receipts`.`person_id_owner` , `b`.`document` , `b`.`field_name1` , `p`.`id` , `p`.`date_from` , `p`.`date_to` , `p`.`code` , `p`.`year` , `p`.`period_number` , `types`.`id` , `p`.`code` , `types`.`name` , `persons`.`field_name1` , `persons`.`document_type` , `persons`.`document` , `zones`.`name` , `status`.`name` , `activities`.`name` , `receipts`.`receipt_date` , `receipts`.`reference` , `retention_types`.`name` , `receipt_types`.`name` , `receipts`.`code_ticket` , `receipts`.`number` , `receipts`.`amount`
                    ORDER BY `p`.`code` , `persons`.`document` , `receipts`.`code_ticket` , `receipts`.`number`;
                END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `retenciones` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `retenciones`(anioUno int,anioDos int,anioTres int,anioCuatro int,anioCinco int,
        anioSeis int,anioSiete int,anioOcho int,anioNueve int,anioDiez int,anioOnce int,anioDoce int,mesUno int,mesDos int,
        mesTres int,mesCuatro int,mesCinco int,mesSeis int,mesSiete int,mesOcho int,mesNueve int,mesDiez int,mesOnce int,
        mesDoce int, person_id int)
BEGIN
        
        SELECT 
                `types`.`id` AS `IdOperacion`,
                `types`.`name` AS `Operacion`,
                `receipts`.`person_id_owner` AS `IdEmpresa`,
                `b`.`document` AS `DocumentoEmpresa`,
                `b`.`field_name1` AS `NombreEmpresa`,
                SUM((CASE
                    WHEN
                        ((`p`.`year` = anioUno)
                            AND (`p`.`period_number` = mesUno)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `UNO`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioDos)
                            AND (`p`.`period_number` = mesDos)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `DOS`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioTres)
                            AND (`p`.`period_number` = mesTres)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `TRES`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioCuatro)
                            AND (`p`.`period_number` = mesCuatro)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `CUATRO`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioCinco)
                            AND (`p`.`period_number` = mesCinco)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `CINCO`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioSeis)
                            AND (`p`.`period_number` = mesSeis)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `SEIS`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioSiete)
                            AND (`p`.`period_number` = mesSiete)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `SIETE`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioOcho)
                            AND (`p`.`period_number` = mesOcho)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `OCHO`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioNueve)
                            AND (`p`.`period_number` = mesNueve)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `NUEVE`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioDiez)
                            AND (`p`.`period_number` = mesDiez)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `DIEZ`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioOnce)
                            AND (`p`.`period_number` = mesOnce)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `ONCE`,
                SUM((CASE
                    WHEN
                       ((`p`.`year` = anioDoce)
                            AND (`p`.`period_number` = mesDoce)
                            AND (`receipts`.`retention_type_id` = 1))
                    THEN
                        `receipts`.`amount`
                    ELSE 0
                END)) AS `DOCE`
            FROM
                (((((`receipts`
                LEFT JOIN `persons` `b` ON ((`receipts`.`person_id_owner` = `b`.`id`)))
                LEFT JOIN `periods` `p` ON ((`receipts`.`period_id` = `p`.`id`)))
                LEFT JOIN `status` ON ((`receipts`.`status_id` = `status`.`id`)))
                LEFT JOIN `persons` ON ((`receipts`.`person_id_relationed` = `persons`.`id`)))
                LEFT JOIN `types` ON ((`receipts`.`type_id` = `types`.`id`)))
            WHERE
                `types`.`id` = 3
                and receipts.deleted_at is null
                and `receipts`.`person_id_owner`= person_id
            GROUP BY `types`.`id` , `types`.`name` , `receipts`.`person_id_owner` , `b`.`document` , `b`.`field_name1` 
            ORDER BY `types`.`id`, `receipts`.`person_id_owner`
        
        ;
        
          END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `SPAsientosContables` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `SPAsientosContables`(person_id int, plan_cuenta_id varchar(20), desde date, hasta date)
BEGIN

SELECT 
    `bl`.`id` AS `balance_libro_id`,
    `pe`.`id` AS `period_id`,
    `pe`.`code` AS `periodo`,
    `pe`.`date_from` AS `Desde`,
    `bl`.`receipt_id` AS `receipt_id`,
    `bl`.`nf_cta_cte_id` AS `nf_cta_cte_id`,
    `bl`.`period_liquidation_id` AS `period_liquidation_id`,
    `bl`.`fecha_registracion` AS `fecha`,
    `bl`.`conta_tipo_asiento_id` AS `conta_tipo_asiento_id`,
    `bl`.`cta_cte_cliente_id` AS `cta_cte_cliente_id`,
    `ta`.`nombre` AS `asiento_de`,
    (case 
        when (`pc3`.`tipo_cuenta_id` = 1) then `pc3`.`nombre`
            else `pc4`.`nombre`
    END) AS `Rubro`,
    `bld`.`plan_cuenta_id` AS `plan_cuenta_id`,
    (CASE
        WHEN (`bld`.`saldo_id` = 1) THEN 'DEUDOR'
        ELSE 'ACREEDOR'
    END) AS `SALDO`,
    `bld`.`saldo_id` AS `saldo_id`,
    `bld`.`comentario` AS `comentario`,
    `bld`.`person_id` AS `person_id`,
    `ta`.`nombre` AS `asiento`,
    `pc`.`nombre` AS `cuenta`,
    `p`.`field_name1` AS `empresa`,
    sum((CASE
        WHEN (`bld`.`saldo_id` = 1) THEN `bld`.`monto`
        ELSE 0
    END)) AS `DEBE`,
    sum((CASE
        WHEN (`bld`.`saldo_id` = 2) THEN `bld`.`monto`
        ELSE 0
    END)) AS `HABER`
FROM
    `balance_libro_details` `bld`
    JOIN `balance_libro` `bl` ON `bld`.`balance_libro_id` = `bl`.`id`
    JOIN `conta_tipo_saldos` `ts` ON `bld`.`saldo_id` = `ts`.`id`
    JOIN `persons` `p` ON `bld`.`person_id` = `p`.`id`
    JOIN `periods` `pe` ON `bld`.`period_id` = `pe`.`id`
    JOIN `conta_tipo_asientos` `ta` ON `bl`.`conta_tipo_asiento_id` = `ta`.`id`
    left JOIN `conta_plan_cuenta` `pc` ON `bld`.`plan_cuenta_id` = `pc`.`id`
    left JOIN `conta_plan_cuenta` `pc1` ON `pc`.`padre` = `pc1`.`codigo`
    left JOIN `conta_plan_cuenta` `pc2` ON `pc1`.`padre` = `pc2`.`codigo`
    left JOIN `conta_plan_cuenta` `pc3` ON `pc2`.`padre` = `pc3`.`codigo`
    left JOIN `conta_plan_cuenta` `pc4` ON `pc3`.`padre` = `pc4`.`codigo`
where bl.deleted_at is null
and bld.person_id like person_id
and bld.plan_cuenta_id like plan_cuenta_id
and `pe`.`date_from` between desde and hasta
group by `bl`.`id`,bl.conta_tipo_asiento_id,bld.plan_cuenta_id
ORDER BY `pe`.`date_from` ,`bl`.`id` , `ta`.orden , `bld`.`saldo_id`;


END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `SPAsientsSumasYSaldos` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `SPAsientsSumasYSaldos`(person_id int, desde date, hasta date)
BEGIN

    SELECT 
    `pe`.`code` AS `periodo`,
    `pe`.`date_from` AS `Desde`,
    pc4.nombre as nivel1,
    pc3.nombre as nivel2,
    pc2.nombre as nivel3,
    pc1.nombre as nivel4,
    pc.nombre as nivel5,
    pc.tipo_cuenta_id,
    `bld`.`plan_cuenta_id` AS `plan_cuenta_id`,
    `bld`.`person_id` AS `person_id`,
    `pc`.`nombre` AS `cuenta`,
    sum((CASE
        WHEN (`bld`.`saldo_id` = 1) THEN `bld`.`monto`
        WHEN (`bld`.`saldo_id` = 2) THEN `bld`.`monto`*(-1)
    END)) AS `SALDO`
FROM
    `balance_libro_details` `bld`
    JOIN `balance_libro` `bl` ON `bld`.`balance_libro_id` = `bl`.`id`
    JOIN `conta_tipo_saldos` `ts` ON `bld`.`saldo_id` = `ts`.`id`
    JOIN `persons` `p` ON `bld`.`person_id` = `p`.`id`
    JOIN `periods` `pe` ON `bld`.`period_id` = `pe`.`id`
    JOIN `conta_tipo_asientos` `ta` ON `bl`.`conta_tipo_asiento_id` = `ta`.`id`
    left JOIN `conta_plan_cuenta` `pc` ON `bld`.`plan_cuenta_id` = `pc`.`id`
    left JOIN `conta_plan_cuenta` `pc1` ON `pc`.`padre` = `pc1`.`codigo`
    left JOIN `conta_plan_cuenta` `pc2` ON `pc1`.`padre` = `pc2`.`codigo`
    left JOIN `conta_plan_cuenta` `pc3` ON `pc2`.`padre` = `pc3`.`codigo`
    left JOIN `conta_plan_cuenta` `pc4` ON `pc3`.`padre` = `pc4`.`codigo`
where bl.deleted_at is null
and bld.person_id = person_id
and `pe`.`date_from` between desde and hasta
group by `bld`.plan_cuenta_id
order by pc.codigo;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `SPUpdateHonorario` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `SPUpdateHonorario`()
begin
        declare no_more_rows boolean default false;
        declare empresa_honorario_id, empresa_impuesto_id, IDImpuesto int;
        declare total int default 0;
        declare importe_honorario, importe_impuesto, importe_actualizado decimal(20,2) default 0.00;
        declare cursor1 cursor for select person_id, honorario from person_configurations where active = 2 and honorario >0;
        declare cursor2 cursor for
                SELECT idPersonVto,person_id,importe FROM vto_person_impuesto where impuesto_id=39;
        declare continue handler for not found 
        set no_more_rows := true;

        open cursor1;
        LOOP1: loop
                fetch cursor1 INTO empresa_honorario_id, importe_honorario;
                if no_more_rows then
                    close cursor1;
                    leave LOOP1;
                end if;
                open cursor2;
                LOOP2: loop
                        fetch cursor2 INTO IDImpuesto, empresa_impuesto_id, importe_impuesto;
                        if no_more_rows then
                                set no_more_rows := false;
                                close cursor2;
                                leave LOOP2;
                        end if;
                        if empresa_honorario_id = empresa_impuesto_id then
                                if importe_honorario != importe_impuesto then
                                        set total = total +1;
                                        set importe_actualizado := importe_honorario;
                                        Update vto_person_impuesto set importe = importe_actualizado where idPersonVto = IDImpuesto;
                                end if;

                        end if;

                end loop LOOP2;
        end loop LOOP1;
        select total;
end ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `SPVtoImpuestosMail` */;
DELIMITER ;;
CREATE DEFINER=`forge`@`%` PROCEDURE `SPVtoImpuestosMail`(anio int,mes int)
BEGIN
    SELECT p.id,pc.person_id_titular as titular,p.field_name1 as empresa,imp.name as impuesto,cat.categoria,vto.anticipo,
        DATE_FORMAT(CONCAT(`vto`.`anio`,'-',`vto`.`mes`,'-',`vto`.`dia`),'%Y-%m-%d')AS `vencimiento`,pi.importe
        FROM vto_person_impuesto pi
        join persons p on pi.person_id = p.id
        left join vto_impuestos imp on pi.impuesto_id = imp.id
        left join vto_categoria_imp cat on pi.categoria_imp_id = cat.id
        left join vto_vencimiento vto on pi.vto_id = vto.id
        left join person_configurations pc on pi.person_id = pc.person_id
        where pc.active =2
        and anio = anio
        and vto.mes = mes
    union

    SELECT per.id,pc1.person_id_titular as titular, per.field_name1 as empresa, pic.impuesto, '' as categoria, pic.anticipo, pic.vencimiento,pic.importe
    FROM vto_person_impuestos_creados pic
    join persons per on pic.person_id = per.id
    join person_configurations pc1 on pic.person_id = pc1.person_id
    where YEAR(vencimiento) = anio and month(vencimiento) = mes

    order by id,vencimiento;



  END ;;
DELIMITER ;

--
-- Final view structure for view `v_business`
--

/*!50001 DROP TABLE IF EXISTS `v_business`*/;
/*!50001 DROP VIEW IF EXISTS `v_business`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_business` AS select (case when (`pc`.`active` = 1) then 'INACTIVA' else 'ACTIVA' end) AS `Status`,`p`.`id` AS `id`,`p`.`field_name1` AS `field_name1`,`p`.`field_name2` AS `field_name2`,`p`.`document_type` AS `document_type`,`p`.`document` AS `document`,`pa`.`id` AS `id_administrador`,`pa`.`field_name1` AS `administrador`,`pa`.`document` AS `cuit_administrador`,`pt`.`id` AS `id_titular`,`pt`.`field_name1` AS `titular`,`pt`.`document` AS `cuit_titular`,`p`.`country_id` AS `country_id`,`p`.`state_id` AS `state_id`,`p`.`zone_id` AS `zone_id`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`activity_id` AS `activity_id`,`p`.`address` AS `address`,`p`.`person_type_id` AS `person_type_id`,`pc`.`id` AS `person_configuration_id`,`pc`.`settle_calc_by_coef` AS `settle_calc_by_coef`,`pc`.`active` AS `active`,`pc`.`month_close` AS `month_close`,`pc`.`iva_condition_id` AS `iva_condition_id`,`pc`.`obligation_buy` AS `obligation_buy`,`pc`.`obligation_electronic_receipt` AS `obligation_electronic_receipt`,`pc`.`obligation_iibb` AS `obligation_iibb`,`pc`.`obligation_iva` AS `obligation_iva`,`pc`.`obligation_other_taxes` AS `obligation_other_taxes`,`pc`.`obligation_salaries` AS `obligation_salaries`,`pc`.`obligation_sell` AS `obligation_sell`,`pc`.`liquidation_start_period` AS `liquidation_start_period` from (((`persons` `p` join `person_configurations` `pc` on((`p`.`id` = `pc`.`person_id`))) join `persons` `pt` on((`pc`.`person_id_titular` = `pt`.`id`))) join `persons` `pa` on((`pc`.`person_id_administrador` = `pa`.`id`))) */;

--
-- Final view structure for view `v_consultacomprobantes`
--

/*!50001 DROP TABLE IF EXISTS `v_consultacomprobantes`*/;
/*!50001 DROP VIEW IF EXISTS `v_consultacomprobantes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_consultacomprobantes` AS select `receipts`.`id` AS `IdComprobante`,`receipts`.`type_id` AS `IdTipoComprobante`,`persons`.`id` AS `IdProveedorCliente`,`receipts`.`person_id_owner` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`id` AS `IdPeriodo`,`p`.`date_from` AS `Desde`,`p`.`date_to` AS `Hasta`,`p`.`code` AS `Periodo`,`p`.`year` AS `anioPeriodo`,`p`.`period_number` AS `mesPeriodo`,`types`.`id` AS `IdOperacion`,`types`.`name` AS `Operacion`,`persons`.`field_name1` AS `Proveedor`,`persons`.`document_type` AS `TipoDocumento`,`persons`.`document` AS `Documento`,`zones`.`name` AS `Zona`,`status`.`name` AS `Estado`,`activities`.`name` AS `Actividad`,`receipts`.`receipt_date` AS `FechaComprobante`,`receipts`.`reference` AS `Referencia`,`retention_types`.`name` AS `TipoDeRetencion`,`receipt_types`.`name` AS `TipoComprobante`,`receipts`.`code_ticket` AS `Suc`,`receipts`.`number` AS `Numero`,(case when (`receipt_types`.`credit` = 1) then -(`receipts`.`amount`) else `receipts`.`amount` end) AS `Total`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 3) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_27`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 3) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_27`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 2) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_21`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 2) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_21`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_105`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_105`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 5) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 5) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 6) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_0`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 6) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_0`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 4) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_2_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 4) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_2_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 7) then `receipt_taxes`.`amount` else 0 end))) AS `no_gravado`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1000) then `receipt_taxes`.`amount` else 0 end))) AS `percepIva`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1001) then `receipt_taxes`.`amount` else 0 end))) AS `Imps_Internos`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1002) then `receipt_taxes`.`amount` else 0 end))) AS `Imp_Gasoil`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1003) then `receipt_taxes`.`amount` else 0 end))) AS `Imp_Hidricos`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1004) then `receipt_taxes`.`amount` else 0 end))) AS `ITC`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1005) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Buenos_Aires`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1006) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Capital_Federal`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1007) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Catamarca`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1008) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Chaco`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1009) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Chubut`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1010) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Cordoba`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1011) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Corrientes`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1012) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Entre_Rios`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1013) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Formosa`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1014) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Jujuy`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1015) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_La_Pampa`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1016) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_La_Rioja`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1017) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Mendoza`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1018) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Misiones`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1019) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Neuquen`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1020) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Pascua_Lama`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1021) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Rio_Negro`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1022) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Salta`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1023) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_San_Juan`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1024) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_San_Luis`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1025) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Santa_Cruz`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1026) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Santa_Fe`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1027) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Santiago_del_Estero`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1028) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Tierra_del_Fuego`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1029) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB_Tucuman` from ((((((((((((`receipts` left join `persons` `b` on((`receipts`.`person_id_owner` = `b`.`id`))) left join `periods` `p` on((`receipts`.`period_id` = `p`.`id`))) left join `receipt_types` on((`receipts`.`type_receipt_id` = `receipt_types`.`id`))) left join `retention_types` on((`receipts`.`retention_type_id` = `retention_types`.`id`))) left join `status` on((`receipts`.`status_id` = `status`.`id`))) left join `persons` on((`receipts`.`person_id_relationed` = `persons`.`id`))) left join `receipt_taxes` on((`receipts`.`id` = `receipt_taxes`.`receipt_id`))) left join `zones` on((`receipts`.`zone_id` = `zones`.`id`))) left join `activities` on((`receipts`.`activity_id` = `activities`.`id`))) left join `types` on((`receipts`.`type_id` = `types`.`id`))) left join `system_taxes` on((`receipt_taxes`.`tax_id` = `system_taxes`.`id`))) left join `other_taxes` on((`receipt_taxes`.`tax_id` = `other_taxes`.`id`))) group by `receipts`.`id`,`receipts`.`type_id`,`persons`.`id`,`receipts`.`person_id_owner`,`b`.`document`,`b`.`field_name1`,`p`.`id`,`p`.`date_from`,`p`.`date_to`,`p`.`code`,`p`.`year`,`p`.`period_number`,`types`.`id`,`p`.`code`,`types`.`name`,`persons`.`field_name1`,`persons`.`document_type`,`persons`.`document`,`zones`.`name`,`status`.`name`,`activities`.`name`,`receipts`.`receipt_date`,`receipts`.`reference`,`retention_types`.`name`,`receipt_types`.`name`,`receipts`.`code_ticket`,`receipts`.`number`,`receipts`.`amount` order by `p`.`code`,`persons`.`document`,`receipts`.`code_ticket`,`receipts`.`number` */;

--
-- Final view structure for view `v_consultaproyeccionganancias`
--

/*!50001 DROP TABLE IF EXISTS `v_consultaproyeccionganancias`*/;
/*!50001 DROP VIEW IF EXISTS `v_consultaproyeccionganancias`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_consultaproyeccionganancias` AS select `types`.`id` AS `IdOperacion`,`types`.`name` AS `Operacion`,`receipts`.`person_id_owner` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`year` AS `anioPeriodo`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 1)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `UNO`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 2)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `DOS`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 3)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `TRES`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 4)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `CUATRO`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 5)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `CINCO`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 6)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `SEIS`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 7)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `SIETE`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 8)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `OCHO`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 9)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `NUEVE`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 10)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `DIEZ`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 11)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `ONCE`,sum((case when (((`receipt_taxes`.`tax_id` = 3) or (`receipt_taxes`.`tax_id` = 2) or (`receipt_taxes`.`tax_id` = 1) or (`receipt_taxes`.`tax_id` = 7) or (`receipt_taxes`.`tax_id` = 6) or (`receipt_taxes`.`tax_id` = 5) or (`receipt_taxes`.`tax_id` = 4)) and (`p`.`period_number` = 12)) then ((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * `receipt_taxes`.`amount`) else 0 end)) AS `DOCE` from (((((((((`receipts` left join `persons` `b` on((`receipts`.`person_id_owner` = `b`.`id`))) left join `periods` `p` on((`receipts`.`period_id` = `p`.`id`))) left join `receipt_types` on((`receipts`.`type_receipt_id` = `receipt_types`.`id`))) left join `status` on((`receipts`.`status_id` = `status`.`id`))) left join `persons` on((`receipts`.`person_id_relationed` = `persons`.`id`))) left join `receipt_taxes` on((`receipts`.`id` = `receipt_taxes`.`receipt_id`))) left join `types` on((`receipts`.`type_id` = `types`.`id`))) left join `system_taxes` on((`receipt_taxes`.`tax_id` = `system_taxes`.`id`))) left join `other_taxes` on((`receipt_taxes`.`tax_id` = `other_taxes`.`id`))) where (`types`.`id` in (1,2)) group by `types`.`id`,`types`.`name`,`receipts`.`person_id_owner`,`b`.`document`,`b`.`field_name1`,`p`.`year` order by `types`.`id`,`p`.`year`,`receipts`.`person_id_owner` */;

--
-- Final view structure for view `v_cta_cte_cheques`
--

/*!50001 DROP TABLE IF EXISTS `v_cta_cte_cheques`*/;
/*!50001 DROP VIEW IF EXISTS `v_cta_cte_cheques`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_cta_cte_cheques` AS select `as`.`id` AS `conta_asiento_id`,`as`.`fecha_registracion` AS `fecha`,`asd`.`id` AS `conta_asiento_detail_id`,`asd`.`tipo_asiento_id` AS `tipo_asiento_id`,`ta`.`nombre` AS `registrado_en`,`asd`.`cta_cte_tesoreria_cuenta_id` AS `plan_cuenta_id`,(case when (`asd`.`saldo_id` = 1) then 'DEUDOR' else 'ACREEDOR' end) AS `SALDO`,`asd`.`saldo_id` AS `saldo_id`,`as`.`comentario` AS `comentario`,`asd`.`person_id` AS `person_id`,`ta`.`nombre` AS `asiento`,`pc1`.`nombre` AS `destino`,`tpc`.`nombre` AS `cuenta`,`p`.`field_name1` AS `empresa`,`ch`.`titular` AS `titular`,`ch`.`numero` AS `numero`,`ch`.`comentario` AS `comentarioCheque`,`ch`.`fecha_cobro` AS `fecha_cobro`,`ch`.`status` AS `status`,`ban`.`nombre` AS `banco`,(case when (`ch`.`abierto_cruzado` = 1) then 'ABIERTO' else 'CRUZADO' end) AS `abierto_cruzado`,sum((case when (`asd`.`saldo_id` = 1) then `asd`.`monto` else 0 end)) AS `DEBE`,sum((case when (`asd`.`saldo_id` = 2) then `asd`.`monto` else 0 end)) AS `HABER` from ((((((((`conta_asientos_details` `asd` join `conta_asientos` `as` on((`asd`.`conta_asiento_id` = `as`.`id`))) join `conta_tipo_saldos` `ts` on((`asd`.`saldo_id` = `ts`.`id`))) left join `persons` `p` on((`asd`.`person_id` = `p`.`id`))) join `conta_tipo_asientos` `ta` on((`asd`.`tipo_asiento_id` = `ta`.`id`))) join `cta_cte_tesoreria_cuentas` `tpc` on((`asd`.`cta_cte_tesoreria_cuenta_id` = `tpc`.`id`))) left join `ctacte_cheques` `ch` on((`as`.`id` = `ch`.`asiento_id`))) left join `cta_cte_tesoreria_cuentas` `pc1` on((`ch`.`cta_cte_tesoreria_cuenta_id` = `pc1`.`id`))) left join `ctacte_bancos` `ban` on((`ch`.`banco_id` = `ban`.`id`))) where (isnull(`asd`.`deleted_at`) and (`asd`.`cta_cte_tesoreria_cuenta_id` = 176)) group by `asd`.`id` order by `as`.`id`,`asd`.`id`,`asd`.`saldo_id`,`p`.`field_name1`,`tpc`.`nombre` */;

--
-- Final view structure for view `v_cta_cte_clientes`
--

/*!50001 DROP TABLE IF EXISTS `v_cta_cte_clientes`*/;
/*!50001 DROP VIEW IF EXISTS `v_cta_cte_clientes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_cta_cte_clientes` AS select `as`.`id` AS `conta_asiento_id`,`as`.`fecha_registracion` AS `fecha`,`asd`.`id` AS `conta_asiento_detail_id`,`asd`.`tipo_asiento_id` AS `tipo_asiento_id`,`ta`.`nombre` AS `registrado_en`,`asd`.`cta_cte_tesoreria_cuenta_id` AS `cta_cte_tesoreria_cuenta_id`,(case when (`asd`.`saldo_id` = 1) then 'DEUDOR' else 'ACREEDOR' end) AS `SALDO`,`asd`.`saldo_id` AS `saldo_id`,`as`.`comentario` AS `comentario`,`asd`.`person_id` AS `person_id`,`ta`.`nombre` AS `asiento`,`tpc`.`nombre` AS `cuenta`,`p`.`field_name1` AS `empresa`,(case when (`asd`.`saldo_id` = 1) then `asd`.`monto` else 0 end) AS `DEBE`,(case when (`asd`.`saldo_id` = 2) then `asd`.`monto` else 0 end) AS `HABER` from (((((`conta_asientos_details` `asd` join `conta_asientos` `as` on((`asd`.`conta_asiento_id` = `as`.`id`))) join `conta_tipo_saldos` `ts` on((`asd`.`saldo_id` = `ts`.`id`))) join `persons` `p` on((`asd`.`person_id` = `p`.`id`))) join `conta_tipo_asientos` `ta` on((`asd`.`tipo_asiento_id` = `ta`.`id`))) join `cta_cte_tesoreria_cuentas` `tpc` on((`asd`.`cta_cte_tesoreria_cuenta_id` = `tpc`.`id`))) where (isnull(`asd`.`deleted_at`) and (`tpc`.`id` = 13)) order by `as`.`id`,`asd`.`id`,`asd`.`saldo_id`,`p`.`field_name1` */;

--
-- Final view structure for view `v_iibb_reg_simpl`
--

/*!50001 DROP TABLE IF EXISTS `v_iibb_reg_simpl`*/;
/*!50001 DROP VIEW IF EXISTS `v_iibb_reg_simpl`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_iibb_reg_simpl` AS select `types`.`id` AS `IdOperacion`,`types`.`name` AS `Operacion`,`receipts`.`person_id_owner` AS `person_id`,`b`.`document` AS `cuit`,`b`.`field_name1` AS `empresa`,`p`.`year` AS `anioPeriodo`,`vpi`.`impuesto_id` AS `impuesto_id`,`vpi`.`importe` AS `importe`,`m`.`categoria` AS `categoria`,`m`.`facAnual` AS `facAnual`,sum(((case when (`vpi`.`impuesto_id` = 13) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end) / 6)) AS `TOTAL`,sum((case when ((`vpi`.`vto_id` = 1110) and ((`p`.`period_number` = 1) or (`p`.`period_number` = 2) or (`p`.`period_number` = 3) or (`p`.`period_number` = 4))) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `Q1`,sum((case when ((`vpi`.`vto_id` = 1110) and ((`p`.`period_number` = 5) or (`p`.`period_number` = 6) or (`p`.`period_number` = 7) or (`p`.`period_number` = 8))) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `Q2`,sum((case when ((`vpi`.`vto_id` = 1110) and ((`p`.`period_number` = 9) or (`p`.`period_number` = 10) or (`p`.`period_number` = 11) or (`p`.`period_number` = 12))) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `Q3`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 1)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `UNO`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 2)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `DOS`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 3)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `TRES`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 4)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `CUATRO`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 5)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `CINCO`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 6)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `SEIS`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 7)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `SIETE`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 8)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `OCHO`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 9)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `NUEVE`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 10)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `DIEZ`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 11)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `ONCE`,sum((case when ((`vpi`.`vto_id` = 1110) and (`p`.`period_number` = 12)) then ((case when (`receipts`.`type_receipt_id` = 9) then -(1) else 1 end) * `receipts`.`amount`) else 0 end)) AS `DOCE` from ((((((((((((`receipts` left join `persons` `b` on((`receipts`.`person_id_owner` = `b`.`id`))) left join `periods` `p` on((`receipts`.`period_id` = `p`.`id`))) left join `receipt_types` on((`receipts`.`type_receipt_id` = `receipt_types`.`id`))) left join `status` on((`receipts`.`status_id` = `status`.`id`))) left join `persons` on((`receipts`.`person_id_relationed` = `persons`.`id`))) left join `receipt_taxes` on((`receipts`.`id` = `receipt_taxes`.`receipt_id`))) left join `types` on((`receipts`.`type_id` = `types`.`id`))) left join `system_taxes` on((`receipt_taxes`.`tax_id` = `system_taxes`.`id`))) left join `other_taxes` on((`receipt_taxes`.`tax_id` = `other_taxes`.`id`))) join `vto_person_impuesto` `vpi` on((`b`.`id` = `vpi`.`person_id`))) join `vto_categoria_imp` `vci` on((`vpi`.`categoria_imp_id` = `vci`.`id`))) join `categorias_iibb` `m` on((`vci`.`cat_mono_id` = `m`.`id`))) where ((`receipts`.`type_id` = 1) and (`vpi`.`impuesto_id` = 13)) group by `types`.`id`,`types`.`name`,`receipts`.`person_id_owner`,`b`.`document`,`b`.`field_name1`,`p`.`year`,`vpi`.`impuesto_id`,`vpi`.`importe`,`m`.`categoria`,`m`.`facAnual` order by `empresa` */;

--
-- Final view structure for view `v_ingresos_brutos_gasto`
--

/*!50001 DROP TABLE IF EXISTS `v_ingresos_brutos_gasto`*/;
/*!50001 DROP VIEW IF EXISTS `v_ingresos_brutos_gasto`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_ingresos_brutos_gasto` AS select `v_liquidaciones_iibb`.`anio` AS `anio`,`v_liquidaciones_iibb`.`IdEmpresa` AS `IdEmpresa`,`v_liquidaciones_iibb`.`NombreEmpresa` AS `NombreEmpresa`,sum((case when (`v_liquidaciones_iibb`.`mes` = 1) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `UNO`,sum((case when (`v_liquidaciones_iibb`.`mes` = 2) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `DOS`,sum((case when (`v_liquidaciones_iibb`.`mes` = 3) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `TRES`,sum((case when (`v_liquidaciones_iibb`.`mes` = 4) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `CUATRO`,sum((case when (`v_liquidaciones_iibb`.`mes` = 5) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `CINCO`,sum((case when (`v_liquidaciones_iibb`.`mes` = 6) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `SEIS`,sum((case when (`v_liquidaciones_iibb`.`mes` = 7) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `SIETE`,sum((case when (`v_liquidaciones_iibb`.`mes` = 8) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `OCHO`,sum((case when (`v_liquidaciones_iibb`.`mes` = 9) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `NUEVE`,sum((case when (`v_liquidaciones_iibb`.`mes` = 10) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `DIEZ`,sum((case when (`v_liquidaciones_iibb`.`mes` = 11) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `ONCE`,sum((case when (`v_liquidaciones_iibb`.`mes` = 12) then `v_liquidaciones_iibb`.`impuesto` else 0 end)) AS `DOCE` from `v_liquidaciones_iibb` group by `v_liquidaciones_iibb`.`anio`,`v_liquidaciones_iibb`.`IdEmpresa`,`v_liquidaciones_iibb`.`NombreEmpresa` */;

--
-- Final view structure for view `v_liquidaciones`
--

/*!50001 DROP TABLE IF EXISTS `v_liquidaciones`*/;
/*!50001 DROP VIEW IF EXISTS `v_liquidaciones`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_liquidaciones` AS select `period_liquidations`.`id` AS `Idperiod_liquidations`,`period_liquidations`.`apply_to` AS `apply_to`,`period_liquidations`.`status` AS `Status`,`period_liquidations`.`period_id` AS `IdPeriodo`,`period_liquidations`.`person_id` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`date_from` AS `Desde`,`p`.`date_to` AS `Hasta`,`p`.`code` AS `Periodo` from ((`period_liquidations` left join `persons` `b` on((`period_liquidations`.`person_id` = `b`.`id`))) left join `periods` `p` on((`period_liquidations`.`period_id` = `p`.`id`))) order by `period_liquidations`.`apply_to`,`p`.`code`,`b`.`field_name1` */;

--
-- Final view structure for view `v_liquidaciones_iibb`
--

/*!50001 DROP TABLE IF EXISTS `v_liquidaciones_iibb`*/;
/*!50001 DROP VIEW IF EXISTS `v_liquidaciones_iibb`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_liquidaciones_iibb` AS select `pl`.`status` AS `Status`,`pld`.`id` AS `IdLiquidacionIIBB`,`pld`.`period_liquidation_id` AS `period_liquidation_id`,`liquidators`.`name` AS `liquidador`,`pld`.`period_id` AS `IdPeriodo`,`pld`.`person_id` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`year` AS `anio`,`p`.`period_number` AS `mes`,`p`.`date_from` AS `Desde`,`p`.`date_to` AS `Hasta`,`p`.`code` AS `Periodo`,`z`.`name` AS `Zona`,`pld`.`coef` AS `coeficiente`,`pld`.`aliquot` AS `alicuota`,`pld`.`base_amount` AS `baseImponible`,`pld`.`tax_amount` AS `impuesto`,`pld`.`previous_period_balance` AS `saldoAnterior`,`pld`.`sircreb_amount` AS `sircreb`,`pld`.`perception_amount` AS `percepciones`,`pld`.`retention_amount` AS `retenciones`,(select `plia`.`negative_amount` from `period_liquidation_details` `plia` where ((`pld`.`zone_id` = `plia`.`zone_id`) and (`plia`.`period_id` = (select `pa`.`id` from `periods` `pa` where ((`pa`.`person_id` = `b`.`id`) and (`pa`.`period_number` = (case when (`p`.`period_number` > 1) then (`p`.`period_number` - 1) else 12 end)) and (`pa`.`year` = (case when (`p`.`period_number` = 1) then (`p`.`year` - 1) else `p`.`year` end))))))) AS `A_PAGAR_ANTERIOR`,`pld`.`negative_amount` AS `A_Pagar`,`pld`.`positive_amount` AS `A_Favor` from (((((((`period_liquidation_details` `pld` join `persons` `b` on((`pld`.`person_id` = `b`.`id`))) join `person_liquidators` on((`b`.`id` = `person_liquidators`.`person_id`))) join `liquidators` on((`person_liquidators`.`liquidator_id` = `liquidators`.`id`))) join `person_configurations` on((`pld`.`person_id` = `person_configurations`.`person_id`))) left join `periods` `p` on((`pld`.`period_id` = `p`.`id`))) left join `period_liquidations` `pl` on((`pld`.`period_liquidation_id` = `pl`.`id`))) left join `zones` `z` on((`pld`.`zone_id` = `z`.`id`))) where (`person_configurations`.`active` = 2) order by `p`.`code`,`b`.`field_name1` */;

--
-- Final view structure for view `v_liquidaciones_iva`
--

/*!50001 DROP TABLE IF EXISTS `v_liquidaciones_iva`*/;
/*!50001 DROP VIEW IF EXISTS `v_liquidaciones_iva`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_liquidaciones_iva` AS select `pl`.`status` AS `Status`,`period_liquidation_iva`.`id` AS `IdLiquidacionIVA`,`period_liquidation_iva`.`period_liquidation_id` AS `period_liquidation_id`,`liquidators`.`name` AS `liquidador`,`period_liquidation_iva`.`period_id` AS `IdPeriodo`,`period_liquidation_iva`.`person_id` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`date_from` AS `Desde`,`p`.`date_to` AS `Hasta`,`p`.`code` AS `Periodo`,`period_liquidation_iva`.`total_debit` AS `total_debit`,`period_liquidation_iva`.`total_credit` AS `total_credit`,`period_liquidation_iva`.`previous_technical` AS `previous_technical`,`period_liquidation_iva`.`previous_free_availability` AS `previous_free_availability`,`period_liquidation_iva`.`retention_amount` AS `retention_amount`,`period_liquidation_iva`.`perception_amount` AS `perception_amount`,`period_liquidation_iva`.`compensation_amount` AS `compensation_amount`,`period_liquidation_iva`.`total_perceptions_retentions` AS `total_perceptions_retentions`,`period_liquidation_iva`.`free_availability_balance` AS `free_availability_balance`,(select (case when isnull(`plia`.`negative_amount`) then 0 else `plia`.`negative_amount` end) from `period_liquidation_iva` `plia` where (`plia`.`period_id` = (select `p`.`id` from `periods` `p` where ((`p`.`person_id` = `b`.`id`) and (`p`.`period_number` = (case when (`p`.`period_number` > 1) then (`p`.`period_number` - 1) else 12 end)) and (`p`.`year` = (case when (`p`.`period_number` = 1) then (`p`.`year` - 1) else `p`.`year` end)))))) AS `A_PAGAR_ANTERIOR`,`period_liquidation_iva`.`negative_amount` AS `A_PAGAR`,`period_liquidation_iva`.`positive_amount` AS `SaldoTecnicoAFavor`,`period_liquidation_iva`.`total_free_availability` AS `SaldoLibreDisponibilidadAFavor` from ((((((`period_liquidation_iva` join `persons` `b` on((`period_liquidation_iva`.`person_id` = `b`.`id`))) join `periods` `p` on((`period_liquidation_iva`.`period_id` = `p`.`id`))) join `period_liquidations` `pl` on((`period_liquidation_iva`.`period_liquidation_id` = `pl`.`id`))) join `person_liquidators` on((`b`.`id` = `person_liquidators`.`person_id`))) join `liquidators` on((`person_liquidators`.`liquidator_id` = `liquidators`.`id`))) join `person_configurations` on((`period_liquidation_iva`.`person_id` = `person_configurations`.`person_id`))) where ((`person_configurations`.`active` = 2) and isnull(`pl`.`deleted_at`)) order by `p`.`code`,`b`.`field_name1` */;

--
-- Final view structure for view `v_pdf_consultacomprobantes`
--

/*!50001 DROP TABLE IF EXISTS `v_pdf_consultacomprobantes`*/;
/*!50001 DROP VIEW IF EXISTS `v_pdf_consultacomprobantes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_pdf_consultacomprobantes` AS select `receipts`.`id` AS `IdComprobante`,`receipts`.`type_id` AS `IdTipoComprobante`,`persons`.`id` AS `IdProveedorCliente`,`receipts`.`person_id_owner` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`id` AS `IdPeriodo`,`p`.`date_from` AS `Desde`,`p`.`date_to` AS `Hasta`,`p`.`code` AS `Periodo`,`p`.`year` AS `anioPeriodo`,`p`.`period_number` AS `mesPeriodo`,`types`.`id` AS `IdOperacion`,`types`.`name` AS `Operacion`,`persons`.`field_name1` AS `Proveedor`,`persons`.`document_type` AS `TipoDocumento`,`persons`.`document` AS `Documento`,`zones`.`name` AS `Zona`,`status`.`name` AS `Estado`,`activities`.`name` AS `Actividad`,`receipts`.`receipt_date` AS `FechaComprobante`,`receipts`.`reference` AS `Referencia`,`retention_types`.`name` AS `TipoDeRetencion`,`receipt_types`.`name` AS `TipoComprobante`,`receipts`.`code_ticket` AS `Suc`,`receipts`.`number` AS `Numero`,(case when (`receipt_types`.`credit` = 1) then -(`receipts`.`amount`) else `receipts`.`amount` end) AS `Total`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 3) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_27`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 3) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_27`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 2) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_21`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 2) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_21`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_105`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_105`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 5) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 5) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 6) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_0`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 6) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_0`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 4) then `receipt_taxes`.`amount` else 0 end))) AS `gravado_2_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 4) then `receipt_taxes`.`tax_amount` else 0 end))) AS `IVA_2_5`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 7) then `receipt_taxes`.`amount` else 0 end))) AS `no_gravado`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1000) then `receipt_taxes`.`amount` else 0 end))) AS `percepIva`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1001) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1002) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1003) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1004) then `receipt_taxes`.`amount` else 0 end))) AS `Imps_Internos`,((case when (`receipt_types`.`credit` = 1) then -(1) else 1 end) * sum((case when (`receipt_taxes`.`tax_id` = 1005) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1006) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1007) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1008) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1009) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1010) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1011) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1012) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1013) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1014) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1015) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1016) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1017) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1018) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1019) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1020) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1021) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1022) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1023) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1024) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1025) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1026) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1027) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1028) then `receipt_taxes`.`amount` when (`receipt_taxes`.`tax_id` = 1029) then `receipt_taxes`.`amount` else 0 end))) AS `Perc_IIBB` from ((((((((((((`receipts` left join `persons` `b` on((`receipts`.`person_id_owner` = `b`.`id`))) left join `periods` `p` on((`receipts`.`period_id` = `p`.`id`))) left join `receipt_types` on((`receipts`.`type_receipt_id` = `receipt_types`.`id`))) left join `retention_types` on((`receipts`.`retention_type_id` = `retention_types`.`id`))) left join `status` on((`receipts`.`status_id` = `status`.`id`))) left join `persons` on((`receipts`.`person_id_relationed` = `persons`.`id`))) left join `receipt_taxes` on((`receipts`.`id` = `receipt_taxes`.`receipt_id`))) left join `zones` on((`receipts`.`zone_id` = `zones`.`id`))) left join `activities` on((`receipts`.`activity_id` = `activities`.`id`))) left join `types` on((`receipts`.`type_id` = `types`.`id`))) left join `system_taxes` on((`receipt_taxes`.`tax_id` = `system_taxes`.`id`))) left join `other_taxes` on((`receipt_taxes`.`tax_id` = `other_taxes`.`id`))) where isnull(`receipts`.`deleted_at`) group by `receipts`.`id`,`receipts`.`type_id`,`persons`.`id`,`receipts`.`person_id_owner`,`b`.`document`,`b`.`field_name1`,`p`.`id`,`p`.`date_from`,`p`.`date_to`,`p`.`code`,`p`.`year`,`p`.`period_number`,`types`.`id`,`p`.`code`,`types`.`name`,`persons`.`field_name1`,`persons`.`document_type`,`persons`.`document`,`zones`.`name`,`status`.`name`,`activities`.`name`,`receipts`.`receipt_date`,`receipts`.`reference`,`retention_types`.`name`,`receipt_types`.`name`,`receipts`.`code_ticket`,`receipts`.`number`,`receipts`.`amount` order by `p`.`code`,`persons`.`document`,`receipts`.`code_ticket`,`receipts`.`number` */;

--
-- Final view structure for view `v_retenciones_ganancias`
--

/*!50001 DROP TABLE IF EXISTS `v_retenciones_ganancias`*/;
/*!50001 DROP VIEW IF EXISTS `v_retenciones_ganancias`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_retenciones_ganancias` AS select `types`.`id` AS `IdOperacion`,`types`.`name` AS `Operacion`,`receipts`.`person_id_owner` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`year` AS `anioPeriodo`,sum((case when ((`p`.`period_number` = 1) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `UNO`,sum((case when ((`p`.`period_number` = 2) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `DOS`,sum((case when ((`p`.`period_number` = 3) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `TRES`,sum((case when ((`p`.`period_number` = 4) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `CUATRO`,sum((case when ((`p`.`period_number` = 5) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `CINCO`,sum((case when ((`p`.`period_number` = 6) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `SEIS`,sum((case when ((`p`.`period_number` = 7) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `SIETE`,sum((case when ((`p`.`period_number` = 8) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `OCHO`,sum((case when ((`p`.`period_number` = 9) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `NUEVE`,sum((case when ((`p`.`period_number` = 10) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `DIEZ`,sum((case when ((`p`.`period_number` = 11) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `ONCE`,sum((case when ((`p`.`period_number` = 12) and (`receipts`.`retention_type_id` = 1)) then `receipts`.`amount` else 0 end)) AS `DOCE` from (((((`receipts` left join `persons` `b` on((`receipts`.`person_id_owner` = `b`.`id`))) left join `periods` `p` on((`receipts`.`period_id` = `p`.`id`))) left join `status` on((`receipts`.`status_id` = `status`.`id`))) left join `persons` on((`receipts`.`person_id_relationed` = `persons`.`id`))) left join `types` on((`receipts`.`type_id` = `types`.`id`))) where (`types`.`id` = 3) group by `types`.`id`,`types`.`name`,`receipts`.`person_id_owner`,`b`.`document`,`b`.`field_name1`,`p`.`year` order by `types`.`id`,`p`.`year`,`receipts`.`person_id_owner` */;

--
-- Final view structure for view `v_sircreb_comp_anticipos_ganan`
--

/*!50001 DROP TABLE IF EXISTS `v_sircreb_comp_anticipos_ganan`*/;
/*!50001 DROP VIEW IF EXISTS `v_sircreb_comp_anticipos_ganan`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_sircreb_comp_anticipos_ganan` AS select `types`.`id` AS `IdOperacion`,`types`.`name` AS `Operacion`,`receipts`.`person_id_owner` AS `IdEmpresa`,`b`.`document` AS `DocumentoEmpresa`,`b`.`field_name1` AS `NombreEmpresa`,`p`.`year` AS `anioPeriodo`,sum((case when (`p`.`period_number` = 1) then `receipts`.`amount` else 0 end)) AS `UNO`,sum((case when (`p`.`period_number` = 2) then `receipts`.`amount` else 0 end)) AS `DOS`,sum((case when (`p`.`period_number` = 3) then `receipts`.`amount` else 0 end)) AS `TRES`,sum((case when (`p`.`period_number` = 4) then `receipts`.`amount` else 0 end)) AS `CUATRO`,sum((case when (`p`.`period_number` = 5) then `receipts`.`amount` else 0 end)) AS `CINCO`,sum((case when (`p`.`period_number` = 6) then `receipts`.`amount` else 0 end)) AS `SEIS`,sum((case when (`p`.`period_number` = 7) then `receipts`.`amount` else 0 end)) AS `SIETE`,sum((case when (`p`.`period_number` = 8) then `receipts`.`amount` else 0 end)) AS `OCHO`,sum((case when (`p`.`period_number` = 9) then `receipts`.`amount` else 0 end)) AS `NUEVE`,sum((case when (`p`.`period_number` = 10) then `receipts`.`amount` else 0 end)) AS `DIEZ`,sum((case when (`p`.`period_number` = 11) then `receipts`.`amount` else 0 end)) AS `ONCE`,sum((case when (`p`.`period_number` = 12) then `receipts`.`amount` else 0 end)) AS `DOCE` from (((((`receipts` left join `persons` `b` on((`receipts`.`person_id_owner` = `b`.`id`))) left join `periods` `p` on((`receipts`.`period_id` = `p`.`id`))) left join `status` on((`receipts`.`status_id` = `status`.`id`))) left join `persons` on((`receipts`.`person_id_relationed` = `persons`.`id`))) left join `types` on((`receipts`.`type_id` = `types`.`id`))) where (`types`.`id` in (4,5,6)) group by `types`.`id`,`types`.`name`,`receipts`.`person_id_owner`,`b`.`document`,`b`.`field_name1`,`p`.`year` order by `types`.`id`,`p`.`year`,`receipts`.`person_id_owner` */;

--
-- Final view structure for view `v_vencimiento_impuestos`
--

/*!50001 DROP TABLE IF EXISTS `v_vencimiento_impuestos`*/;
/*!50001 DROP VIEW IF EXISTS `v_vencimiento_impuestos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_vencimiento_impuestos` AS select `vto_p`.`idPersonVto` AS `idPersonVto`,`p`.`id` AS `person_id`,`l`.`name` AS `liquidador`,`p`.`field_name1` AS `empresa`,`p`.`document` AS `cuit`,`imp`.`name` AS `impuesto`,`cat`.`categoria` AS `categoria`,`vto_p`.`impuesto_id` AS `impuesto_id`,`vto_p`.`categoria_imp_id` AS `categoria_imp_id`,date_format(str_to_date(concat(`vto`.`anio`,'/',`vto`.`mes`,'/',`vto`.`dia`),'%Y/%m/%d'),'%d-%m-%Y') AS `vencimiento`,`vto_p`.`vto_id` AS `vto_id`,`vto`.`anticipo` AS `anticipo`,`vto_p`.`importe` AS `importe`,`vto_p`.`comentario` AS `comentario`,monthname(str_to_date(concat(`vto`.`anio`,'/',`vto`.`mes`,'/',`vto`.`dia`),'%Y/%m/%d')) AS `mes`,month(str_to_date(concat(`vto`.`anio`,'/',`vto`.`mes`,'/',`vto`.`dia`),'%Y/%m/%d')) AS `NumMes` from (((((((`vto_person_impuesto` `vto_p` join `person_configurations` `pc` on((`vto_p`.`person_id` = `pc`.`person_id`))) join `persons` `p` on((`pc`.`person_id` = `p`.`id`))) join `vto_vencimiento` `vto` on((`vto_p`.`vto_id` = `vto`.`id`))) join `vto_impuestos` `imp` on((`vto`.`impuesto_id` = `imp`.`id`))) left join `vto_categoria_imp` `cat` on((`vto_p`.`categoria_imp_id` = `cat`.`id`))) left join `person_liquidators` `pl` on((`p`.`id` = `pl`.`person_id`))) left join `liquidators` `l` on((`pl`.`liquidator_id` = `l`.`id`))) where (`pc`.`active` = 2) order by date_format(str_to_date(concat(`vto`.`anio`,'/',`vto`.`mes`,'/',`vto`.`dia`),'%Y/%m/%d'),'%d-%m-%Y'),`imp`.`name` */;

--
-- Final view structure for view `v_vencimientosanuales`
--

/*!50001 DROP TABLE IF EXISTS `v_vencimientosanuales`*/;
/*!50001 DROP VIEW IF EXISTS `v_vencimientosanuales`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`forge`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_vencimientosanuales` AS select `imp`.`id` AS `impuesto_id`,`imp`.`name` AS `impuesto`,`vto`.`anio` AS `anio`,`vto`.`mes` AS `mes`,`vto`.`dia` AS `dia`,`vto`.`anticipo` AS `anticipo`,`imp`.`status` AS `status`,`vto_fin_cuit`.`grupo` AS `grupo`,`vto_fin_cuit`.`id` AS `IdFinCuit` from (((`vto_vencimiento` `vto` left join `vto_impuestos` `imp` on((`vto`.`impuesto_id` = `imp`.`id`))) left join `vto_imp_fin_cuit` on((`vto`.`finCuit_id` = `vto_imp_fin_cuit`.`idImpFinCuit`))) left join `vto_fin_cuit` on((`vto_imp_fin_cuit`.`finCuit_id` = `vto_fin_cuit`.`id`))) order by `imp`.`name`,`vto`.`anio`,`vto`.`mes`,`vto`.`dia` */;


