(102,1,'aa40973f-534c-447d-ab13-d46d8ab0ae3b',1,'{\"country_id\":\"PE\",\"country\":{\"id\":\"PE\",\"description\":\"PERU\"},\"department_id\":\"01\",\"department\":{\"id\":\"01\",\"description\":\"AMAZONAS\"},\"province_id\":\"0107\",\"province\":{\"id\":\"0107\",\"description\":\"Utcubamba\"},\"district_id\":\"010701\",\"district\":{\"id\":\"010701\",\"description\":\"Bagua Grande\"},\"urbanization\":null,\"address\":\"Jr. Jorge chavez N\\u00b0 340\",\"email\":\"asia@softlte.net.pe\",\"telephone\":\"976 656 837\",\"code\":\"0000\",\"trade_address\":null,\"web_address\":null,\"aditional_information\":null,\"logo\":null}','02','05','2.1',1,0,'02','03','B001',27,'2023-02-24','20:10:39',8,'{\"identity_document_type_id\":\"1\",\"identity_document_type\":{\"id\":\"1\",\"description\":\"DNI\"},\"number\":\"33665805\",\"name\":\"DIAZ IRIGOIN, BENIGNO ROMAN\",\"trade_name\":null,\"country_id\":\"PE\",\"country\":{\"id\":\"PE\",\"description\":\"PERU\"},\"department_id\":\"01\",\"department\":{\"id\":\"01\",\"description\":\"AMAZONAS\"},\"province_id\":\"0107\",\"province\":{\"id\":\"0107\",\"description\":\"Utcubamba\"},\"district_id\":\"010701\",\"district\":{\"id\":\"010701\",\"description\":\"Bagua Grande\"},\"address\":\"JR.BELEN 249\",\"email\":null,\"telephone\":null,\"perception_agent\":false,\"address_id\":null,\"internal_code\":null,\"address_type_id\":null,\"address_type\":{\"id\":null,\"description\":null}}','PEN','01',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1.000,0,NULL,NULL,NULL,NULL,0,0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,63.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,63.00,63.00,63.00,0,0,NULL,0,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'[{\"code\":1000,\"value\":\"Sesenta y tres  con 00\\/100 \"}]',NULL,NULL,'20602518893-03-B001-27','20602518893-03-B001-27','Rdk+Q0fzj2hL+QQ81hlvq18jskM=','[encoded data, 90460 characters]',NULL,NULL,0,0,0,'{\"serie_documento\":\"B001\",\"numero_documento\":\"#\",\"fecha_de_emision\":\"2023-02-24\",\"hora_de_emision\":\"20:10:39\",\"codigo_tipo_operacion\":\"0101\",\"codigo_tipo_documento\":\"03\",\"codigo_tipo_moneda\":\"PEN\",\"fecha_de_vencimiento\":\"2023-02-24\",\"datos_del_cliente_o_receptor\":{\"codigo_tipo_documento_identidad\":\"1\",\"numero_documento\":\"33665805\",\"apellidos_y_nombres_o_razon_social\":\"DIAZ IRIGOIN, BENIGNO ROMAN\",\"codigo_pais\":\"PE\",\"ubigeo\":\"010701\",\"direccion\":\"JR.BELEN 249\",\"correo_electronico\":null,\"telefono\":null},\"codigo_condicion_de_pago\":\"01\",\"totales\":{\"total_exportacion\":0,\"total_operaciones_gravadas\":0,\"total_operaciones_inafectas\":0,\"total_operaciones_exoneradas\":63,\"total_operaciones_gratuitas\":0,\"total_impuestos_bolsa_plastica\":0,\"total_igv\":0,\"total_impuestos\":0,\"total_valor\":63,\"total_venta\":63},\"items\":[{\"codigo_interno\":\"BI10\",\"descripcion\":\"CHAUFA DE PAC POW\",\"codigo_producto_sunat\":null,\"unidad_de_medida\":\"NIU\",\"cantidad\":1,\"valor_unitario\":20,\"codigo_tipo_precio\":\"01\",\"precio_unitario\":20,\"codigo_tipo_afectacion_igv\":\"20\",\"total_base_igv\":20,\"porcentaje_igv\":18,\"total_igv\":0,\"total_impuestos_bolsa_plastica\":0,\"total_impuestos\":0,\"total_valor_item\":20,\"total_item\":20,\"nombre_producto_pdf\":null},{\"codigo_interno\":\"BI10\",\"descripcion\":\"CHAUFA DE PAC POW\",\"codigo_producto_sunat\":null,\"unidad_de_medida\":\"NIU\",\"cantidad\":1,\"valor_unitario\":20,\"codigo_tipo_precio\":\"01\",\"precio_unitario\":20,\"codigo_tipo_afectacion_igv\":\"20\",\"total_base_igv\":20,\"porcentaje_igv\":18,\"total_igv\":0,\"total_impuestos_bolsa_plastica\":0,\"total_impuestos\":0,\"total_valor_item\":20,\"total_item\":20,\"nombre_producto_pdf\":null},{\"codigo_interno\":\"BI203\",\"descripcion\":\"02 TALLARIN SALTADO\",\"codigo_producto_sunat\":null,\"unidad_de_medida\":\"NIU\",\"cantidad\":1,\"valor_unitario\":13,\"codigo_tipo_precio\":\"01\",\"precio_unitario\":13,\"codigo_tipo_afectacion_igv\":\"20\",\"total_base_igv\":13,\"porcentaje_igv\":18,\"total_igv\":0,\"total_impuestos_bolsa_plastica\":0,\"total_impuestos\":0,\"total_valor_item\":13,\"total_item\":13,\"nombre_producto_pdf\":null},{\"codigo_interno\":\"BI172\",\"descripcion\":\"COCA COLA 1 1\\/2 LT\",\"codigo_producto_sunat\":null,\"unidad_de_medida\":\"NIU\",\"cantidad\":1,\"valor_unitario\":10,\"codigo_tipo_precio\":\"01\",\"precio_unitario\":10,\"codigo_tipo_afectacion_igv\":\"20\",\"total_base_igv\":10,\"porcentaje_igv\":18,\"total_igv\":0,\"total_impuestos_bolsa_plastica\":0,\"total_impuestos\":0,\"total_valor_item\":10,\"total_item\":10,\"nombre_producto_pdf\":null}],\"pagos\":[{\"codigo_destino_pago\":\"cash\",\"codigo_metodo_pago\":\"01\",\"referencia\":null,\"pago_recibido\":true,\"monto\":63}],\"cuotas\":[]}',0,0,NULL,0,NULL,NULL,0,1,'{\"sent\":true,\"code\":\"0\",\"description\":\"La Boleta numero B001-27, ha sido aceptada\",\"notes\":[]}',0,NULL,0,NULL,NULL,NULL,'',NULL,'2023-02-24 20:22:51','2023-02-24 20:22:53',1,NULL,NULL),(103,1,'5ce861e8-360d-4a11-9d81-d92ae8cf5d7e',1,'{\"country_id\":\"PE\",\"country\":{\"id\":\"PE\",\"description\":\"PERU\"},\"department_id\":\"01\",\"department\":{\"id\":\"01\",\"description\":\"AMAZONAS\"},\"province_id\":\"0107\",\"province\":{\"id\":\"0107\",\"description\":\"Utcubamba\"},\"district_id\":\"010701\",\"district\":{\"id\":\"010701\",\"description\":\"Bagua Grande\"},\"urbanization\":null,\"address\":\"Jr. Jorge chavez N\\u00b0 340\",\"email\":\"asia@softlte.net.pe\",\"telephone\":\"976 656 837\",\"code\":\"0000\",\"trade_address\":null,\"web_address\":null,\"aditional_information\":null,\"logo\":null}','02','05','2.1',1,0,'02','03','B001',28,'2023-02-26','21:42:26',8,'{\"identity_document_type_id\":\"1\",\"identity_document_type\":{\"id\":\"1\",\"description\":\"DNI\"},\"number\":\"33665805\",\"name\":\"DIAZ IRIGOIN, BENIGNO ROMAN\",\"trade_name\":null,\"country_id\":\"PE\",\"country\":{\"id\":\"PE\",\"description\":\"PERU\"},\"department_id\":\"01\",\"department\":{\"id\":\"01\",\"description\":\"AMAZONAS\"},\"province_id\":\"0107\",\"province\":{\"id\":\"0107\",\"description\":\"Utcubamba\"},\"district_id\":\"010701\",\"district\":{\"id\":\"010701\",\"description\":\"Bagua Grande\"},\"address\":\"JR.BELEN 249\",\"email\":null,\"telephone\":null,\"perception_agent\":false,\"address_id\":null,\"internal_code\":null,\"address_type_id\":null,\"address_type\":{\"id\":null,\"description\":null}}','PEN','01',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1.000,0,NULL,NULL,NULL,NULL,0,0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,24.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,24.00,24.00,24.00,0,0,NULL,0,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'[{\"code\":1000,\"value\":\"Veinticuatro  con 00\\/100 \"}]',NULL,NULL,'20602518893-03-B001-28','20602518893-03-B001-28','TD5oMtfmiMwxXcrQ6xfHn5ymrTA=','[encoded data, 90460 characters]',NULL,NULL,0,0,0,'{\"serie_documento\":\"B001\",\"numero_documento\":\"#\",\"fecha_de_emision\":\"2023-02-26\",\"hora_de_emision\":\"21:42:26\",\"codigo_tipo_operacion\":\"0101\",\"codigo_tipo_documento\":\"03\",\"codigo_tipo_moneda\":\"PEN\",\"fecha_de_vencimiento\":\"2023-02-26\",\"datos_del_cliente_o_receptor\":{\"codigo_tipo_documento_identidad\":\"1\",\"numero_documento\":\"33665805\",\"apellidos_y_nombres_o_razon_social\":\"DIAZ IRIGOIN, BENIGNO ROMAN\",\"codigo_pais\":\"PE\",\"ubigeo\":\"010701\",\"direccion\":\"JR.BELEN 249\",\"correo_electronico\":null,\"telefono\":null},\"codigo_condicion_de_pago\":\"01\",\"totales\":{\"total_exportacion\":0,\"total_operaciones_gravadas\":0,\"total_operaciones_inafectas\":0,\"total_operaciones_exoneradas\":24,\"total_operaciones_gratuitas\":0,\"total_impuestos_bolsa_plastica\":0,\"total_igv\":0,\"total_impuestos\":0,\"total_valor\":24,\"total_venta\":24},\"items\":[{\"codigo_interno\":\"BI17\",\"descripcion\":\"AEROPUERTO DE CHANCHO\",\"codigo_producto_sunat\":null,\"unidad_de_medida\":\"NIU\",\"cantidad\":1,\"valor_unitario\":15,\"codigo_tipo_precio\":\"01\",\"precio_unitario\":15,\"codigo_tipo_afectacion_igv\":\"20\",\"total_base_igv\":15,\"porcentaje_igv\":18,\"total_igv\":0,\"total_impuestos_bolsa_plastica\":0,\"total_impuestos\":0,\"total_valor_item\":15,\"total_item\":15,\"nombre_producto_pdf\":null},{\"codigo_interno\":\"BI177\",\"descripcion\":\"MARACUYA 1 LT\",\"codigo_producto_sunat\":null,\"unidad_de_medida\":\"NIU\",\"cantidad\":1,\"valor_unitario\":9,\"codigo_tipo_precio\":\"01\",\"precio_unitario\":9,\"codigo_tipo_afectacion_igv\":\"20\",\"total_base_igv\":9,\"porcentaje_igv\":18,\"total_igv\":0,\"total_impuestos_bolsa_plastica\":0,\"total_impuestos\":0,\"total_valor_item\":9,\"total_item\":9,\"nombre_producto_pdf\":null}],\"pagos\":[{\"codigo_destino_pago\":\"cash\",\"codigo_metodo_pago\":\"01\",\"referencia\":null,\"pago_recibido\":true,\"monto\":24}],\"cuotas\":[]}',0,0,NULL,0,NULL,NULL,0,1,'{\"sent\":true,\"code\":\"0\",\"description\":\"La Boleta numero B001-28, ha sido aceptada\",\"notes\":[]}',0,NULL,0,NULL,NULL,NULL,'',NULL,'2023-02-26 21:45:44','2023-02-26 21:45:47',1,NULL,NULL);

