-- Table structure for table `ctacte_bancos`
--

CREATE TABLE `ctacte_bancos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `codigoBCRA` int(11) DEFAULT NULL,
  `cuit` 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=82 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctacte_bancos`
--

INSERT INTO `ctacte_bancos` VALUES (1,NULL,'BANCO DE GALICIA Y BUENOS AIRES S.A.',7,'30-50000173-5',NULL,NULL,NULL),(2,NULL,'BANCO DE LA NACION ARGENTINA',11,'30-50001091-2',NULL,NULL,NULL),(3,NULL,'BANCO DE LA PROVINCIA DE BUENOS AIRES',14,'33-99924210-9',NULL,NULL,NULL),(4,NULL,'INDUSTRIAL AND COMMERCIAL BANK OF CHINA',15,'30-70944784-6',NULL,NULL,NULL),(5,NULL,'CITIBANK N.A.',16,'30-50000562-5',NULL,NULL,NULL),(6,NULL,'BBVA BANCO FRANCES S.A.',17,'30-50000319-3',NULL,NULL,NULL),(7,NULL,'THE BANK OF TOKYO-MITSUBISHI UFJ, LTD.',18,'30-50001183-8',NULL,NULL,NULL),(8,NULL,'BANCO DE LA PROVINCIA DE CORDOBA S.A.',20,'30-99922856-5',NULL,NULL,NULL),(9,NULL,'BANCO SUPERVIELLE S.A.',27,'33-50000517-9',NULL,NULL,NULL),(10,NULL,'BANCO DE LA CIUDAD DE BUENOS AIRES',29,'30-99903208-3',NULL,NULL,NULL),(11,NULL,'BANCO PATAGONIA S.A.',34,'30-50000661-3',NULL,NULL,NULL),(12,NULL,'BANCO HIPOTECARIO S.A.',44,'30-50001107-2',NULL,NULL,NULL),(13,NULL,'BANCO DE SAN JUAN S.A.',45,'30-50000944-2',NULL,NULL,NULL),(14,NULL,'BANCO DEL TUCUMAN S.A.',60,'30-51794820-5',NULL,NULL,NULL),(15,NULL,'BANCO MUNICIPAL DE ROSARIO',65,'33-99918181-9',NULL,NULL,NULL),(16,NULL,'BANCO SANTANDER RIO S.A.',72,'30-50000845-4',NULL,NULL,NULL),(17,NULL,'BANCO DEL CHUBUT S.A.',83,'30-50001299-0',NULL,NULL,NULL),(18,NULL,'BANCO DE SANTA CRUZ S.A.',86,'30-50009880-1',NULL,NULL,NULL),(19,NULL,'BANCO DE LA PAMPA SOCIEDAD DE ECONOMÍA M',93,'30-50001251-6',NULL,NULL,NULL),(20,NULL,'BANCO DE CORRIENTES S.A.',94,'30-50001060-2',NULL,NULL,NULL),(21,NULL,'BANCO PROVINCIA DEL NEUQUÉN SOCIEDAD ANÓ',97,'30-50001404-7',NULL,NULL,NULL),(22,NULL,'BANCO INTERFINANZAS S.A.',147,'30-52271441-7',NULL,NULL,NULL),(23,NULL,'HSBC BANK ARGENTINA S.A.',150,'33-53718600-9',NULL,NULL,NULL),(24,NULL,'JPMORGAN CHASE BANK, NATIONAL ASSOCIATIO',165,'30-58313794-3',NULL,NULL,NULL),(25,NULL,'BANCO CREDICOOP COOPERATIVO LIMITADO',191,'30-57142135-2',NULL,NULL,NULL),(26,NULL,'BANCO DE VALORES S.A.',198,'30-57612427-5',NULL,NULL,NULL),(27,NULL,'BANCO ROELA S.A.',247,'30-53561044-0',NULL,NULL,NULL),(28,NULL,'BANCO MARIVA S.A.',254,'30-51642044-4',NULL,NULL,NULL),(29,NULL,'BANCO ITAU ARGENTINA S.A.',259,'30-58018941-1',NULL,NULL,NULL),(30,NULL,'BANK OF AMERICA, NATIONAL ASSOCIATION',262,'30-50005055-8',NULL,NULL,NULL),(31,NULL,'BNP PARIBAS',266,'30-58472756-6',NULL,NULL,NULL),(32,NULL,'BANCO PROVINCIA DE TIERRA DEL FUEGO',268,'30-57565578-1',NULL,NULL,NULL),(33,NULL,'BANCO DE LA REPUBLICA ORIENTAL DEL URUGU',269,'30-58833784-3',NULL,NULL,NULL),(34,NULL,'BANCO SAENZ S.A.',277,'30-53467243-4',NULL,NULL,NULL),(35,NULL,'BANCO MERIDIAN S.A.',281,'30-53448749-1',NULL,NULL,NULL),(36,NULL,'BANCO MACRO S.A.',285,'30-50001008-4',NULL,NULL,NULL),(37,NULL,'BANCO COMAFI SOCIEDAD ANONIMA',299,'30-60473101-8',NULL,NULL,NULL),(38,NULL,'BANCO DE INVERSION Y COMERCIO EXTERIOR S',300,'30-65112908-3',NULL,NULL,NULL),(39,NULL,'BANCO PIANO S.A.',301,'30-56915176-3',NULL,NULL,NULL),(40,NULL,'BANCO JULIO SOCIEDAD ANONIMA',305,'30-65744121-6',NULL,NULL,NULL),(41,NULL,'BANCO RIOJA SOCIEDAD ANONIMA UNIPERSONAL',309,'30-67185933-9',NULL,NULL,NULL),(42,NULL,'BANCO DEL SOL S.A.',310,'30-67793756-0',NULL,NULL,NULL),(43,NULL,'NUEVO BANCO DEL CHACO S. A.',311,'30-67015779-9',NULL,NULL,NULL),(44,NULL,'BANCO VOII S.A.',312,'30-54674163-6',NULL,NULL,NULL),(45,NULL,'BANCO DE FORMOSA S.A.',315,'30-67137590-0',NULL,NULL,NULL),(46,NULL,'BANCO CMF S.A.',319,'30-57661429-9',NULL,NULL,NULL),(47,NULL,'BANCO DE SANTIAGO DEL ESTERO S.A.',321,'33-68666464-9',NULL,NULL,NULL),(48,NULL,'BANCO INDUSTRIAL S.A.',322,'30-68502995-9',NULL,NULL,NULL),(49,NULL,'NUEVO BANCO DE SANTA FE SOCIEDAD ANONIMA',330,'30-69243266-1',NULL,NULL,NULL),(50,NULL,'BANCO CETELEM ARGENTINA S.A.',331,'30-69730636-2',NULL,NULL,NULL),(51,NULL,'BANCO DE SERVICIOS FINANCIEROS S.A.',332,'30-69726589-5',NULL,NULL,NULL),(52,NULL,'BANCO BRADESCO ARGENTINA S.A.U.',336,'30-70125555-7',NULL,NULL,NULL),(53,NULL,'BANCO DE SERVICIOS Y TRANSACCIONES S.A.',338,'30-70496099-5',NULL,NULL,NULL);
INSERT INTO `ctacte_bancos` VALUES (54,NULL,'RCI BANQUE S.A.',339,'30-70710834-3',NULL,NULL,NULL),(55,NULL,'BACS BANCO DE CREDITO Y SECURITIZACION S',340,'30-70722741-5',NULL,NULL,NULL),(56,NULL,'BANCO MASVENTAS S.A.',341,'30-54061826-3',NULL,NULL,NULL),(57,NULL,'BANCO WANAP S.A.',384,'30-71565463-2',NULL,NULL,NULL),(58,NULL,'NUEVO BANCO DE ENTRE RÍOS S.A.',386,'33-70799551-9',NULL,NULL,NULL),(59,NULL,'BANCO COLUMBIA S.A.',389,'30-51763749-8',NULL,NULL,NULL),(60,NULL,'BANCO BICA S.A.',426,'30-71233123-9',NULL,NULL,NULL),(61,NULL,'BANCO COINAG S.A.',431,'30-71419596-0',NULL,NULL,NULL),(62,NULL,'BANCO DE COMERCIO S.A.',432,'30-54203363-7',NULL,NULL,NULL),(63,NULL,'FORD CREDIT COMPAÑIA FINANCIERA S.A.',44059,'30-51654454-2',NULL,NULL,NULL),(64,NULL,'COMPAÑIA FINANCIERA ARGENTINA S.A.',44077,'30-53800640-4',NULL,NULL,NULL),(65,NULL,'VOLKWAGEN FINANCIAL SERVICES CIA.FIN.S.A',44088,'30-68241957-8',NULL,NULL,NULL),(66,NULL,'CORDIAL COMPAÑÍA FINANCIERA S.A.',44090,'30-70181085-2',NULL,NULL,NULL),(67,NULL,'FCA COMPAÑIA FINANCIERA S.A.',44092,'30-69230488-4',NULL,NULL,NULL),(68,NULL,'GPAT COMPAÑIA FINANCIERA S.A.',44093,'30-67856482-2',NULL,NULL,NULL),(69,NULL,'MERCEDES-BENZ COMPAÑÍA FINANCIERA ARGENT',44094,'30-70700229-4',NULL,NULL,NULL),(70,NULL,'ROMBO COMPAÑÍA FINANCIERA S.A.',44095,'33-70712490-9',NULL,NULL,NULL),(71,NULL,'JOHN DEERE CREDIT COMPAÑÍA FINANCIERA S.',44096,'30-70702485-9',NULL,NULL,NULL),(72,NULL,'PSA FINANCE ARGENTINA COMPAÑÍA FINANCIER',44098,'30-70784736-7',NULL,NULL,NULL),(73,NULL,'TOYOTA COMPAÑÍA FINANCIERA DE ARGENTINA',44099,'30-70900042-6',NULL,NULL,NULL),(74,NULL,'FINANDINO COMPAÑIA FINANCIERA S.A.',44100,'30-71259240-7',NULL,NULL,NULL),(75,NULL,'MONTEMAR COMPAÑIA FINANCIERA S.A.',45056,'30-58138551-6',NULL,NULL,NULL),(76,NULL,'MULTIFINANZAS COMPAÑIA FINANCIERA S.A.',45072,'30-62828435-7',NULL,NULL,NULL),(77,NULL,'CAJA DE CREDITO \"CUENCA\" COOPERATIVA LIM',65203,'30-71622694-4',NULL,NULL,NULL),(78,NULL,'MERCADO PAGO',NULL,NULL,NULL,NULL,NULL),(79,NULL,'UALA',NULL,NULL,NULL,NULL,NULL),(80,NULL,'ICBC',NULL,NULL,NULL,NULL,NULL),(81,NULL,'BMA SAU',NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `ctacte_bancos_datos`
--

CREATE TABLE `ctacte_bancos_datos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cuenta_conta_id` int(10) unsigned DEFAULT NULL,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cuit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `titular` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cuenta` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `num_cuenta` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cbu` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `alias` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ctacte_bancos_datos_cuenta_conta_id_foreign` (`cuenta_conta_id`),
  CONSTRAINT `ctacte_bancos_datos_cuenta_conta_id_foreign` FOREIGN KEY (`cuenta_conta_id`) REFERENCES `conta_plan_cuenta` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctacte_bancos_datos`
--


--
-- Table structure for table `ctacte_cheques`
--

CREATE TABLE `ctacte_cheques` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `asiento_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cuenta_conta_id` int(10) unsigned DEFAULT NULL,
  `cta_cte_tesoreria_cuenta_id` int(10) unsigned DEFAULT NULL,
  `cta_cte_tesoreria_id` int(10) unsigned DEFAULT NULL,
  `cta_cte_tesoreria_detail_id` int(10) unsigned DEFAULT NULL,
  `cta_cte_cliente_id` int(10) unsigned DEFAULT NULL,
  `cta_cte_cliente_id2` int(10) unsigned DEFAULT NULL,
  `cta_cte_cliente_detail_id` int(10) unsigned DEFAULT NULL,
  `nf_cta_cte_id2` int(10) unsigned DEFAULT NULL,
  `nf_cta_cte_id` int(10) unsigned DEFAULT NULL,
  `monto` decimal(16,2) DEFAULT NULL,
  `cheque3ros` tinyint(1) NOT NULL DEFAULT '0',
  `cheque_emitidos` tinyint(1) NOT NULL DEFAULT '0',
  `fecha` date DEFAULT NULL,
  `fecha_cobro` date DEFAULT NULL,
  `banco_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned DEFAULT NULL,
  `cuit` text COLLATE utf8mb4_unicode_ci,
  `titular` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `abierto_cruzado` int(11) NOT NULL DEFAULT '1',
  `is_no_a_la_orden` tinyint(1) NOT NULL DEFAULT '0',
  `numero` int(10) unsigned DEFAULT NULL,
  `foto` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comentario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int(11) 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 `ctacte_cheques_asiento_id_foreign` (`asiento_id`),
  KEY `ctacte_cheques_cuenta_conta_id_foreign` (`cuenta_conta_id`),
  KEY `ctacte_cheques_banco_id_foreign` (`banco_id`),
  KEY `ctacte_cheques_person_id_foreign` (`person_id`),
  KEY `ctacte_cheques_cta_cte_cliente_id2_foreign` (`cta_cte_cliente_id2`),
  KEY `ctacte_cheques_cta_cte_cliente_id_foreign` (`cta_cte_cliente_id`),
  KEY `cta_cte_tesorer_id` (`cta_cte_tesoreria_id`),
  KEY `ctacte_cheques_nf_cta_cte_id_foreign` (`nf_cta_cte_id`),
  KEY `ctacte_cheques_nf_cta_cte_id2_foreign` (`nf_cta_cte_id2`),
  KEY `ctacte_cheques_cta_cte_tesoreria_cuenta_id_foreign` (`cta_cte_tesoreria_cuenta_id`),
  KEY `ctacte_cheques_cta_cte_cliente_detail_id_foreign` (`cta_cte_cliente_detail_id`),
  KEY `ctacte_cheques_cta_cte_tesoreria_detail_id_foreign` (`cta_cte_tesoreria_detail_id`),
  CONSTRAINT `cta_cte_tesorer_id` FOREIGN KEY (`cta_cte_tesoreria_id`) REFERENCES `cta_cte_tesoreria` (`id`),
  CONSTRAINT `ctacte_cheques_banco_id_foreign` FOREIGN KEY (`banco_id`) REFERENCES `ctacte_bancos` (`id`),
  CONSTRAINT `ctacte_cheques_cta_cte_cliente_detail_id_foreign` FOREIGN KEY (`cta_cte_cliente_detail_id`) REFERENCES `cta_cte_cliente_details` (`id`),
  CONSTRAINT `ctacte_cheques_cta_cte_cliente_id2_foreign` FOREIGN KEY (`cta_cte_cliente_id2`) REFERENCES `cta_cte_cliente` (`id`),
  CONSTRAINT `ctacte_cheques_cta_cte_cliente_id_foreign` FOREIGN KEY (`cta_cte_cliente_id`) REFERENCES `cta_cte_cliente` (`id`),
  CONSTRAINT `ctacte_cheques_cta_cte_tesoreria_cuenta_id_foreign` FOREIGN KEY (`cta_cte_tesoreria_cuenta_id`) REFERENCES `cta_cte_tesoreria_cuentas` (`id`),
  CONSTRAINT `ctacte_cheques_cta_cte_tesoreria_detail_id_foreign` FOREIGN KEY (`cta_cte_tesoreria_detail_id`) REFERENCES `cta_cte_tesoreria_detail` (`id`),
  CONSTRAINT `ctacte_cheques_cuenta_conta_id_foreign` FOREIGN KEY (`cuenta_conta_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `ctacte_cheques_nf_cta_cte_id2_foreign` FOREIGN KEY (`nf_cta_cte_id2`) REFERENCES `nf_cta_cte` (`id`),
  CONSTRAINT `ctacte_cheques_nf_cta_cte_id_foreign` FOREIGN KEY (`nf_cta_cte_id`) REFERENCES `nf_cta_cte` (`id`),
  CONSTRAINT `ctacte_cheques_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctacte_cheques`
--


--
-- Table structure for table `ctactegastos_centrocosto`
--

CREATE TABLE `ctactegastos_centrocosto` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctactegastos_centrocosto`
--

INSERT INTO `ctactegastos_centrocosto` VALUES (1,NULL,'OFICINA',NULL,NULL,NULL),(2,NULL,'FIJO',NULL,NULL,NULL),(3,NULL,'VARIABLE',NULL,NULL,NULL),(4,NULL,'GISELA',NULL,NULL,NULL),(5,NULL,'LIA',NULL,NULL,NULL),(6,NULL,'PADRES',NULL,NULL,NULL),(7,NULL,'CASA',NULL,NULL,NULL),(8,NULL,'VANESA',NULL,NULL,NULL);

--
-- Table structure for table `ctactegastos_cuenta_tipo`
--

CREATE TABLE `ctactegastos_cuenta_tipo` (
  `idCuentaTipo` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `cta_cte_tesoreria_cuenta_id` int(10) unsigned DEFAULT NULL,
  `idTipo` 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 (`idCuentaTipo`),
  KEY `ctactegastos_cuenta_tipo_idtipo_foreign` (`idTipo`),
  KEY `ctactegastos_cuenta_tipo_cta_cte_tesoreria_cuenta_id_foreign` (`cta_cte_tesoreria_cuenta_id`),
  CONSTRAINT `ctactegastos_cuenta_tipo_cta_cte_tesoreria_cuenta_id_foreign` FOREIGN KEY (`cta_cte_tesoreria_cuenta_id`) REFERENCES `cta_cte_tesoreria_cuentas` (`id`),
  CONSTRAINT `ctactegastos_cuenta_tipo_idtipo_foreign` FOREIGN KEY (`idTipo`) REFERENCES `ctactegastos_tiposdegastos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctactegastos_cuenta_tipo`
--

INSERT INTO `ctactegastos_cuenta_tipo` VALUES (1,NULL,NULL,3,NULL,NULL,NULL),(2,NULL,NULL,6,NULL,NULL,NULL),(3,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,NULL,4,NULL,NULL,NULL),(5,NULL,NULL,5,NULL,NULL,NULL),(6,NULL,NULL,3,NULL,NULL,NULL),(7,NULL,NULL,4,NULL,NULL,NULL),(8,NULL,NULL,3,NULL,NULL,NULL),(9,NULL,NULL,4,NULL,NULL,NULL),(10,NULL,NULL,7,NULL,NULL,NULL),(11,NULL,NULL,8,NULL,NULL,NULL),(12,NULL,NULL,3,NULL,NULL,NULL),(13,NULL,NULL,3,NULL,NULL,NULL),(14,NULL,NULL,4,NULL,NULL,NULL),(15,NULL,NULL,1,NULL,NULL,NULL),(16,NULL,NULL,2,NULL,NULL,NULL),(17,NULL,NULL,5,NULL,NULL,NULL);

--
-- Table structure for table `ctactegastos_mensuales`
--

CREATE TABLE `ctactegastos_mensuales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `CuentaTipo_id` int(10) unsigned NOT NULL,
  `cta_cte_tesoreria_cuenta_id` int(10) unsigned NOT NULL DEFAULT '13',
  `TipoDeGasto_id` int(10) unsigned NOT NULL,
  `CentroCosto_id` int(10) unsigned NOT NULL,
  `gasto_cta_cte_tesoreria_cuenta_id` int(10) unsigned NOT NULL DEFAULT '13',
  `monto` decimal(16,2) DEFAULT NULL,
  `comentario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int(11) 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 `ctactegastos_mensuales_cuentatipo_id_foreign` (`CuentaTipo_id`),
  KEY `ctactegastos_mensuales_tipodegasto_id_foreign` (`TipoDeGasto_id`),
  KEY `ctactegastos_mensuales_centrocosto_id_foreign` (`CentroCosto_id`),
  KEY `ctactegastos_mensuales_cta_cte_tesoreria_cuenta_id_foreign` (`cta_cte_tesoreria_cuenta_id`),
  KEY `ctactegastos_mensuales_gasto_cta_cte_tesoreria_cuenta_id_foreign` (`gasto_cta_cte_tesoreria_cuenta_id`),
  CONSTRAINT `ctactegastos_mensuales_centrocosto_id_foreign` FOREIGN KEY (`CentroCosto_id`) REFERENCES `ctactegastos_centrocosto` (`id`),
  CONSTRAINT `ctactegastos_mensuales_cta_cte_tesoreria_cuenta_id_foreign` FOREIGN KEY (`cta_cte_tesoreria_cuenta_id`) REFERENCES `cta_cte_tesoreria_cuentas` (`id`),
  CONSTRAINT `ctactegastos_mensuales_cuentatipo_id_foreign` FOREIGN KEY (`CuentaTipo_id`) REFERENCES `ctactegastos_cuenta_tipo` (`idCuentaTipo`),
  CONSTRAINT `ctactegastos_mensuales_gasto_cta_cte_tesoreria_cuenta_id_foreign` FOREIGN KEY (`gasto_cta_cte_tesoreria_cuenta_id`) REFERENCES `cta_cte_tesoreria_cuentas` (`id`),
  CONSTRAINT `ctactegastos_mensuales_tipodegasto_id_foreign` FOREIGN KEY (`TipoDeGasto_id`) REFERENCES `ctactegastos_tiposdegastos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctactegastos_mensuales`
--


--
-- Table structure for table `ctactegastos_tiposdegastos`
--

CREATE TABLE `ctactegastos_tiposdegastos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `nombre` 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`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ctactegastos_tiposdegastos`
--

INSERT INTO `ctactegastos_tiposdegastos` VALUES (1,NULL,'Oficina',NULL,NULL,NULL),(2,NULL,'Personales',NULL,NULL,NULL),(3,NULL,'Tarjeta VISA',NULL,NULL,NULL),(4,NULL,'Tarjeta Mastercard',NULL,NULL,NULL),(5,NULL,'Debito Automatico',NULL,NULL,NULL),(6,NULL,'American Express',NULL,NULL,NULL),(7,NULL,'Tarjeta Shopping',NULL,NULL,NULL),(8,NULL,'Tarjeta Cencosud',NULL,NULL,NULL),(9,NULL,'Tarjeta Coto',NULL,NULL,NULL),(10,NULL,'Tarjeta Nativa',NULL,NULL,NULL);

--
-- Table structure for table `cursos`
--

CREATE TABLE `cursos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha` date DEFAULT NULL,
  `hora` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `profesor` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cant_clases` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `duracion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `adjuntos` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `link_zoom` longtext COLLATE utf8mb4_unicode_ci,
  `cod_zoom` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contraseña_zoom` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `link_youtube` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `materiales` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cursos`
--


--
-- Table structure for table `cursos_detail`
--

CREATE TABLE `cursos_detail` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `curso_id` int(10) unsigned NOT NULL,
  `field_name1` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `celular` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cursos_detail_curso_id_foreign` (`curso_id`),
  CONSTRAINT `cursos_detail_curso_id_foreign` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cursos_detail`
--


--
-- Table structure for table `data_types`
--

CREATE TABLE `data_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `class` int(10) unsigned NOT NULL,
  `class_description` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `data_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `data_types_description_unique` (`description`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `data_types`
--

INSERT INTO `data_types` VALUES (1,'Comprobantes XLS',1,'Importación','XLS','data/imports/receipts/xls',NULL,NULL),(2,'CITI-Ventas',1,'Importación','TXT','data/imports/receipts/CitiVentas',NULL,NULL),(3,'CITI Compras',2,'Exportación','TXT','data/exports/receipts/citi',NULL,NULL),(4,'CITI Ventas',2,'Exportación','TXT','data/exports/receipts/CitiVentasExport',NULL,NULL),(5,'Convenio Multilateral',2,'Exportación','TXT','data/exports/receipts/convenio',NULL,NULL),(6,'Libro IVA Digital',2,'Exportación','TXT','data/exports/receipts/libro_iva_digital',NULL,'2019-11-20 21:43:44'),(7,'Mis Comprobantes',1,'Importacion','','data/imports/receipts/mis_comprobantes',NULL,NULL),(8,'Consulta AFIP',3,'AFIP','','data/afip/index','2019-12-06 14:49:55','2019-12-06 14:49:55');

--
-- Table structure for table `dc_estados`
--

CREATE TABLE `dc_estados` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_estados`
--

INSERT INTO `dc_estados` VALUES (1,NULL,'BORRADOR',1,NULL,'2023-08-06 23:59:30',NULL),(2,NULL,'TERMINADO',1,NULL,'2023-08-06 23:59:30',NULL),(3,NULL,'ELIMINADO',1,NULL,'2023-08-13 09:18:03',NULL),(4,NULL,'PAGADO',1,NULL,'2023-08-06 23:59:30','2023-08-06 23:59:30'),(5,NULL,'CONCILIADO',1,NULL,'2023-08-06 23:59:30','2023-08-06 23:59:30');

--
-- Table structure for table `dc_estados_decisiones`
--

CREATE TABLE `dc_estados_decisiones` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_tipo_id` bigint(20) unsigned NOT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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 `dc_estados_decisiones_dc_orden_tipo_id_foreign` (`dc_orden_tipo_id`),
  CONSTRAINT `dc_estados_decisiones_dc_orden_tipo_id_foreign` FOREIGN KEY (`dc_orden_tipo_id`) REFERENCES `dc_ordenes_tipos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_estados_decisiones`
--

INSERT INTO `dc_estados_decisiones` VALUES (1,NULL,3,'Pendiente',1,NULL,NULL,NULL),(2,NULL,3,'Aprobado',1,NULL,NULL,NULL),(3,NULL,3,'Rechazado',1,NULL,NULL,NULL),(4,NULL,3,'Cancelado',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_firmas`
--

CREATE TABLE `dc_firmas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `show_firmante_dc` tinyint(1) NOT NULL DEFAULT '0',
  `show_create_dc` tinyint(1) NOT NULL DEFAULT '0',
  `faltan_firmas` tinyint(1) NOT NULL DEFAULT '0',
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_firmas`
--

INSERT INTO `dc_firmas` VALUES (1,NULL,'NO',1,1,0,1,NULL,'2023-08-06 23:59:31',NULL),(2,NULL,'RECHAZADO',1,1,0,1,NULL,'2023-08-06 23:59:31',NULL),(3,NULL,'ACEPTADO',1,0,0,1,NULL,'2023-08-06 23:59:31',NULL),(4,NULL,'FALTAN FIRMAS',0,0,1,1,'2023-08-06 23:59:31','2023-08-06 23:59:31',NULL),(5,NULL,'EMITIDO',1,0,0,1,'2023-10-12 08:07:46','2023-10-12 08:07:46',NULL);

--
-- Table structure for table `dc_firmas_ordenes`
--

CREATE TABLE `dc_firmas_ordenes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `user_id_que_firma` int(10) unsigned NOT NULL,
  `dc_firma_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_firmas_ordenes_person_id_foreign` (`person_id`),
  KEY `dc_firmas_ordenes_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_firmas_ordenes_dc_firma_id_foreign` (`dc_firma_id`),
  CONSTRAINT `dc_firmas_ordenes_dc_firma_id_foreign` FOREIGN KEY (`dc_firma_id`) REFERENCES `dc_firmas` (`id`),
  CONSTRAINT `dc_firmas_ordenes_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_firmas_ordenes_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_firmas_ordenes`
--


--
-- Table structure for table `dc_firmas_reglas`
--

CREATE TABLE `dc_firmas_reglas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `importe` decimal(16,2) NOT NULL,
  `grupos_users_ids` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_firmas_reglas_person_id_foreign` (`person_id`),
  KEY `dc_firmas_reglas_dc_orden_id_foreign` (`dc_orden_id`),
  CONSTRAINT `dc_firmas_reglas_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_firmas_reglas_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_firmas_reglas`
--


--
-- Table structure for table `dc_orden_de_pago`
--

CREATE TABLE `dc_orden_de_pago` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `fecha` datetime NOT NULL DEFAULT '2023-09-28 16:31:30',
  `dc_orden_id` bigint(20) unsigned NOT NULL DEFAULT '10',
  `person_id` int(10) unsigned NOT NULL,
  `person_id_relationed` int(10) unsigned NOT NULL,
  `request` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `dc_estado_id` bigint(20) unsigned NOT NULL DEFAULT '1',
  `dc_firma_id` bigint(20) 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 `dc_orden_de_pago_person_id_foreign` (`person_id`),
  KEY `dc_orden_de_pago_person_id_relationed_foreign` (`person_id_relationed`),
  KEY `dc_orden_de_pago_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_orden_de_pago_dc_firma_id_foreign` (`dc_firma_id`),
  KEY `dc_orden_de_pago_dc_estado_id_foreign` (`dc_estado_id`),
  CONSTRAINT `dc_orden_de_pago_dc_estado_id_foreign` FOREIGN KEY (`dc_estado_id`) REFERENCES `dc_estados` (`id`),
  CONSTRAINT `dc_orden_de_pago_dc_firma_id_foreign` FOREIGN KEY (`dc_firma_id`) REFERENCES `dc_firmas` (`id`),
  CONSTRAINT `dc_orden_de_pago_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_orden_de_pago_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `dc_orden_de_pago_person_id_relationed_foreign` FOREIGN KEY (`person_id_relationed`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_orden_de_pago`
--


--
-- Table structure for table `dc_orden_de_pago_cheques`
--

CREATE TABLE `dc_orden_de_pago_cheques` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_de_pago_id` bigint(20) unsigned NOT NULL,
  `ctacte_cheque_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 (`id`),
  KEY `dc_orden_de_pago_cheques_dc_orden_de_pago_id_foreign` (`dc_orden_de_pago_id`),
  KEY `dc_orden_de_pago_cheques_ctacte_cheque_id_foreign` (`ctacte_cheque_id`),
  CONSTRAINT `dc_orden_de_pago_cheques_ctacte_cheque_id_foreign` FOREIGN KEY (`ctacte_cheque_id`) REFERENCES `ctacte_cheques` (`id`),
  CONSTRAINT `dc_orden_de_pago_cheques_dc_orden_de_pago_id_foreign` FOREIGN KEY (`dc_orden_de_pago_id`) REFERENCES `dc_orden_de_pago` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_orden_de_pago_cheques`
--


--
-- Table structure for table `dc_orden_de_pago_receipts`
--

CREATE TABLE `dc_orden_de_pago_receipts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_de_pago_id` bigint(20) unsigned NOT NULL,
  `receipt_id` int(10) unsigned DEFAULT NULL,
  `importe` decimal(16,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_orden_de_pago_receipts_dc_orden_de_pago_id_foreign` (`dc_orden_de_pago_id`),
  KEY `dc_orden_de_pago_receipts_receipt_id_foreign` (`receipt_id`),
  CONSTRAINT `dc_orden_de_pago_receipts_dc_orden_de_pago_id_foreign` FOREIGN KEY (`dc_orden_de_pago_id`) REFERENCES `dc_orden_de_pago` (`id`),
  CONSTRAINT `dc_orden_de_pago_receipts_receipt_id_foreign` FOREIGN KEY (`receipt_id`) REFERENCES `receipts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_orden_de_pago_receipts`
--


--
-- Table structure for table `dc_orden_files`
--

CREATE TABLE `dc_orden_files` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `file` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_name` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_orden_files_dc_orden_id_foreign` (`dc_orden_id`),
  CONSTRAINT `dc_orden_files_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_orden_files`
--


--
-- Table structure for table `dc_ordenes`
--

CREATE TABLE `dc_ordenes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_tipo_id` bigint(20) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `person_id_relationed` int(10) unsigned DEFAULT NULL,
  `titulo` text COLLATE utf8mb4_unicode_ci,
  `sucursal` int(11) NOT NULL DEFAULT '1',
  `numero` int(11) NOT NULL,
  `numero_text` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sector` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `solicitante` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `syj_empleado_id` int(10) unsigned DEFAULT NULL,
  `fecha` date NOT NULL,
  `fecha_entrega` date DEFAULT NULL,
  `fecha_asignacion` datetime DEFAULT NULL,
  `fecha_cumplido` datetime DEFAULT NULL,
  `condicion_venta_id` int(10) unsigned DEFAULT NULL,
  `is_pago_adelantado` tinyint(1) DEFAULT NULL,
  `is_garantia` tinyint(1) NOT NULL DEFAULT '0',
  `forma_de_entrega_id` int(10) unsigned DEFAULT NULL,
  `plazo_de_pago_id` int(10) unsigned DEFAULT NULL,
  `cantidades` decimal(16,2) NOT NULL,
  `moneda_id` int(10) unsigned NOT NULL DEFAULT '1',
  `cotizacion` decimal(16,2) NOT NULL DEFAULT '1.00',
  `neto` decimal(16,2) NOT NULL,
  `iva` decimal(16,2) NOT NULL,
  `total` decimal(16,2) NOT NULL,
  `facturada` decimal(16,2) NOT NULL DEFAULT '0.00',
  `is_pagada` tinyint(1) NOT NULL,
  `garantia` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mant_oferta` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comen_para_cliente` text COLLATE utf8mb4_unicode_ci,
  `comentario` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `dc_ov_origen_id` bigint(20) unsigned DEFAULT NULL,
  `dc_ov_status_cobranza_id` bigint(20) unsigned DEFAULT NULL,
  `dc_ov_status_factura_id` bigint(20) unsigned DEFAULT NULL,
  `dc_ov_status_entrega_id` bigint(20) unsigned DEFAULT NULL,
  `dc_ov_status_venta_id` bigint(20) unsigned DEFAULT NULL,
  `dc_estado_id` bigint(20) unsigned NOT NULL,
  `dc_estado_decision_id` bigint(20) unsigned DEFAULT NULL,
  `inv_orden_trabajo_id` bigint(20) unsigned DEFAULT NULL,
  `conta_cc_id` bigint(20) unsigned DEFAULT NULL,
  `origendestinoable_type` text COLLATE utf8mb4_unicode_ci,
  `origendestinoable_id` int(10) unsigned DEFAULT NULL,
  `is_multiples_ot` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `dc_orden_origen_destino_id` bigint(20) unsigned DEFAULT NULL,
  `is_completado` tinyint(1) NOT NULL DEFAULT '0',
  `is_credit` tinyint(1) DEFAULT NULL,
  `dc_firma_id` bigint(20) 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 `dc_ordenes_dc_orden_tipo_id_foreign` (`dc_orden_tipo_id`),
  KEY `dc_ordenes_person_id_foreign` (`person_id`),
  KEY `dc_ordenes_person_id_relationed_foreign` (`person_id_relationed`),
  KEY `dc_ordenes_dc_estado_id_foreign` (`dc_estado_id`),
  KEY `dc_ordenes_conta_cc_id_foreign` (`conta_cc_id`),
  KEY `dc_ordenes_inv_orden_trabajo_id_foreign` (`inv_orden_trabajo_id`),
  KEY `dc_ordenes_dc_orden_origen_destino_id_foreign` (`dc_orden_origen_destino_id`),
  KEY `dc_ordenes_moneda_id_foreign` (`moneda_id`),
  KEY `dc_ordenes_dc_firma_id_foreign` (`dc_firma_id`),
  KEY `dc_ordenes_syj_empleado_id_foreign` (`syj_empleado_id`),
  KEY `dc_ordenes_dc_estado_decision_id_foreign` (`dc_estado_decision_id`),
  KEY `dc_ordenes_dc_ov_origen_id_foreign` (`dc_ov_origen_id`),
  KEY `dc_ordenes_dc_ov_status_venta_id_foreign` (`dc_ov_status_venta_id`),
  KEY `dc_ordenes_dc_ov_status_entrega_id_foreign` (`dc_ov_status_entrega_id`),
  KEY `dc_ordenes_dc_ov_status_factura_id_foreign` (`dc_ov_status_factura_id`),
  KEY `dc_ordenes_dc_ov_status_cobranza_id_foreign` (`dc_ov_status_cobranza_id`),
  CONSTRAINT `dc_ordenes_conta_cc_id_foreign` FOREIGN KEY (`conta_cc_id`) REFERENCES `conta_centro_costos` (`id`),
  CONSTRAINT `dc_ordenes_dc_estado_decision_id_foreign` FOREIGN KEY (`dc_estado_decision_id`) REFERENCES `dc_estados_decisiones` (`id`),
  CONSTRAINT `dc_ordenes_dc_estado_id_foreign` FOREIGN KEY (`dc_estado_id`) REFERENCES `dc_estados` (`id`),
  CONSTRAINT `dc_ordenes_dc_firma_id_foreign` FOREIGN KEY (`dc_firma_id`) REFERENCES `dc_firmas` (`id`),
  CONSTRAINT `dc_ordenes_dc_orden_origen_destino_id_foreign` FOREIGN KEY (`dc_orden_origen_destino_id`) REFERENCES `dc_ordenes_origen_destino` (`id`),
  CONSTRAINT `dc_ordenes_dc_orden_tipo_id_foreign` FOREIGN KEY (`dc_orden_tipo_id`) REFERENCES `dc_ordenes_tipos` (`id`),
  CONSTRAINT `dc_ordenes_dc_ov_origen_id_foreign` FOREIGN KEY (`dc_ov_origen_id`) REFERENCES `dc_ov_origenes` (`id`),
  CONSTRAINT `dc_ordenes_dc_ov_status_cobranza_id_foreign` FOREIGN KEY (`dc_ov_status_cobranza_id`) REFERENCES `dc_ov_status_cobranza` (`id`),
  CONSTRAINT `dc_ordenes_dc_ov_status_entrega_id_foreign` FOREIGN KEY (`dc_ov_status_entrega_id`) REFERENCES `dc_ov_status_entrega` (`id`),
  CONSTRAINT `dc_ordenes_dc_ov_status_factura_id_foreign` FOREIGN KEY (`dc_ov_status_factura_id`) REFERENCES `dc_ov_status_factura` (`id`),
  CONSTRAINT `dc_ordenes_dc_ov_status_venta_id_foreign` FOREIGN KEY (`dc_ov_status_venta_id`) REFERENCES `dc_ov_status_venta` (`id`),
  CONSTRAINT `dc_ordenes_inv_orden_trabajo_id_foreign` FOREIGN KEY (`inv_orden_trabajo_id`) REFERENCES `inv_orden_trabajos` (`id`),
  CONSTRAINT `dc_ordenes_moneda_id_foreign` FOREIGN KEY (`moneda_id`) REFERENCES `monedas` (`id`),
  CONSTRAINT `dc_ordenes_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `dc_ordenes_person_id_relationed_foreign` FOREIGN KEY (`person_id_relationed`) REFERENCES `persons` (`id`),
  CONSTRAINT `dc_ordenes_syj_empleado_id_foreign` FOREIGN KEY (`syj_empleado_id`) REFERENCES `syj_empleados` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes`
--


--
-- Table structure for table `dc_ordenes_compra_coti`
--

CREATE TABLE `dc_ordenes_compra_coti` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_coti_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_compra_coti_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_compra_coti_dc_orden_coti_id_foreign` (`dc_orden_coti_id`),
  CONSTRAINT `dc_ordenes_compra_coti_dc_orden_coti_id_foreign` FOREIGN KEY (`dc_orden_coti_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_compra_coti_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_compra_coti`
--


--
-- Table structure for table `dc_ordenes_compra_req`
--

CREATE TABLE `dc_ordenes_compra_req` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL,
  `dc_orden_req_id` bigint(20) unsigned NOT NULL,
  `dc_orden_req_detail_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_compra_req_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_compra_req_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_ordenes_compra_req_dc_orden_req_id_foreign` (`dc_orden_req_id`),
  KEY `dc_ordenes_compra_req_dc_orden_req_detail_id_foreign` (`dc_orden_req_detail_id`),
  CONSTRAINT `dc_ordenes_compra_req_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_compra_req_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_compra_req_dc_orden_req_detail_id_foreign` FOREIGN KEY (`dc_orden_req_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_compra_req_dc_orden_req_id_foreign` FOREIGN KEY (`dc_orden_req_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_compra_req`
--


--
-- Table structure for table `dc_ordenes_cotizacion_req`
--

CREATE TABLE `dc_ordenes_cotizacion_req` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL,
  `dc_orden_req_id` bigint(20) unsigned NOT NULL,
  `dc_orden_req_detail_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_cotizacion_req_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_cotizacion_req_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_ordenes_cotizacion_req_dc_orden_req_id_foreign` (`dc_orden_req_id`),
  KEY `dc_ordenes_cotizacion_req_dc_orden_req_detail_id_foreign` (`dc_orden_req_detail_id`),
  CONSTRAINT `dc_ordenes_cotizacion_req_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_cotizacion_req_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_cotizacion_req_dc_orden_req_detail_id_foreign` FOREIGN KEY (`dc_orden_req_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_cotizacion_req_dc_orden_req_id_foreign` FOREIGN KEY (`dc_orden_req_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_cotizacion_req`
--


--
-- Table structure for table `dc_ordenes_details`
--

CREATE TABLE `dc_ordenes_details` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_origen_destino_id` bigint(20) unsigned DEFAULT NULL,
  `origendestinoable_id` int(10) unsigned DEFAULT NULL,
  `origendestinoable_type` text COLLATE utf8mb4_unicode_ci,
  `cantidades` decimal(16,2) NOT NULL,
  `inv_deposito_id` bigint(20) unsigned DEFAULT NULL,
  `inv_producto_id` bigint(20) unsigned DEFAULT NULL,
  `inv_producto_id_destino` bigint(20) unsigned DEFAULT NULL,
  `prod_variant_id` bigint(20) unsigned DEFAULT NULL,
  `inv_deposito_id_destino` bigint(20) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `neto` decimal(16,2) NOT NULL,
  `desc_porc` decimal(16,2) DEFAULT NULL,
  `descuento` decimal(16,2) DEFAULT NULL,
  `system_tax_id` int(10) unsigned NOT NULL,
  `iva` decimal(16,2) NOT NULL,
  `subtotal` decimal(16,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_details_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_details_inv_producto_id_foreign` (`inv_producto_id`),
  KEY `dc_ordenes_details_system_tax_id_foreign` (`system_tax_id`),
  KEY `dc_ordenes_details_inv_producto_id_destino_foreign` (`inv_producto_id_destino`),
  KEY `dc_ordenes_details_dc_orden_origen_destino_id_foreign` (`dc_orden_origen_destino_id`),
  KEY `dc_ordenes_details_inv_deposito_id_foreign` (`inv_deposito_id`),
  KEY `dc_ordenes_details_inv_deposito_id_destino_foreign` (`inv_deposito_id_destino`),
  KEY `dc_ordenes_details_prod_variant_id_foreign` (`prod_variant_id`),
  CONSTRAINT `dc_ordenes_details_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_details_dc_orden_origen_destino_id_foreign` FOREIGN KEY (`dc_orden_origen_destino_id`) REFERENCES `dc_ordenes_origen_destino` (`id`),
  CONSTRAINT `dc_ordenes_details_inv_deposito_id_destino_foreign` FOREIGN KEY (`inv_deposito_id_destino`) REFERENCES `inv_depositos` (`id`),
  CONSTRAINT `dc_ordenes_details_inv_deposito_id_foreign` FOREIGN KEY (`inv_deposito_id`) REFERENCES `inv_depositos` (`id`),
  CONSTRAINT `dc_ordenes_details_inv_producto_id_destino_foreign` FOREIGN KEY (`inv_producto_id_destino`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `dc_ordenes_details_inv_producto_id_foreign` FOREIGN KEY (`inv_producto_id`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `dc_ordenes_details_prod_variant_id_foreign` FOREIGN KEY (`prod_variant_id`) REFERENCES `prod_variants` (`id`) ON DELETE SET NULL,
  CONSTRAINT `dc_ordenes_details_system_tax_id_foreign` FOREIGN KEY (`system_tax_id`) REFERENCES `system_taxes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_details`
--


--
-- Table structure for table `dc_ordenes_facturada`
--

CREATE TABLE `dc_ordenes_facturada` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `dc_orden_id` bigint(20) unsigned DEFAULT NULL,
  `fact_elec_receipt_id` int(11) DEFAULT NULL,
  `receipt_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_facturada_person_id_foreign` (`person_id`),
  KEY `dc_ordenes_facturada_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_facturada_fact_elec_receipt_id_foreign` (`fact_elec_receipt_id`),
  KEY `dc_ordenes_facturada_receipt_id_foreign` (`receipt_id`),
  CONSTRAINT `dc_ordenes_facturada_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_facturada_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `dc_ordenes_facturada_receipt_id_foreign` FOREIGN KEY (`receipt_id`) REFERENCES `receipts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_facturada`
--


--
-- Table structure for table `dc_ordenes_ingreso_compra`
--

CREATE TABLE `dc_ordenes_ingreso_compra` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL,
  `dc_orden_compra_id` bigint(20) unsigned NOT NULL,
  `dc_orden_compra_detail_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_ingreso_compra_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_ingreso_compra_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_ordenes_ingreso_compra_dc_orden_compra_id_foreign` (`dc_orden_compra_id`),
  KEY `dc_ordenes_ingreso_compra_dc_orden_compra_detail_id_foreign` (`dc_orden_compra_detail_id`),
  CONSTRAINT `dc_ordenes_ingreso_compra_dc_orden_compra_detail_id_foreign` FOREIGN KEY (`dc_orden_compra_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_ingreso_compra_dc_orden_compra_id_foreign` FOREIGN KEY (`dc_orden_compra_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_ingreso_compra_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_ingreso_compra_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_ingreso_compra`
--


--
-- Table structure for table `dc_ordenes_ingxdev_rem_egr`
--

CREATE TABLE `dc_ordenes_ingxdev_rem_egr` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL,
  `dc_orden_rem_egr_id` bigint(20) unsigned NOT NULL,
  `dc_orden_rem_egr_detail_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_ingxdev_rem_egr_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_ingxdev_rem_egr_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_ordenes_ingxdev_rem_egr_dc_orden_rem_egr_id_foreign` (`dc_orden_rem_egr_id`),
  KEY `dc_ordenes_ingxdev_rem_egr_dc_orden_rem_egr_detail_id_foreign` (`dc_orden_rem_egr_detail_id`),
  CONSTRAINT `dc_ordenes_ingxdev_rem_egr_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_ingxdev_rem_egr_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_ingxdev_rem_egr_dc_orden_rem_egr_detail_id_foreign` FOREIGN KEY (`dc_orden_rem_egr_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_ingxdev_rem_egr_dc_orden_rem_egr_id_foreign` FOREIGN KEY (`dc_orden_rem_egr_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_ingxdev_rem_egr`
--


--
-- Table structure for table `dc_ordenes_logs`
--

CREATE TABLE `dc_ordenes_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `loggable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `loggable_id` bigint(20) unsigned NOT NULL,
  `related_id` bigint(20) unsigned DEFAULT NULL,
  `related_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comentario` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_logs_loggable_type_loggable_id_index` (`loggable_type`,`loggable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_logs`
--


--
-- Table structure for table `dc_ordenes_origen_destino`
--

CREATE TABLE `dc_ordenes_origen_destino` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `modelo` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_deposito` tinyint(1) NOT NULL DEFAULT '0',
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_origen_destino`
--

INSERT INTO `dc_ordenes_origen_destino` VALUES (1,NULL,'Orden de Trabajo','App\\Models\\Inventario\\InvOrdenTrabajo',0,1,NULL,NULL,NULL),(2,NULL,'Centro de Costos','App\\Models\\Inventario\\InvOrdenTrabajoHorasTipo',0,1,NULL,'2023-09-12 22:20:36',NULL),(3,NULL,'Deposito','App\\Models\\Inventario\\InvDeposito',1,1,NULL,'2024-05-07 20:13:34',NULL),(4,NULL,'Empleado','App\\Models\\SyJEmpleado',0,0,NULL,'2023-07-03 22:10:12',NULL);

--
-- Table structure for table `dc_ordenes_pdf_templates`
--

CREATE TABLE `dc_ordenes_pdf_templates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `dc_orden_tipo_id` bigint(20) unsigned NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `vista_blade` text COLLATE utf8mb4_unicode_ci,
  `pdf_base_path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo_plantilla` enum('blade','pdf_base') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'blade',
  `configuracion` json DEFAULT NULL,
  `habilitado` tinyint(1) 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`),
  UNIQUE KEY `unique_person_tipo_template` (`person_id`,`dc_orden_tipo_id`),
  KEY `dc_ordenes_pdf_templates_dc_orden_tipo_id_foreign` (`dc_orden_tipo_id`),
  CONSTRAINT `dc_ordenes_pdf_templates_dc_orden_tipo_id_foreign` FOREIGN KEY (`dc_orden_tipo_id`) REFERENCES `dc_ordenes_tipos` (`id`),
  CONSTRAINT `dc_ordenes_pdf_templates_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_pdf_templates`
--


--
-- Table structure for table `dc_ordenes_revocadas`
--

CREATE TABLE `dc_ordenes_revocadas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `comentario` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_revocadas_dc_orden_id_foreign` (`dc_orden_id`),
  CONSTRAINT `dc_ordenes_revocadas_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_revocadas`
--


--
-- Table structure for table `dc_ordenes_servicio_compra`
--

CREATE TABLE `dc_ordenes_servicio_compra` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL,
  `dc_orden_compra_id` bigint(20) unsigned NOT NULL,
  `dc_orden_compra_detail_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ordenes_servicio_compra_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ordenes_servicio_compra_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_ordenes_servicio_compra_dc_orden_compra_id_foreign` (`dc_orden_compra_id`),
  KEY `dc_ordenes_servicio_compra_dc_orden_compra_detail_id_foreign` (`dc_orden_compra_detail_id`),
  CONSTRAINT `dc_ordenes_servicio_compra_dc_orden_compra_detail_id_foreign` FOREIGN KEY (`dc_orden_compra_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_servicio_compra_dc_orden_compra_id_foreign` FOREIGN KEY (`dc_orden_compra_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ordenes_servicio_compra_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ordenes_servicio_compra_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_servicio_compra`
--


--
-- Table structure for table `dc_ordenes_tipos`
--

CREATE TABLE `dc_ordenes_tipos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `usabilidad` longtext COLLATE utf8mb4_unicode_ci,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ordenes_tipos`
--

INSERT INTO `dc_ordenes_tipos` VALUES (1,NULL,'ORDEN DE COMPRAS',NULL,1,NULL,'2022-10-09 18:43:19',NULL),(2,NULL,'ORDEN DE VENTAS',NULL,1,NULL,'2022-10-09 18:43:19',NULL),(3,NULL,'PRESUPUESTO',NULL,1,NULL,NULL,NULL),(4,NULL,'REQUERIMIENTO',NULL,1,NULL,NULL,NULL),(5,NULL,'REMITO DE INGRESO',NULL,1,NULL,'2023-06-12 23:28:53',NULL),(6,NULL,'REMITO DE EGRESO',NULL,1,NULL,NULL,NULL),(7,NULL,'REMITO INTERNO',NULL,1,NULL,NULL,NULL),(8,NULL,'REMITO DE INGRESO','Es lo mismo que un remito de ingreso, \n        pero los productosa ingresar provienen de una Orden de Compra',1,NULL,NULL,NULL),(9,NULL,'REMITO DE SERVICIO','Es un remito de Ingreso de un servicio que se\n        asigna directo a una OT',1,NULL,NULL,NULL),(10,NULL,'ORDEN DE PAGO',NULL,1,'2023-09-28 16:31:30','2023-09-28 16:31:30',NULL),(11,NULL,'ANULACION REQUERIMIENTOS',NULL,1,'2024-04-02 23:11:39','2024-04-02 23:11:39',NULL),(12,NULL,'ANULACION COMPRAS PRODUCTOS',NULL,1,'2024-04-02 23:11:39','2024-04-02 23:11:39',NULL),(13,NULL,'ANULACION COMPRAS SERVICIOS',NULL,1,'2024-04-02 23:11:39','2024-04-02 23:11:39',NULL),(14,NULL,'REMITO DE GASTO',NULL,1,'2024-05-07 20:13:34','2024-05-07 20:13:34',NULL),(15,NULL,'COTIZACIONES',NULL,1,'2024-06-26 07:59:34','2024-06-26 07:59:34',NULL),(16,NULL,'REMITO INGRESO-DEVOLUCION',NULL,1,'2024-09-02 13:22:31','2024-09-02 13:22:31',NULL),(17,NULL,'REMITO EGRESO-DEVOLUCION',NULL,1,'2024-10-17 08:53:02','2024-10-17 08:53:02',NULL),(18,NULL,'REMITO','Es un remito de servicio, que no tiene ni ingreso ni egreso',1,'2024-12-03 21:52:24','2024-12-03 21:52:24',NULL),(19,NULL,'Remito de Cliente','Se usa en las Ordenes de Venta para demostrar que se entrego mercaderia al cliente',1,NULL,NULL,NULL),(20,NULL,'Orden de Compra de Cliente','Es la OC que envia el cliente para que se le haga el pedido',1,NULL,NULL,NULL),(21,NULL,'Solicitud de Facturacion','Es un documento que se usa para que se pueda facturar',1,NULL,NULL,NULL),(22,NULL,'Ordenes de Compra','Es una OC para Empresas',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_ov_cta_cte_cliente`
--

CREATE TABLE `dc_ov_cta_cte_cliente` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `cta_cte_cliente_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_cta_cte_cliente_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_cta_cte_cliente_cta_cte_cliente_id_foreign` (`cta_cte_cliente_id`),
  CONSTRAINT `dc_ov_cta_cte_cliente_cta_cte_cliente_id_foreign` FOREIGN KEY (`cta_cte_cliente_id`) REFERENCES `cta_cte_cliente` (`id`),
  CONSTRAINT `dc_ov_cta_cte_cliente_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_cta_cte_cliente`
--


--
-- Table structure for table `dc_ov_fact_electronicas`
--

CREATE TABLE `dc_ov_fact_electronicas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `fact_elec_receipt_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_fact_electronicas_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_fact_electronicas_fact_elec_receipt_id_foreign` (`fact_elec_receipt_id`),
  CONSTRAINT `dc_ov_fact_electronicas_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_fact_electronicas_fact_elec_receipt_id_foreign` FOREIGN KEY (`fact_elec_receipt_id`) REFERENCES `fact_elec_receipts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_fact_electronicas`
--


--
-- Table structure for table `dc_ov_oc_presupuestos`
--

CREATE TABLE `dc_ov_oc_presupuestos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_presupuesto_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_oc_presupuestos_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_oc_presupuestos_dc_orden_presupuesto_id_foreign` (`dc_orden_presupuesto_id`),
  CONSTRAINT `dc_ov_oc_presupuestos_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_oc_presupuestos_dc_orden_presupuesto_id_foreign` FOREIGN KEY (`dc_orden_presupuesto_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_oc_presupuestos`
--


--
-- Table structure for table `dc_ov_ocs`
--

CREATE TABLE `dc_ov_ocs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_compra_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_ocs_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_ocs_dc_orden_compra_id_foreign` (`dc_orden_compra_id`),
  CONSTRAINT `dc_ov_ocs_dc_orden_compra_id_foreign` FOREIGN KEY (`dc_orden_compra_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_ocs_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_ocs`
--


--
-- Table structure for table `dc_ov_origenes`
--

CREATE TABLE `dc_ov_origenes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_origenes`
--

INSERT INTO `dc_ov_origenes` VALUES (1,NULL,'Taller',1,NULL,NULL,NULL),(2,NULL,'Comercial',1,NULL,NULL,NULL),(3,NULL,'Repuestos',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_ov_origenes_users`
--

CREATE TABLE `dc_ov_origenes_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `dc_ov_origen_id` bigint(20) unsigned NOT NULL,
  `user_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 (`id`),
  KEY `dc_ov_origenes_users_dc_ov_origen_id_foreign` (`dc_ov_origen_id`),
  CONSTRAINT `dc_ov_origenes_users_dc_ov_origen_id_foreign` FOREIGN KEY (`dc_ov_origen_id`) REFERENCES `dc_ov_origenes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_origenes_users`
--


--
-- Table structure for table `dc_ov_ots`
--

CREATE TABLE `dc_ov_ots` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `ot_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_ots_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_ots_ot_id_foreign` (`ot_id`),
  CONSTRAINT `dc_ov_ots_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_ots_ot_id_foreign` FOREIGN KEY (`ot_id`) REFERENCES `inv_orden_trabajos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_ots`
--


--
-- Table structure for table `dc_ov_pres_clientes`
--

CREATE TABLE `dc_ov_pres_clientes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_pres_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_pres_clientes_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_pres_clientes_dc_orden_pres_id_foreign` (`dc_orden_pres_id`),
  CONSTRAINT `dc_ov_pres_clientes_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_pres_clientes_dc_orden_pres_id_foreign` FOREIGN KEY (`dc_orden_pres_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_pres_clientes`
--


--
-- Table structure for table `dc_ov_rem_clientes`
--

CREATE TABLE `dc_ov_rem_clientes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_rem_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_rem_clientes_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_rem_clientes_dc_orden_rem_id_foreign` (`dc_orden_rem_id`),
  CONSTRAINT `dc_ov_rem_clientes_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_rem_clientes_dc_orden_rem_id_foreign` FOREIGN KEY (`dc_orden_rem_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_rem_clientes`
--


--
-- Table structure for table `dc_ov_remc_occ`
--

CREATE TABLE `dc_ov_remc_occ` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `dc_orden_id` bigint(20) unsigned DEFAULT NULL,
  `dc_orden_detail_id` bigint(20) unsigned DEFAULT NULL,
  `dc_occ_id` bigint(20) unsigned DEFAULT NULL,
  `dc_occ_detail_id` bigint(20) unsigned DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_remc_occ_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_remc_occ_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_ov_remc_occ_dc_occ_id_foreign` (`dc_occ_id`),
  KEY `dc_ov_remc_occ_dc_occ_detail_id_foreign` (`dc_occ_detail_id`),
  CONSTRAINT `dc_ov_remc_occ_dc_occ_detail_id_foreign` FOREIGN KEY (`dc_occ_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ov_remc_occ_dc_occ_id_foreign` FOREIGN KEY (`dc_occ_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_remc_occ_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_ov_remc_occ_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_remc_occ`
--


--
-- Table structure for table `dc_ov_sol_facturacion`
--

CREATE TABLE `dc_ov_sol_facturacion` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_sol_facturacion_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_ov_sol_facturacion_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `dc_ov_sol_facturacion_dc_sol_facturacion_id_foreign` (`dc_sol_facturacion_id`),
  CONSTRAINT `dc_ov_sol_facturacion_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_ov_sol_facturacion_dc_sol_facturacion_id_foreign` FOREIGN KEY (`dc_sol_facturacion_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_sol_facturacion`
--


--
-- Table structure for table `dc_ov_status_cobranza`
--

CREATE TABLE `dc_ov_status_cobranza` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_status_cobranza`
--

INSERT INTO `dc_ov_status_cobranza` VALUES (1,NULL,'Pendiente',1,NULL,NULL,NULL),(2,NULL,'Parcial',1,NULL,NULL,NULL),(3,NULL,'Completa',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_ov_status_entrega`
--

CREATE TABLE `dc_ov_status_entrega` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_status_entrega`
--

INSERT INTO `dc_ov_status_entrega` VALUES (1,NULL,'Pendiente',1,NULL,NULL,NULL),(2,NULL,'Parcial',1,NULL,NULL,NULL),(3,NULL,'Completa',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_ov_status_factura`
--

CREATE TABLE `dc_ov_status_factura` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_status_factura`
--

INSERT INTO `dc_ov_status_factura` VALUES (1,NULL,'Pendiente',1,NULL,NULL,NULL),(2,NULL,'Facturable',1,NULL,NULL,NULL),(3,NULL,'Facturado Parcialmente',1,NULL,NULL,NULL),(4,NULL,'Facturado Totalmente',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_ov_status_venta`
--

CREATE TABLE `dc_ov_status_venta` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_ov_status_venta`
--

INSERT INTO `dc_ov_status_venta` VALUES (1,NULL,'Pendiente',1,NULL,NULL,NULL),(2,NULL,'Presupuesto',1,NULL,NULL,NULL),(3,NULL,'Venta',1,NULL,NULL,NULL),(4,NULL,'Rechazada',1,NULL,NULL,NULL);

--
-- Table structure for table `dc_sol_fac_occ`
--

CREATE TABLE `dc_sol_fac_occ` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL COMMENT 'Solicitud Facturación (tipo 21)',
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL COMMENT 'Detalle de SF',
  `dc_occ_id` bigint(20) unsigned NOT NULL COMMENT 'OC Cliente (tipo 20)',
  `dc_occ_detail_id` bigint(20) unsigned NOT NULL COMMENT 'Detalle de OCC',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_sf` (`dc_orden_id`),
  KEY `idx_occ` (`dc_occ_id`),
  KEY `dc_sol_fac_occ_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `dc_sol_fac_occ_dc_occ_detail_id_foreign` (`dc_occ_detail_id`),
  CONSTRAINT `dc_sol_fac_occ_dc_occ_detail_id_foreign` FOREIGN KEY (`dc_occ_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_sol_fac_occ_dc_occ_id_foreign` FOREIGN KEY (`dc_occ_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `dc_sol_fac_occ_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `dc_sol_fac_occ_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dc_sol_fac_occ`
--


--
-- Table structure for table `despachos`
--

CREATE TABLE `despachos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `person_id_relationed` int(10) unsigned NOT NULL,
  `moneda_id` int(10) unsigned NOT NULL,
  `fecha` datetime NOT NULL DEFAULT '2025-04-28 16:14:31',
  `is_ponderacion_autom` tinyint(1) NOT NULL DEFAULT '1',
  `is_garantia` tinyint(1) NOT NULL DEFAULT '0',
  `numero` int(10) unsigned DEFAULT NULL,
  `comentario` longtext COLLATE utf8mb4_unicode_ci,
  `total` decimal(16,2) NOT NULL DEFAULT '0.00',
  `total_parte_1` decimal(16,2) NOT NULL DEFAULT '0.00',
  `total_parte_2` decimal(16,2) NOT NULL DEFAULT '0.00',
  `total_parte_3` decimal(16,2) NOT NULL DEFAULT '0.00',
  `cotizacion` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `despachos_person_id_foreign` (`person_id`),
  KEY `despachos_person_id_relationed_foreign` (`person_id_relationed`),
  KEY `despachos_moneda_id_foreign` (`moneda_id`),
  CONSTRAINT `despachos_moneda_id_foreign` FOREIGN KEY (`moneda_id`) REFERENCES `monedas` (`id`),
  CONSTRAINT `despachos_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `despachos_person_id_relationed_foreign` FOREIGN KEY (`person_id_relationed`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `despachos`
--


--
-- Table structure for table `despachos_cierres`
--

CREATE TABLE `despachos_cierres` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `despacho_id` bigint(20) unsigned NOT NULL,
  `receipt_id` int(10) unsigned DEFAULT NULL,
  `dc_orden_id` bigint(20) unsigned NOT NULL,
  `dc_orden_detail_id` bigint(20) unsigned NOT NULL,
  `inv_producto_id` bigint(20) unsigned DEFAULT NULL,
  `costo_antes` decimal(16,2) NOT NULL DEFAULT '0.00',
  `cantidades` decimal(16,2) DEFAULT '0.00',
  `precio_x_cantidad` decimal(16,2) DEFAULT '0.00',
  `ratio` decimal(16,4) NOT NULL DEFAULT '0.0000',
  `incremento` decimal(16,2) NOT NULL DEFAULT '0.00',
  `incremento_x_cantidad` decimal(16,2) DEFAULT '0.00',
  `costo_despues` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `despachos_cierres_despacho_id_foreign` (`despacho_id`),
  KEY `despachos_cierres_receipt_id_foreign` (`receipt_id`),
  KEY `despachos_cierres_dc_orden_id_foreign` (`dc_orden_id`),
  KEY `despachos_cierres_dc_orden_detail_id_foreign` (`dc_orden_detail_id`),
  KEY `despachos_cierres_inv_producto_id_foreign` (`inv_producto_id`),
  CONSTRAINT `despachos_cierres_dc_orden_detail_id_foreign` FOREIGN KEY (`dc_orden_detail_id`) REFERENCES `dc_ordenes_details` (`id`),
  CONSTRAINT `despachos_cierres_dc_orden_id_foreign` FOREIGN KEY (`dc_orden_id`) REFERENCES `dc_ordenes` (`id`),
  CONSTRAINT `despachos_cierres_despacho_id_foreign` FOREIGN KEY (`despacho_id`) REFERENCES `despachos` (`id`),
  CONSTRAINT `despachos_cierres_inv_producto_id_foreign` FOREIGN KEY (`inv_producto_id`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `despachos_cierres_receipt_id_foreign` FOREIGN KEY (`receipt_id`) REFERENCES `receipts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `despachos_cierres`
--


--
-- Table structure for table `despachos_details`
--

CREATE TABLE `despachos_details` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `despacho_id` bigint(20) unsigned NOT NULL,
  `despacho_parte_id` bigint(20) unsigned NOT NULL,
  `receipt_id` int(10) unsigned DEFAULT NULL,
  `porcentaje_ponderacion` decimal(8,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `despachos_details_despacho_id_foreign` (`despacho_id`),
  KEY `despachos_details_despacho_parte_id_foreign` (`despacho_parte_id`),
  KEY `despachos_details_receipt_id_foreign` (`receipt_id`),
  CONSTRAINT `despachos_details_despacho_id_foreign` FOREIGN KEY (`despacho_id`) REFERENCES `despachos` (`id`),
  CONSTRAINT `despachos_details_despacho_parte_id_foreign` FOREIGN KEY (`despacho_parte_id`) REFERENCES `despachos_partes` (`id`),
  CONSTRAINT `despachos_details_receipt_id_foreign` FOREIGN KEY (`receipt_id`) REFERENCES `receipts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `despachos_details`
--


--
-- Table structure for table `despachos_files`
--

CREATE TABLE `despachos_files` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `despacho_id` bigint(20) unsigned NOT NULL,
  `descripcion` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name_original` 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 `despachos_files_despacho_id_foreign` (`despacho_id`),
  CONSTRAINT `despachos_files_despacho_id_foreign` FOREIGN KEY (`despacho_id`) REFERENCES `despachos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `despachos_files`
--


--
-- Table structure for table `despachos_partes`
--

CREATE TABLE `despachos_partes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `despachos_partes`
--

INSERT INTO `despachos_partes` VALUES (1,NULL,'Facturas del Proveedor',1,NULL,NULL,NULL),(2,NULL,'Despachos de Importacion',1,NULL,NULL,NULL),(3,NULL,'Facturas de Logistica',1,NULL,NULL,NULL);

--
-- Table structure for table `deudas_impositivas`
--

CREATE TABLE `deudas_impositivas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `vto_impuesto_id` int(10) unsigned NOT NULL,
  `periodo_deuda` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `concepto` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `deudas_impositivas_vto_impuesto_id_foreign` (`vto_impuesto_id`),
  KEY `deudas_impositivas_person_id_foreign` (`person_id`),
  CONSTRAINT `deudas_impositivas_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `deudas_impositivas_vto_impuesto_id_foreign` FOREIGN KEY (`vto_impuesto_id`) REFERENCES `vto_impuestos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deudas_impositivas`
--


--
-- Table structure for table `ejer_anteriores`
--

CREATE TABLE `ejer_anteriores` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `anio` int(11) NOT NULL,
  `ventas` decimal(16,2) DEFAULT NULL,
  `compras` decimal(16,2) DEFAULT NULL,
  `sueldos` decimal(16,2) DEFAULT NULL,
  `impuesto` decimal(16,2) DEFAULT NULL,
  `apagar` decimal(16,2) DEFAULT NULL,
  `afavor` decimal(16,2) 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 `ejer_anteriores_person_id_foreign` (`person_id`),
  CONSTRAINT `ejer_anteriores_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ejer_anteriores`
--


--
-- Table structure for table `estado_civil`
--

CREATE TABLE `estado_civil` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`),
  UNIQUE KEY `estado_civil_descripcion_unique` (`descripcion`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `estado_civil`
--

INSERT INTO `estado_civil` VALUES (1,NULL,'Separado Legal',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL),(2,NULL,'Separado de Hecho',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL),(3,NULL,'Divorciado',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL),(4,NULL,'Convivencia',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL),(5,NULL,'Soltero',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL),(6,NULL,'Casado',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL),(7,NULL,'Viudo',1,'2020-05-28 20:55:23','2020-05-28 20:55:23',NULL);

--
-- Table structure for table `fa_masiva`
--

CREATE TABLE `fa_masiva` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `user_id` int(11) NOT 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=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fa_masiva`
--

INSERT INTO `fa_masiva` VALUES (7,40724,8444,'2023-04-03 16:30:22','2023-04-03 16:30:22',NULL);

--
-- Table structure for table `fa_masiva_detalle`
--

CREATE TABLE `fa_masiva_detalle` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `fa_masiva_id` int(11) NOT NULL,
  `cliente_id` int(11) NOT NULL,
  `tipo_comprobante_id` int(10) unsigned NOT NULL DEFAULT '1',
  `zone_id` int(10) unsigned NOT NULL DEFAULT '22',
  `activity_id` int(10) unsigned NOT NULL DEFAULT '1',
  `cond_frente_iva_id` int(10) unsigned NOT NULL DEFAULT '1',
  `system_tax_id` int(10) unsigned NOT NULL DEFAULT '1',
  `concepto_id` int(10) unsigned NOT NULL DEFAULT '1',
  `taxable_iibb` int(10) unsigned NOT NULL DEFAULT '2',
  `renglon1` varchar(180) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `importe1` decimal(20,2) DEFAULT NULL,
  `renglon2` varchar(180) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `importe2` decimal(20,2) DEFAULT NULL,
  `renglon3` varchar(180) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `importe3` decimal(20,2) DEFAULT NULL,
  `punto_venta_id` int(11) DEFAULT NULL,
  `fecha_comprobante` date DEFAULT NULL,
  `fecha_facturado_desde` date DEFAULT NULL,
  `fecha_facturado_hasta` date DEFAULT NULL,
  `fecha_vencimiento_pago` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fa_masiva_detalle_concepto_id_foreign` (`concepto_id`),
  KEY `fa_masiva_detalle_system_tax_id_foreign` (`system_tax_id`),
  KEY `fa_masiva_detalle_cond_frente_iva_id_foreign` (`cond_frente_iva_id`),
  KEY `fa_masiva_detalle_zone_id_foreign` (`zone_id`),
  KEY `fa_masiva_detalle_tipo_comprobante_id_foreign` (`tipo_comprobante_id`),
  KEY `fa_masiva_detalle_activity_id_foreign` (`activity_id`),
  CONSTRAINT `fa_masiva_detalle_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `activities` (`id`),
  CONSTRAINT `fa_masiva_detalle_concepto_id_foreign` FOREIGN KEY (`concepto_id`) REFERENCES `fact_elec_conceptos_afip` (`id`),
  CONSTRAINT `fa_masiva_detalle_cond_frente_iva_id_foreign` FOREIGN KEY (`cond_frente_iva_id`) REFERENCES `fac_elec_cond_frente_iva` (`id`),
  CONSTRAINT `fa_masiva_detalle_system_tax_id_foreign` FOREIGN KEY (`system_tax_id`) REFERENCES `system_taxes` (`id`),
  CONSTRAINT `fa_masiva_detalle_tipo_comprobante_id_foreign` FOREIGN KEY (`tipo_comprobante_id`) REFERENCES `receipt_types` (`id`),
  CONSTRAINT `fa_masiva_detalle_zone_id_foreign` FOREIGN KEY (`zone_id`) REFERENCES `zones` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fa_masiva_detalle`
--

INSERT INTO `fa_masiva_detalle` VALUES (44,8444,7,40782,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',223665.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(45,8444,7,41733,1,23,796,1,2,2,2,'Servicios prestados período 03-2023 LIDERGAS',46020.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(46,8444,7,41733,1,23,796,1,2,2,2,'Viaticos Lidergas período 03-2023 ',11000.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(47,8444,7,41733,1,23,796,1,2,2,2,'Servicios prestados período 03-2023 EL MUNDO DEL JUGUETE',105000.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(48,8444,7,40846,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',172926.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(49,8444,7,40801,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',59760.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(50,8444,7,41730,1,23,796,1,2,2,2,'Servicios prestados período 03-2023 - VU SECURITY',121680.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(51,8444,7,41730,1,23,796,1,2,2,2,'Servicios prestados período 03-2023 - Mann Hummel ',41510.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(52,8444,7,41730,1,23,796,1,2,2,2,'Servicios prestados período 03-2023 - Mann Hummel ',87500.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(53,8444,7,40762,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',89460.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(54,8444,7,40848,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',165120.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(55,8444,7,41732,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',231170.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(56,8444,7,40791,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',55146.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(57,8444,7,41729,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',125550.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(58,8444,7,40802,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',84850.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(59,8444,7,41731,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',96000.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(60,8444,7,41019,1,23,796,1,2,2,2,'Servicios prestados período 03-2023',193440.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(61,8444,7,41085,4,23,796,4,8,2,2,'Servicios prestados período 03-2023',19985.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL),(62,8444,7,41086,4,23,796,4,8,2,2,'Servicios prestados período 03-2023',19985.00,NULL,NULL,NULL,NULL,3,NULL,'2023-03-01','2023-03-31','2023-04-10','2023-04-03 16:30:22','2023-04-03 16:30:50',NULL);

--
-- Table structure for table `fa_masiva_stock`
--

CREATE TABLE `fa_masiva_stock` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `person_id_relationed` int(10) unsigned NOT NULL,
  `data` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fa_masiva_stock_person_id_foreign` (`person_id`),
  KEY `fa_masiva_stock_person_id_relationed_foreign` (`person_id_relationed`),
  CONSTRAINT `fa_masiva_stock_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `fa_masiva_stock_person_id_relationed_foreign` FOREIGN KEY (`person_id_relationed`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fa_masiva_stock`
--


--
-- Table structure for table `fac_elec_cond_frente_iva`
--

CREATE TABLE `fac_elec_cond_frente_iva` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `fac_elec_cond_frente_iva_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fac_elec_cond_frente_iva`
--

INSERT INTO `fac_elec_cond_frente_iva` VALUES (1,'IVA Responsable Inscripto','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(2,'IVA Sujeto Exento','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(3,'Consumidor Final','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(4,'Responsable Monotributo','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(5,'Proveedor del Exterior','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(6,'Cliente del Exterior','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(7,'IVA Liberado - Ley Nº 19.640','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(8,'IVA Responsable Inscripto - Agente de Percepción','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(9,'Monotributista Social','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(10,'IVA No Alcanzado','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL);

--
-- Table structure for table `fac_elec_unidad_medidas`
--

CREATE TABLE `fac_elec_unidad_medidas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `fac_elec_unidad_medidas_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fac_elec_unidad_medidas`
--

INSERT INTO `fac_elec_unidad_medidas` VALUES (1,'Grs','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(2,'Kg','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(3,'Mts','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(4,'Mts2','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(5,'Mts3','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(6,'Lts','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(7,'1000 Kwh','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(8,'Unidades','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(9,'Pares','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(10,'Doc','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(11,'Quilates','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(12,'Millares','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(13,'Milimetros','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(14,'Mm 3','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(15,'Km','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(16,'Hectolitros','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(17,'Cm','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL),(18,'Cm 3','2019-07-15 18:37:39','2019-07-15 18:37:39',NULL);

--
-- Table structure for table `fact_elec_conceptos_afip`
--

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

--
-- Dumping data for table `fact_elec_conceptos_afip`
--

INSERT INTO `fact_elec_conceptos_afip` VALUES (1,1,'Producto','2019-03-13 13:29:34','2019-03-13 13:29:34'),(2,2,'Servicios','2019-03-13 13:29:34','2019-03-13 13:29:34'),(3,3,'Productos y Servicios','2019-03-13 13:29:34','2019-03-13 13:29:34');

--
-- Table structure for table `fact_elec_perc_ret`
--

CREATE TABLE `fact_elec_perc_ret` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `codigo_afip` int(10) unsigned NOT NULL,
  `other_tax_id` int(10) unsigned NOT NULL,
  `habilitado` tinyint(1) 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 `fact_elec_perc_ret_other_tax_id_foreign` (`other_tax_id`),
  CONSTRAINT `fact_elec_perc_ret_other_tax_id_foreign` FOREIGN KEY (`other_tax_id`) REFERENCES `other_taxes` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fact_elec_perc_ret`
--

INSERT INTO `fact_elec_perc_ret` VALUES (1,NULL,'Per./Ret de Imp. a las Ganancias',1,1032,1,NULL,NULL,NULL),(2,NULL,'Per./Ret de IVA',1,1000,1,NULL,NULL,NULL),(3,NULL,'Per./Ret de IIBB',2,1006,1,NULL,NULL,NULL),(4,NULL,'Impuestos Internos',4,1001,1,NULL,NULL,NULL),(5,NULL,'Impuestos Municipales',3,1031,1,NULL,NULL,NULL);

--
-- Table structure for table `fact_elec_perc_ret_details`
--

CREATE TABLE `fact_elec_perc_ret_details` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `fact_elec_perc_ret_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `fact_elec_receipt_id` int(10) unsigned NOT NULL,
  `detalle` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zone_id` int(10) unsigned DEFAULT NULL,
  `base_imponible` decimal(16,2) DEFAULT NULL,
  `alicuota` decimal(16,2) DEFAULT NULL,
  `importe` decimal(16,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fact_elec_perc_ret_details_fact_elec_perc_ret_id_foreign` (`fact_elec_perc_ret_id`),
  KEY `fact_elec_perc_ret_details_person_id_foreign` (`person_id`),
  KEY `fact_elec_perc_ret_details_fact_elec_receipt_id_foreign` (`fact_elec_receipt_id`),
  KEY `fact_elec_perc_ret_details_zone_id_foreign` (`zone_id`),
  CONSTRAINT `fact_elec_perc_ret_details_fact_elec_perc_ret_id_foreign` FOREIGN KEY (`fact_elec_perc_ret_id`) REFERENCES `fact_elec_perc_ret` (`id`),
  CONSTRAINT `fact_elec_perc_ret_details_fact_elec_receipt_id_foreign` FOREIGN KEY (`fact_elec_receipt_id`) REFERENCES `fact_elec_receipts` (`id`),
  CONSTRAINT `fact_elec_perc_ret_details_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `fact_elec_perc_ret_details_zone_id_foreign` FOREIGN KEY (`zone_id`) REFERENCES `zones` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fact_elec_perc_ret_details`
--


--
-- Table structure for table `fact_elec_puntos_venta`
--

CREATE TABLE `fact_elec_puntos_venta` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `direccion` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `codigo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0000',
  `codigo_postal` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zone_id` int(11) DEFAULT NULL,
  `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `habilitado` tinyint(1) NOT NULL DEFAULT '1',
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fact_elec_puntos_venta_person_id_foreign` (`person_id`),
  CONSTRAINT `fact_elec_puntos_venta_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fact_elec_puntos_venta`
--

INSERT INTO `fact_elec_puntos_venta` VALUES (1,8444,'MITRE 497','2023-02-28 08:56:54','2023-04-03 09:37:35',40724,'2','6720',23,NULL,1,NULL),(2,7931,'Direccion','2023-03-15 13:01:51','2023-03-15 13:01:51',40719,NULL,NULL,22,NULL,1,NULL),(3,8444,'MITRE 497','2023-04-03 09:36:55','2023-04-03 09:37:50',40724,'3','6720',23,NULL,1,NULL);

--
-- Table structure for table `fact_elec_receipt_details`
--

CREATE TABLE `fact_elec_receipt_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `fact_elec_receipt_id` int(10) unsigned NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `cantidad` decimal(20,2) NOT NULL,
  `unidad_medida` text COLLATE utf8mb4_unicode_ci,
  `precio_unitario` decimal(20,2) NOT NULL,
  `neto_gravado` decimal(20,2) NOT NULL,
  `bonificacion_porcentaje` decimal(20,2) DEFAULT NULL,
  `bonificacion_monto` decimal(20,2) DEFAULT NULL,
  `bonificacion_subtotal` decimal(20,2) DEFAULT NULL,
  `system_tax_id` int(10) unsigned NOT NULL DEFAULT '1',
  `iva_monto` decimal(20,2) DEFAULT NULL,
  `iva_subtotal` decimal(20,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `codigo` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fact_elec_receipt_details_fact_elec_receipt_id_foreign` (`fact_elec_receipt_id`),
  KEY `fact_elec_receipt_details_system_tax_id_foreign` (`system_tax_id`),
  CONSTRAINT `fact_elec_receipt_details_fact_elec_receipt_id_foreign` FOREIGN KEY (`fact_elec_receipt_id`) REFERENCES `fact_elec_receipts` (`id`),
  CONSTRAINT `fact_elec_receipt_details_system_tax_id_foreign` FOREIGN KEY (`system_tax_id`) REFERENCES `system_taxes` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fact_elec_receipt_details`
--

INSERT INTO `fact_elec_receipt_details` VALUES (3,8444,3,'Servicios prestados período 03-2023',1.00,'8',1.00,1.00,0.00,0.00,0.00,7,0.00,1.00,'2023-03-30 09:48:42','2023-03-30 09:48:42',NULL,NULL),(4,8444,4,'Servicios prestados período 03-2023',1.00,'8',1.00,1.00,0.00,0.00,0.00,7,0.00,1.00,'2023-03-30 10:08:09','2023-03-30 10:08:09',NULL,NULL),(5,8444,7,'Servicios prestados período 03-2023',1.00,'8',1.00,1.00,0.00,0.00,0.00,7,0.00,1.00,'2023-04-03 08:23:46','2023-04-03 08:23:46',NULL,NULL),(6,8444,8,'Servicios prestados período 03-2023.',1.00,'8',22695.00,22695.00,0.00,0.00,0.00,2,4765.95,27460.95,'2023-04-03 08:29:03','2023-04-03 08:29:03','',NULL),(7,8444,9,'Servicios prestados período 03-2023',1.00,'8',37310.00,37310.00,0.00,0.00,0.00,2,7835.10,45145.10,'2023-04-03 09:39:49','2023-04-03 09:39:49',NULL,NULL),(8,8444,10,'Servicios prestados período 03-2023',1.00,'8',113620.00,113620.00,0.00,0.00,0.00,2,23860.20,137480.20,'2023-04-03 09:39:52','2023-04-03 09:39:52',NULL,NULL),(9,8444,11,'Servicios prestados período 03-2023',1.00,'8',101290.00,101290.00,0.00,0.00,0.00,2,21270.90,122560.90,'2023-04-03 11:50:06','2023-04-03 11:50:06',NULL,NULL),(10,8444,12,'Servicios prestados período 03-2023',1.00,'8',57160.00,57160.00,0.00,0.00,0.00,2,12003.60,69163.60,'2023-04-03 11:50:30','2023-04-03 11:50:30',NULL,NULL),(11,NULL,13,'Servicios prestados período 03-2023',1.00,'8',223665.00,223665.00,0.00,0.00,0.00,2,46969.65,270634.65,'2023-04-03 16:31:25','2023-04-03 16:31:25',NULL,NULL),(12,NULL,14,'Servicios prestados período 03-2023 LIDERGAS',1.00,'8',46020.00,46020.00,0.00,0.00,0.00,2,9664.20,55684.20,'2023-04-03 16:31:29','2023-04-03 16:31:29',NULL,NULL),(13,NULL,15,'Viaticos Lidergas período 03-2023',1.00,'8',11000.00,11000.00,0.00,0.00,0.00,2,2310.00,13310.00,'2023-04-03 16:31:32','2023-04-03 16:31:32',NULL,NULL),(14,NULL,16,'Servicios prestados período 03-2023 EL MUNDO DEL JUGUETE',1.00,'8',105000.00,105000.00,0.00,0.00,0.00,2,22050.00,127050.00,'2023-04-03 16:31:34','2023-04-03 16:31:34',NULL,NULL),(15,NULL,17,'Servicios prestados período 03-2023',1.00,'8',172926.00,172926.00,0.00,0.00,0.00,2,36314.46,209240.46,'2023-04-03 16:31:36','2023-04-03 16:31:36',NULL,NULL),(16,NULL,18,'Servicios prestados período 03-2023',1.00,'8',59760.00,59760.00,0.00,0.00,0.00,2,12549.60,72309.60,'2023-04-03 16:31:38','2023-04-03 16:31:38',NULL,NULL),(17,NULL,19,'Servicios prestados período 03-2023 - VU SECURITY',1.00,'8',121680.00,121680.00,0.00,0.00,0.00,2,25552.80,147232.80,'2023-04-03 16:31:40','2023-04-03 16:31:40',NULL,NULL),(18,NULL,20,'Servicios prestados período 03-2023 - Mann Hummel',1.00,'8',41510.00,41510.00,0.00,0.00,0.00,2,8717.10,50227.10,'2023-04-03 16:31:42','2023-04-03 16:31:42',NULL,NULL),(19,NULL,21,'Servicios prestados período 03-2023 - Mann Hummel',1.00,'8',87500.00,87500.00,0.00,0.00,0.00,2,18375.00,105875.00,'2023-04-03 16:31:44','2023-04-03 16:31:44',NULL,NULL),(20,NULL,22,'Servicios prestados período 03-2023',1.00,'8',89460.00,89460.00,0.00,0.00,0.00,2,18786.60,108246.60,'2023-04-03 16:31:45','2023-04-03 16:31:45',NULL,NULL),(21,NULL,23,'Servicios prestados período 03-2023',1.00,'8',165120.00,165120.00,0.00,0.00,0.00,2,34675.20,199795.20,'2023-04-03 16:31:47','2023-04-03 16:31:47',NULL,NULL),(22,NULL,24,'Servicios prestados período 03-2023',1.00,'8',231170.00,231170.00,0.00,0.00,0.00,2,48545.70,279715.70,'2023-04-03 16:31:49','2023-04-03 16:31:49',NULL,NULL),(23,NULL,25,'Servicios prestados período 03-2023',1.00,'8',55146.00,55146.00,0.00,0.00,0.00,2,11580.66,66726.66,'2023-04-03 16:31:51','2023-04-03 16:31:51',NULL,NULL),(24,NULL,26,'Servicios prestados período 03-2023',1.00,'8',125550.00,125550.00,0.00,0.00,0.00,2,26365.50,151915.50,'2023-04-03 16:31:55','2023-04-03 16:31:55',NULL,NULL),(25,NULL,27,'Servicios prestados período 03-2023',1.00,'8',84850.00,84850.00,0.00,0.00,0.00,2,17818.50,102668.50,'2023-04-03 16:31:57','2023-04-03 16:31:57',NULL,NULL);
INSERT INTO `fact_elec_receipt_details` VALUES (26,NULL,28,'Servicios prestados período 03-2023',1.00,'8',96000.00,96000.00,0.00,0.00,0.00,2,20160.00,116160.00,'2023-04-03 16:31:59','2023-04-03 16:31:59',NULL,NULL),(27,NULL,29,'Servicios prestados período 03-2023',1.00,'8',193440.00,193440.00,0.00,0.00,0.00,2,40622.40,234062.40,'2023-04-03 16:32:01','2023-04-03 16:32:01',NULL,NULL),(28,NULL,30,'Servicios prestados período 03-2023',1.00,'8',19985.00,19985.00,0.00,0.00,0.00,8,0.00,19985.00,'2023-04-03 16:32:02','2023-04-03 16:32:02',NULL,NULL),(29,NULL,31,'Servicios prestados período 03-2023',1.00,'8',19985.00,19985.00,0.00,0.00,0.00,8,0.00,19985.00,'2023-04-03 16:32:05','2023-04-03 16:32:05',NULL,NULL),(30,8444,32,'Viaticos Lidergas período 03-2023',1.00,'8',11000.00,11000.00,0.00,0.00,0.00,2,2310.00,13310.00,'2023-04-03 17:05:44','2023-04-03 17:05:44','',NULL),(31,8444,33,'Viáticos Lidergas período 03-2023',5.00,'8',1600.00,8000.00,0.00,0.00,0.00,7,0.00,8000.00,'2023-04-03 17:06:59','2023-04-03 17:06:59','',NULL),(32,8444,34,'Horas Bandex del 17/03 al 31/03',1.00,'8',70000.00,70000.00,0.00,0.00,0.00,2,14700.00,84700.00,'2023-04-03 17:16:33','2023-04-03 17:16:33','',NULL),(33,8444,35,'Servicios prestados período 03-2023 ',1.00,'8',193440.00,193440.00,0.00,0.00,0.00,2,40622.40,234062.40,'2023-04-04 15:53:11','2023-04-04 15:53:11','',NULL),(34,8444,36,'Servicios prestados período 03-2023',1.00,'8',19985.00,19985.00,0.00,0.00,0.00,7,0.00,19985.00,'2023-04-04 16:11:00','2023-04-04 16:11:00','',NULL),(35,8444,37,'Servicios prestados período 03-2023',1.00,'8',19985.00,19985.00,0.00,0.00,0.00,7,0.00,19985.00,'2023-04-04 16:12:31','2023-04-04 16:12:31','',NULL),(36,8444,38,'Servicios prestados período 03-2023',1.00,'8',161200.00,161200.00,0.00,0.00,0.00,2,33852.00,195052.00,'2023-04-05 10:59:40','2023-04-05 10:59:40','',NULL),(37,8444,39,'Servicios prestados período 03-2023',1.00,'8',20150.00,20150.00,0.00,0.00,0.00,8,0.00,20150.00,'2023-04-05 13:01:18','2023-04-05 13:01:18','',NULL),(38,8444,40,'Servicios prestados período 03-2023',1.00,'8',20150.00,20150.00,0.00,0.00,0.00,8,0.00,20150.00,'2023-04-05 16:15:43','2023-04-05 16:15:43','',NULL),(39,8444,41,'Servicios prestados período 03-2023 ',1.00,'8',20150.00,20150.00,0.00,0.00,0.00,8,0.00,20150.00,'2023-04-05 16:19:05','2023-04-05 16:19:05','',NULL),(40,8444,42,'Servicios prestados período 03-2023 ',1.00,'8',20150.00,20150.00,0.00,0.00,0.00,8,0.00,20150.00,'2023-04-05 16:20:25','2023-04-05 16:20:25','',NULL),(41,8444,43,'Servicios prestados período 03-2023 ',1.00,'8',20150.00,20150.00,0.00,0.00,0.00,8,0.00,20150.00,'2023-04-05 16:21:14','2023-04-05 16:21:14','',NULL),(42,8444,44,'Servicios prestados período 03-2023 ',1.00,'8',20150.00,20150.00,0.00,0.00,0.00,8,0.00,20150.00,'2023-04-05 16:25:03','2023-04-05 16:25:03','',NULL),(45,8444,47,'50% Servicios EECC 2022',1.00,'8',195000.00,195000.00,0.00,0.00,0.00,2,40950.00,235950.00,'2023-04-25 13:07:47','2023-04-25 13:07:47','',NULL),(46,8444,48,': Confección DDJJ Personales 2021.',1.00,'8',22000.00,22000.00,0.00,0.00,0.00,2,4620.00,26620.00,'2023-04-25 13:51:24','2023-04-25 13:51:24','',NULL);

--
-- Table structure for table `fact_elec_receipts`
--

CREATE TABLE `fact_elec_receipts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `fecha_comprobante` date NOT NULL,
  `fecha_facturado_desde` date DEFAULT NULL,
  `fecha_facturado_hasta` date DEFAULT NULL,
  `fecha_vencimiento_pago` date DEFAULT NULL,
  `concepto_id` int(10) unsigned NOT NULL,
  `punto_venta_id` int(10) unsigned NOT NULL,
  `tipo_comprobante_id` int(10) unsigned NOT NULL,
  `condiciones_venta` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `comprobante_asoc` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `cae` varchar(180) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cae_vencimiento` date DEFAULT NULL,
  `nro_comprobante_afip` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fecha_proceso_afip` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `person_id_receptor` int(10) unsigned NOT NULL,
  `condicion_venta_id` int(11) DEFAULT NULL,
  `cond_frente_iva_id` int(10) unsigned NOT NULL DEFAULT '1',
  `cbu` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `opcion_transferencia` longtext COLLATE utf8mb4_unicode_ci,
  `referencia` text COLLATE utf8mb4_unicode_ci,
  `alias_cbu` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_otros_tributos` decimal(16,2) DEFAULT '0.00',
  `total` decimal(16,2) NOT NULL DEFAULT '0.00',
  `moneda_id` int(10) unsigned NOT NULL DEFAULT '1',
  `cotizacion` decimal(9,2) NOT NULL DEFAULT '1.00',
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fact_elec_receipts_user_id_foreign` (`user_id`),
  KEY `fact_elec_receipts_punto_venta_id_foreign` (`punto_venta_id`),
  KEY `fact_elec_receipts_tipo_comprobante_id_foreign` (`tipo_comprobante_id`),
  KEY `fact_elec_receipts_person_id_foreign` (`person_id`),
  KEY `fact_elec_receipts_person_id_receptor_foreign` (`person_id_receptor`),
  KEY `fact_elec_receipts_cond_frente_iva_id_foreign` (`cond_frente_iva_id`),
  KEY `fact_elec_receipts_moneda_id_foreign` (`moneda_id`),
  CONSTRAINT `fact_elec_receipts_cond_frente_iva_id_foreign` FOREIGN KEY (`cond_frente_iva_id`) REFERENCES `condicion_frente_al_iva` (`id`),
  CONSTRAINT `fact_elec_receipts_moneda_id_foreign` FOREIGN KEY (`moneda_id`) REFERENCES `monedas` (`id`),
  CONSTRAINT `fact_elec_receipts_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `fact_elec_receipts_person_id_receptor_foreign` FOREIGN KEY (`person_id_receptor`) REFERENCES `persons` (`id`),
  CONSTRAINT `fact_elec_receipts_punto_venta_id_foreign` FOREIGN KEY (`punto_venta_id`) REFERENCES `fact_elec_puntos_venta` (`id`),
  CONSTRAINT `fact_elec_receipts_tipo_comprobante_id_foreign` FOREIGN KEY (`tipo_comprobante_id`) REFERENCES `receipt_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fact_elec_receipts`
--

INSERT INTO `fact_elec_receipts` VALUES (1,8444,'2023-04-03','2023-03-01','2023-03-30','2023-04-10',2,1,34,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"03-30-2023\",\"anula_comp_rechazado\":\"N\"}','2023-03-30 09:07:55','2023-03-30 09:07:58',NULL,NULL,NULL,NULL,40724,40719,4,6,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,'2023-03-30 09:07:58'),(2,8444,'2023-04-03','2023-03-01','2023-03-30','2023-04-10',2,1,34,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"03-30-2023\",\"anula_comp_rechazado\":\"N\"}','2023-03-30 09:08:11','2023-03-30 09:08:13',NULL,NULL,NULL,NULL,40724,40719,4,6,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,'2023-03-30 09:08:13'),(3,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,1,7,'',NULL,'2023-03-30 09:48:42','2023-03-30 09:48:42',NULL,NULL,NULL,NULL,40724,40719,4,6,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,NULL),(4,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,1,7,'',NULL,'2023-03-30 10:08:09','2023-03-30 10:08:09',NULL,NULL,NULL,NULL,40724,40719,4,6,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,NULL),(5,7931,'2023-03-30','2023-03-30','2023-03-30','2023-03-30',2,1,4,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"03-30-2023\",\"anula_comp_rechazado\":\"N\"}','2023-03-30 13:01:24','2023-03-30 13:01:25',NULL,NULL,NULL,NULL,40724,40718,4,5,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,'2023-03-30 13:01:25'),(6,7931,'2023-03-30','2023-03-30','2023-03-30','2023-03-30',2,1,4,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"03-30-2023\",\"anula_comp_rechazado\":\"N\"}','2023-03-30 14:10:16','2023-03-30 14:10:18',NULL,NULL,NULL,NULL,40724,40718,4,5,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,'2023-03-30 14:10:18'),(7,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,1,7,'',NULL,'2023-04-03 08:23:46','2023-04-03 08:23:46',NULL,NULL,NULL,NULL,40724,40719,4,6,NULL,NULL,NULL,NULL,0.00,1.00,1,1.00,NULL),(8,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-03 08:29:03','2023-04-03 08:29:06','73141118935457','2023-04-13','1','2023-04-13',40724,40877,4,1,NULL,NULL,NULL,NULL,0.00,27460.95,1,1.00,NULL),(9,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 09:39:49','2023-04-03 09:39:51','73141128603604','2023-04-13','2','2023-04-13',40724,40796,4,1,NULL,NULL,NULL,NULL,0.00,45145.10,1,1.00,NULL),(10,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 09:39:52','2023-04-03 09:39:53','73141128608667','2023-04-13','3','2023-04-13',40724,41177,4,1,NULL,NULL,NULL,NULL,0.00,137480.20,1,1.00,NULL),(11,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 11:50:06','2023-04-03 11:50:29','73141153333411','2023-04-13','4','2023-04-13',40724,40842,4,1,NULL,NULL,NULL,NULL,0.00,122560.90,1,1.00,NULL),(12,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 11:50:30','2023-04-03 11:50:56','73141153421963','2023-04-13','5','2023-04-13',40724,40803,4,1,NULL,NULL,NULL,NULL,0.00,69163.60,1,1.00,NULL),(13,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:25','2023-04-03 16:31:27','73141195653907','2023-04-13','6','2023-04-13',40724,40782,4,1,NULL,NULL,NULL,NULL,0.00,270634.65,1,1.00,NULL),(14,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:29','2023-04-03 16:31:30','73141195662360','2023-04-13','7','2023-04-13',40724,41733,4,1,NULL,NULL,NULL,NULL,0.00,55684.20,1,1.00,NULL),(15,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:32','2023-04-03 16:31:33','73141195671032','2023-04-13','8','2023-04-13',40724,41733,4,1,NULL,NULL,NULL,NULL,0.00,13310.00,1,1.00,NULL),(16,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:34','2023-04-03 16:31:35','73141195675463','2023-04-13','9','2023-04-13',40724,41733,4,1,NULL,NULL,NULL,NULL,0.00,127050.00,1,1.00,NULL);
INSERT INTO `fact_elec_receipts` VALUES (17,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:36','2023-04-03 16:31:37','73141195680482','2023-04-13','10','2023-04-13',40724,40846,4,1,NULL,NULL,NULL,NULL,0.00,209240.46,1,1.00,NULL),(18,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:38','2023-04-03 16:31:39','73141195686022','2023-04-13','11','2023-04-13',40724,40801,4,1,NULL,NULL,NULL,NULL,0.00,72309.60,1,1.00,NULL),(19,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:40','2023-04-03 16:31:41','73141195690786','2023-04-13','12','2023-04-13',40724,41730,4,1,NULL,NULL,NULL,NULL,0.00,147232.80,1,1.00,NULL),(20,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:42','2023-04-03 16:31:43','73141195694853','2023-04-13','13','2023-04-13',40724,41730,4,1,NULL,NULL,NULL,NULL,0.00,50227.10,1,1.00,NULL),(21,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:44','2023-04-03 16:31:44','73141195700003','2023-04-13','14','2023-04-13',40724,41730,4,1,NULL,NULL,NULL,NULL,0.00,105875.00,1,1.00,NULL),(22,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:45','2023-04-03 16:31:46','73141195706070','2023-04-13','15','2023-04-13',40724,40762,4,1,NULL,NULL,NULL,NULL,0.00,108246.60,1,1.00,NULL),(23,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:47','2023-04-03 16:31:48','73141195710234','2023-04-13','16','2023-04-13',40724,40848,4,1,NULL,NULL,NULL,NULL,0.00,199795.20,1,1.00,NULL),(24,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:49','2023-04-03 16:31:50','73141195714136','2023-04-13','17','2023-04-13',40724,41732,4,1,NULL,NULL,NULL,NULL,0.00,279715.70,1,1.00,NULL),(25,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:51','2023-04-03 16:31:52','73141195719880','2023-04-13','18','2023-04-13',40724,40791,4,1,NULL,NULL,NULL,NULL,0.00,66726.66,1,1.00,NULL),(26,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:55','2023-04-03 16:31:56','73141195730269','2023-04-13','19','2023-04-13',40724,41729,4,1,NULL,NULL,NULL,NULL,0.00,151915.50,1,1.00,NULL),(27,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:57','2023-04-03 16:31:58','73141195734674','2023-04-13','20','2023-04-13',40724,40802,4,1,NULL,NULL,NULL,NULL,0.00,102668.50,1,1.00,NULL),(28,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:31:59','2023-04-03 16:32:00','73141195739548','2023-04-13','21','2023-04-13',40724,41731,4,1,NULL,NULL,NULL,NULL,0.00,116160.00,1,1.00,NULL),(29,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,1,'',NULL,'2023-04-03 16:32:01','2023-04-03 16:32:02','73141195743320','2023-04-13','22','2023-04-13',40724,41019,4,1,NULL,NULL,NULL,NULL,0.00,234062.40,1,1.00,NULL),(30,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,4,'',NULL,'2023-04-03 16:32:02','2023-04-03 16:32:04','73141195747997','2023-04-13','1','2023-04-13',40724,41085,4,4,NULL,NULL,NULL,NULL,0.00,19985.00,1,1.00,NULL),(31,NULL,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',2,3,4,'',NULL,'2023-04-03 16:32:05','2023-04-03 16:32:06','73141195752623','2023-04-13','2','2023-04-13',40724,41086,4,4,NULL,NULL,NULL,NULL,0.00,19985.00,1,1.00,NULL);
INSERT INTO `fact_elec_receipts` VALUES (32,8444,'2023-04-03','2023-04-03','2023-04-03','2023-04-03',3,1,3,'','{\"Tipo\":{\"id\":1,\"user_id\":null,\"created_at\":null,\"updated_at\":\"2019-07-30T01:19:32.000000Z\",\"name\":\"Factura A\",\"code\":\"1\",\"credit\":0,\"agroup_iva_module\":1,\"sell_no_taxabled\":0,\"buy_no_taxabled\":0,\"iva_condition_id\":2,\"is_fce_pyme\":0,\"afip_comprobante_id\":1,\"tipo\":\"Factura\",\"letra\":\"A\",\"facta_electronica\":1,\"is_stock_lpg\":0,\"show_from_total\":0,\"deleted_at\":null},\"PtoVta\":\"0003\",\"Nro\":\"00000008\",\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-03 17:05:44','2023-04-03 17:05:46','73141200918913','2023-04-13','13','2023-04-13',40724,41733,4,1,NULL,NULL,NULL,NULL,0.00,13310.00,1,1.00,NULL),(33,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-03 17:06:59','2023-04-03 17:07:01','73141201103449','2023-04-13','444','2023-04-13',40724,41733,4,1,NULL,NULL,NULL,NULL,0.00,8000.00,1,1.00,NULL),(34,8444,'2023-04-03','2023-03-17','2023-03-31','2023-04-10',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-03 17:16:33','2023-04-03 17:16:34','73141202514366','2023-04-13','445','2023-04-13',40724,41729,4,1,NULL,NULL,NULL,NULL,0.00,84700.00,1,1.00,NULL),(35,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,3,'','{\"Tipo\":{\"id\":1,\"user_id\":null,\"created_at\":null,\"updated_at\":\"2019-07-30T01:19:32.000000Z\",\"name\":\"Factura A\",\"code\":\"1\",\"credit\":0,\"agroup_iva_module\":1,\"sell_no_taxabled\":0,\"buy_no_taxabled\":0,\"iva_condition_id\":2,\"is_fce_pyme\":0,\"afip_comprobante_id\":1,\"tipo\":\"Factura\",\"letra\":\"A\",\"facta_electronica\":1,\"is_stock_lpg\":0,\"show_from_total\":0,\"deleted_at\":null},\"PtoVta\":\"0003\",\"Nro\":\"00000022\",\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-04 15:53:11','2023-04-04 15:53:14','73141311150212','2023-04-13','14','2023-04-13',40724,41019,4,1,NULL,NULL,NULL,NULL,0.00,234062.40,1,1.00,NULL),(36,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,6,'','{\"Tipo\":{\"id\":4,\"user_id\":null,\"created_at\":null,\"updated_at\":\"2022-10-09T21:42:59.000000Z\",\"name\":\"Factura B\",\"code\":\"6\",\"credit\":0,\"agroup_iva_module\":2,\"sell_no_taxabled\":0,\"buy_no_taxabled\":1,\"iva_condition_id\":2,\"is_fce_pyme\":0,\"afip_comprobante_id\":6,\"tipo\":\"Factura\",\"letra\":\"B\",\"facta_electronica\":1,\"is_stock_lpg\":0,\"show_from_total\":1,\"deleted_at\":null},\"PtoVta\":\"0003\",\"Nro\":\"00000001\",\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-04 16:11:00','2023-04-04 16:11:02','73141313487965','2023-04-13','2','2023-04-13',40724,41085,4,1,NULL,NULL,NULL,NULL,0.00,19985.00,1,1.00,NULL),(37,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,6,'','{\"Tipo\":{\"id\":4,\"user_id\":null,\"created_at\":null,\"updated_at\":\"2022-10-09T21:42:59.000000Z\",\"name\":\"Factura B\",\"code\":\"6\",\"credit\":0,\"agroup_iva_module\":2,\"sell_no_taxabled\":0,\"buy_no_taxabled\":1,\"iva_condition_id\":2,\"is_fce_pyme\":0,\"afip_comprobante_id\":6,\"tipo\":\"Factura\",\"letra\":\"B\",\"facta_electronica\":1,\"is_stock_lpg\":0,\"show_from_total\":1,\"deleted_at\":null},\"PtoVta\":\"0003\",\"Nro\":\"00000001\",\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-04 16:12:31','2023-04-04 16:12:32','73141313687281','2023-04-13','3','2023-04-13',40724,41086,4,1,NULL,NULL,NULL,NULL,0.00,19985.00,1,1.00,NULL),(38,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-05-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 10:59:40','2023-04-05 10:59:47','73141389411464','2023-04-13','446','2023-04-13',40724,41019,4,1,NULL,NULL,NULL,NULL,0.00,195052.00,1,1.00,NULL);
INSERT INTO `fact_elec_receipts` VALUES (39,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-05-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 13:01:18','2023-04-05 13:01:21','73141410563691','2023-04-13','447','2023-04-13',40724,41086,4,1,NULL,NULL,NULL,NULL,0.00,20150.00,1,1.00,NULL),(40,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-05-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 16:15:43','2023-04-05 16:15:45','73141436387371','2023-04-13','448','2023-04-13',40724,41085,4,4,NULL,NULL,NULL,NULL,0.00,20150.00,1,1.00,NULL),(41,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,3,'','{\"Tipo\":{\"id\":1,\"user_id\":null,\"created_at\":null,\"updated_at\":\"2019-07-30T01:19:32.000000Z\",\"name\":\"Factura A\",\"code\":\"1\",\"credit\":0,\"agroup_iva_module\":1,\"sell_no_taxabled\":0,\"buy_no_taxabled\":0,\"iva_condition_id\":2,\"is_fce_pyme\":0,\"afip_comprobante_id\":1,\"tipo\":\"Factura\",\"letra\":\"A\",\"facta_electronica\":1,\"is_stock_lpg\":0,\"show_from_total\":0,\"deleted_at\":null},\"PtoVta\":\"0002\",\"Nro\":\"00000447\",\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 16:19:05','2023-04-05 16:19:07','73141436884399','2023-04-13','15','2023-04-13',40724,41086,4,1,NULL,NULL,NULL,NULL,0.00,20150.00,1,1.00,NULL),(42,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,3,'','{\"Tipo\":{\"id\":1,\"user_id\":null,\"created_at\":null,\"updated_at\":\"2019-07-30T01:19:32.000000Z\",\"name\":\"Factura A\",\"code\":\"1\",\"credit\":0,\"agroup_iva_module\":1,\"sell_no_taxabled\":0,\"buy_no_taxabled\":0,\"iva_condition_id\":2,\"is_fce_pyme\":0,\"afip_comprobante_id\":1,\"tipo\":\"Factura\",\"letra\":\"A\",\"facta_electronica\":1,\"is_stock_lpg\":0,\"show_from_total\":0,\"deleted_at\":null},\"PtoVta\":\"0002\",\"Nro\":\"00000448\",\"CbteFch\":\"04-03-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 16:20:25','2023-04-05 16:20:27','73141437071987','2023-04-13','16','2023-04-13',40724,41085,4,4,NULL,NULL,NULL,NULL,0.00,20150.00,1,1.00,NULL),(43,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,4,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-05-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 16:21:14','2023-04-05 16:21:18','73141437193322','2023-04-13','16','2023-04-13',40724,41086,4,4,NULL,NULL,NULL,NULL,0.00,20150.00,1,1.00,NULL),(44,8444,'2023-04-03','2023-03-01','2023-03-31','2023-04-10',3,1,4,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-05-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-05 16:25:03','2023-04-05 16:25:05','73141437717528','2023-04-13','17','2023-04-13',40724,41085,4,4,NULL,NULL,NULL,NULL,0.00,20150.00,1,1.00,NULL),(45,8444,'2023-04-25','2023-04-25','2023-04-25','2023-04-30',3,1,34,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-25-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-25 12:54:07','2023-04-25 12:54:10',NULL,NULL,NULL,NULL,40724,42351,4,1,NULL,NULL,NULL,NULL,0.00,235950.00,1,1.00,'2023-04-25 12:54:10'),(46,8444,'2023-04-25','2023-04-25','2023-04-25','2023-04-30',3,1,34,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-25-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-25 12:55:51','2023-04-25 12:55:53',NULL,NULL,NULL,NULL,40724,42351,4,1,NULL,NULL,NULL,NULL,0.00,235950.00,1,1.00,'2023-04-25 12:55:53'),(47,8444,'2023-04-25','2023-04-25','2023-04-25','2023-04-30',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-25-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-25 13:07:47','2023-04-25 13:07:50','73171332819603','2023-05-05','449','2023-05-05',40724,42351,4,1,NULL,NULL,NULL,NULL,0.00,235950.00,1,1.00,NULL);
INSERT INTO `fact_elec_receipts` VALUES (48,8444,'2023-04-25','2023-04-21','2023-04-21','2023-04-30',3,1,1,'','{\"Tipo\":null,\"PtoVta\":null,\"Nro\":null,\"CbteFch\":\"04-25-2023\",\"anula_comp_rechazado\":\"N\"}','2023-04-25 13:51:24','2023-04-25 13:51:26','73171337862826','2023-05-05','450','2023-05-05',40724,41075,4,1,NULL,NULL,NULL,NULL,0.00,26620.00,1,1.00,NULL);

--
-- Table structure for table `fact_elec_tipos_docs_afip`
--

CREATE TABLE `fact_elec_tipos_docs_afip` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `afip_tipo_doc_id` int(10) unsigned NOT NULL,
  `descripcion` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fact_elec_tipos_docs_afip`
--

INSERT INTO `fact_elec_tipos_docs_afip` VALUES (1,1,'CI Buenos Aires','2019-03-13 13:29:34','2019-03-13 13:29:34'),(2,2,'CI Catamarca','2019-03-13 13:29:34','2019-03-13 13:29:34'),(3,3,'CI Córdoba','2019-03-13 13:29:34','2019-03-13 13:29:34'),(4,4,'CI Corrientes','2019-03-13 13:29:34','2019-03-13 13:29:34'),(5,5,'CI Entre Ríos','2019-03-13 13:29:34','2019-03-13 13:29:34'),(6,6,'CI Jujuy','2019-03-13 13:29:34','2019-03-13 13:29:34'),(7,7,'CI Mendoza','2019-03-13 13:29:34','2019-03-13 13:29:34'),(8,8,'CI La Rioja','2019-03-13 13:29:34','2019-03-13 13:29:34'),(9,9,'CI Salta','2019-03-13 13:29:34','2019-03-13 13:29:34'),(10,10,'CI San Juan','2019-03-13 13:29:34','2019-03-13 13:29:34'),(11,11,'CI San Luis','2019-03-13 13:29:34','2019-03-13 13:29:34'),(12,12,'CI Santa Fe','2019-03-13 13:29:34','2019-03-13 13:29:34'),(13,13,'CI Santiago del Estero','2019-03-13 13:29:34','2019-03-13 13:29:34'),(14,14,'CI Tucumán','2019-03-13 13:29:34','2019-03-13 13:29:34'),(16,16,'CI Chaco','2019-03-13 13:29:34','2019-03-13 13:29:34'),(17,17,'CI Chubut','2019-03-13 13:29:34','2019-03-13 13:29:34'),(18,18,'CI Formosa','2019-03-13 13:29:34','2019-03-13 13:29:34'),(19,19,'CI Misiones','2019-03-13 13:29:34','2019-03-13 13:29:34'),(20,20,'CI Neuquén','2019-03-13 13:29:34','2019-03-13 13:29:34'),(21,21,'CI La Pampa','2019-03-13 13:29:34','2019-03-13 13:29:34'),(22,22,'CI Río Negro','2019-03-13 13:29:34','2019-03-13 13:29:34'),(23,23,'CI Santa Cruz','2019-03-13 13:29:34','2019-03-13 13:29:34'),(24,24,'CI Tierra del Fuego','2019-03-13 13:29:34','2019-03-13 13:29:34'),(80,80,'CUIT','2019-03-13 13:29:34','2019-03-13 13:29:34'),(86,86,'CUIL','2019-03-13 13:29:34','2019-03-13 13:29:34'),(87,87,'CDI','2019-03-13 13:29:34','2019-03-13 13:29:34'),(89,89,'LE','2019-03-13 13:29:34','2019-03-13 13:29:34'),(90,90,'LC','2019-03-13 13:29:34','2019-03-13 13:29:34'),(91,91,'CI Extranjera','2019-03-13 13:29:34','2019-03-13 13:29:34'),(92,92,'en trámite','2019-03-13 13:29:34','2019-03-13 13:29:34'),(93,93,'Acta Nacimiento','2019-03-13 13:29:34','2019-03-13 13:29:34'),(94,94,'Pasaporte','2019-03-13 13:29:34','2019-03-13 13:29:34'),(95,95,'CI Bs. As. RNP','2019-03-13 13:29:34','2019-03-13 13:29:34'),(96,96,'DNI','2019-03-13 13:29:34','2019-03-13 13:29:34'),(97,0,'CI Policía Federal','2019-03-13 13:29:34','2019-03-13 13:29:34'),(99,99,'Doc. (Otro)','2019-03-13 13:29:34','2019-03-13 13:29:34');

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `faq`
--

CREATE TABLE `faq` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pregunta` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `respuesta` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `faq`
--


--
-- Table structure for table `file_upload_details`
--

CREATE TABLE `file_upload_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `file_upload_id` int(10) unsigned NOT NULL,
  `detail` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `file_upload_details_file_upload_id_foreign` (`file_upload_id`),
  CONSTRAINT `file_upload_details_file_upload_id_foreign` FOREIGN KEY (`file_upload_id`) REFERENCES `file_uploads` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_upload_details`
--


--
-- Table structure for table `file_uploads`
--

CREATE TABLE `file_uploads` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `data_type_id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `period_id` int(10) unsigned DEFAULT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int(10) unsigned NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `file_uploads_data_type_id_foreign` (`data_type_id`),
  KEY `file_uploads_user_id_foreign` (`user_id`),
  KEY `file_uploads_person_id_foreign` (`person_id`),
  KEY `file_uploads_period_id_foreign` (`period_id`),
  CONSTRAINT `file_uploads_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`),
  CONSTRAINT `file_uploads_period_id_foreign` FOREIGN KEY (`period_id`) REFERENCES `periods` (`id`),
  CONSTRAINT `file_uploads_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `file_uploads_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `tusers` (`idUser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `file_uploads`
--


--
-- Table structure for table `forma_de_entrega`
--

CREATE TABLE `forma_de_entrega` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `detalle` longtext COLLATE utf8mb4_unicode_ci,
  `habilitado` tinyint(1) 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 `forma_de_entrega_person_id_foreign` (`person_id`),
  CONSTRAINT `forma_de_entrega_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `forma_de_entrega`
--


--
-- Table structure for table `ganan_art_90`
--

CREATE TABLE `ganan_art_90` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `anio` int(10) unsigned NOT NULL,
  `desde` decimal(16,2) NOT NULL DEFAULT '0.00',
  `hasta` decimal(16,2) NOT NULL DEFAULT '0.00',
  `impuesto` decimal(16,2) NOT NULL DEFAULT '0.00',
  `mas_porcentaje` decimal(16,2) NOT NULL DEFAULT '0.00',
  `excedente` decimal(16,2) NOT NULL DEFAULT '0.00',
  `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=91 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_art_90`
--

INSERT INTO `ganan_art_90` VALUES (1,2017,0.00,20000.00,0.00,0.05,0.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(2,2017,20000.00,40000.00,1000.00,0.09,20000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(3,2017,40000.00,60000.00,2800.00,0.12,40000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(4,2017,60000.00,80000.00,5200.00,0.15,60000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(5,2017,80000.00,120000.00,8200.00,0.19,80000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(6,2017,120000.00,160000.00,15800.00,0.23,120000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(7,2017,160000.00,240000.00,25000.00,0.27,160000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(8,2017,240000.00,320000.00,46600.00,0.31,240000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(9,2017,320000.00,999999999.99,71400.00,0.35,320000.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(10,2018,0.00,25754.00,0.00,0.05,0.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(11,2018,25754.00,51508.00,1287.70,0.09,25754.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(12,2018,51508.00,77262.00,3605.56,0.12,51508.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(13,2018,77262.00,103016.00,6696.04,0.15,77262.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(14,2018,103016.00,154524.00,10559.14,0.19,103016.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(15,2018,154524.00,206032.00,20345.66,0.23,154524.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(16,2018,206032.00,309048.00,32192.50,0.27,206032.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(17,2018,309048.00,412064.00,60006.82,0.31,309048.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(18,2018,412064.00,999999999.99,91941.78,0.35,412064.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(19,2019,0.00,33039.81,0.00,0.05,0.00,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(20,2019,33039.81,66079.61,1651.99,0.09,33039.81,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(21,2019,66079.61,99119.42,4625.57,0.12,66079.61,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(22,2019,99119.42,132159.23,8590.35,0.15,99119.42,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(23,2019,132159.23,198238.84,13546.32,0.19,132159.23,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(24,2019,198238.84,264318.45,26101.45,0.23,198238.84,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(25,2019,264318.45,396477.68,41299.76,0.27,264318.45,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(26,2019,396477.68,528636.91,76982.75,0.31,396477.68,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(27,2019,528636.91,999999999.99,117952.11,0.35,528636.91,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(28,2016,0.00,10000.00,0.00,0.09,0.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(29,2016,10000.00,20000.00,900.00,0.14,10000.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(30,2016,20000.00,30000.00,2300.00,0.19,20000.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(31,2016,30000.00,60000.00,4200.00,0.23,30000.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(32,2016,60000.00,90000.00,11100.00,0.27,60000.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(33,2016,90000.00,120000.00,19200.00,0.31,90000.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(34,2016,120000.00,999999999.00,28500.00,0.35,120000.00,'2020-01-28 13:48:34','2020-02-27 02:59:44',NULL),(37,2020,0.00,47669.16,0.00,0.05,0.00,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(38,2020,47669.16,95338.32,2383.46,0.09,47669.16,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(39,2020,95338.32,143007.48,6673.68,0.12,95338.32,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(40,2020,143007.48,190676.65,12393.98,0.15,143007.48,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(41,2020,190676.65,286014.96,19544.36,0.19,190676.65,'2020-01-28 14:17:39','2022-10-09 18:43:04',NULL),(42,2020,286014.96,381353.28,37658.64,0.23,286014.96,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL);
INSERT INTO `ganan_art_90` VALUES (43,2020,381353.28,572029.92,59586.45,0.27,381353.28,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(44,2020,572029.92,762706.57,111069.14,0.31,572029.92,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(45,2020,762706.57,999999999.99,170178.90,0.35,762706.57,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(46,2021,0.00,64532.64,0.00,0.05,0.00,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(47,2021,64532.64,129065.29,3226.63,0.09,64532.64,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(48,2021,129065.29,193597.93,9034.57,0.12,129065.29,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(49,2021,193597.93,258130.58,16778.49,0.15,193597.93,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(50,2021,258130.58,387195.86,26458.39,0.19,258130.58,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(51,2021,387195.86,516261.14,50980.79,0.23,387195.86,'2022-10-09 18:43:05','2022-10-09 18:43:18',NULL),(52,2021,516261.14,774391.71,80665.80,0.27,516261.14,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(53,2021,774391.71,1032522.30,150361.06,0.31,774391.71,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(54,2021,1032522.30,999999999.99,230381.54,0.35,1032522.30,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(55,2022,0.00,97201.99,0.00,0.05,0.00,'2022-10-09 18:43:11','2022-10-09 18:43:12',NULL),(56,2022,97201.99,194404.01,4860.10,0.09,97201.99,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(57,2022,194404.01,291606.01,13608.29,0.12,194404.01,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(58,2022,291606.01,388808.02,25272.52,0.15,291606.01,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(59,2022,388808.02,583212.02,39852.82,0.19,388808.02,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(60,2022,583212.02,777616.02,76789.59,0.23,583212.02,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(61,2022,777616.02,1166424.03,121502.49,0.27,777616.02,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(62,2022,1166424.03,1555232.07,226480.67,0.31,1166424.03,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(63,2022,1555232.07,999999999.99,347011.15,0.35,1555232.07,'2022-10-09 18:43:11','2023-06-27 10:54:53',NULL),(64,2023,0.00,1400000.00,0.00,0.00,0.00,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(65,2023,1400000.00,1526000.00,0.00,0.09,1400000.00,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(66,2023,1526000.00,1648080.00,11340.00,0.12,1526000.00,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(67,2023,1648080.00,1763445.60,25989.60,0.15,1648080.00,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(68,2023,1763445.60,1869252.34,43294.44,0.19,1763445.60,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(69,2023,1869252.34,1962714.95,63397.72,0.23,1869252.34,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(70,2023,1962714.95,2041223.55,84894.12,0.27,1962714.95,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(71,2023,2041223.55,2102460.26,106091.44,0.31,2041223.55,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(72,2023,2102460.26,999999999.00,125074.82,0.35,2102460.26,'2022-12-28 17:49:25','2023-09-25 21:57:09',NULL),(73,2024,0.00,1360200.00,0.00,0.05,0.00,NULL,NULL,NULL),(74,2024,1360200.00,2720400.00,68010.00,0.09,1360200.00,NULL,NULL,NULL),(75,2024,2720400.00,4080600.00,190428.00,0.12,2720400.00,NULL,NULL,NULL),(76,2024,4080600.00,6120900.00,353652.00,0.15,4080600.00,NULL,NULL,NULL),(77,2024,6120900.00,12241800.00,659697.00,0.19,6120900.00,NULL,NULL,NULL),(78,2024,12241800.00,18362700.00,1822668.00,0.23,12241800.00,NULL,NULL,NULL),(79,2024,18362700.00,27544050.00,3230475.00,0.27,18362700.00,NULL,NULL,NULL),(80,2024,27544050.00,41316075.00,5709439.50,0.31,27544050.00,NULL,NULL,NULL),(81,2024,41316075.00,9999999999.00,9978767.25,0.35,41316075.00,NULL,NULL,NULL),(82,2025,0.00,1520371.67,0.00,0.05,0.00,NULL,NULL,NULL),(83,2025,1520371.67,3040743.34,76018.58,0.09,1520371.67,NULL,NULL,NULL),(84,2025,3040743.34,4561115.01,212852.03,0.12,3040743.34,NULL,NULL,NULL);
INSERT INTO `ganan_art_90` VALUES (85,2025,4561115.01,6841672.52,395296.63,0.15,4561115.01,NULL,NULL,NULL),(86,2025,6841672.52,13683345.04,737380.26,0.19,6841672.52,NULL,NULL,NULL),(87,2025,13683345.04,20525017.56,2037298.04,0.23,13683345.04,NULL,NULL,NULL),(88,2025,20525017.56,30787526.34,3610882.72,0.27,20525017.56,NULL,NULL,NULL),(89,2025,30787526.34,46181289.52,6381760.09,0.31,30787526.34,NULL,NULL,NULL),(90,2025,46181289.52,999999999999.00,11153826.67,0.35,46181289.52,NULL,NULL,NULL);

--
-- Table structure for table `ganan_categorias`
--

CREATE TABLE `ganan_categorias` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_categorias`
--

INSERT INTO `ganan_categorias` VALUES (1,'Primera',1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(2,'Segunda',1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(3,'Tercera',1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(4,'Cuarta',1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL);

--
-- Table structure for table `ganan_conceptos_anticipos`
--

CREATE TABLE `ganan_conceptos_anticipos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) 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`),
  UNIQUE KEY `ganan_conceptos_anticipos_nombre_unique` (`nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_conceptos_anticipos`
--

INSERT INTO `ganan_conceptos_anticipos` VALUES (1,NULL,'Anticipos',1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(2,NULL,'Retenciones y Percepciones',1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(3,NULL,'Saldo a Favor Anterior',1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL);

--
-- Table structure for table `ganan_ddjj_detail_anticipos`
--

CREATE TABLE `ganan_ddjj_detail_anticipos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `ganan_ddjj_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `ganan_concepto_anticipo_id` int(10) unsigned NOT NULL,
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ganan_ddjj_detail_anticipos_ganan_ddjj_id_foreign` (`ganan_ddjj_id`),
  KEY `ganan_ddjj_detail_anticipos_person_id_foreign` (`person_id`),
  KEY `ganan_ddjj_detail_anticipos_ganan_concepto_anticipo_id_foreign` (`ganan_concepto_anticipo_id`),
  CONSTRAINT `ganan_ddjj_detail_anticipos_ganan_concepto_anticipo_id_foreign` FOREIGN KEY (`ganan_concepto_anticipo_id`) REFERENCES `ganan_conceptos_anticipos` (`id`),
  CONSTRAINT `ganan_ddjj_detail_anticipos_ganan_ddjj_id_foreign` FOREIGN KEY (`ganan_ddjj_id`) REFERENCES `ganan_ddjjs` (`id`),
  CONSTRAINT `ganan_ddjj_detail_anticipos_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_ddjj_detail_anticipos`
--

INSERT INTO `ganan_ddjj_detail_anticipos` VALUES (1,7931,1,40875,1,0.00,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(2,7931,1,40875,2,0.00,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(3,7931,1,40875,3,0.00,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(4,7931,2,40719,1,0.00,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(5,7931,2,40719,2,0.00,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(6,7931,2,40719,3,0.00,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(10,7931,4,40876,1,0.00,'2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(11,7931,4,40876,2,0.00,'2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(12,7931,4,40876,3,0.00,'2023-03-22 15:41:59','2023-03-22 15:41:59',NULL);

--
-- Table structure for table `ganan_ddjj_detail_deducciones`
--

CREATE TABLE `ganan_ddjj_detail_deducciones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `ganan_ddjj_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `ganan_deduccion_id` int(10) unsigned NOT NULL,
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `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 `ganan_ddjj_detail_deducciones_ganan_ddjj_id_foreign` (`ganan_ddjj_id`),
  KEY `ganan_ddjj_detail_deducciones_person_id_foreign` (`person_id`),
  KEY `ganan_ddjj_detail_deducciones_ganan_deduccion_id_foreign` (`ganan_deduccion_id`),
  CONSTRAINT `ganan_ddjj_detail_deducciones_ganan_ddjj_id_foreign` FOREIGN KEY (`ganan_ddjj_id`) REFERENCES `ganan_ddjjs` (`id`),
  CONSTRAINT `ganan_ddjj_detail_deducciones_ganan_deduccion_id_foreign` FOREIGN KEY (`ganan_deduccion_id`) REFERENCES `ganan_deducciones` (`id`),
  CONSTRAINT `ganan_ddjj_detail_deducciones_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_ddjj_detail_deducciones`
--

INSERT INTO `ganan_ddjj_detail_deducciones` VALUES (1,7931,1,40875,128,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(2,7931,1,40875,129,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(3,7931,1,40875,130,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(4,7931,1,40875,131,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(5,7931,1,40875,132,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(6,7931,1,40875,133,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(7,7931,1,40875,134,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(8,7931,1,40875,135,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(9,7931,1,40875,136,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(10,7931,1,40875,137,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(11,7931,1,40875,138,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(12,7931,1,40875,139,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(13,7931,1,40875,140,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(14,7931,1,40875,141,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(15,7931,1,40875,142,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(16,7931,1,40875,143,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(17,7931,1,40875,144,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(18,7931,1,40875,145,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(19,7931,1,40875,146,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(20,7931,1,40875,147,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(21,7931,1,40875,148,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(22,7931,1,40875,149,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(23,7931,2,40719,128,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(24,7931,2,40719,129,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(25,7931,2,40719,130,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(26,7931,2,40719,131,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(27,7931,2,40719,132,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(28,7931,2,40719,133,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(29,7931,2,40719,134,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(30,7931,2,40719,135,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(31,7931,2,40719,136,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(32,7931,2,40719,137,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(33,7931,2,40719,138,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(34,7931,2,40719,139,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(35,7931,2,40719,140,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(36,7931,2,40719,141,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(37,7931,2,40719,142,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(38,7931,2,40719,143,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(39,7931,2,40719,144,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(40,7931,2,40719,145,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(41,7931,2,40719,146,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(42,7931,2,40719,147,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(43,7931,2,40719,148,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(44,7931,2,40719,149,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(67,7931,4,40876,151,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(68,7931,4,40876,152,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(69,7931,4,40876,153,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(70,7931,4,40876,154,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(71,7931,4,40876,155,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL);
INSERT INTO `ganan_ddjj_detail_deducciones` VALUES (72,7931,4,40876,156,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(73,7931,4,40876,157,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(74,7931,4,40876,158,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(75,7931,4,40876,159,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(76,7931,4,40876,160,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(77,7931,4,40876,161,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(78,7931,4,40876,162,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(79,7931,4,40876,163,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(80,7931,4,40876,164,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(81,7931,4,40876,165,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(82,7931,4,40876,166,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(83,7931,4,40876,167,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(84,7931,4,40876,168,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(85,7931,4,40876,169,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(86,7931,4,40876,170,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(87,7931,4,40876,171,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(88,7931,4,40876,172,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL);

--
-- Table structure for table `ganan_ddjj_detail_ing_egr`
--

CREATE TABLE `ganan_ddjj_detail_ing_egr` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `ganan_ddjj_id` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `conta_tipo_asiento_id` int(10) unsigned NOT NULL,
  `ganan_categoria_id` int(10) unsigned NOT NULL,
  `ganan_tipo_op_id` int(10) unsigned NOT NULL,
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `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 `ganan_ddjj_detail_ing_egr_ganan_ddjj_id_foreign` (`ganan_ddjj_id`),
  KEY `ganan_ddjj_detail_ing_egr_person_id_foreign` (`person_id`),
  KEY `ganan_ddjj_detail_ing_egr_conta_tipo_asiento_id_foreign` (`conta_tipo_asiento_id`),
  KEY `ganan_ddjj_detail_ing_egr_ganan_categoria_id_foreign` (`ganan_categoria_id`),
  KEY `ganan_ddjj_detail_ing_egr_ganan_tipo_op_id_foreign` (`ganan_tipo_op_id`),
  CONSTRAINT `ganan_ddjj_detail_ing_egr_conta_tipo_asiento_id_foreign` FOREIGN KEY (`conta_tipo_asiento_id`) REFERENCES `conta_tipo_asientos` (`id`),
  CONSTRAINT `ganan_ddjj_detail_ing_egr_ganan_categoria_id_foreign` FOREIGN KEY (`ganan_categoria_id`) REFERENCES `ganan_categorias` (`id`),
  CONSTRAINT `ganan_ddjj_detail_ing_egr_ganan_ddjj_id_foreign` FOREIGN KEY (`ganan_ddjj_id`) REFERENCES `ganan_ddjjs` (`id`),
  CONSTRAINT `ganan_ddjj_detail_ing_egr_ganan_tipo_op_id_foreign` FOREIGN KEY (`ganan_tipo_op_id`) REFERENCES `ganan_tipos_op` (`id`),
  CONSTRAINT `ganan_ddjj_detail_ing_egr_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_ddjj_detail_ing_egr`
--

INSERT INTO `ganan_ddjj_detail_ing_egr` VALUES (1,7931,1,40875,2,1,1,1000.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(2,7931,1,40875,2,2,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(3,7931,1,40875,2,3,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(4,7931,1,40875,2,4,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(5,7931,1,40875,2,1,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(6,7931,1,40875,2,2,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(7,7931,1,40875,2,3,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(8,7931,1,40875,2,4,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(9,7931,1,40875,3,1,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(10,7931,1,40875,3,2,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(11,7931,1,40875,3,3,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(12,7931,1,40875,3,4,1,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(13,7931,1,40875,3,1,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(14,7931,1,40875,3,2,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(15,7931,1,40875,3,3,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(16,7931,1,40875,3,4,2,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(17,7931,2,40719,2,1,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(18,7931,2,40719,2,2,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(19,7931,2,40719,2,3,1,50000.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(20,7931,2,40719,2,4,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(21,7931,2,40719,2,1,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(22,7931,2,40719,2,2,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(23,7931,2,40719,2,3,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(24,7931,2,40719,2,4,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(25,7931,2,40719,3,1,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(26,7931,2,40719,3,2,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(27,7931,2,40719,3,3,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(28,7931,2,40719,3,4,1,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(29,7931,2,40719,3,1,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(30,7931,2,40719,3,2,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(31,7931,2,40719,3,3,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(32,7931,2,40719,3,4,2,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(49,7931,4,40876,2,1,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(50,7931,4,40876,2,2,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(51,7931,4,40876,2,3,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(52,7931,4,40876,2,4,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(53,7931,4,40876,2,1,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(54,7931,4,40876,2,2,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(55,7931,4,40876,2,3,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(56,7931,4,40876,2,4,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(57,7931,4,40876,3,1,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(58,7931,4,40876,3,2,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(59,7931,4,40876,3,3,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(60,7931,4,40876,3,4,1,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(61,7931,4,40876,3,1,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(62,7931,4,40876,3,2,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(63,7931,4,40876,3,3,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL),(64,7931,4,40876,3,4,2,0.00,'','2023-03-22 15:41:59','2023-03-22 15:41:59',NULL);

--
-- Table structure for table `ganan_ddjjs`
--

CREATE TABLE `ganan_ddjjs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `anio` int(10) unsigned NOT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `ingresos_gravados` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ingresos_exentos` decimal(16,2) NOT NULL DEFAULT '0.00',
  `egresos_gravados` decimal(16,2) NOT NULL DEFAULT '0.00',
  `egresos_exentos` decimal(16,2) NOT NULL DEFAULT '0.00',
  `deducciones_total` decimal(16,2) NOT NULL DEFAULT '0.00',
  `base_imponible` decimal(16,2) NOT NULL DEFAULT '0.00',
  `impuesto_determinado` decimal(16,2) NOT NULL DEFAULT '0.00',
  `saldo_a_pagar` decimal(16,2) NOT NULL DEFAULT '0.00',
  `saldo_a_favor` decimal(16,2) NOT NULL DEFAULT '0.00',
  `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 `ganan_ddjjs_person_id_foreign` (`person_id`),
  CONSTRAINT `ganan_ddjjs_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_ddjjs`
--

INSERT INTO `ganan_ddjjs` VALUES (1,7931,2022,40875,1000.00,0.00,0.00,0.00,0.00,1000.00,50.00,50.00,0.00,NULL,'2023-03-13 19:32:33','2023-03-13 19:32:33',NULL),(2,7931,2022,40719,50000.00,0.00,0.00,0.00,0.00,50000.00,2500.00,0.00,0.00,NULL,'2023-03-15 15:31:13','2023-03-15 15:31:13',NULL),(4,7931,2023,40876,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,NULL,'2023-03-22 15:41:59','2023-03-22 15:41:59',NULL);

--
-- Table structure for table `ganan_deducciones`
--

CREATE TABLE `ganan_deducciones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `anio` int(10) unsigned NOT NULL,
  `generales` tinyint(1) NOT NULL DEFAULT '0',
  `particulares` tinyint(1) NOT NULL DEFAULT '0',
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `status` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=225 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_deducciones`
--

INSERT INTO `ganan_deducciones` VALUES (1,NULL,2017,1,0,'Primas de seguro para el caso de muerte',999.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(2,NULL,2017,1,0,'Gastos de Sepelio',999.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(3,NULL,2017,1,0,'Aportes a Obras Sociales',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(4,NULL,2017,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(5,NULL,2017,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(6,NULL,2017,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(7,NULL,2017,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(8,NULL,2017,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(9,NULL,2017,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(10,NULL,2017,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(11,NULL,2017,1,0,'Servicio Doméstico',51967.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(12,NULL,2017,1,0,'Donaciones',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(13,NULL,2017,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2019-11-15 13:24:27','2019-11-15 13:24:27',NULL),(14,NULL,2017,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(15,NULL,2017,0,1,'Conyuge',48447.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(16,NULL,2017,0,1,'Hijo Incapacitado',24432.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(17,NULL,2017,0,1,'Hijo Menor 18 años',24432.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(18,NULL,2017,0,1,'Hijastro Incapacitado',24432.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(19,NULL,2017,0,1,'Hijastro Menor 18 Años',24432.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(20,NULL,2017,0,1,'Ganancia No Imponible',51967.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(21,NULL,2017,0,1,'Deduccion Especial',51967.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(22,NULL,2018,1,0,'Primas de seguro para el caso de muerte',12000.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(23,NULL,2018,1,0,'Gastos de Sepelio',999.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(24,NULL,2018,1,0,'Aportes a Obras Sociales',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(25,NULL,2018,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(26,NULL,2018,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(27,NULL,2018,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(28,NULL,2018,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(29,NULL,2018,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(30,NULL,2018,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL);
INSERT INTO `ganan_deducciones` VALUES (31,NULL,2018,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(32,NULL,2018,1,0,'Servicio Doméstico',66917.91,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(33,NULL,2018,1,0,'Donaciones',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(34,NULL,2018,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(35,NULL,2018,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(36,NULL,2018,0,1,'Conyuge',66917.91,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(37,NULL,2018,0,1,'Hijo Incapacitado',31461.09,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(38,NULL,2018,0,1,'Hijo Menor 18 años',31461.09,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(39,NULL,2018,0,1,'Hijastro Incapacitado',31461.09,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(40,NULL,2018,0,1,'Hijastro Menor 18 Años',31461.09,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(41,NULL,2018,0,1,'Ganancia No Imponible',66917.91,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(42,NULL,2018,0,1,'Deduccion Especial',66917.91,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(43,NULL,2019,1,0,'Primas de seguro para el caso de muerte',18000.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(44,NULL,2019,1,0,'Gastos de Sepelio',999.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(45,NULL,2019,1,0,'Aportes a Obras Sociales',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(46,NULL,2019,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(47,NULL,2019,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(48,NULL,2019,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(49,NULL,2019,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(50,NULL,2019,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(51,NULL,2019,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(52,NULL,2019,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(53,NULL,2019,1,0,'Servicio Doméstico',103018.79,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(54,NULL,2019,1,0,'Donaciones',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(55,NULL,2019,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(56,NULL,2019,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(57,NULL,2019,0,1,'Conyuge',80033.97,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(58,NULL,2019,0,1,'Hijo Incapacitado',40361.43,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(59,NULL,2019,0,1,'Hijo Menor 18 años',206037.56,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(60,NULL,2019,0,1,'Hijastro Incapacitado',206037.56,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(61,NULL,2019,0,1,'Hijastro Menor 18 Años',0.00,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(62,NULL,2019,0,1,'Ganancia No Imponible',103018.79,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(63,NULL,2019,0,1,'Deduccion Especial',103018.79,1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL);
INSERT INTO `ganan_deducciones` VALUES (64,NULL,2016,1,0,'Primas de seguro para el caso de muerte',999.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(65,NULL,2016,1,0,'Gastos de Sepelio',999.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(66,NULL,2016,1,0,'Aportes a Obras Sociales',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(67,NULL,2016,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(68,NULL,2016,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(69,NULL,2016,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(70,NULL,2016,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(71,NULL,2016,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(72,NULL,2016,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(73,NULL,2016,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(74,NULL,2016,1,0,'Servicio Doméstico',42318.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(75,NULL,2016,1,0,'Donaciones',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(76,NULL,2016,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(77,NULL,2016,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y \n            Paramédica',0.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(78,NULL,2016,0,1,'Conyuge',39778.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(79,NULL,2016,0,1,'Hijo Incapacitado',19889.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(80,NULL,2016,0,1,'Hijo Menor 18 años',19889.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(81,NULL,2016,0,1,'Hijastro Incapacitado',19889.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(82,NULL,2016,0,1,'Hijastro Menor 18 Años',19889.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(83,NULL,2016,0,1,'Ganancia No Imponible',42318.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(84,NULL,2016,0,1,'Deduccion Especial',42318.00,1,'2020-01-28 13:48:34','2020-01-28 13:48:34',NULL),(85,NULL,2019,1,0,'Alquileres',103018.97,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(86,NULL,2020,1,0,'Alquileres',123861.17,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(87,NULL,2020,1,0,'Primas de seguro para el caso de muerte',18000.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(88,NULL,2020,1,0,'Gastos de Sepelio',999.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(89,NULL,2020,1,0,'Aportes a Obras Sociales',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(90,NULL,2020,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(91,NULL,2020,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(92,NULL,2020,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(93,NULL,2020,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL);
INSERT INTO `ganan_deducciones` VALUES (94,NULL,2020,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(95,NULL,2020,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(96,NULL,2020,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(97,NULL,2020,1,0,'Servicio Doméstico',123861.17,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(98,NULL,2020,1,0,'Donaciones',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(99,NULL,2020,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(100,NULL,2020,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(101,NULL,2020,0,1,'Conyuge',115471.38,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(102,NULL,2020,0,1,'Hijo Incapacitado',58232.65,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(103,NULL,2020,0,1,'Hijo Menor 18 años',58232.65,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(104,NULL,2020,0,1,'Hijastro Incapacitado',58232.65,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(105,NULL,2020,0,1,'Hijastro Menor 18 Años',0.00,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(106,NULL,2020,0,1,'Ganancia No Imponible',123861.17,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(107,NULL,2020,0,1,'Deduccion Especial Art 30 Apartado 1',103018.79,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(108,NULL,2020,0,1,'Deduccion Especial Art 30 Apartado 1 \"Nuevos Profesionales / Emprendedores',309652.93,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(109,NULL,2020,0,1,'Deduccion Especial Art 30 Apartado 2',594533.62,1,'2020-01-28 14:17:39','2020-01-28 14:17:39',NULL),(110,NULL,2021,1,0,'Primas de seguro para el caso de muerte',24000.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(111,NULL,2021,1,0,'Gastos de Sepelio',996.23,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(112,NULL,2021,1,0,'Aportes a Obras Sociales',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(113,NULL,2021,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(114,NULL,2021,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(115,NULL,2021,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(116,NULL,2021,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(117,NULL,2021,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(118,NULL,2021,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(119,NULL,2021,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(120,NULL,2021,1,0,'Servicio Doméstico',167678.40,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(121,NULL,2021,1,0,'Donaciones',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(122,NULL,2021,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(123,NULL,2021,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(124,NULL,2021,0,1,'Conyuge',156320.63,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(125,NULL,2021,0,1,'Hijo Menor 18 años',78833.08,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL);
INSERT INTO `ganan_deducciones` VALUES (126,NULL,2021,0,1,'Ganancia No Imponible',167678.40,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(127,NULL,2021,0,1,'Deduccion Especial',804856.34,1,'2022-10-09 18:43:05','2022-10-09 18:43:05',NULL),(128,NULL,2022,1,0,'Primas de seguro para el caso de muerte',24000.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(129,NULL,2022,1,0,'Gastos de Sepelio',996.23,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(130,NULL,2022,1,0,'Aportes a Obras Sociales',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(131,NULL,2022,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(132,NULL,2022,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(133,NULL,2022,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(134,NULL,2022,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(135,NULL,2022,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(136,NULL,2022,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(137,NULL,2022,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(138,NULL,2022,1,0,'Servicio Doméstico',252564.84,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(139,NULL,2022,1,0,'Donaciones',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(140,NULL,2022,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(141,NULL,2022,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(142,NULL,2022,1,0,'Alquileres',252564.84,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(143,NULL,2022,0,1,'Conyuge',235457.25,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(144,NULL,2022,0,1,'Hijo Menor 18 años',118741.97,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(145,NULL,2022,0,1,'Ganancia No Imponible',252564.84,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(146,NULL,2022,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 2]',1212311.24,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(147,NULL,2022,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1]',505129.68,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(148,NULL,2022,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1 “nuevos profesionales/emprendedores”]',631412.10,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(149,NULL,2022,0,1,'Hijo Incapacitado',237483.94,1,'2022-10-09 18:43:11','2022-10-09 18:43:11',NULL),(150,NULL,2021,1,0,'Alquileres',167678.40,1,NULL,NULL,NULL),(151,NULL,2023,1,0,'Primas de seguro para el caso de muerte',24000.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(152,NULL,2023,1,0,'Aportes a Obras Sociales',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(153,NULL,2023,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(154,NULL,2023,1,0,'Gastos de Sepelio',996.23,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(155,NULL,2023,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL);
INSERT INTO `ganan_deducciones` VALUES (156,NULL,2023,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(157,NULL,2023,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(158,NULL,2023,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(159,NULL,2023,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(160,NULL,2023,1,0,'Intereses Crédito Hipotecario',20000.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(161,NULL,2023,1,0,'Servicio Doméstico',451686.96,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(162,NULL,2023,1,0,'Donaciones',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(163,NULL,2023,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(164,NULL,2023,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(165,NULL,2023,1,0,'Alquileres',451686.96,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(166,NULL,2023,0,1,'Ganancia No Imponible',451686.96,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(167,NULL,2023,0,1,'Conyuge',421091.75,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(168,NULL,2023,0,1,'Hijo Menor 18 años',212358.14,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(169,NULL,2023,0,1,'Hijo Incapacitado',424716.28,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(170,NULL,2023,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1]',1580904.36,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(171,NULL,2023,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1 “nuevos profesionales/emprendedores”]',1806747.84,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(172,NULL,2023,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 2]',2168097.42,1,'2022-12-28 17:49:25','2022-12-28 17:49:25',NULL),(173,NULL,2024,1,0,'Primas de seguro para el caso de muerte',195845.39,1,NULL,NULL,NULL),(174,NULL,2024,1,0,'Aportes a Obras Sociales',0.00,1,NULL,NULL,NULL),(175,NULL,2024,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,NULL,NULL,NULL),(176,NULL,2024,1,0,'Gastos de Sepelio',996.23,1,NULL,NULL,NULL),(177,NULL,2024,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,NULL,NULL,NULL),(178,NULL,2024,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,NULL,NULL,NULL),(179,NULL,2024,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,NULL,NULL,NULL),(180,NULL,2024,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,NULL,NULL,NULL),(181,NULL,2024,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,NULL,NULL,NULL),(182,NULL,2024,1,0,'Intereses Crédito Hipotecario',20000.00,1,NULL,NULL,NULL),(183,NULL,2024,1,0,'Servicio Doméstico',3503688.17,1,NULL,NULL,NULL),(184,NULL,2024,1,0,'Donaciones',0.00,1,NULL,NULL,NULL),(185,NULL,2024,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,NULL,NULL,NULL),(186,NULL,2024,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,NULL,NULL,NULL),(187,NULL,2024,1,0,'Alquileres',3503688.17,1,NULL,NULL,NULL),(188,NULL,2024,1,0,'Servicios o Herramientas con Fines Educativos',1401475.27,1,NULL,NULL,NULL),(189,NULL,2024,1,0,'Primas Riesgo de Muertes y Ahorros',195845.39,1,NULL,NULL,NULL),(190,NULL,2024,1,0,'Aportes Planes Seguro Retiro Privado',195845.39,1,NULL,NULL,NULL),(191,NULL,2024,1,0,'Aportes a Sociedades de Garantias Reciprocas',0.00,1,NULL,NULL,NULL);
INSERT INTO `ganan_deducciones` VALUES (192,NULL,2024,0,1,'Ganancia No Imponible',3503688.17,1,NULL,NULL,NULL),(193,NULL,2024,0,1,'Conyuge',3299771.52,1,NULL,NULL,NULL),(194,NULL,2024,0,1,'Hijo Menor 18 años',1664086.82,1,NULL,NULL,NULL),(195,NULL,2024,0,1,'Hijo Incapacitado',3328173.63,1,NULL,NULL,NULL),(196,NULL,2024,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1]',12262908.60,1,NULL,NULL,NULL),(197,NULL,2024,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1 “nuevos profesionales/emprendedores”]',14014752.69,1,NULL,NULL,NULL),(198,NULL,2024,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 2]',16817703.23,1,NULL,NULL,NULL),(199,NULL,2025,1,0,'Primas de seguro para el caso de muerte',195845.39,1,NULL,NULL,NULL),(200,NULL,2025,1,0,'Aportes a Obras Sociales',0.00,1,NULL,NULL,NULL),(201,NULL,2025,1,0,'Aportes obligatorios a Fondos de jubilaciones, retiros, pensiones o subsidios a cajas nacionales, provinciales o municipales- incluidas las Cajas de Previsión para Profesionales.',0.00,1,NULL,NULL,NULL),(202,NULL,2025,1,0,'Gastos de Sepelio',996.23,1,NULL,NULL,NULL),(203,NULL,2025,1,0,'Otras deducciones del Anexo III de la RG 2437: Aportes para fondos de Jubilación, Retiros, Pensiones o Subsidios destinados al ANSES',0.00,1,NULL,NULL,NULL),(204,NULL,2025,1,0,'Aportes a Cajas Provinciales o Municipales o de Previsión para Profesionales',0.00,1,NULL,NULL,NULL),(205,NULL,2025,1,0,'Pagos Régimen Nacional de Trabajadores Autónomos',0.00,1,NULL,NULL,NULL),(206,NULL,2025,1,0,'Aportes a Cajas Complementarias de Previsión',0.00,1,NULL,NULL,NULL),(207,NULL,2025,1,0,'Aportes a Fondos Compensadores de Previsión',0.00,1,NULL,NULL,NULL),(208,NULL,2025,1,0,'Intereses Crédito Hipotecario',20000.00,1,NULL,NULL,NULL),(209,NULL,2025,1,0,'Servicio Doméstico',3916268.37,1,NULL,NULL,NULL),(210,NULL,2025,1,0,'Donaciones',0.00,1,NULL,NULL,NULL),(211,NULL,2025,1,0,'Cuota médico asistencial abonado por usted y por sus familiares a cargo',0.00,1,NULL,NULL,NULL),(212,NULL,2025,1,0,'Honorarios Correspondientes a los Servicios de asistencia Sanitaria, Médica y Paramédica',0.00,1,NULL,NULL,NULL),(213,NULL,2025,1,0,'Alquileres',3916268.37,1,NULL,NULL,NULL),(214,NULL,2025,1,0,'Servicios o Herramientas con Fines Educativos',1566507.35,1,NULL,NULL,NULL),(215,NULL,2025,1,0,'Primas Riesgo de Muertes y Ahorros',195845.39,1,NULL,NULL,NULL),(216,NULL,2025,1,0,'Aportes Planes Seguro Retiro Privado',195845.39,1,NULL,NULL,NULL),(217,NULL,2025,1,0,'Aportes a Sociedades de Garantias Reciprocas',0.00,1,NULL,NULL,NULL),(218,NULL,2025,0,1,'Ganancia No Imponible',3916268.37,1,NULL,NULL,NULL),(219,NULL,2025,0,1,'Conyuge',3688339.32,1,NULL,NULL,NULL),(220,NULL,2025,0,1,'Hijo Menor 18 años',1860042.98,1,NULL,NULL,NULL),(221,NULL,2025,0,1,'Hijo Incapacitado',3720085.95,1,NULL,NULL,NULL),(222,NULL,2025,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1]',13706939.31,1,NULL,NULL,NULL),(223,NULL,2025,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 1 “nuevos profesionales/emprendedores”]',15665073.50,1,NULL,NULL,NULL),(224,NULL,2025,0,1,'Deducción Especial [Artículo 30, inciso c), Apartado 2]',18798088.20,1,NULL,NULL,NULL);

--
-- Table structure for table `ganan_tipos_op`
--

CREATE TABLE `ganan_tipos_op` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ganan_tipos_op`
--

INSERT INTO `ganan_tipos_op` VALUES (1,NULL,'Gravado',1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL),(2,NULL,'Exento',1,'2019-11-15 13:24:28','2019-11-15 13:24:28',NULL);

--
-- Table structure for table `horas_calculadas`
--

CREATE TABLE `horas_calculadas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `syj_empleado_id` int(10) unsigned NOT NULL,
  `fecha` date NOT NULL,
  `horas_fichaje` decimal(8,2) NOT NULL DEFAULT '0.00',
  `horas_normales` decimal(8,2) NOT NULL DEFAULT '0.00',
  `horas_50` decimal(8,2) NOT NULL DEFAULT '0.00',
  `horas_100` decimal(8,2) NOT NULL DEFAULT '0.00',
  `horas_prod` decimal(8,2) NOT NULL DEFAULT '0.00',
  `horas_improd` decimal(8,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `horas_calculadas_syj_empleado_id_foreign` (`syj_empleado_id`),
  CONSTRAINT `horas_calculadas_syj_empleado_id_foreign` FOREIGN KEY (`syj_empleado_id`) REFERENCES `syj_empleados` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `horas_calculadas`
--


--
-- Table structure for table `horas_calculadas_details`
--

CREATE TABLE `horas_calculadas_details` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `horas_calculada_id` bigint(20) unsigned NOT NULL,
  `inv_orden_trabajo_hora_id` bigint(20) unsigned DEFAULT NULL,
  `horas_productiva_id` bigint(20) unsigned NOT NULL,
  `horas_prod` decimal(16,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `horas_calculadas_details_horas_calculada_id_foreign` (`horas_calculada_id`),
  KEY `horas_calculadas_details_horas_productiva_id_foreign` (`horas_productiva_id`),
  KEY `horas_calculadas_details_inv_orden_trabajo_hora_id_foreign` (`inv_orden_trabajo_hora_id`),
  CONSTRAINT `horas_calculadas_details_horas_calculada_id_foreign` FOREIGN KEY (`horas_calculada_id`) REFERENCES `horas_calculadas` (`id`),
  CONSTRAINT `horas_calculadas_details_horas_productiva_id_foreign` FOREIGN KEY (`horas_productiva_id`) REFERENCES `horas_productivas` (`id`),
  CONSTRAINT `horas_calculadas_details_inv_orden_trabajo_hora_id_foreign` FOREIGN KEY (`inv_orden_trabajo_hora_id`) REFERENCES `inv_orden_trabajo_horas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `horas_calculadas_details`
--


--
-- Table structure for table `horas_definicion`
--

CREATE TABLE `horas_definicion` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `fecha` date NOT NULL,
  `horas_normales_inicio` time DEFAULT NULL,
  `horas_normales_fin` time DEFAULT NULL,
  `horas_50_inicio` time DEFAULT NULL,
  `horas_50_fin` time DEFAULT NULL,
  `horas_100_inicio` time DEFAULT NULL,
  `horas_100_fin` time DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `horas_definicion_person_id_foreign` (`person_id`),
  CONSTRAINT `horas_definicion_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `horas_definicion`
--


--
-- Table structure for table `horas_fichajes`
--

CREATE TABLE `horas_fichajes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `syj_empleado_id` int(10) unsigned NOT NULL,
  `fecha` date NOT NULL,
  `fecha_y_hora` datetime DEFAULT NULL,
  `terminal` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `codigo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `jornada` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `retraso` time DEFAULT NULL,
  `hs_50` time DEFAULT NULL,
  `hs_100` time DEFAULT NULL,
  `feriados` time DEFAULT NULL,
  `comentario` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `horas_fichajes_person_id_foreign` (`person_id`),
  KEY `horas_fichajes_syj_empleado_id_foreign` (`syj_empleado_id`),
  CONSTRAINT `horas_fichajes_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `horas_fichajes_syj_empleado_id_foreign` FOREIGN KEY (`syj_empleado_id`) REFERENCES `syj_empleados` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `horas_fichajes`
--


--
-- Table structure for table `horas_productivas`
--

CREATE TABLE `horas_productivas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `ot_id` bigint(20) unsigned NOT NULL,
  `syj_empleado_id` int(10) unsigned NOT NULL,
  `fecha_y_hora` datetime NOT NULL,
  `fecha_hora_start` datetime NOT NULL,
  `fecha_hora_end` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `horas_productivas_syj_empleado_id_foreign` (`syj_empleado_id`),
  KEY `horas_productivas_ot_id_foreign` (`ot_id`),
  CONSTRAINT `horas_productivas_ot_id_foreign` FOREIGN KEY (`ot_id`) REFERENCES `inv_orden_trabajos` (`id`),
  CONSTRAINT `horas_productivas_syj_empleado_id_foreign` FOREIGN KEY (`syj_empleado_id`) REFERENCES `syj_empleados` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `horas_productivas`
--


--
-- Table structure for table `iibb_perceptions`
--

CREATE TABLE `iibb_perceptions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `iibb_perceptions`
--

INSERT INTO `iibb_perceptions` VALUES (1,NULL,NULL,NULL,'IIBB CABA','IIBBCABA'),(2,NULL,NULL,NULL,'IIBB Bs. As.','IIBBBSAS'),(3,NULL,NULL,NULL,'Percepcion IIBB Tucuman','IIBBTucuman'),(4,NULL,NULL,NULL,'Perc IIBB Misiones','IIBBMisiones'),(5,NULL,NULL,NULL,'Perc IIBB Cordoba','IIBBCba'),(6,NULL,NULL,NULL,'Pec IIBB La Pampa','IIBB La Pampa'),(7,NULL,NULL,NULL,'Perc IIBB Rio Negro','IIBB Rio Negro'),(8,NULL,NULL,NULL,'Perc IIBB Corrientes','IIIBB Corrientes'),(9,NULL,NULL,NULL,'Perc IIBB Santiago del Estero','IIBBSantiago');

--
-- Table structure for table `inv_combos`
--

CREATE TABLE `inv_combos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `inv_product_combo_id` bigint(20) unsigned NOT NULL,
  `inv_product_id` bigint(20) unsigned NOT NULL,
  `cantidades` int(11) NOT NULL,
  `codigo_interno` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_combos_inv_product_combo_id_foreign` (`inv_product_combo_id`),
  KEY `inv_combos_inv_product_id_foreign` (`inv_product_id`),
  CONSTRAINT `inv_combos_inv_product_combo_id_foreign` FOREIGN KEY (`inv_product_combo_id`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `inv_combos_inv_product_id_foreign` FOREIGN KEY (`inv_product_id`) REFERENCES `inv_productos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_combos`
--


--
-- Table structure for table `inv_control_stock`
--

CREATE TABLE `inv_control_stock` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `person_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 (`id`),
  KEY `inv_control_stock_person_id_foreign` (`person_id`),
  CONSTRAINT `inv_control_stock_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_control_stock`
--


--
-- Table structure for table `inv_control_stock_detail`
--

CREATE TABLE `inv_control_stock_detail` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `inv_control_stock_id` bigint(20) unsigned NOT NULL,
  `inv_product_id` bigint(20) unsigned NOT NULL,
  `inv_deposito_id` bigint(20) unsigned DEFAULT NULL,
  `stock_actual` decimal(16,2) NOT NULL DEFAULT '0.00',
  `stock_real` decimal(16,2) NOT NULL DEFAULT '0.00',
  `stock_diferencia` decimal(16,2) NOT NULL DEFAULT '0.00',
  `precio_costo` decimal(16,2) NOT NULL DEFAULT '0.00',
  `precio_diferencia` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_control_stock_detail_person_id_foreign` (`person_id`),
  KEY `inv_control_stock_detail_inv_control_stock_id_foreign` (`inv_control_stock_id`),
  KEY `inv_control_stock_detail_inv_product_id_foreign` (`inv_product_id`),
  KEY `inv_control_stock_detail_inv_deposito_id_foreign` (`inv_deposito_id`),
  CONSTRAINT `inv_control_stock_detail_inv_control_stock_id_foreign` FOREIGN KEY (`inv_control_stock_id`) REFERENCES `inv_control_stock` (`id`),
  CONSTRAINT `inv_control_stock_detail_inv_deposito_id_foreign` FOREIGN KEY (`inv_deposito_id`) REFERENCES `inv_depositos` (`id`),
  CONSTRAINT `inv_control_stock_detail_inv_product_id_foreign` FOREIGN KEY (`inv_product_id`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `inv_control_stock_detail_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_control_stock_detail`
--


--
-- Table structure for table `inv_depositos`
--

CREATE TABLE `inv_depositos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) NOT NULL DEFAULT '1',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_depositos_person_id_foreign` (`person_id`),
  CONSTRAINT `inv_depositos_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_depositos`
--


--
-- Table structure for table `inv_descarga_details`
--

CREATE TABLE `inv_descarga_details` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `inv_descarga_id` bigint(20) unsigned DEFAULT NULL,
  `inv_producto_id` bigint(20) unsigned DEFAULT NULL,
  `inv_deposito_id` bigint(20) unsigned DEFAULT NULL,
  `cantidades` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_descarga_details_person_id_foreign` (`person_id`),
  KEY `inv_descarga_details_inv_producto_id_foreign` (`inv_producto_id`),
  KEY `inv_descarga_details_inv_descarga_id_foreign` (`inv_descarga_id`),
  KEY `inv_descarga_details_inv_deposito_id_foreign` (`inv_deposito_id`),
  CONSTRAINT `inv_descarga_details_inv_deposito_id_foreign` FOREIGN KEY (`inv_deposito_id`) REFERENCES `inv_depositos` (`id`),
  CONSTRAINT `inv_descarga_details_inv_descarga_id_foreign` FOREIGN KEY (`inv_descarga_id`) REFERENCES `inv_descargas` (`id`),
  CONSTRAINT `inv_descarga_details_inv_producto_id_foreign` FOREIGN KEY (`inv_producto_id`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `inv_descarga_details_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_descarga_details`
--


--
-- Table structure for table `inv_descargas`
--

CREATE TABLE `inv_descargas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `inv_orden_trabajo_gastos_tipo_id` bigint(20) unsigned DEFAULT NULL,
  `syj_empleado_id` int(10) unsigned DEFAULT NULL,
  `comentario` text COLLATE utf8mb4_unicode_ci,
  `fecha` datetime NOT NULL DEFAULT '2023-03-15 23:48:58',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_descargas_person_id_foreign` (`person_id`),
  KEY `inv_descargas_inv_orden_trabajo_gastos_tipo_id_foreign` (`inv_orden_trabajo_gastos_tipo_id`),
  KEY `inv_descargas_syj_empleado_id_foreign` (`syj_empleado_id`),
  CONSTRAINT `inv_descargas_inv_orden_trabajo_gastos_tipo_id_foreign` FOREIGN KEY (`inv_orden_trabajo_gastos_tipo_id`) REFERENCES `inv_orden_trabajo_gastos_tipos` (`id`),
  CONSTRAINT `inv_descargas_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `inv_descargas_syj_empleado_id_foreign` FOREIGN KEY (`syj_empleado_id`) REFERENCES `syj_empleados` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_descargas`
--


--
-- Table structure for table `inv_indicadores`
--

CREATE TABLE `inv_indicadores` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `metodo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tipo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `orden` int(10) unsigned NOT NULL,
  `habilitado` tinyint(1) 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`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_indicadores`
--

INSERT INTO `inv_indicadores` VALUES (1,NULL,'Datos Grales','datos_grales','card_info',5,1,NULL,'2022-10-09 18:43:17',NULL),(2,NULL,'Impuestos Asociados','impuestos_asociados','card_info',6,1,NULL,'2022-10-09 18:43:17',NULL),(3,NULL,'Informacion de Liquidacion','informacion_de_liquidacion','card_info',7,1,NULL,'2022-10-09 18:43:17',NULL),(4,NULL,'Cantidad Ventas del Mes','cantidad_ventas_del_mes','card',1,1,NULL,'2022-10-09 18:43:17',NULL),(5,NULL,'Total Facturado En El Mes','total_facturado_en_el_mes','card',2,1,NULL,'2022-10-09 18:43:17',NULL),(6,NULL,'Total Facturado En El Dia','total_facturado_en_el_dia','card',3,1,NULL,'2022-10-09 18:43:17',NULL),(7,NULL,'Total Facturado En El Año','total_facturado_en_el_anio','card',4,1,NULL,'2022-10-09 18:43:17',NULL),(8,NULL,'Facturacion Mensual','facturacion_mensual','grafico',8,1,NULL,'2022-10-09 18:43:17',NULL),(9,NULL,'Proyeccion de Ganancias','proyeccion_de_ganancias','tabla',9,1,NULL,'2022-10-09 18:43:17',NULL),(10,NULL,'Posicion IVA','posicion_de_iva','tabla',10,1,NULL,'2022-10-09 18:43:17',NULL);

--
-- Table structure for table `inv_indicadores_persons`
--

CREATE TABLE `inv_indicadores_persons` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `inv_indicador_id` bigint(20) unsigned NOT NULL,
  `objetivo` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_indicadores_persons_person_id_foreign` (`person_id`),
  KEY `inv_indicadores_persons_inv_indicador_id_foreign` (`inv_indicador_id`),
  CONSTRAINT `inv_indicadores_persons_inv_indicador_id_foreign` FOREIGN KEY (`inv_indicador_id`) REFERENCES `inv_indicadores` (`id`),
  CONSTRAINT `inv_indicadores_persons_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_indicadores_persons`
--

INSERT INTO `inv_indicadores_persons` VALUES (1,NULL,40719,4,0.00,NULL,'2022-11-22 18:25:56','2022-11-22 18:25:56'),(2,NULL,40719,4,0.00,NULL,'2022-12-12 10:46:03','2022-12-12 10:46:03'),(3,NULL,40719,9,0.00,NULL,'2022-12-12 10:46:03','2022-12-12 10:46:03'),(4,NULL,40719,9,0.00,NULL,'2023-01-27 10:25:34','2023-01-27 10:25:34'),(5,NULL,40724,9,0.00,NULL,'2023-02-23 09:29:02','2023-02-23 09:29:02'),(6,NULL,40719,2,0.00,NULL,'2023-10-10 10:36:28','2023-10-10 10:36:28'),(7,NULL,40724,8,0.00,NULL,NULL,NULL),(8,NULL,40719,10,0.00,NULL,'2023-10-10 10:39:20','2023-10-10 10:39:20'),(9,NULL,40793,7,0.00,NULL,'2024-01-09 12:23:43','2024-01-09 12:23:43');

--
-- Table structure for table `inv_ing_egr_stock`
--

CREATE TABLE `inv_ing_egr_stock` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `person_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 (`id`),
  KEY `inv_ing_egr_stock_person_id_foreign` (`person_id`),
  CONSTRAINT `inv_ing_egr_stock_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_ing_egr_stock`
--


--
-- Table structure for table `inv_ing_egr_stock_detail`
--

CREATE TABLE `inv_ing_egr_stock_detail` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `inv_ing_egr_stock_id` bigint(20) unsigned NOT NULL,
  `inv_product_id` bigint(20) unsigned NOT NULL,
  `prod_variant_id` bigint(20) unsigned DEFAULT NULL,
  `inv_deposito_id` bigint(20) unsigned DEFAULT NULL,
  `sumar1_restar0` tinyint(1) NOT NULL DEFAULT '1',
  `cantidades` decimal(16,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_ing_egr_stock_detail_person_id_foreign` (`person_id`),
  KEY `inv_ing_egr_stock_detail_inv_ing_egr_stock_id_foreign` (`inv_ing_egr_stock_id`),
  KEY `inv_ing_egr_stock_detail_inv_product_id_foreign` (`inv_product_id`),
  KEY `inv_ing_egr_stock_detail_inv_deposito_id_foreign` (`inv_deposito_id`),
  KEY `inv_ing_egr_stock_detail_prod_variant_id_foreign` (`prod_variant_id`),
  CONSTRAINT `inv_ing_egr_stock_detail_inv_deposito_id_foreign` FOREIGN KEY (`inv_deposito_id`) REFERENCES `inv_depositos` (`id`),
  CONSTRAINT `inv_ing_egr_stock_detail_inv_ing_egr_stock_id_foreign` FOREIGN KEY (`inv_ing_egr_stock_id`) REFERENCES `inv_ing_egr_stock` (`id`),
  CONSTRAINT `inv_ing_egr_stock_detail_inv_product_id_foreign` FOREIGN KEY (`inv_product_id`) REFERENCES `inv_productos` (`id`),
  CONSTRAINT `inv_ing_egr_stock_detail_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `inv_ing_egr_stock_detail_prod_variant_id_foreign` FOREIGN KEY (`prod_variant_id`) REFERENCES `prod_variants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_ing_egr_stock_detail`
--


--
-- Table structure for table `inv_lista_de_precios`
--

CREATE TABLE `inv_lista_de_precios` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cliente_id` int(10) unsigned DEFAULT NULL COMMENT 'Cliente específico al que aplica la lista (opcional)',
  `descuento_general` decimal(10,2) DEFAULT NULL COMMENT 'Porcentaje de descuento general para todos los productos',
  `incremento_general` decimal(10,2) DEFAULT NULL COMMENT 'Porcentaje de incremento general para todos los productos',
  `aplicar_redondeo` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Si se debe aplicar redondeo al precio calculado',
  `redondeo_a` decimal(10,2) DEFAULT NULL COMMENT 'Múltiplo al cual redondear el precio (ej: 10, 50, 100)',
  `fecha_desde` date DEFAULT NULL COMMENT 'Fecha de inicio de vigencia',
  `fecha_hasta` date DEFAULT NULL COMMENT 'Fecha de fin de vigencia',
  `habilitado` tinyint(1) 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 `inv_lista_de_precios_person_id_foreign` (`person_id`),
  KEY `inv_lista_de_precios_cliente_id_index` (`cliente_id`),
  KEY `inv_lista_de_precios_fecha_desde_index` (`fecha_desde`),
  KEY `inv_lista_de_precios_fecha_hasta_index` (`fecha_hasta`),
  CONSTRAINT `inv_lista_de_precios_cliente_id_foreign` FOREIGN KEY (`cliente_id`) REFERENCES `persons` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inv_lista_de_precios_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_lista_de_precios`
--


--
-- Table structure for table `inv_lista_de_precios_productos`
--

CREATE TABLE `inv_lista_de_precios_productos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `inv_lista_de_precio_id` bigint(20) unsigned NOT NULL,
  `inv_producto_id` bigint(20) unsigned NOT NULL,
  `precio_sin_iva` decimal(15,2) DEFAULT NULL COMMENT 'Override del precio sin IVA (si es null, se calcula desde precio base)',
  `precio_final` decimal(15,2) DEFAULT NULL COMMENT 'Override del precio final (si es null, se calcula desde precio base)',
  `descuento_porcentaje` decimal(10,2) DEFAULT NULL COMMENT 'Porcentaje de descuento sobre precio base del producto',
  `incremento_porcentaje` decimal(10,2) DEFAULT NULL COMMENT 'Porcentaje de incremento sobre precio base del producto',
  `margen` decimal(10,2) DEFAULT NULL COMMENT 'Override del margen para recalcular precio',
  `habilitado` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_lista_producto` (`inv_lista_de_precio_id`,`inv_producto_id`),
  KEY `inv_lista_de_precios_productos_habilitado_index` (`habilitado`),
  KEY `inv_lista_de_precios_productos_inv_producto_id_habilitado_index` (`inv_producto_id`,`habilitado`),
  CONSTRAINT `inv_lista_de_precios_productos_inv_lista_de_precio_id_foreign` FOREIGN KEY (`inv_lista_de_precio_id`) REFERENCES `inv_lista_de_precios` (`id`) ON DELETE CASCADE,
  CONSTRAINT `inv_lista_de_precios_productos_inv_producto_id_foreign` FOREIGN KEY (`inv_producto_id`) REFERENCES `inv_productos` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_lista_de_precios_productos`
--


--
-- Table structure for table `inv_orden_trabajo_clasificacion`
--

CREATE TABLE `inv_orden_trabajo_clasificacion` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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 `inv_orden_trabajo_clasificacion_person_id_foreign` (`person_id`),
  CONSTRAINT `inv_orden_trabajo_clasificacion_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_orden_trabajo_clasificacion`
--


--
-- Table structure for table `inv_orden_trabajo_config_cc`
--

CREATE TABLE `inv_orden_trabajo_config_cc` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `horas_conta_plan_cuenta_id` int(10) unsigned NOT NULL,
  `horas_contra_conta_plan_cuenta_id` int(10) unsigned NOT NULL,
  `gastos_conta_plan_cuenta_id` int(10) unsigned NOT NULL,
  `gastos_contra_conta_plan_cuenta_id` int(10) unsigned NOT NULL,
  `productos_conta_plan_cuenta_id` int(10) unsigned NOT NULL,
  `productos_contra_conta_plan_cuenta_id` int(10) unsigned NOT NULL,
  `asiento_horas_cpc_id` int(10) unsigned NOT NULL DEFAULT '217',
  `asiento_contra_horas_cpc_id` int(10) unsigned NOT NULL DEFAULT '217',
  `asiento_gastos_cpc_id` int(10) unsigned NOT NULL DEFAULT '217',
  `asiento_contra_gastos_cpc_id` int(10) unsigned NOT NULL DEFAULT '217',
  `asiento_productos_cpc_id` int(10) unsigned NOT NULL DEFAULT '217',
  `asiento_contra_productos_cpc_id` int(10) unsigned NOT NULL DEFAULT '217',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_orden_trabajo_config_cc_person_id_foreign` (`person_id`),
  KEY `hcc_id_foreign` (`horas_conta_plan_cuenta_id`),
  KEY `gcc_id_foreign` (`gastos_conta_plan_cuenta_id`),
  KEY `pcc_id_foreign` (`productos_conta_plan_cuenta_id`),
  KEY `h_contra_cc_id_foreign` (`horas_contra_conta_plan_cuenta_id`),
  KEY `g_contra_cc_id_foreign` (`gastos_contra_conta_plan_cuenta_id`),
  KEY `p_contra_cc_id_foreign` (`productos_contra_conta_plan_cuenta_id`),
  KEY `ahcc_id_foreign` (`asiento_horas_cpc_id`),
  KEY `agcc_id_foreign` (`asiento_gastos_cpc_id`),
  KEY `apcc_id_foreign` (`asiento_productos_cpc_id`),
  KEY `ah_contra_cc_id_foreign` (`asiento_contra_horas_cpc_id`),
  KEY `ag_contra_cc_id_foreign` (`asiento_contra_gastos_cpc_id`),
  KEY `ap_contra_cc_id_foreign` (`asiento_contra_productos_cpc_id`),
  CONSTRAINT `ag_contra_cc_id_foreign` FOREIGN KEY (`asiento_contra_gastos_cpc_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `agcc_id_foreign` FOREIGN KEY (`asiento_gastos_cpc_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `ah_contra_cc_id_foreign` FOREIGN KEY (`asiento_contra_horas_cpc_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `ahcc_id_foreign` FOREIGN KEY (`asiento_horas_cpc_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `ap_contra_cc_id_foreign` FOREIGN KEY (`asiento_contra_productos_cpc_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `apcc_id_foreign` FOREIGN KEY (`asiento_productos_cpc_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `g_contra_cc_id_foreign` FOREIGN KEY (`gastos_contra_conta_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `gcc_id_foreign` FOREIGN KEY (`gastos_conta_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `h_contra_cc_id_foreign` FOREIGN KEY (`horas_contra_conta_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `hcc_id_foreign` FOREIGN KEY (`horas_conta_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `inv_orden_trabajo_config_cc_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `p_contra_cc_id_foreign` FOREIGN KEY (`productos_contra_conta_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`),
  CONSTRAINT `pcc_id_foreign` FOREIGN KEY (`productos_conta_plan_cuenta_id`) REFERENCES `conta_plan_cuenta` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_orden_trabajo_config_cc`
--


--
-- Table structure for table `inv_orden_trabajo_files`
--

CREATE TABLE `inv_orden_trabajo_files` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `inv_orden_trabajo_id` bigint(20) unsigned DEFAULT NULL,
  `path` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_name` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_orden_trabajo_files_inv_orden_trabajo_id_foreign` (`inv_orden_trabajo_id`),
  CONSTRAINT `inv_orden_trabajo_files_inv_orden_trabajo_id_foreign` FOREIGN KEY (`inv_orden_trabajo_id`) REFERENCES `inv_orden_trabajos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_orden_trabajo_files`
--


--
-- Table structure for table `inv_orden_trabajo_gastos`
--

CREATE TABLE `inv_orden_trabajo_gastos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `inv_orden_trabajo_id` bigint(20) unsigned DEFAULT NULL,
  `inv_orden_trabajo_gastos_tipo_id` bigint(20) unsigned DEFAULT NULL,
  `person_id_relationed` int(10) unsigned DEFAULT NULL,
  `receipt_id` int(10) unsigned DEFAULT NULL,
  `fecha` datetime NOT NULL DEFAULT '2022-10-09 18:43:13',
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `total` decimal(16,2) NOT NULL DEFAULT '0.00',
  `comentario` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_orden_trabajo_gastos_person_id_foreign` (`person_id`),
  KEY `inv_orden_trabajo_gastos_person_id_relationed_foreign` (`person_id_relationed`),
  KEY `inv_orden_trabajo_gastos_receipt_id_foreign` (`receipt_id`),
  KEY `i_o_t_g_t_id_foreign` (`inv_orden_trabajo_gastos_tipo_id`),
  KEY `inv_orden_trabajo_gastos_inv_orden_trabajo_id_foreign` (`inv_orden_trabajo_id`),
  CONSTRAINT `i_o_t_g_t_id_foreign` FOREIGN KEY (`inv_orden_trabajo_gastos_tipo_id`) REFERENCES `inv_orden_trabajo_gastos_tipos` (`id`),
  CONSTRAINT `inv_orden_trabajo_gastos_inv_orden_trabajo_id_foreign` FOREIGN KEY (`inv_orden_trabajo_id`) REFERENCES `inv_orden_trabajos` (`id`),
  CONSTRAINT `inv_orden_trabajo_gastos_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `inv_orden_trabajo_gastos_person_id_relationed_foreign` FOREIGN KEY (`person_id_relationed`) REFERENCES `persons` (`id`),
  CONSTRAINT `inv_orden_trabajo_gastos_receipt_id_foreign` FOREIGN KEY (`receipt_id`) REFERENCES `receipts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_orden_trabajo_gastos`
--


--
-- Table structure for table `inv_orden_trabajo_gastos_tipos`
--

CREATE TABLE `inv_orden_trabajo_gastos_tipos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `person_id` int(10) unsigned NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `habilitado` tinyint(1) 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 `inv_orden_trabajo_gastos_tipos_person_id_foreign` (`person_id`),
  CONSTRAINT `inv_orden_trabajo_gastos_tipos_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inv_orden_trabajo_gastos_tipos`
--


--
-- Table structure for table `inv_orden_trabajo_horas`
--

CREATE TABLE `inv_orden_trabajo_horas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `fecha` datetime NOT NULL DEFAULT '2023-08-15 23:35:45',
  `person_id` int(10) unsigned NOT NULL,
  `inv_orden_trabajo_id` bigint(20) unsigned DEFAULT NULL,
  `inv_orden_trabajo_horas_tipo_id` bigint(20) unsigned DEFAULT NULL,
  `inv_ot_hora_disponible_id` bigint(20) unsigned NOT NULL,
  `cantidad` decimal(16,2) NOT NULL DEFAULT '0.00',
  `importe` decimal(16,2) NOT NULL DEFAULT '0.00',
  `total` decimal(16,2) NOT NULL DEFAULT '0.00',
  `comentario` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inv_orden_trabajo_horas_person_id_foreign` (`person_id`),
  KEY `inv_orden_trabajo_horas_inv_orden_trabajo_horas_tipo_id_foreign` (`inv_orden_trabajo_horas_tipo_id`),
  KEY `inv_orden_trabajo_horas_inv_orden_trabajo_id_foreign` (`inv_orden_trabajo_id`),
  KEY `inv_orden_trabajo_horas_inv_ot_hora_disponible_id_foreign` (`inv_ot_hora_disponible_id`),
  CONSTRAINT `inv_orden_trabajo_horas_inv_orden_trabajo_horas_tipo_id_foreign` FOREIGN KEY (`inv_orden_trabajo_horas_tipo_id`) REFERENCES `inv_orden_trabajo_horas_tipos` (`id`),
  CONSTRAINT `inv_orden_trabajo_horas_inv_orden_trabajo_id_foreign` FOREIGN KEY (`inv_orden_trabajo_id`) REFERENCES `inv_orden_trabajos` (`id`),
  CONSTRAINT `inv_orden_trabajo_horas_inv_ot_hora_disponible_id_foreign` FOREIGN KEY (`inv_ot_hora_disponible_id`) REFERENCES `inv_orden_trabajo_horas_disponibles` (`id`),
  CONSTRAINT `inv_orden_trabajo_horas_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `persons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