--
-- Table structure for table `download_tray`
--

CREATE TABLE `download_tray` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned DEFAULT NULL,
  `module` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `format` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'IN_PROCESS',
  `date_init` datetime DEFAULT NULL,
  `date_end` datetime DEFAULT NULL,
  `payload_request` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `download_tray_user_id_foreign` (`user_id`),
  CONSTRAINT `download_tray_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `download_tray`
--


--
-- Table structure for table `drivers`
--

CREATE TABLE `drivers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `identity_document_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `license` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `telephone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `drivers_identity_document_type_id_foreign` (`identity_document_type_id`),
  KEY `drivers_number_index` (`number`),
  KEY `drivers_name_index` (`name`),
  CONSTRAINT `drivers_identity_document_type_id_foreign` FOREIGN KEY (`identity_document_type_id`) REFERENCES `cat_identity_document_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `drivers`
--


--
-- Table structure for table `email_send_log`
--

CREATE TABLE `email_send_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `relation_id` int(10) unsigned DEFAULT 0 COMMENT 'Id de modelo',
  `type` int(10) unsigned DEFAULT 0 COMMENT 'Tipo de relacion',
  `relation_model` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Modelo a relacion',
  `file_line` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Archivo qu elo llama',
  `sendit` tinyint(3) unsigned DEFAULT 1 COMMENT 'Booleano para envio de correo',
  `email` text COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Correo de destino',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `email_send_log`
--


--
-- Table structure for table `establishments`
--

CREATE TABLE `establishments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `country_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `province_id` char(4) COLLATE utf8mb4_unicode_ci NOT NULL,
  `district_id` char(6) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `telephone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `aditional_information` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `web_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `trade_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_id` int(10) unsigned DEFAULT NULL,
  `logo` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `template_pdf` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',
  `has_igv_31556` tinyint(1) NOT NULL DEFAULT 0,
  `template_ticket_pdf` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `establishments_country_id_foreign` (`country_id`),
  KEY `establishments_department_id_foreign` (`department_id`),
  KEY `establishments_province_id_foreign` (`province_id`),
  KEY `establishments_district_id_foreign` (`district_id`),
  CONSTRAINT `establishments_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`),
  CONSTRAINT `establishments_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`),
  CONSTRAINT `establishments_district_id_foreign` FOREIGN KEY (`district_id`) REFERENCES `districts` (`id`),
  CONSTRAINT `establishments_province_id_foreign` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `establishments`
--

INSERT INTO `establishments` VALUES (1,'Oficina Principal','PE','01','0107','010701','Jr. Jorge chavez N° 340','asia@softlte.net.pe','976 656 837','0000',NULL,NULL,NULL,NULL,NULL,'default',0,'default',NULL,'2022-05-31 22:26:18');

--
-- Table structure for table `exchange_rates`
--

CREATE TABLE `exchange_rates` (
  `date` date NOT NULL,
  `sale_original` decimal(13,3) NOT NULL,
  `purchase_original` decimal(13,3) NOT NULL,
  `purchase` decimal(13,3) NOT NULL,
  `sale` decimal(13,3) NOT NULL,
  `date_original` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `exchange_rates`
--

INSERT INTO `exchange_rates` VALUES ('2022-05-19',3.772,3.766,3.766,3.772,'2022-05-19','2022-05-19 13:02:58','2022-05-19 13:02:58'),('2022-05-24',3.720,3.711,3.711,3.720,'2022-05-24','2022-05-24 10:17:03','2022-05-24 10:17:03'),('2022-05-31',3.683,3.665,3.665,3.683,'2022-05-31','2022-05-31 22:22:36','2022-05-31 22:22:36'),('2022-06-11',3.778,3.765,3.765,3.778,'2022-06-11','2022-06-11 20:35:24','2022-06-11 20:35:24'),('2022-07-03',3.830,3.820,3.820,3.830,'2022-07-01','2022-07-03 23:16:19','2022-07-03 23:16:19'),('2022-07-08',3.888,3.881,3.881,3.888,'2022-07-08','2022-07-08 09:33:45','2022-07-08 09:33:45'),('2022-07-12',3.939,3.928,3.928,3.939,'2022-07-12','2022-07-12 23:45:56','2022-07-12 23:45:56'),('2022-07-14',3.968,3.959,3.959,3.968,'2022-07-14','2022-07-14 09:17:42','2022-07-14 09:17:42'),('2022-07-18',3.906,3.884,3.884,3.906,'2022-07-16','2022-07-18 23:05:55','2022-07-18 23:05:55'),('2022-08-05',3.897,3.885,3.885,3.897,'2022-08-05','2022-08-05 21:53:59','2022-08-05 21:53:59'),('2022-10-28',3.987,3.976,3.976,3.987,'2022-10-28','2022-10-28 15:51:53','2022-10-28 15:51:53');

--
-- Table structure for table `expense_items`
--

CREATE TABLE `expense_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `expense_id` int(10) unsigned NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total` decimal(12,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `expense_items_expense_id_foreign` (`expense_id`),
  CONSTRAINT `expense_items_expense_id_foreign` FOREIGN KEY (`expense_id`) REFERENCES `expenses` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expense_items`
--


--
-- Table structure for table `expense_method_types`
--

CREATE TABLE `expense_method_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `has_card` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expense_method_types`
--

INSERT INTO `expense_method_types` VALUES (1,'CAJA GENERAL',0),(2,'Tarjeta de crédito',1),(3,'Tarjeta de débito',1);

--
-- Table structure for table `expense_payments`
--

CREATE TABLE `expense_payments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `expense_id` int(10) unsigned NOT NULL,
  `date_of_payment` date NOT NULL,
  `expense_method_type_id` int(10) unsigned NOT NULL,
  `has_card` tinyint(1) NOT NULL DEFAULT 0,
  `card_brand_id` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment` decimal(12,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `expense_payments_expense_id_foreign` (`expense_id`),
  KEY `expense_payments_card_brand_id_foreign` (`card_brand_id`),
  KEY `expense_payments_expense_method_type_id_foreign` (`expense_method_type_id`),
  KEY `expense_payments_date_of_payment_index` (`date_of_payment`),
  CONSTRAINT `expense_payments_card_brand_id_foreign` FOREIGN KEY (`card_brand_id`) REFERENCES `card_brands` (`id`),
  CONSTRAINT `expense_payments_expense_id_foreign` FOREIGN KEY (`expense_id`) REFERENCES `expenses` (`id`) ON DELETE CASCADE,
  CONSTRAINT `expense_payments_expense_method_type_id_foreign` FOREIGN KEY (`expense_method_type_id`) REFERENCES `expense_method_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expense_payments`
--


--
-- Table structure for table `expense_reasons`
--

CREATE TABLE `expense_reasons` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expense_reasons`
--

INSERT INTO `expense_reasons` VALUES (1,'Varios'),(2,'Representación de la organización'),(3,'Trabajo de campo');

--
-- Table structure for table `expense_types`
--

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

--
-- Dumping data for table `expense_types`
--

INSERT INTO `expense_types` VALUES (1,'PLANILLA','2022-05-19 10:09:15','2022-05-19 10:09:15'),(2,'RECIBO POR HONORARIO','2022-05-19 10:09:15','2022-05-19 10:09:15'),(3,'SERVICIO PÚBLICO','2022-05-19 10:09:15','2022-05-19 10:09:15'),(4,'OTROS','2022-05-19 10:09:15','2022-05-19 10:09:15');

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `soap_type_id` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expense_type_id` int(10) unsigned NOT NULL,
  `establishment_id` int(10) unsigned NOT NULL,
  `supplier_id` int(10) unsigned NOT NULL,
  `expense_reason_id` int(10) unsigned NOT NULL DEFAULT 1,
  `currency_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `external_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state_type_id` char(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_of_issue` date NOT NULL,
  `time_of_issue` time NOT NULL,
  `supplier` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`supplier`)),
  `exchange_rate_sale` decimal(13,3) NOT NULL,
  `total` decimal(12,2) NOT NULL,
  `filename` 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 `expenses_filename_unique` (`filename`),
  KEY `expenses_user_id_foreign` (`user_id`),
  KEY `expenses_establishment_id_foreign` (`establishment_id`),
  KEY `expenses_supplier_id_foreign` (`supplier_id`),
  KEY `expenses_expense_type_id_foreign` (`expense_type_id`),
  KEY `expenses_currency_type_id_foreign` (`currency_type_id`),
  KEY `expenses_expense_reason_id_foreign` (`expense_reason_id`),
  KEY `expenses_soap_type_id_foreign` (`soap_type_id`),
  KEY `expenses_state_type_id_foreign` (`state_type_id`),
  CONSTRAINT `expenses_currency_type_id_foreign` FOREIGN KEY (`currency_type_id`) REFERENCES `cat_currency_types` (`id`),
  CONSTRAINT `expenses_establishment_id_foreign` FOREIGN KEY (`establishment_id`) REFERENCES `establishments` (`id`),
  CONSTRAINT `expenses_expense_reason_id_foreign` FOREIGN KEY (`expense_reason_id`) REFERENCES `expense_reasons` (`id`),
  CONSTRAINT `expenses_expense_type_id_foreign` FOREIGN KEY (`expense_type_id`) REFERENCES `expense_types` (`id`),
  CONSTRAINT `expenses_soap_type_id_foreign` FOREIGN KEY (`soap_type_id`) REFERENCES `soap_types` (`id`),
  CONSTRAINT `expenses_state_type_id_foreign` FOREIGN KEY (`state_type_id`) REFERENCES `state_types` (`id`),
  CONSTRAINT `expenses_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expenses`
--


--
-- Table structure for table `fixed_asset_items`
--

CREATE TABLE `fixed_asset_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `internal_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchase_unit_price` decimal(16,6) NOT NULL,
  `purchase_affectation_igv_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fixed_asset_items_item_type_id_foreign` (`item_type_id`),
  KEY `fixed_asset_items_unit_type_id_foreign` (`unit_type_id`),
  KEY `fixed_asset_items_currency_type_id_foreign` (`currency_type_id`),
  KEY `fixed_asset_items_purchase_affectation_igv_type_id_foreign` (`purchase_affectation_igv_type_id`),
  CONSTRAINT `fixed_asset_items_currency_type_id_foreign` FOREIGN KEY (`currency_type_id`) REFERENCES `cat_currency_types` (`id`),
  CONSTRAINT `fixed_asset_items_item_type_id_foreign` FOREIGN KEY (`item_type_id`) REFERENCES `item_types` (`id`),
  CONSTRAINT `fixed_asset_items_purchase_affectation_igv_type_id_foreign` FOREIGN KEY (`purchase_affectation_igv_type_id`) REFERENCES `cat_affectation_igv_types` (`id`),
  CONSTRAINT `fixed_asset_items_unit_type_id_foreign` FOREIGN KEY (`unit_type_id`) REFERENCES `cat_unit_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fixed_asset_items`
--


--
-- Table structure for table `fixed_asset_purchase_items`
--

CREATE TABLE `fixed_asset_purchase_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fixed_asset_purchase_id` int(10) unsigned NOT NULL,
  `fixed_asset_item_id` int(10) unsigned NOT NULL,
  `item` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`item`)),
  `quantity` decimal(12,4) NOT NULL,
  `unit_value` decimal(16,6) NOT NULL,
  `affectation_igv_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_base_igv` decimal(12,2) NOT NULL,
  `percentage_igv` decimal(12,2) NOT NULL,
  `total_igv` decimal(12,2) NOT NULL,
  `system_isc_type_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_base_isc` decimal(12,2) NOT NULL DEFAULT 0.00,
  `percentage_isc` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_isc` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_base_other_taxes` decimal(12,2) NOT NULL DEFAULT 0.00,
  `percentage_other_taxes` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_other_taxes` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_taxes` decimal(12,2) NOT NULL,
  `price_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit_price` decimal(16,6) NOT NULL,
  `total_value` decimal(12,2) NOT NULL,
  `total_charge` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL,
  `attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`attributes`)),
  `discounts` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`discounts`)),
  `charges` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`charges`)),
  PRIMARY KEY (`id`),
  KEY `fixed_asset_purchase_items_fixed_asset_purchase_id_foreign` (`fixed_asset_purchase_id`),
  KEY `fixed_asset_purchase_items_fixed_asset_item_id_foreign` (`fixed_asset_item_id`),
  KEY `fixed_asset_purchase_items_affectation_igv_type_id_foreign` (`affectation_igv_type_id`),
  KEY `fixed_asset_purchase_items_system_isc_type_id_foreign` (`system_isc_type_id`),
  KEY `fixed_asset_purchase_items_price_type_id_foreign` (`price_type_id`),
  CONSTRAINT `fixed_asset_purchase_items_affectation_igv_type_id_foreign` FOREIGN KEY (`affectation_igv_type_id`) REFERENCES `cat_affectation_igv_types` (`id`),
  CONSTRAINT `fixed_asset_purchase_items_fixed_asset_item_id_foreign` FOREIGN KEY (`fixed_asset_item_id`) REFERENCES `fixed_asset_items` (`id`),
  CONSTRAINT `fixed_asset_purchase_items_fixed_asset_purchase_id_foreign` FOREIGN KEY (`fixed_asset_purchase_id`) REFERENCES `fixed_asset_purchases` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fixed_asset_purchase_items_price_type_id_foreign` FOREIGN KEY (`price_type_id`) REFERENCES `cat_price_types` (`id`),
  CONSTRAINT `fixed_asset_purchase_items_system_isc_type_id_foreign` FOREIGN KEY (`system_isc_type_id`) REFERENCES `cat_system_isc_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fixed_asset_purchase_items`
--


--
-- Table structure for table `fixed_asset_purchases`
--

CREATE TABLE `fixed_asset_purchases` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `external_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `establishment_id` int(10) unsigned NOT NULL,
  `soap_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `group_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `document_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `series` char(4) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` int(11) NOT NULL,
  `date_of_issue` date NOT NULL,
  `date_of_due` date DEFAULT NULL,
  `time_of_issue` time NOT NULL,
  `supplier_id` int(10) unsigned NOT NULL,
  `supplier` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`supplier`)),
  `currency_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `exchange_rate_sale` decimal(13,3) NOT NULL,
  `total_prepayment` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_charge` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_exportation` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_free` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_taxed` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_unaffected` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_exonerated` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_igv` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_base_isc` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_isc` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_base_other_taxes` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_other_taxes` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_taxes` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_value` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL,
  `customer_id` int(10) unsigned DEFAULT NULL,
  `perception_date` date DEFAULT NULL,
  `perception_number` int(11) DEFAULT NULL,
  `total_perception` decimal(12,2) DEFAULT NULL,
  `charges` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`charges`)),
  `discounts` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`discounts`)),
  `prepayments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`prepayments`)),
  `guides` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`guides`)),
  `related` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`related`)),
  `perception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`perception`)),
  `detraction` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`detraction`)),
  `legends` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`legends`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fixed_asset_purchases_user_id_foreign` (`user_id`),
  KEY `fixed_asset_purchases_establishment_id_foreign` (`establishment_id`),
  KEY `fixed_asset_purchases_supplier_id_foreign` (`supplier_id`),
  KEY `fixed_asset_purchases_customer_id_foreign` (`customer_id`),
  KEY `fixed_asset_purchases_soap_type_id_foreign` (`soap_type_id`),
  KEY `fixed_asset_purchases_state_type_id_foreign` (`state_type_id`),
  KEY `fixed_asset_purchases_group_id_foreign` (`group_id`),
  KEY `fixed_asset_purchases_document_type_id_foreign` (`document_type_id`),
  KEY `fixed_asset_purchases_currency_type_id_foreign` (`currency_type_id`),
  CONSTRAINT `fixed_asset_purchases_currency_type_id_foreign` FOREIGN KEY (`currency_type_id`) REFERENCES `cat_currency_types` (`id`),
  CONSTRAINT `fixed_asset_purchases_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `fixed_asset_purchases_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `cat_document_types` (`id`),
  CONSTRAINT `fixed_asset_purchases_establishment_id_foreign` FOREIGN KEY (`establishment_id`) REFERENCES `establishments` (`id`),
  CONSTRAINT `fixed_asset_purchases_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`),
  CONSTRAINT `fixed_asset_purchases_soap_type_id_foreign` FOREIGN KEY (`soap_type_id`) REFERENCES `soap_types` (`id`),
  CONSTRAINT `fixed_asset_purchases_state_type_id_foreign` FOREIGN KEY (`state_type_id`) REFERENCES `state_types` (`id`),
  CONSTRAINT `fixed_asset_purchases_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `persons` (`id`),
  CONSTRAINT `fixed_asset_purchases_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fixed_asset_purchases`
--


--
-- Table structure for table `format_templates`
--

CREATE TABLE `format_templates` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `formats` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `urls` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`urls`)),
  `is_custom_ticket` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `format_templates`
--

INSERT INTO `format_templates` VALUES (1,'blank','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/blank\\/image.png\",\"ticket\":\"\"}',0),(2,'brand','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/brand\\/image.png\",\"ticket\":\"\"}',0),(3,'center_note','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/center_note\\/image.png\",\"ticket\":\"\"}',0),(4,'citec','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/citec\\/image.png\",\"ticket\":\"\"}',0),(5,'con_valor_unitario','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/con_valor_unitario\\/image.png\",\"ticket\":\"\"}',0),(6,'custom','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/custom\\/image.png\",\"ticket\":\"\"}',0),(7,'custom_gasolution','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/custom_gasolution\\/image.png\",\"ticket\":\"\"}',0),(8,'custom_multisaba','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/custom_multisaba\\/image.png\",\"ticket\":\"\"}',0),(9,'customer_contact','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/customer_contact\\/image.png\",\"ticket\":\"\"}',0),(10,'customer_contact_with_subtotal','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/customer_contact_with_subtotal\\/image.png\",\"ticket\":\"\"}',0),(11,'datetime','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/datetime\\/image.png\",\"ticket\":\"\"}',0),(12,'default','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"templates\\/pdf\\/default\\/ticket.png\"}',1),(13,'default2','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default2\\/image.png\",\"ticket\":\"\"}',0),(14,'default3','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3\\/image.png\",\"ticket\":\"\"}',0),(15,'default3_596','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_596\\/image.png\",\"ticket\":\"\"}',0),(16,'default3_911','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_911\\/image.png\",\"ticket\":\"\"}',0),(17,'default3_929','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_929\\/image.png\",\"ticket\":\"\"}',0),(18,'default3_banks','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_banks\\/image.png\",\"ticket\":\"\"}',0),(19,'default3_new','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_new\\/image.png\",\"ticket\":\"\"}',0),(20,'default3_new_account','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_new_account\\/image.png\",\"ticket\":\"\"}',0),(21,'default3_new_unit_value','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default3_new_unit_value\\/image.png\",\"ticket\":\"\"}',0),(22,'default4','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default4\\/image.png\",\"ticket\":\"\"}',0),(23,'default5','{\"guide\":\"templates\\/pdf\\/default5\\/image_guide.png\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(24,'default_brand_as_lab','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default_brand_as_lab\\/image.png\",\"ticket\":\"\"}',0),(25,'default_date_end','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default_date_end\\/image.png\",\"ticket\":\"\"}',0),(26,'default_lote_fven_serie','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default_lote_fven_serie\\/image.png\",\"ticket\":\"\"}',0),(27,'defaultGreen','{\"guide\":\"templates\\/pdf\\/defaultGreen\\/image_guide.png\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(28,'dispatch_brand','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(29,'dispatch_place','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/dispatch_place\\/image.png\",\"ticket\":\"\"}',0),(30,'dispatch_place_2','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/dispatch_place_2\\/image.png\",\"ticket\":\"\"}',0),(31,'distpatch_pharmacy','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(32,'doble_print','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/doble_print\\/image.png\",\"ticket\":\"\"}',0),(33,'doble_print_unilac','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(34,'font_sm','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/font_sm\\/image.png\",\"ticket\":\"\"}',0),(35,'font_swz','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/font_swz\\/image.png\",\"ticket\":\"\"}',0),(36,'fr_item_desc','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(37,'full_height','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/full_height\\/image.png\",\"ticket\":\"\"}',0),(38,'full_height_ticket','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/full_height_ticket\\/image.png\",\"ticket\":\"\"}',0),(39,'header_image_full_width','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/header_image_full_width\\/image.png\",\"ticket\":\"\"}',0),(40,'internal_code','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/internal_code\\/image.png\",\"ticket\":\"\"}',0),(41,'internal_code_2','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/internal_code_2\\/image.png\",\"ticket\":\"\"}',0),(42,'internal_code_contact','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/internal_code_contact\\/image.png\",\"ticket\":\"\"}',0),(43,'item_desc','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/item_desc\\/image.png\",\"ticket\":\"\"}',0),(44,'item_description','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/item_description\\/image.png\",\"ticket\":\"\"}',0),(45,'item_watermark','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/item_watermark\\/image.png\",\"ticket\":\"\"}',0),(46,'jazmar','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/jazmar\\/image.png\",\"ticket\":\"\"}',0),(47,'jc','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/jc\\/image.png\",\"ticket\":\"\"}',0),(48,'legend_amazonia','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/legend_amazonia\\/image.png\",\"ticket\":\"\"}',0),(49,'legend_amazonia_2','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/legend_amazonia_2\\/image.png\",\"ticket\":\"\"}',0),(50,'model1','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/model1\\/image.png\",\"ticket\":\"\"}',0),(51,'model2','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/model2\\/image.png\",\"ticket\":\"\"}',0),(52,'model3','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/model3\\/image.png\",\"ticket\":\"\"}',0),(53,'model4','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/model4\\/image.png\",\"ticket\":\"\"}',0),(54,'modelw80','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/modelw80\\/image.png\",\"ticket\":\"\"}',0),(55,'multiples_logos','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/multiples_logos\\/image.png\",\"ticket\":\"\"}',0),(56,'no_igv','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/no_igv\\/image.png\",\"ticket\":\"\"}',0),(57,'rich_text','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/rich_text\\/image.png\",\"ticket\":\"\"}',0),(58,'rounded','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/rounded\\/image.png\",\"ticket\":\"\"}',0),(59,'santiago','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/santiago\\/image.png\",\"ticket\":\"\"}',0),(60,'school','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/school\\/image.png\",\"ticket\":\"\"}',0),(61,'static','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"\"}',0),(62,'technical','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/technical\\/image.png\",\"ticket\":\"\"}',0),(63,'ticket_58','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/ticket_58\\/image.png\",\"ticket\":\"templates\\/pdf\\/ticket_58\\/ticket.png\"}',1),(64,'ticket_b','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"templates\\/pdf\\/ticket_b\\/ticket.png\"}',1),(65,'ticket_internal_code','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"templates\\/pdf\\/ticket_internal_code\\/ticket.png\"}',1),(66,'ticket_name_tradename','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/default\\/image.png\",\"ticket\":\"templates\\/pdf\\/ticket_name_tradename\\/ticket.png\"}',1),(67,'top_logo_company','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/top_logo_company\\/image.png\",\"ticket\":\"\"}',0),(68,'top_placa','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/top_placa\\/image.png\",\"ticket\":\"\"}',0),(69,'top_ruc','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/top_ruc\\/image.png\",\"ticket\":\"\"}',0),(70,'unit_price','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/unit_price\\/image.png\",\"ticket\":\"\"}',0),(71,'unit_types_desc','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/unit_types_desc\\/image.png\",\"ticket\":\"\"}',0),(72,'wsc','{\"guide\":\"\",\"invoice\":\"templates\\/pdf\\/wsc\\/image.png\",\"ticket\":\"\"}',0);

--
-- Table structure for table `full_suscription_server_data`
--

CREATE TABLE `full_suscription_server_data` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(10) unsigned DEFAULT 0,
  `host` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ip` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `full_suscription_server_data`
--


--
-- Table structure for table `full_suscription_user_data`
--

CREATE TABLE `full_suscription_user_data` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(10) unsigned DEFAULT 0,
  `discord_user` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `slack_channel` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discord_channel` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gitlab_user` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `full_suscription_user_data`
--


--
-- Table structure for table `general_payment_conditions`
--

CREATE TABLE `general_payment_conditions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_payment_conditions`
--

INSERT INTO `general_payment_conditions` VALUES ('01','Contado'),('02','Crédito'),('03','Crédito con cuotas');

--
-- Table structure for table `global_payments`
--

CREATE TABLE `global_payments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `soap_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `destination_id` int(11) DEFAULT NULL,
  `destination_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_id` int(11) NOT NULL,
  `payment_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `destination_index` (`destination_id`,`destination_type`),
  KEY `payment_index` (`payment_id`,`payment_type`),
  KEY `global_payments_soap_type_id_foreign` (`soap_type_id`),
  KEY `global_payments_user_id_foreign` (`user_id`),
  CONSTRAINT `global_payments_soap_type_id_foreign` FOREIGN KEY (`soap_type_id`) REFERENCES `soap_types` (`id`),
  CONSTRAINT `global_payments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `global_payments`
--

INSERT INTO `global_payments` VALUES (8,'02',1,'App\\Models\\Tenant\\Cash',7,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-01 20:32:35','2022-06-01 20:32:35'),(9,'02',1,'App\\Models\\Tenant\\Cash',8,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-01 20:37:34','2022-06-01 20:37:34'),(10,'02',1,'App\\Models\\Tenant\\Cash',9,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-01 20:44:04','2022-06-01 20:44:04'),(11,'02',1,'App\\Models\\Tenant\\Cash',10,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-08 22:18:49','2022-06-08 22:18:49'),(12,'02',1,'App\\Models\\Tenant\\Cash',11,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-10 23:12:38','2022-06-10 23:12:38'),(13,'02',1,'App\\Models\\Tenant\\Cash',12,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-10 23:29:59','2022-06-10 23:29:59'),(14,'02',1,'App\\Models\\Tenant\\Cash',13,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-10 23:33:15','2022-06-10 23:33:15'),(15,'02',1,'App\\Models\\Tenant\\Cash',14,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-10 23:37:36','2022-06-10 23:37:36'),(16,'02',1,'App\\Models\\Tenant\\Cash',15,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-11 01:23:34','2022-06-11 01:23:34'),(17,'02',1,'App\\Models\\Tenant\\Cash',16,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-11 01:25:21','2022-06-11 01:25:21'),(19,'02',1,'App\\Models\\Tenant\\Cash',18,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-11 21:03:43','2022-06-11 21:03:43'),(20,'02',1,'App\\Models\\Tenant\\Cash',19,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-29 23:42:55','2022-06-29 23:42:55'),(21,'02',1,'App\\Models\\Tenant\\Cash',20,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-29 23:44:51','2022-06-29 23:44:51'),(22,'02',1,'App\\Models\\Tenant\\Cash',21,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-30 21:35:55','2022-06-30 21:35:55'),(23,'02',1,'App\\Models\\Tenant\\Cash',22,'App\\Models\\Tenant\\DocumentPayment',1,'2022-06-30 22:28:36','2022-06-30 22:28:36'),(24,'02',1,'App\\Models\\Tenant\\Cash',23,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-03 22:33:54','2022-07-03 22:33:54'),(25,'02',1,'App\\Models\\Tenant\\Cash',24,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-08 22:32:49','2022-07-08 22:32:49'),(26,'02',1,'App\\Models\\Tenant\\Cash',25,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-10 00:08:40','2022-07-10 00:08:40'),(27,'02',1,'App\\Models\\Tenant\\Cash',26,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-12 23:54:37','2022-07-12 23:54:37'),(28,'02',1,'App\\Models\\Tenant\\Cash',1,'App\\Models\\Tenant\\SaleNotePayment',1,'2022-07-16 10:18:18','2022-07-16 10:18:18'),(29,'02',1,'App\\Models\\Tenant\\Cash',27,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-18 19:12:48','2022-07-18 19:12:48'),(30,'02',1,'App\\Models\\Tenant\\Cash',28,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-18 19:17:41','2022-07-18 19:17:41'),(31,'02',1,'App\\Models\\Tenant\\Cash',2,'App\\Models\\Tenant\\SaleNotePayment',1,'2022-07-18 23:14:44','2022-07-18 23:14:44'),(32,'02',1,'App\\Models\\Tenant\\Cash',29,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-21 00:53:35','2022-07-21 00:53:35'),(33,'02',1,'App\\Models\\Tenant\\Cash',30,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-25 00:31:29','2022-07-25 00:31:29'),(34,'02',1,'App\\Models\\Tenant\\Cash',31,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-28 20:37:47','2022-07-28 20:37:47'),(35,'02',1,'App\\Models\\Tenant\\Cash',32,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-28 22:28:25','2022-07-28 22:28:25'),(36,'02',1,'App\\Models\\Tenant\\Cash',33,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-29 23:41:01','2022-07-29 23:41:01'),(37,'02',1,'App\\Models\\Tenant\\Cash',34,'App\\Models\\Tenant\\DocumentPayment',1,'2022-07-31 21:39:05','2022-07-31 21:39:05'),(38,'02',1,'App\\Models\\Tenant\\Cash',35,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-02 23:16:36','2022-08-02 23:16:36'),(39,'02',1,'App\\Models\\Tenant\\Cash',36,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-02 23:27:06','2022-08-02 23:27:06'),(40,'02',1,'App\\Models\\Tenant\\Cash',37,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-03 17:12:31','2022-08-03 17:12:31'),(41,'02',1,'App\\Models\\Tenant\\Cash',38,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-03 17:13:29','2022-08-03 17:13:29'),(42,'02',1,'App\\Models\\Tenant\\Cash',39,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-04 22:09:42','2022-08-04 22:09:42'),(43,'02',1,'App\\Models\\Tenant\\Cash',40,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-07 18:04:42','2022-08-07 18:04:42'),(44,'02',1,'App\\Models\\Tenant\\Cash',41,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-07 21:34:17','2022-08-07 21:34:17'),(45,'02',1,'App\\Models\\Tenant\\Cash',42,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-09 21:39:07','2022-08-09 21:39:07'),(46,'02',1,'App\\Models\\Tenant\\Cash',43,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-09 21:52:23','2022-08-09 21:52:23'),(47,'02',1,'App\\Models\\Tenant\\Cash',44,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-11 19:54:00','2022-08-11 19:54:00'),(48,'02',1,'App\\Models\\Tenant\\Cash',45,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-12 21:21:48','2022-08-12 21:21:48'),(49,'02',1,'App\\Models\\Tenant\\Cash',46,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-15 20:48:45','2022-08-15 20:48:45'),(50,'02',1,'App\\Models\\Tenant\\Cash',47,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-16 20:16:11','2022-08-16 20:16:11'),(51,'02',1,'App\\Models\\Tenant\\Cash',48,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-25 11:22:03','2022-08-25 11:22:03'),(52,'02',1,'App\\Models\\Tenant\\Cash',49,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-27 18:48:11','2022-08-27 18:48:11'),(53,'02',1,'App\\Models\\Tenant\\Cash',50,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-27 20:31:03','2022-08-27 20:31:03'),(54,'02',1,'App\\Models\\Tenant\\Cash',51,'App\\Models\\Tenant\\DocumentPayment',1,'2022-08-31 22:01:54','2022-08-31 22:01:54'),(55,'02',1,'App\\Models\\Tenant\\Cash',52,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-01 00:04:56','2022-09-01 00:04:56'),(56,'02',1,'App\\Models\\Tenant\\Cash',53,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-01 00:07:59','2022-09-01 00:07:59'),(57,'02',1,'App\\Models\\Tenant\\Cash',54,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-01 20:47:57','2022-09-01 20:47:57'),(58,'02',1,'App\\Models\\Tenant\\Cash',55,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:43:13','2022-09-03 10:43:13'),(59,'02',1,'App\\Models\\Tenant\\Cash',56,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:44:06','2022-09-03 10:44:06'),(60,'02',1,'App\\Models\\Tenant\\Cash',57,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:45:02','2022-09-03 10:45:02'),(61,'02',1,'App\\Models\\Tenant\\Cash',58,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:46:37','2022-09-03 10:46:37'),(62,'02',1,'App\\Models\\Tenant\\Cash',59,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:47:45','2022-09-03 10:47:45'),(63,'02',1,'App\\Models\\Tenant\\Cash',60,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:55:14','2022-09-03 10:55:14'),(64,'02',1,'App\\Models\\Tenant\\Cash',61,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-03 10:58:49','2022-09-03 10:58:49'),(65,'02',1,'App\\Models\\Tenant\\Cash',62,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-12 12:07:04','2022-09-12 12:07:04'),(66,'02',1,'App\\Models\\Tenant\\Cash',63,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-18 19:41:01','2022-09-18 19:41:01'),(67,'02',1,'App\\Models\\Tenant\\Cash',64,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-26 19:09:49','2022-09-26 19:09:49'),(68,'02',1,'App\\Models\\Tenant\\Cash',65,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-27 19:39:35','2022-09-27 19:39:35'),(69,'02',1,'App\\Models\\Tenant\\Cash',66,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-27 19:45:07','2022-09-27 19:45:07'),(70,'02',1,'App\\Models\\Tenant\\Cash',67,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-28 22:14:24','2022-09-28 22:14:24'),(71,'02',1,'App\\Models\\Tenant\\Cash',68,'App\\Models\\Tenant\\DocumentPayment',1,'2022-09-28 22:16:16','2022-09-28 22:16:16'),(72,'02',1,'App\\Models\\Tenant\\Cash',69,'App\\Models\\Tenant\\DocumentPayment',1,'2022-10-14 21:12:24','2022-10-14 21:12:24'),(73,'02',1,'App\\Models\\Tenant\\Cash',70,'App\\Models\\Tenant\\DocumentPayment',1,'2022-10-14 21:14:48','2022-10-14 21:14:48'),(74,'02',1,'App\\Models\\Tenant\\Cash',71,'App\\Models\\Tenant\\DocumentPayment',1,'2022-10-28 16:17:28','2022-10-28 16:17:28'),(75,'02',1,'App\\Models\\Tenant\\Cash',72,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-11 18:45:11','2022-11-11 18:45:11'),(76,'02',1,'App\\Models\\Tenant\\Cash',73,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-11 21:12:03','2022-11-11 21:12:03'),(77,'02',1,'App\\Models\\Tenant\\Cash',74,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-15 21:47:40','2022-11-15 21:47:40'),(78,'02',1,'App\\Models\\Tenant\\Cash',75,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-16 21:55:19','2022-11-16 21:55:19'),(79,'02',1,'App\\Models\\Tenant\\Cash',76,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-16 21:58:58','2022-11-16 21:58:58'),(80,'02',1,'App\\Models\\Tenant\\Cash',77,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-20 22:55:36','2022-11-20 22:55:36'),(81,'02',1,'App\\Models\\Tenant\\Cash',78,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-21 23:14:01','2022-11-21 23:14:01'),(82,'02',1,'App\\Models\\Tenant\\Cash',79,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-21 23:33:35','2022-11-21 23:33:35'),(83,'02',1,'App\\Models\\Tenant\\Cash',80,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-21 23:36:05','2022-11-21 23:36:05'),(84,'02',1,'App\\Models\\Tenant\\Cash',81,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-27 23:37:38','2022-11-27 23:37:38'),(85,'02',1,'App\\Models\\Tenant\\Cash',82,'App\\Models\\Tenant\\DocumentPayment',1,'2022-11-27 23:40:24','2022-11-27 23:40:24'),(86,'02',1,'App\\Models\\Tenant\\Cash',83,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-22 00:01:04','2022-12-22 00:01:04'),(87,'02',1,'App\\Models\\Tenant\\Cash',84,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-25 23:16:07','2022-12-25 23:16:07'),(88,'02',1,'App\\Models\\Tenant\\Cash',85,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-29 13:40:13','2022-12-29 13:40:13'),(89,'02',1,'App\\Models\\Tenant\\Cash',86,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-31 08:39:37','2022-12-31 08:39:37'),(90,'02',1,'App\\Models\\Tenant\\Cash',87,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-31 08:47:08','2022-12-31 08:47:08'),(91,'02',1,'App\\Models\\Tenant\\Cash',88,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-31 08:54:21','2022-12-31 08:54:21'),(92,'02',1,'App\\Models\\Tenant\\Cash',89,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-31 08:59:44','2022-12-31 08:59:44'),(93,'02',1,'App\\Models\\Tenant\\Cash',90,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-31 16:13:42','2022-12-31 16:13:42'),(94,'02',1,'App\\Models\\Tenant\\Cash',91,'App\\Models\\Tenant\\DocumentPayment',1,'2022-12-31 16:20:22','2022-12-31 16:20:22'),(95,'02',1,'App\\Models\\Tenant\\Cash',92,'App\\Models\\Tenant\\DocumentPayment',1,'2023-01-01 00:04:18','2023-01-01 00:04:18'),(96,'02',1,'App\\Models\\Tenant\\Cash',93,'App\\Models\\Tenant\\DocumentPayment',1,'2023-01-14 02:52:06','2023-01-14 02:52:06'),(97,'02',1,'App\\Models\\Tenant\\Cash',94,'App\\Models\\Tenant\\DocumentPayment',1,'2023-02-03 20:13:13','2023-02-03 20:13:13'),(98,'02',1,'App\\Models\\Tenant\\Cash',95,'App\\Models\\Tenant\\DocumentPayment',1,'2023-02-24 20:22:51','2023-02-24 20:22:51'),(99,'02',1,'App\\Models\\Tenant\\Cash',96,'App\\Models\\Tenant\\DocumentPayment',1,'2023-02-26 21:45:44','2023-02-26 21:45:44');

--
-- Table structure for table `groups`
--

CREATE TABLE `groups` (
  `id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  KEY `groups_id_index` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `groups`
--

INSERT INTO `groups` VALUES ('01','Facturas'),('02','Boletas');

--
-- Table structure for table `guide_files`
--

CREATE TABLE `guide_files` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `filename` text COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Nombre de archivo',
  `purchase_id` int(10) unsigned DEFAULT 0 COMMENT 'Relacion con purchases',
  `document_id` int(10) unsigned DEFAULT 0 COMMENT 'Relacion con documents',
  `order_note_id` int(10) unsigned DEFAULT 0 COMMENT 'Relacion con order_notes',
  `quotation_id` int(10) unsigned DEFAULT 0 COMMENT 'Relacion con quotations',
  `sale_note_id` int(10) unsigned DEFAULT 0 COMMENT 'Relacion con sale_notes',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `guide_files`
--


--
-- Table structure for table `guide_items`
--

CREATE TABLE `guide_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `guide_id` int(10) unsigned NOT NULL,
  `item_id` int(10) unsigned NOT NULL,
  `item_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` decimal(20,8) NOT NULL,
  `unit_cost` decimal(20,8) NOT NULL,
  `total` decimal(12,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `guide_items_guide_id_foreign` (`guide_id`),
  KEY `guide_items_item_id_foreign` (`item_id`),
  CONSTRAINT `guide_items_guide_id_foreign` FOREIGN KEY (`guide_id`) REFERENCES `guides` (`id`) ON DELETE CASCADE,
  CONSTRAINT `guide_items_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `guide_items`
--


--
-- Table structure for table `guides`
--

CREATE TABLE `guides` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `external_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `warehouse_id` int(10) unsigned NOT NULL,
  `soap_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `document_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `series` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` int(11) NOT NULL,
  `date_of_issue` date NOT NULL,
  `time_of_issue` time NOT NULL,
  `inventory_transaction_id` char(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guideable_id` int(10) unsigned DEFAULT NULL,
  `guideable_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `observations` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `filename` 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 `guides_series_number_unique` (`soap_type_id`,`document_type_id`,`series`,`number`),
  KEY `guides_user_id_foreign` (`user_id`),
  KEY `guides_warehouse_id_foreign` (`warehouse_id`),
  KEY `guides_document_type_id_foreign` (`document_type_id`),
  KEY `guides_inventory_transaction_id_foreign` (`inventory_transaction_id`),
  CONSTRAINT `guides_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `cat_document_types` (`id`),
  CONSTRAINT `guides_inventory_transaction_id_foreign` FOREIGN KEY (`inventory_transaction_id`) REFERENCES `inventory_transactions` (`id`),
  CONSTRAINT `guides_soap_type_id_foreign` FOREIGN KEY (`soap_type_id`) REFERENCES `soap_types` (`id`),
  CONSTRAINT `guides_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
  CONSTRAINT `guides_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `guides`
--


--
-- Table structure for table `hotel_categories`
--

CREATE TABLE `hotel_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_categories`
--


--
-- Table structure for table `hotel_floors`
--

CREATE TABLE `hotel_floors` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_floors`
--


--
-- Table structure for table `hotel_rates`
--

CREATE TABLE `hotel_rates` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_rates`
--


--
-- Table structure for table `hotel_rent_items`
--

CREATE TABLE `hotel_rent_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `hotel_rent_id` int(10) unsigned NOT NULL,
  `item_id` int(10) unsigned NOT NULL,
  `item` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `hotel_rent_items_hotel_rent_id_foreign` (`hotel_rent_id`),
  KEY `hotel_rent_items_item_id_foreign` (`item_id`),
  CONSTRAINT `hotel_rent_items_hotel_rent_id_foreign` FOREIGN KEY (`hotel_rent_id`) REFERENCES `hotel_rents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `hotel_rent_items_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_rent_items`
--


--
-- Table structure for table `hotel_rents`
--

CREATE TABLE `hotel_rents` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int(10) unsigned NOT NULL,
  `customer` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `notes` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `towels` int(11) NOT NULL DEFAULT 1,
  `hotel_room_id` int(10) unsigned NOT NULL,
  `hotel_rate_id` int(10) unsigned DEFAULT NULL,
  `duration` int(11) NOT NULL DEFAULT 1,
  `quantity_persons` int(11) NOT NULL DEFAULT 1,
  `input_date` date DEFAULT NULL,
  `input_time` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_status` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `output_date` date NOT NULL,
  `output_time` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL,
  `arrears` int(11) NOT NULL DEFAULT 0,
  `status` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'INICIADO',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `hotel_rents_hotel_rate_id_foreign` (`hotel_rate_id`),
  CONSTRAINT `hotel_rents_hotel_rate_id_foreign` FOREIGN KEY (`hotel_rate_id`) REFERENCES `hotel_rates` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_rents`
--


--
-- Table structure for table `hotel_room_rates`
--

CREATE TABLE `hotel_room_rates` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `hotel_room_id` int(10) unsigned NOT NULL,
  `hotel_rate_id` int(10) unsigned NOT NULL,
  `price` double NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `hotel_room_rates_hotel_room_id_foreign` (`hotel_room_id`),
  KEY `hotel_room_rates_hotel_rate_id_foreign` (`hotel_rate_id`),
  CONSTRAINT `hotel_room_rates_hotel_rate_id_foreign` FOREIGN KEY (`hotel_rate_id`) REFERENCES `hotel_rates` (`id`) ON DELETE CASCADE,
  CONSTRAINT `hotel_room_rates_hotel_room_id_foreign` FOREIGN KEY (`hotel_room_id`) REFERENCES `hotel_rooms` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_room_rates`
--


--
-- Table structure for table `hotel_rooms`
--

CREATE TABLE `hotel_rooms` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `item_id` int(10) unsigned DEFAULT NULL,
  `hotel_category_id` int(10) unsigned NOT NULL,
  `hotel_floor_id` int(10) unsigned NOT NULL,
  `name` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'DISPONIBLE',
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `hotel_rooms_hotel_category_id_foreign` (`hotel_category_id`),
  KEY `hotel_rooms_hotel_floor_id_foreign` (`hotel_floor_id`),
  KEY `hotel_rooms_item_id_foreign` (`item_id`),
  CONSTRAINT `hotel_rooms_hotel_category_id_foreign` FOREIGN KEY (`hotel_category_id`) REFERENCES `hotel_categories` (`id`) ON DELETE CASCADE,
  CONSTRAINT `hotel_rooms_hotel_floor_id_foreign` FOREIGN KEY (`hotel_floor_id`) REFERENCES `hotel_floors` (`id`) ON DELETE CASCADE,
  CONSTRAINT `hotel_rooms_item_id_foreign` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hotel_rooms`
--


--
-- Table structure for table `income`
--

CREATE TABLE `income` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `income_type_id` int(10) unsigned NOT NULL,
  `income_reason_id` int(10) unsigned NOT NULL,
  `soap_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `establishment_id` int(10) unsigned NOT NULL,
  `customer` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_type_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `external_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` int(11) NOT NULL,
  `date_of_issue` date NOT NULL,
  `time_of_issue` time NOT NULL,
  `exchange_rate_sale` decimal(13,3) NOT NULL,
  `total` decimal(12,2) NOT NULL,
  `filename` 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 `income_filename_unique` (`filename`),
  KEY `income_user_id_foreign` (`user_id`),
  KEY `income_establishment_id_foreign` (`establishment_id`),
  KEY `income_income_type_id_foreign` (`income_type_id`),
  KEY `income_income_reason_id_foreign` (`income_reason_id`),
  KEY `income_state_type_id_foreign` (`state_type_id`),
  KEY `income_soap_type_id_foreign` (`soap_type_id`),
  KEY `income_currency_type_id_foreign` (`currency_type_id`),
  KEY `income_number_index` (`number`),
  KEY `income_date_of_issue_index` (`date_of_issue`),
  KEY `income_external_id_index` (`external_id`),
  CONSTRAINT `income_currency_type_id_foreign` FOREIGN KEY (`currency_type_id`) REFERENCES `cat_currency_types` (`id`),
  CONSTRAINT `income_establishment_id_foreign` FOREIGN KEY (`establishment_id`) REFERENCES `establishments` (`id`),
  CONSTRAINT `income_income_reason_id_foreign` FOREIGN KEY (`income_reason_id`) REFERENCES `income_reasons` (`id`),
  CONSTRAINT `income_income_type_id_foreign` FOREIGN KEY (`income_type_id`) REFERENCES `income_types` (`id`),
  CONSTRAINT `income_soap_type_id_foreign` FOREIGN KEY (`soap_type_id`) REFERENCES `soap_types` (`id`),
  CONSTRAINT `income_state_type_id_foreign` FOREIGN KEY (`state_type_id`) REFERENCES `state_types` (`id`),
  CONSTRAINT `income_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `income`
--


--
-- Table structure for table `income_items`
--

CREATE TABLE `income_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `income_id` int(10) unsigned NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total` decimal(12,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `income_items_income_id_foreign` (`income_id`),
  CONSTRAINT `income_items_income_id_foreign` FOREIGN KEY (`income_id`) REFERENCES `income` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `income_items`
--


--
-- Table structure for table `income_payments`
--

CREATE TABLE `income_payments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `income_id` int(10) unsigned NOT NULL,
  `date_of_payment` date NOT NULL,
  `payment_method_type_id` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `has_card` tinyint(1) NOT NULL DEFAULT 0,
  `card_brand_id` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `change` decimal(12,2) DEFAULT NULL,
  `payment` decimal(12,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `income_payments_income_id_foreign` (`income_id`),
  KEY `income_payments_card_brand_id_foreign` (`card_brand_id`),
  KEY `income_payments_payment_method_type_id_foreign` (`payment_method_type_id`),
  CONSTRAINT `income_payments_card_brand_id_foreign` FOREIGN KEY (`card_brand_id`) REFERENCES `card_brands` (`id`),
  CONSTRAINT `income_payments_income_id_foreign` FOREIGN KEY (`income_id`) REFERENCES `income` (`id`) ON DELETE CASCADE,
  CONSTRAINT `income_payments_payment_method_type_id_foreign` FOREIGN KEY (`payment_method_type_id`) REFERENCES `payment_method_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
