--
-- Host: 127.0.0.1    Database: sistema_ventas_facturacion
-- ------------------------------------------------------


--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `account_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `initial_balance` double DEFAULT NULL,
  `total_balance` double NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `is_default` tinyint(1) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `owner_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `owner_id` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mostrar_en_web` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `accounts`
--

INSERT INTO `accounts` VALUES (1,'2202113062','CAJA',0,0,'DINERO EN EFECTIVO CAJA',1,1,'2020-12-03 01:13:38','2021-01-24 19:32:49',1,NULL,NULL,NULL,NULL);

--
-- Table structure for table `accounts_platform`
--

CREATE TABLE `accounts_platform` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_name` varchar(45) DEFAULT NULL,
  `account_description` varchar(45) DEFAULT NULL,
  `account_price` varchar(45) DEFAULT NULL,
  `account_time` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `number_users` int(11) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `is_deleted` tinyint(1) DEFAULT NULL,
  `max_products` int(11) DEFAULT NULL,
  `max_users` int(11) DEFAULT NULL,
  `fec_electronic` tinyint(1) DEFAULT NULL,
  `max_documents` tinyint(1) DEFAULT NULL,
  `renovate_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `accounts_platform`
--

INSERT INTO `accounts_platform` VALUES (1,'BASICO','CUENTA BASICA ','120',1,'2020-07-06 06:13:11','2020-07-06 06:13:11',10,1,0,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `adjustments`
--

CREATE TABLE `adjustments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_qty` double NOT NULL,
  `item` int(11) NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `adjustments`
--


--
-- Table structure for table `attendances`
--

CREATE TABLE `attendances` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `employee_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `checkin` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `checkout` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int(11) NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendances`
--

INSERT INTO `attendances` VALUES (1,'2021-01-24',2,1,'8:00am','6:30pm',1,NULL,'2021-01-24 19:34:28','2021-01-24 19:34:28',NULL);

--
-- Table structure for table `billers`
--

CREATE TABLE `billers` (
  `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,
  `company_id` int(11) DEFAULT NULL,
  `secuencial_factura` int(11) DEFAULT NULL,
  `secuencial_guia` int(11) DEFAULT NULL,
  `secuencial_nota_credito` int(11) DEFAULT NULL,
  `secuencial_nota_debito` int(11) DEFAULT NULL,
  `secuencial_liquidacion` int(11) DEFAULT NULL,
  `secuencial_retencion` int(11) DEFAULT NULL,
  `codigo` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `is_active` tinyint(4) DEFAULT NULL,
  `asignado` tinyint(4) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `billers`
--

INSERT INTO `billers` VALUES (1,'CAJA-001-001','2020-12-03 00:55:36','2020-12-08 02:05:36',1,91,1,1,1,1,1,'001',1,1,NULL,NULL),(4,'CAJA-001-003','2021-01-24 19:40:57','2021-01-26 01:57:20',NULL,95,95,95,95,95,95,'003',1,0,NULL,NULL);

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image` longtext COLLATE utf8mb4_unicode_ci,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `brands`
--

INSERT INTO `brands` VALUES (1,'HP','data:image/jpeg;base64,[BLOB]',0,'2020-12-03 00:15:27','2021-01-24 19:08:20',1),(2,'DELL',NULL,0,'2021-01-15 22:34:07','2021-01-24 19:08:34',NULL),(3,'GENIUS','data:image/png;base64,[BLOB]',1,'2021-01-24 19:09:24','2021-01-24 19:09:24',NULL),(4,'marca','data:image/jpeg;base64,[BLOB]',1,'2023-02-19 23:34:45','2023-02-19 23:34:45',NULL);

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `as_menu` tinyint(1) DEFAULT NULL,
  `web` tinyint(1) DEFAULT NULL,
  `mobile` tinyint(1) DEFAULT NULL,
  `route` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` VALUES (1,'APICULTURA',NULL,0,'2020-12-03 19:14:20','2020-12-31 00:00:09',1,0,0,0,NULL,NULL),(2,'EQUIPOS DE PROTECCION',NULL,0,'2020-12-03 19:14:35','2020-12-30 23:59:55',1,1,1,1,NULL,NULL),(3,'MATERIAL APICOLA',NULL,0,'2020-12-03 19:15:34','2020-12-30 23:59:46',1,1,1,1,NULL,NULL),(4,'COLMENAS Y ABEJAS',NULL,0,'2020-12-03 19:16:03','2020-12-31 00:00:00',1,1,1,1,NULL,NULL),(5,'COLMENAS',3,0,'2020-12-03 19:18:33','2020-12-31 00:00:05',1,1,1,1,NULL,NULL),(6,'TAJES DE APICULTURA',2,0,'2020-12-03 19:19:58','2020-12-30 23:59:41',1,1,1,1,NULL,NULL),(7,'GUANTES',2,0,'2020-12-03 19:20:23','2020-12-30 23:59:50',1,1,1,1,NULL,NULL),(8,'TECNOLOGÍA',0,0,'2020-12-31 00:01:00','2021-01-24 18:57:54',1,0,0,0,NULL,NULL),(9,'SUPERMERCADO',0,0,'2020-12-31 00:01:21','2021-01-24 18:57:41',1,0,0,0,NULL,NULL),(10,'demo',8,0,'2021-01-15 22:15:07','2021-01-16 19:54:18',NULL,0,0,0,NULL,NULL),(11,'DEMO CATEGORIA',NULL,0,'2021-01-15 22:28:45','2021-01-16 19:54:23',NULL,0,0,0,NULL,NULL),(12,'LAPTOPS,NOTEBOOK, PORTATILES',NULL,1,'2021-01-24 19:02:13','2021-01-24 19:02:13',NULL,0,0,0,NULL,NULL),(13,'REDES',NULL,1,'2021-01-24 19:02:48','2021-01-24 19:02:48',NULL,0,0,0,NULL,NULL),(14,'ROUTERS',13,1,'2021-01-24 19:03:14','2021-01-24 19:03:14',NULL,0,0,0,NULL,NULL),(15,'ADAPTADORES DE RED',13,1,'2021-01-24 19:03:47','2021-01-24 19:03:47',NULL,0,0,0,NULL,NULL),(16,'ACCESS POINTS',13,1,'2021-01-24 19:04:03','2021-01-24 19:04:03',NULL,0,0,0,NULL,NULL),(17,'SWICH',13,1,'2021-01-24 19:04:24','2021-01-24 19:04:24',NULL,0,0,0,NULL,NULL),(18,'TECLADOS',NULL,1,'2021-01-24 19:05:34','2021-01-24 19:05:34',NULL,0,0,0,NULL,NULL),(19,'MOUSE',NULL,1,'2021-01-24 19:05:44','2021-01-24 19:05:44',NULL,0,0,0,NULL,NULL),(20,'BATERIAS LAPTOPS',NULL,1,'2021-01-24 19:06:02','2021-01-24 19:06:02',NULL,0,0,0,NULL,NULL),(21,'TECLADOS LAPTOPS',18,1,'2021-01-24 19:06:34','2021-01-24 19:06:34',NULL,0,0,0,NULL,NULL),(22,'PANTALLAS Y MONITORES',NULL,1,'2021-01-24 19:07:10','2021-01-24 19:07:10',NULL,0,0,0,NULL,NULL),(23,'ALMACENAMIENTO',NULL,1,'2021-01-24 19:07:30','2021-01-24 19:07:30',NULL,0,0,0,NULL,NULL);

--
-- Table structure for table `codigo_retencion`
--

CREATE TABLE `codigo_retencion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo` varchar(45) DEFAULT NULL,
  `codigo` varchar(45) DEFAULT NULL,
  `porcentaje` varchar(45) DEFAULT NULL,
  `descripcion` varchar(250) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `codigo_retencion`
--

INSERT INTO `codigo_retencion` VALUES (1,'IVA','9','10','Retención IVA 10%',NULL,NULL),(2,'IVA','10','20','Retención IVA 20%',NULL,NULL),(3,'IVA','1','30','Retención IVA 30%',NULL,NULL),(4,'IVA','11','50','Retención IVA 50%',NULL,NULL),(5,'IVA','2','70','Retencióm IVA 70%',NULL,NULL),(6,'IVA','3','100','Retención IVA 100%',NULL,NULL),(7,'Renta','303','10','Honorarios profecionales y demás pagos por servicios relacionados con el titulo profesional',NULL,NULL),(8,'Renta','304',NULL,'Servicios predomina el intelecto no relacionado con el titulo profesional',NULL,NULL);

--
-- Table structure for table `company`
--

CREATE TABLE `company` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(70) DEFAULT NULL,
  `owner_last_name` varchar(45) DEFAULT NULL,
  `company_description` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `business_name` varchar(150) DEFAULT NULL,
  `email` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(4) DEFAULT NULL,
  `is_deleted` tinyint(4) DEFAULT NULL,
  `accounts_platform_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_company_accounts_platform1_idx` (`accounts_platform_id`),
  CONSTRAINT `fk_company_accounts_platform1` FOREIGN KEY (`accounts_platform_id`) REFERENCES `accounts_platform` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `company`
--

INSERT INTO `company` VALUES (1,'ODRES GROUP','JUAN GABRIEL','COMPAÑIA COMERCIAL','QUITO Y LOS SAUCES','098987655','ALIMENTOS','juan.gabriel.077@gmail.com','2018-07-06 06:13:11','2018-07-06 06:13:11',1,0,1);

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `minimum_amount` double DEFAULT NULL,
  `quantity` int(11) NOT NULL,
  `used` int(11) NOT NULL,
  `expired_date` date NOT NULL,
  `user_id` int(11) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `coupons`
--


--
-- Table structure for table `couriers`
--

CREATE TABLE `couriers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(70) DEFAULT NULL,
  `descripcion` varchar(90) DEFAULT NULL,
  `costo_base` varchar(45) DEFAULT NULL,
  `costo_kilogramo` varchar(45) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `comentario` varchar(155) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `couriers`
--

INSERT INTO `couriers` VALUES (1,'SERVIENTREGA','Tiempo estimado de entrega de 24 a 48 horas','0.00','0.40',1,NULL,NULL,'Si la dirección que se proporcione no tiene covertura se enviara a la oficna de Servientrega mas cercana'),(2,'ENETSA','Tiempo estimado de entrega de 24 a 48 horas','0.00','0.20',1,NULL,NULL,'Si la dirección que se proporcione no tiene covertura se enviara a la oficna de Enetsa  mas cercana'),(3,'TRAMACO EXPRESS','Tiempo estimado de entrega de 24 a 48 horas','0.00','0.40',1,NULL,NULL,'Puede recoger en oficina'),(4,'ENCOMIENDA - TRASPORTE INTER PROVINCIAL','Tiempo estimado de entrega de 24 a 48 horas','0.00','0.10',1,NULL,NULL,'Terminal terrestre u oficina de la cooperativa de transporte');

--
-- Table structure for table `customer_groups`
--

CREATE TABLE `customer_groups` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `percentage` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_groups`
--

INSERT INTO `customer_groups` VALUES (1,'General','0',1,'2018-05-12 08:09:36','2020-05-06 02:48:03',1),(2,'Distribuidor','-10',1,'2018-05-12 08:12:14','2020-05-06 02:47:43',1),(3,'Revendedor','5',0,'2018-05-12 08:12:26','2020-09-22 16:34:05',1),(4,'test','12',0,'2018-05-30 01:17:16','2018-05-30 01:17:57',NULL),(5,'test','0',0,'2018-08-03 09:10:27','2018-08-03 09:10:34',NULL);

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customer_group_id` int(11) NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tax_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deposit` double DEFAULT NULL,
  `expense` double DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `tipo_identificacion` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ruc` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `provincia_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` VALUES (1,1,'CONSUMIDOR FINAL',NULL,'correo@test.com','9999999999999','9999999999999','N/A','N/A','N/A','00000','Ecuador',NULL,NULL,1,'2020-12-03 00:45:49','2023-05-28 17:45:28',1,'07',NULL,NULL);

--
-- Table structure for table `datos_envio`
--

CREATE TABLE `datos_envio` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `persona_recibe` varchar(95) DEFAULT NULL,
  `correo` varchar(45) DEFAULT NULL,
  `telefono` varchar(45) DEFAULT NULL,
  `provincia_id` varchar(45) DEFAULT NULL,
  `ciudad` varchar(45) DEFAULT NULL,
  `direccion` varchar(45) DEFAULT NULL,
  `nota_pedido` varchar(45) DEFAULT NULL,
  `sale_id` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `courier_id` int(11) DEFAULT NULL,
  `costo_envio` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `datos_envio`
--

INSERT INTO `datos_envio` VALUES (1,'CARLOS ESTEBAN MUÑOZ','juan.gabriel.077@gmail.com','0987077295','2','Quito','General Rumiñahui y los Sauces N13-128',NULL,'172','2020-11-28 04:28:05','2020-11-28 04:28:05',NULL,NULL);

--
-- Table structure for table `deliveries`
--

CREATE TABLE `deliveries` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sale_id` int(11) NOT NULL,
  `address` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `delivered_by` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `recieved_by` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deliveries`
--


--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` VALUES (1,'PRODUCCIÓN',1,'2020-12-03 01:03:23','2020-12-03 01:03:23',1),(2,'DISEÑO Y CONFECCIÓN',1,'2020-12-03 01:03:50','2020-12-03 01:03:50',1),(3,'ADMINISTRACIÓN',1,'2020-12-03 01:04:05','2020-12-03 01:04:05',1),(4,'TECNOLOGÍA',1,'2020-12-03 01:04:17','2020-12-03 01:04:17',1),(5,'GERENCIA',1,'2020-12-03 01:04:29','2020-12-03 01:04:29',1);

--
-- Table structure for table `deposits`
--

CREATE TABLE `deposits` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `customer_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deposits`
--


--
-- Table structure for table `detalle_retencion`
--

CREATE TABLE `detalle_retencion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo_documento` varchar(5) DEFAULT NULL,
  `codigo_retencion` varchar(45) DEFAULT NULL,
  `porcentaje` varchar(45) DEFAULT NULL,
  `base_imponible` double DEFAULT NULL,
  `total` double DEFAULT NULL,
  `numero_documento` varchar(45) DEFAULT NULL,
  `tipo_impuesto` varchar(45) DEFAULT NULL,
  `fecha_documento` date DEFAULT NULL,
  `retencion_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `detalle_retencion`
--

INSERT INTO `detalle_retencion` VALUES (1,'01','9','10',123,12.3,'001001000000087','2','2021-02-08',1,'2021-02-08 21:15:36','2021-02-08 21:15:36'),(2,'01','9','10',23,2.3,'001001000000008','2','2021-02-08',2,'2021-02-08 21:19:40','2021-02-08 21:19:40'),(3,'01','9','10',123,12.3,'00100100000987','2','2021-02-19',3,'2021-02-20 02:46:41','2021-02-20 02:46:41'),(4,'01','9','10',120,12,'001001000009874','2','2021-02-23',4,'2021-02-24 03:13:41','2021-02-24 03:13:41'),(5,'01','9','10',120,12,'001001000000087','2','2021-02-23',5,'2021-02-24 03:14:42','2021-02-24 03:14:42'),(6,'01','9','10',120,12,'001001000000098','2','2021-02-23',6,'2021-02-24 03:15:29','2021-02-24 03:15:29'),(7,'01','9','10',120,12,'001001000000876','2','2021-02-23',7,'2021-02-24 03:17:41','2021-02-24 03:17:41'),(8,'01','9','10',120,12,'001001000008987','2','2021-02-23',9,'2021-02-24 03:19:39','2021-02-24 03:19:39'),(9,'01','9','10',122,12.2,'001001000000123','2','2021-02-23',10,'2021-02-24 03:26:43','2021-02-24 03:26:43'),(10,'01','10','20',123,24.6,'0010001000000093','2','2021-02-23',11,'2021-02-24 03:35:10','2021-02-24 03:35:10'),(11,'01','9','10',2,0.2,'0010010000000001','1','2023-01-16',12,'2023-01-17 03:02:11','2023-01-17 03:02:11'),(12,'01','303','10',1200,120,'001-001-000000388','1','2023-04-06',1,'2023-04-06 21:29:13','2023-04-06 21:29:13'),(13,'01','9','10',12,1.2,'001-001-000000388','2','2023-04-06',2,'2023-04-06 22:23:34','2023-04-06 22:23:34'),(14,'01','9','10',12,1.2,'001001000000388','2','2023-04-06',3,'2023-04-06 22:26:17','2023-04-06 22:26:17'),(15,'01','9','10',120,12,'001001000000388','1','2023-04-06',4,'2023-04-06 22:29:05','2023-04-06 22:29:05'),(16,'01','9','10',120,12,'001001000000388','1','2023-04-06',5,'2023-04-06 22:31:22','2023-04-06 22:31:22'),(17,'01','9','10',15,1.5,'001001000000388','2','2023-04-06',6,'2023-04-06 22:33:16','2023-04-06 22:33:16'),(18,'01','9','10',15,1.5,'001001000000388','2','2023-04-06',7,'2023-04-06 22:34:17','2023-04-06 22:34:17'),(19,'01','9','10',12,1.2,'001001000000434','2',NULL,8,'2023-04-13 04:14:45','2023-04-13 04:14:45');

--
-- Table structure for table `detalles_guia`
--

CREATE TABLE `detalles_guia` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `cantidad` double DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `guia_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `detalles_guia`
--

INSERT INTO `detalles_guia` VALUES (2,2,1,'2021-02-11 01:32:37','2021-02-11 01:32:37',2),(3,2,5,'2023-01-17 02:52:27','2023-01-17 02:52:27',3),(4,2,5,'2023-01-17 02:59:36','2023-01-17 02:59:36',4),(5,1,5,'2023-04-06 21:26:23','2023-04-06 21:26:23',1),(6,1,1,'2023-04-06 21:30:45','2023-04-06 21:30:45',2),(7,1,1,'2023-04-06 21:31:35','2023-04-06 21:31:35',3),(8,1,1,'2023-04-06 21:33:11','2023-04-06 21:33:11',4),(9,1,1,'2023-04-06 21:34:25','2023-04-06 21:34:25',5),(10,1,16,'2023-04-06 21:44:05','2023-04-06 21:44:05',11),(11,1,56,'2023-04-06 21:45:32','2023-04-06 21:45:32',12),(12,1,56,'2023-04-06 21:47:33','2023-04-06 21:47:33',13),(13,1,1,'2023-04-06 21:56:58','2023-04-06 21:56:58',14),(14,1,1,'2023-04-06 21:59:39','2023-04-06 21:59:39',15),(15,1,6,'2023-04-06 22:00:59','2023-04-06 22:00:59',18),(16,1,15,'2023-04-06 22:03:01','2023-04-06 22:03:01',19),(17,1,56,'2023-04-06 22:06:24','2023-04-06 22:06:24',20),(18,1,1,'2023-04-06 22:09:38','2023-04-06 22:09:38',21),(19,1,1,'2023-04-06 22:21:55','2023-04-06 22:21:55',22),(20,1,1,'2023-04-13 04:13:00','2023-04-13 04:13:00',23);

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` VALUES (1,'ZOILA GUACHAMIN','zoila@gmail.com','000000000',2,NULL,'zoilagmailcom.jpg','Amaguaña Los Sauces','Quito','Ecuador',0,'2020-12-03 01:07:04','2020-12-31 00:19:29','1'),(2,'OSCAR DIAZ','oscardiaz0077@hotmail.com','0939693348',4,23,NULL,'ARCHIDONA','ARCHIDONA','ECUADOR',1,'2021-01-24 19:34:10','2021-01-24 19:34:10',NULL);

--
-- Table structure for table `expense_categories`
--

CREATE TABLE `expense_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expense_categories`
--

INSERT INTO `expense_categories` VALUES (1,'16718342','washing',0,'2018-08-16 00:32:48','2021-01-16 19:55:06',NULL),(2,'60128975','electric bill',0,'2018-08-16 00:39:18','2021-01-16 19:55:02',NULL),(3,'83954970','test',0,'2018-08-16 00:50:28','2018-08-16 00:51:40',NULL),(4,'1234','snacks',0,'2018-09-01 02:40:04','2021-01-16 19:54:52',NULL),(5,'20921079','SERVICIOS BÁSICOS',1,'2020-09-17 18:34:34','2020-09-17 18:50:07',1),(6,'48299045','GASTOS VARIOS',1,'2020-09-17 18:49:37','2020-09-17 18:49:37',1);

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

CREATE TABLE `expenses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expense_category_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


--
-- Table structure for table `forma_pago_facturacion`
--

CREATE TABLE `forma_pago_facturacion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(45) DEFAULT NULL,
  `descripcion` varchar(191) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `forma_pago_facturacion`
--

INSERT INTO `forma_pago_facturacion` VALUES (1,'01','SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,NULL),(2,'15','COMPENSACIÓN DE DEUDAS',NULL,NULL),(3,'16','TARJETA DE DÉBITO',NULL,NULL),(4,'17','DINERO ELECTRÓNICO',NULL,NULL),(5,'18','TARJETA PREPAGO',NULL,NULL),(6,'19','TARJETA DE CRÉDITO',NULL,NULL),(7,'20','OTROS CON UTILIZACION DEL SISTEMA FINANCIERO',NULL,NULL),(8,'21','ENDOSO DE TÍTULOS',NULL,NULL);

--
-- Table structure for table `general_settings`
--

CREATE TABLE `general_settings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `site_title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `site_logo` longtext COLLATE utf8mb4_unicode_ci,
  `currency` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `staff_access` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_format` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `theme` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `currency_position` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_id` int(11) DEFAULT NULL,
  `address` varchar(192) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mode` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_settings`
--

INSERT INTO `general_settings` VALUES (1,'Bl DIGITAL','data:image/png;base64,[BLOB]','USD','all','d-m-Y','blue.css','2018-07-06 06:13:11','2023-02-17 05:29:46','prefix',1,'LOS SAUCES N13-128',NULL);

--
-- Table structure for table `gift_card_recharges`
--

CREATE TABLE `gift_card_recharges` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gift_card_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `gift_card_recharges`
--


--
-- Table structure for table `gift_cards`
--

CREATE TABLE `gift_cards` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `card_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `expense` double NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `expired_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `gift_cards`
--


--
-- Table structure for table `guia`
--

CREATE TABLE `guia` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ambiente` varchar(45) DEFAULT NULL,
  `auxiliar_secuencial` varchar(45) DEFAULT NULL,
  `numero_documento` varchar(45) DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `user_id` varchar(45) DEFAULT NULL,
  `direccion_partida` varchar(250) DEFAULT NULL,
  `transportista` varchar(45) DEFAULT NULL,
  `identificacion_transportista` varchar(45) DEFAULT NULL,
  `ruc_transportista` varchar(15) DEFAULT NULL,
  `fecha_inicio` date DEFAULT NULL,
  `fecha_fin` date DEFAULT NULL,
  `placa` varchar(10) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `motivo_traslado` varchar(155) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `clave_acceso` varchar(59) DEFAULT NULL,
  `estado_sri` varchar(15) DEFAULT NULL,
  `tipo_documento` varchar(5) DEFAULT NULL,
  `fecha_emision` date DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `guia`
--

INSERT INTO `guia` VALUES (1,'1','1','001-001-000000001',1,'1','QUITO','JUAN ESTEBAN','04','1721854675','2023-04-06','2023-04-06','PDM1553',6,NULL,'2023-04-06 21:26:23','2023-04-06 21:26:23','0604202306172185467500110010010000000011234567816','creado','04','2023-04-06',NULL),(2,'1','2','001-001-000000002',1,'1','QUIOT','jUAN','04','1721854675001','2023-04-06','2023-04-13','PDM1553',6,'TASLADO CASA','2023-04-06 21:30:45','2023-04-06 21:30:45',NULL,'creado','05',NULL,NULL),(3,'1','3','001-001-000000003',1,'1','YRYRYRRY','UTTUTUTU','04','1721854675001','2023-04-06','2023-04-06','PDM1553',6,'MOTIVO','2023-04-06 21:31:35','2023-04-06 21:31:35',NULL,'creado','04','2023-04-06',NULL),(4,'1','4','001-001-000000004',1,'1','tyryr','ryryyry','04','1721854675001','2023-04-06','2023-04-06','pol7898',6,'gggree','2023-04-06 21:33:11','2023-04-06 21:33:11',NULL,'creado','05','2023-04-06',NULL),(5,'1','5','001-001-000000005',1,'1','ytyryryryr','ryryryr','04','1721854675001','2023-04-06','2023-04-06','plo8909',6,'gdgd','2023-04-06 21:34:25','2023-04-06 21:34:25',NULL,'creado','04','2023-04-06',NULL),(6,'1','6','001-001-000000006',1,'1','ytyryryryr','ryryryr','04','1721854675001','2023-04-06','2023-04-06','plo8909',6,'gdgd','2023-04-06 21:35:39','2023-04-06 21:35:39','0604202306172185467500110010010000000061234567813','creado','04','2023-04-06',NULL),(7,'1','7','001-001-000000007',1,'1','ytyryryryr','ryryryr','04','1721854675001','2023-04-06','2023-04-06','plo8909',6,'gdgd','2023-04-06 21:35:56','2023-04-06 21:35:56','0604202306172185467500110010010000000071234567819','creado','04','2023-04-06',NULL),(8,'1','8','001-001-000000008',1,'1','rytyryryryr','fksfsffs','04','1721854675001','2023-04-06','2023-04-06','olp099',6,'hgfhgfhf','2023-04-06 21:38:23','2023-04-06 21:38:23','0604202306172185467500110010010000000081234567814','creado','04','2023-04-06',NULL),(9,'1','9','001-001-000000009',1,'1','rytyryryryr','fksfsffs','04','1721854675001','2023-04-06','2023-04-06','olp099',6,'hgfhgfhf','2023-04-06 21:38:26','2023-04-06 21:38:26','0604202306172185467500110010010000000091234567811','creado','04','2023-04-06',NULL),(10,'1','10','001-001-000000010',1,'1','75757gu','uutututu','04','1721854675001','2023-04-06','2023-04-06','uiuiyiyiy',6,'hfhfhgf','2023-04-06 21:39:17','2023-04-06 21:39:17','0604202306172185467500110010010000000101234567815','creado','04','2023-04-06',NULL),(11,'1','11','001-001-000000011',1,'1','ryrry','ryryryr','04','1721854675001','2023-04-06','2023-04-06','plo8987',6,NULL,'2023-04-06 21:44:05','2023-04-06 21:44:05','0604202306172185467500110010010000000111234567810','creado','04','2023-04-06',NULL),(12,'1','12','001-001-000000012',1,'1','ttretete','yryryr','04','1721854675001','2023-04-06','2023-04-06','plo9089',6,'motifo de trslado','2023-04-06 21:45:32','2023-04-06 21:45:57','0604202306172185467500110010010000000121234567816','autorizado','04','2023-04-06','2023-04-06'),(13,'1','13','001-001-000000013',1,'1','ytytu','tututut','04','1721854675001','2023-04-06','2023-04-06','plo9088',6,'hgjgjgjgh','2023-04-06 21:47:33','2023-04-06 21:47:42','0604202306172185467500110010010000000131234567811','autorizado','04','2023-04-06','2023-04-06'),(14,'1','14','001-001-000000014',1,'1','757575','57575','04','1721854675001','2023-04-06','2023-04-06','opl0987',6,'tyutuytut','2023-04-06 21:56:58','2023-04-06 21:57:09','0604202306172185467500110010010000000141234567817','autorizado','04','2023-04-06','2023-04-06'),(15,'1','15','001-001-000000015',1,'1','654646','6464','04','1721854675001','2023-04-06','2023-04-06','plo9876',6,'hfhfhf','2023-04-06 21:59:39','2023-04-06 21:59:39','0604202306172185467500110010010000000151234567812','creado','04','2023-04-06',NULL),(16,'1','16','001-001-000000016',1,'1','654646','6464','04','1721854675001','2023-04-06','2023-04-06','plo9876',6,'hfhfhf','2023-04-06 21:59:42','2023-04-06 21:59:42','0604202306172185467500110010010000000161234567818','creado','04','2023-04-06',NULL),(17,'1','17','001-001-000000017',1,'1','654646','6464','04','1721854675001','2023-04-06','2023-04-06','plo9876',6,'hfhfhf','2023-04-06 21:59:51','2023-04-06 21:59:51','0604202306172185467500110010010000000171234567813','creado','04','2023-04-06',NULL),(18,'1','18','001-001-000000018',1,'1','gfhdghfghdghdf','hdghdhdfdhf','04','1721854675001','2023-04-06','2023-04-06','plo9876',6,'hfhdgfhdfghdfhdghdhd','2023-04-06 22:00:59','2023-04-06 22:01:00','0604202306172185467500110010010000000181234567819','creado','04','2023-04-06',NULL),(19,'1','19','001-001-000000019',1,'1','tutururutyu','rurturtyururturt','04','1721854675001','2023-04-06','2023-04-07','pdm1234',6,'hgjhfhfjhjfjhfgjgfjfhjf','2023-04-06 22:03:01','2023-04-06 22:03:01','0604202306172185467500110010010000000191234567814','creado','04','2023-04-06',NULL),(20,'1','20','001-001-000000020',1,'1','hfhghdhdhfgh','hghdgfhfhgf','04','1721854675001','2023-04-06','2023-04-07','plo9876',6,'gdgfdhdhghdgfhf','2023-04-06 22:06:24','2023-04-06 22:06:33','0604202306172185467500110010010000000201234567811','autorizado','04','2023-04-06','2023-04-06'),(21,'1','21','001-001-000000021',1,'1','tyrtuurtur','uryuruurturtu','04','1721854675001','2023-04-06','2023-04-06','plo8987',6,'ghdhgdfhdfhfd','2023-04-06 22:09:38','2023-04-06 22:09:46','0604202306172185467500110010010000000211234567815','autorizado','04','2023-04-06','2023-04-06'),(22,'1','22','001-001-000000022',1,'1','885788658','8856856858865','04','1721854675001','2023-04-06','2023-04-06','pgm7898',6,'ffghfh','2023-04-06 22:21:55','2023-04-06 22:22:04','0604202306172185467500110010010000000221234567810','autorizado','04','2023-04-06','2023-04-06'),(23,'1','23','001-001-000000023',1,'1','eertttre','tetetetet','04','1721854675001','2023-04-12','2023-04-12','pok1234',6,'este molrtillgldg','2023-04-13 04:12:59','2023-04-13 04:13:10','1204202306172185467500110010010000000231234567811','autorizado','05','2023-04-12','2023-04-12');

--
-- Table structure for table `holidays`
--

CREATE TABLE `holidays` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `is_approved` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `holidays`
--


--
-- Table structure for table `hrm_settings`
--

CREATE TABLE `hrm_settings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `checkin` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `checkout` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hrm_settings`
--

INSERT INTO `hrm_settings` VALUES (1,'8:00am','6:30pm','2019-01-02 02:20:08','2020-09-22 17:59:30',1);

--
-- Table structure for table `informacion_adicional`
--

CREATE TABLE `informacion_adicional` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) DEFAULT NULL,
  `valor` varchar(95) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `tipo_documdento` varchar(5) DEFAULT NULL,
  `documento_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `informacion_adicional`
--


--
-- Table structure for table `languages`
--

CREATE TABLE `languages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(191) 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=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `languages`
--

INSERT INTO `languages` VALUES (1,'es','2018-07-07 22:59:17','2020-09-17 19:59:37');

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_resets_table',1),(3,'2018_02_17_060412_create_categories_table',1),(4,'2018_02_20_035727_create_brands_table',1),(5,'2018_02_25_100635_create_suppliers_table',1),(6,'2018_02_27_101619_create_warehouse_table',1),(7,'2018_03_03_040448_create_units_table',1),(8,'2018_03_04_041317_create_taxes_table',1),(9,'2018_03_10_061915_create_customer_groups_table',1),(10,'2018_03_10_090534_create_customers_table',1),(11,'2018_03_11_095547_create_billers_table',1),(12,'2018_04_05_054401_create_products_table',1),(13,'2018_04_06_133606_create_purchases_table',1),(14,'2018_04_06_154600_create_product_purchases_table',1),(15,'2018_04_06_154915_create_product_warhouse_table',1),(16,'2018_04_10_085927_create_sales_table',1),(17,'2018_04_10_090133_create_product_sales_table',1),(18,'2018_04_10_090254_create_payments_table',1),(19,'2018_04_10_090341_create_payment_with_cheque_table',1),(20,'2018_04_10_090509_create_payment_with_credit_card_table',1),(21,'2018_04_13_121436_create_quotation_table',1),(22,'2018_04_13_122324_create_product_quotation_table',1),(23,'2018_04_14_121802_create_transfers_table',1),(24,'2018_04_14_121913_create_product_transfer_table',1),(25,'2018_05_13_082847_add_payment_id_and_change_sale_id_to_payments_table',2),(26,'2018_05_13_090906_change_customer_id_to_payment_with_credit_card_table',3),(27,'2018_05_20_054532_create_adjustments_table',4),(28,'2018_05_20_054859_create_product_adjustments_table',4),(29,'2018_05_21_163419_create_returns_table',5),(30,'2018_05_21_163443_create_product_returns_table',5),(31,'2018_06_02_050905_create_roles_table',6),(32,'2018_06_02_073430_add_columns_to_users_table',7),(33,'2018_06_03_053738_create_permission_tables',8),(36,'2018_06_21_063736_create_pos_setting_table',9),(37,'2018_06_21_094155_add_user_id_to_sales_table',10),(38,'2018_06_21_101529_add_user_id_to_purchases_table',11),(39,'2018_06_21_103512_add_user_id_to_transfers_table',12),(40,'2018_06_23_061058_add_user_id_to_quotations_table',13),(41,'2018_06_23_082427_add_is_deleted_to_users_table',14),(42,'2018_06_25_043308_change_email_to_users_table',15),(43,'2018_07_06_115449_create_general_settings_table',16),(44,'2018_07_08_043944_create_languages_table',17),(45,'2018_07_11_102144_add_user_id_to_returns_table',18),(46,'2018_07_11_102334_add_user_id_to_payments_table',18),(47,'2018_07_22_130541_add_digital_to_products_table',19),(49,'2018_07_24_154250_create_deliveries_table',20),(50,'2018_08_16_053336_create_expense_categories_table',21),(51,'2018_08_17_115415_create_expenses_table',22),(55,'2018_08_18_050418_create_gift_cards_table',23),(56,'2018_08_19_063119_create_payment_with_gift_card_table',24),(57,'2018_08_25_042333_create_gift_card_recharges_table',25),(58,'2018_08_25_101354_add_deposit_expense_to_customers_table',26),(59,'2018_08_26_043801_create_deposits_table',27),(60,'2018_09_02_044042_add_keybord_active_to_pos_setting_table',28),(61,'2018_09_09_092713_create_payment_with_paypal_table',29),(62,'2018_09_10_051254_add_currency_to_general_settings_table',30),(63,'2018_10_22_084118_add_biller_and_store_id_to_users_table',31),(65,'2018_10_26_034927_create_coupons_table',32),(66,'2018_10_27_090857_add_coupon_to_sales_table',33),(67,'2018_11_07_070155_add_currency_position_to_general_settings_table',34),(68,'2018_11_19_094650_add_combo_to_products_table',35),(69,'2018_12_09_043712_create_accounts_table',36),(70,'2018_12_17_112253_add_is_default_to_accounts_table',37),(71,'2018_12_19_103941_add_account_id_to_payments_table',38),(72,'2018_12_20_065900_add_account_id_to_expenses_table',39),(73,'2018_12_20_082753_add_account_id_to_returns_table',40),(74,'2018_12_26_064330_create_return_purchases_table',41),(75,'2018_12_26_144210_create_purchase_product_return_table',42),(76,'2018_12_26_144708_create_purchase_product_return_table',43),(77,'2018_12_27_110018_create_departments_table',44),(78,'2018_12_30_054844_create_employees_table',45),(79,'2018_12_31_125210_create_payrolls_table',46),(80,'2018_12_31_150446_add_department_id_to_employees_table',47),(81,'2019_01_01_062708_add_user_id_to_expenses_table',48),(82,'2019_01_02_075644_create_hrm_settings_table',49),(83,'2019_01_02_090334_create_attendances_table',50),(84,'2019_01_27_160956_add_three_columns_to_general_settings_table',51),(85,'2019_02_15_183303_create_stock_counts_table',52),(86,'2019_02_17_101604_add_is_adjusted_to_stock_counts_table',53),(87,'2019_04_13_101707_add_tax_no_to_customers_table',54),(89,'2019_10_14_111455_create_holidays_table',55);

--
-- Table structure for table `modo_despliegue`
--

CREATE TABLE `modo_despliegue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mode` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `modo_despliegue`
--

INSERT INTO `modo_despliegue` VALUES (1,'hosting');

--
-- Table structure for table `motivos_nota_debito`
--

CREATE TABLE `motivos_nota_debito` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `razon` varchar(150) DEFAULT NULL,
  `valor` double DEFAULT NULL,
  `nota_debito_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `motivos_nota_debito`
--

INSERT INTO `motivos_nota_debito` VALUES (1,'error',123,1,'2021-02-11 01:36:03','2021-02-11 01:36:03'),(2,'eror en la dta',12,2,'2021-02-20 02:36:35','2021-02-20 02:36:35'),(4,'motivo',5,4,'2023-01-17 02:49:45','2023-01-17 02:49:45'),(5,'motivo',12,1,'2023-04-06 18:32:31','2023-04-06 18:32:31'),(6,'gdgd',23,8,'2023-04-06 18:35:42','2023-04-06 18:35:42'),(7,'gdgdg',5,9,'2023-04-06 18:36:58','2023-04-06 18:36:58'),(8,'gdgdg',5,9,'2023-04-06 18:36:58','2023-04-06 18:36:58'),(9,'555',5,10,'2023-04-06 18:58:05','2023-04-06 18:58:05'),(10,'ter',55,11,'2023-04-06 19:02:30','2023-04-06 19:02:30'),(11,'rtt',5,19,'2023-04-06 20:35:18','2023-04-06 20:35:18'),(12,'4',5,24,'2023-04-06 20:36:29','2023-04-06 20:36:29'),(13,'6666',666,25,'2023-04-06 20:37:31','2023-04-06 20:37:31'),(14,'eret',7,34,'2023-04-06 20:47:22','2023-04-06 20:47:22'),(15,'y6677',67,48,'2023-04-06 21:17:23','2023-04-06 21:17:23'),(16,'MOTIVO 1',3,52,'2023-04-06 21:21:38','2023-04-06 21:21:38'),(17,'MOTIVO 2',3,52,'2023-04-06 21:21:38','2023-04-06 21:21:38'),(18,'este motivo',12,53,'2023-04-13 04:11:59','2023-04-13 04:11:59');

--
-- Table structure for table `nota_credito`
--

CREATE TABLE `nota_credito` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `tipo_documento` varchar(5) DEFAULT NULL,
  `fecha_emision` date DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  `numero_comprobante` varchar(45) DEFAULT NULL,
  `motivo` varchar(155) DEFAULT NULL,
  `subtotal_iva12` double DEFAULT NULL,
  `subtotal_iva0` double DEFAULT NULL,
  `subtotal_noiva` double DEFAULT NULL,
  `subtotal_extiva` double DEFAULT NULL,
  `total_discount` double DEFAULT NULL,
  `total_price` double DEFAULT NULL,
  `total_ice` double DEFAULT NULL,
  `grand_total` double DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_irbpnr` double DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `estado_sri` varchar(45) DEFAULT NULL,
  `clave_acceso` varchar(51) DEFAULT NULL,
  `fecha_emision_documento` date DEFAULT NULL,
  `numero_nota` varchar(45) DEFAULT NULL,
  `auxiliar_secuencial` int(11) DEFAULT NULL,
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `ambiente` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `nota_credito`
--

INSERT INTO `nota_credito` VALUES (1,6,1,1,'01',NULL,NULL,'001-001-000000388','devolución',32,0,0,0,0,32,0,35.43,'2023-04-06 17:53:55',0,'2023-04-06 17:53:55','creado','0604202304172185467500110010010000000011234567813','2023-04-06','001-001-000000001',1,NULL,'1'),(2,6,1,1,'01',NULL,NULL,'001-001-000000388','devolucion',16,0,0,0,0,16,0,17.71,'2023-04-06 17:59:54',0,'2023-04-06 17:59:54','creado','0604202304172185467500110010010000000021234567819','2023-04-06','001-001-000000002',2,NULL,'1'),(3,6,1,1,'01',NULL,NULL,'001-001-000000388','tsst',16,0,0,0,0,16,0,17.71,'2023-04-06 18:06:22',0,'2023-04-06 18:06:22','creado','0604202304172185467500110010010000000031234567814','2023-04-06','001-001-000000003',3,NULL,'1'),(4,6,1,1,'01',NULL,NULL,'001-001-000000388','rtry',16,0,0,0,0,16,0,17.71,'2023-04-06 18:09:36',0,'2023-04-06 18:09:36','creado',NULL,'2023-04-06','001-001-000000004',4,NULL,'1'),(5,6,1,1,'01',NULL,NULL,'001-001-000000388','ttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:10:14',0,'2023-04-06 18:10:14','creado',NULL,'2023-04-06','001-001-000000005',5,NULL,'1'),(6,6,1,1,'01',NULL,NULL,'001-001-000000388','test',16,0,0,0,0,16,0,17.71,'2023-04-06 18:13:41',0,'2023-04-06 18:13:41','creado',NULL,'2023-04-06','001-001-000000006',6,NULL,'1'),(7,6,1,1,'01',NULL,NULL,'001-001-000000388','test',16,0,0,0,0,16,0,17.71,'2023-04-06 18:16:26',0,'2023-04-06 18:16:26','creado',NULL,'2023-04-06','001-001-000000007',7,NULL,'1'),(8,6,1,1,'01',NULL,NULL,'001-001-000000388','test',16,0,0,0,0,16,0,17.71,'2023-04-06 18:16:34',0,'2023-04-06 18:16:34','creado',NULL,'2023-04-06','001-001-000000008',8,NULL,'1'),(9,6,1,1,'01',NULL,NULL,'001-001-000000388','ttttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:17:11',0,'2023-04-06 18:17:11','creado',NULL,'2023-04-06','001-001-000000009',9,NULL,'1'),(10,6,1,1,'01',NULL,NULL,'001-001-000000388','ttttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:17:51',0,'2023-04-06 18:17:51','creado',NULL,'2023-04-06','001-001-000000010',10,NULL,'1'),(11,6,1,1,'01',NULL,NULL,'001-001-000000388','ttttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:17:54',0,'2023-04-06 18:17:54','creado',NULL,'2023-04-06','001-001-000000011',11,NULL,'1'),(12,6,1,1,'01',NULL,NULL,'001-001-000000388','ttttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:17:55',0,'2023-04-06 18:17:55','creado',NULL,'2023-04-06','001-001-000000012',12,NULL,'1'),(13,6,1,1,'01',NULL,NULL,'001-001-000000388','ttttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:17:55',0,'2023-04-06 18:17:55','creado',NULL,'2023-04-06','001-001-000000013',13,NULL,'1'),(14,6,1,1,'01',NULL,NULL,'001-001-000000388','tttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:18:18',0,'2023-04-06 18:18:18','creado',NULL,'2023-04-06','001-001-000000014',14,NULL,'1'),(15,6,1,1,'01',NULL,NULL,'001-001-000000388','tttt',16,0,0,0,0,16,0,17.71,'2023-04-06 18:18:21',0,'2023-04-06 18:18:21','creado',NULL,'2023-04-06','001-001-000000015',15,NULL,'1'),(16,6,1,1,'01',NULL,'2023-04-06','001-001-000000388','tyyuuu',16,0,0,0,0,16,0,17.71,'2023-04-06 18:22:34',0,'2023-04-06 18:21:23','autorizado','0604202304172185467500110010010000000161234567815','2023-04-06','001-001-000000016',16,NULL,'1'),(17,6,1,1,'01',NULL,'2023-04-06','001-001-000000388','556677',16,0,0,0,0,16,0,17.71,'2023-04-06 18:28:23',0,'2023-04-06 18:27:01','autorizado','0604202304172185467500110010010000000171234567810','2023-04-06','001-001-000000017',17,NULL,'1'),(18,6,1,1,'01',NULL,'2023-04-06','001-001-000000388','descripcion',96,0,0,0,0,96,0,106.29,'2023-04-06 18:31:40',0,'2023-04-06 18:31:31','autorizado','0604202304172185467500110010010000000181234567816','2023-04-06','001-001-000000018',18,NULL,'1'),(19,6,1,1,'01','2023-04-12','2023-04-12','001-001-000000434','test',32,0,0,0,0,32,0,35.43,'2023-04-13 04:07:42',0,'2023-04-13 04:07:33','autorizado','1204202304172185467500110010010000000191234567817','2023-04-12','001-001-000000019',19,NULL,'1');

--
-- Table structure for table `nota_debito`
--

CREATE TABLE `nota_debito` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `tipo_documento` varchar(5) DEFAULT NULL,
  `fecha_emision` date DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  `numero_comprobante` varchar(45) DEFAULT NULL,
  `motivo` varchar(155) DEFAULT NULL,
  `subtotal_iva12` double DEFAULT NULL,
  `subtotal_iva0` double DEFAULT NULL,
  `subtotal_noiva` double DEFAULT NULL,
  `subtotal_extiva` double DEFAULT NULL,
  `total_discount` double DEFAULT NULL,
  `total_price` double DEFAULT NULL,
  `total_ice` double DEFAULT NULL,
  `grand_total` double DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_irbpnr` double DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `estado_sri` varchar(45) DEFAULT NULL,
  `clave_acceso` varchar(51) DEFAULT NULL,
  `fecha_emision_documento` date DEFAULT NULL,
  `numero_nota` varchar(45) DEFAULT NULL,
  `auxiliar_secuencial` int(11) DEFAULT NULL,
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `ambiente` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `nota_debito`
--

INSERT INTO `nota_debito` VALUES (1,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:32:31',0,'2023-04-06 18:32:31','creado',NULL,'2023-04-06','001-001-000000001',1,'05','1'),(2,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:32:45',0,'2023-04-06 18:32:45','creado',NULL,'2023-04-06','001-001-000000002',2,'05','1'),(3,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:32:45',0,'2023-04-06 18:32:45','creado',NULL,'2023-04-06','001-001-000000003',3,'05','1'),(4,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:33:22',0,'2023-04-06 18:33:22','creado',NULL,'2023-04-06','001-001-000000004',4,'05','1'),(5,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:34:37',0,'2023-04-06 18:34:37','creado',NULL,'2023-04-06','001-001-000000005',5,'05','1'),(6,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:34:38',0,'2023-04-06 18:34:38','creado',NULL,'2023-04-06','001-001-000000006',6,'05','1'),(7,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,12,0,12,'2023-04-06 18:34:38',0,'2023-04-06 18:34:38','creado',NULL,'2023-04-06','001-001-000000007',7,'05','1'),(8,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,23,0,23,'2023-04-06 18:35:42',0,'2023-04-06 18:35:42','creado',NULL,'2023-04-06','001-001-000000007',7,'05','1'),(9,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,10,0,10,'2023-04-06 18:36:58',0,'2023-04-06 18:36:58','creado',NULL,'2023-04-06','001-001-000000008',8,'05','1'),(10,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 18:58:05',0,'2023-04-06 18:58:05','creado',NULL,'2023-04-06','001-001-000000009',9,'05','1'),(11,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:30',0,'2023-04-06 19:02:30','creado',NULL,'2023-04-06','001-001-000000010',10,'05','1'),(12,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:31',0,'2023-04-06 19:02:31','creado',NULL,'2023-04-06','001-001-000000011',11,'05','1'),(13,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:31',0,'2023-04-06 19:02:31','creado',NULL,'2023-04-06','001-001-000000012',12,'05','1'),(14,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:31',0,'2023-04-06 19:02:31','creado',NULL,'2023-04-06','001-001-000000013',13,'05','1'),(15,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:31',0,'2023-04-06 19:02:31','creado',NULL,'2023-04-06','001-001-000000014',14,'05','1'),(16,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:32',0,'2023-04-06 19:02:32','creado',NULL,'2023-04-06','001-001-000000015',15,'05','1'),(17,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:32',0,'2023-04-06 19:02:32','creado',NULL,'2023-04-06','001-001-000000016',16,'05','1'),(18,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,55,0,55,'2023-04-06 19:02:32',0,'2023-04-06 19:02:32','creado',NULL,'2023-04-06','001-001-000000016',16,'05','1'),(19,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 20:35:18',0,'2023-04-06 20:35:18','creado',NULL,'2023-04-06','001-001-000000016',16,'05','1'),(20,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 20:35:19',0,'2023-04-06 20:35:19','creado',NULL,'2023-04-06','001-001-000000017',17,'05','1'),(21,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 20:35:20',0,'2023-04-06 20:35:20','creado',NULL,'2023-04-06','001-001-000000018',18,'05','1'),(22,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 20:35:20',0,'2023-04-06 20:35:20','creado',NULL,'2023-04-06','001-001-000000019',19,'05','1'),(23,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 20:35:20',0,'2023-04-06 20:35:20','creado',NULL,'2023-04-06','001-001-000000020',20,'05','1'),(24,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,5,0,5,'2023-04-06 20:36:29',0,'2023-04-06 20:36:29','creado',NULL,'2023-04-06','001-001-000000021',21,'05','1'),(25,6,1,1,'01','2023-04-06',NULL,'001-001-000000388',NULL,0,0,0,0,0,666,0,666,'2023-04-06 20:37:31',0,'2023-04-06 20:37:31','creado',NULL,'2023-04-06','001-001-000000022',22,'05','1'),(26,6,1,1,'01','2023-04-06',NULL,'8686',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:39:13',0,'2023-04-06 20:39:13','creado',NULL,'2023-04-06','001-001-000000023',23,'05','1'),(27,6,1,1,'01','2023-04-06',NULL,'8686',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:41:29',0,'2023-04-06 20:41:29','creado','0604202305172185467500110010010000000241234567815','2023-04-06','001-001-000000024',24,'05','1'),(28,6,1,1,'01','2023-04-06',NULL,'8786',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:42:46',0,'2023-04-06 20:42:46','creado',NULL,'2023-04-06','001-001-000000025',25,'05','1'),(29,6,1,1,'01','2023-04-06',NULL,'8786',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:43:02',0,'2023-04-06 20:43:02','creado',NULL,'2023-04-06','001-001-000000026',26,'05','1'),(30,6,1,1,'01','2023-04-06',NULL,'8786',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:43:22',0,'2023-04-06 20:43:22','creado',NULL,'2023-04-06','001-001-000000027',27,'05','1'),(31,6,1,1,'01','2023-04-06',NULL,'757567575',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:43:42',0,'2023-04-06 20:43:42','creado',NULL,'2023-04-06','001-001-000000028',28,'05','1'),(32,6,1,1,'01','2023-04-06',NULL,'464646',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:45:11',0,'2023-04-06 20:45:11','creado',NULL,'2023-04-06','001-001-000000029',29,'05','1'),(33,6,1,1,'01','2023-04-06',NULL,'464646',NULL,0,0,0,0,0,0,0,0,'2023-04-06 20:46:27',0,'2023-04-06 20:46:27','creado',NULL,'2023-04-06','001-001-000000030',30,'05','1'),(34,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 20:47:22',0,'2023-04-06 20:47:22','creado',NULL,'2023-04-06','001-001-000000031',31,'05','1'),(35,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:05:12',0,'2023-04-06 21:05:12','creado',NULL,'2023-04-06','001-001-000000032',32,'05','1'),(36,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:06:28',0,'2023-04-06 21:06:28','creado',NULL,'2023-04-06','001-001-000000033',33,'05','1'),(37,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:07:40',0,'2023-04-06 21:07:40','creado',NULL,'2023-04-06','001-001-000000034',34,'05','1'),(38,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:08:15',0,'2023-04-06 21:08:15','creado',NULL,'2023-04-06','001-001-000000035',35,'05','1'),(39,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:08:50',0,'2023-04-06 21:08:50','creado',NULL,'2023-04-06','001-001-000000036',36,'05','1'),(40,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:09:41',0,'2023-04-06 21:09:41','creado',NULL,'2023-04-06','001-001-000000037',37,'05','1'),(41,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:09:57',0,'2023-04-06 21:09:57','creado',NULL,'2023-04-06','001-001-000000038',38,'05','1'),(42,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:10:48',0,'2023-04-06 21:10:48','creado',NULL,'2023-04-06','001-001-000000039',39,'05','1'),(43,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:13:18',0,'2023-04-06 21:13:18','creado',NULL,'2023-04-06','001-001-000000040',40,'05','1'),(44,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:14:41',0,'2023-04-06 21:14:41','creado',NULL,'2023-04-06','001-001-000000041',41,'05','1'),(45,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:15:22',0,'2023-04-06 21:15:22','creado',NULL,'2023-04-06','001-001-000000042',42,'05','1'),(46,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:15:37',0,'2023-04-06 21:15:37','creado',NULL,'2023-04-06','001-001-000000043',43,'05','1'),(47,6,1,1,'01','2023-04-06',NULL,'6464',NULL,0,0,0,0,0,7,0,7,'2023-04-06 21:16:03',0,'2023-04-06 21:16:03','creado',NULL,'2023-04-06','001-001-000000044',44,'05','1'),(48,6,1,1,'01','2023-04-06',NULL,'45654646',NULL,0,0,0,0,0,67,0,67,'2023-04-06 21:17:23',0,'2023-04-06 21:17:23','creado',NULL,'2023-04-06','001-001-000000045',45,'05','1'),(49,6,1,1,'01','2023-04-06',NULL,'45654646',NULL,0,0,0,0,0,67,0,67,'2023-04-06 21:19:48',0,'2023-04-06 21:19:48','creado',NULL,'2023-04-06','001-001-000000046',46,'05','1'),(50,6,1,1,'01','2023-04-06',NULL,'45654646',NULL,0,0,0,0,0,67,0,67,'2023-04-06 21:20:21',0,'2023-04-06 21:20:21','creado','0604202305172185467500110010010000000471234567810','2023-04-06','001-001-000000047',47,'05','1'),(51,6,1,1,'01','2023-04-06',NULL,'45654646',NULL,0,0,0,0,0,67,0,67,'2023-04-06 21:21:04',0,'2023-04-06 21:21:04','creado','0604202305172185467500110010010000000481234567816','2023-04-06','001-001-000000048',48,'05','1'),(52,6,1,1,'01','2023-04-06','2023-04-06','001-001-000000388',NULL,0,0,0,0,0,6,0,6,'2023-04-06 21:22:30',0,'2023-04-06 21:21:37','autorizado','0604202305172185467500110010010000000491234567811','2023-04-06','001-001-000000049',49,'05','1'),(53,6,1,1,'01','2023-04-12','2023-04-12','001-001-000000434',NULL,0,0,0,0,0,12,0,12,'2023-04-13 04:12:08',0,'2023-04-13 04:11:59','autorizado','1204202305172185467500110010010000000501234567812','2023-04-12','001-001-000000050',50,'05','1');

--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `client_id` bigint(20) unsigned NOT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_auth_codes_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_auth_codes`
--


--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `client_id` bigint(20) unsigned NOT 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 `oauth_personal_access_clients`
--


--
-- Table structure for table `pais`
--

CREATE TABLE `pais` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pais`
--

INSERT INTO `pais` VALUES (1,'ECUADOR',1,NULL,NULL),(2,'USA',1,NULL,NULL);

--
-- Table structure for table `payment_with_bank_transfer`
--

CREATE TABLE `payment_with_bank_transfer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_id` int(11) DEFAULT NULL,
  `num_transaction` varchar(191) DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `referencia` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payment_with_bank_transfer`
--


--
-- Table structure for table `payment_with_cheque`
--

CREATE TABLE `payment_with_cheque` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `payment_id` int(11) NOT NULL,
  `cheque_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_with_cheque`
--


--
-- Table structure for table `payment_with_credit_card`
--

CREATE TABLE `payment_with_credit_card` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `payment_id` int(11) NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `customer_stripe_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `charge_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_with_credit_card`
--


--
-- Table structure for table `payment_with_gift_card`
--

CREATE TABLE `payment_with_gift_card` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `payment_id` int(11) NOT NULL,
  `gift_card_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_with_gift_card`
--


--
-- Table structure for table `payment_with_paypal`
--

CREATE TABLE `payment_with_paypal` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `payment_id` int(11) NOT NULL,
  `transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_with_paypal`
--


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `payment_reference` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `sale_id` int(11) DEFAULT NULL,
  `account_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `change` double NOT NULL,
  `paying_method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `forma_pago` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payments`
--

INSERT INTO `payments` VALUES (9,'BG-POS-20210526-124709',1,NULL,10,1,26,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2021-05-26 17:47:09','2021-05-26 17:47:09',NULL,'01'),(10,'spr-20230116-091802',1,NULL,25,1,13,0,'Cash',NULL,'2023-01-17 02:18:02','2023-01-17 02:18:02',NULL,NULL),(11,'BG-POS-20230116-091855',1,NULL,26,1,13,0,'COMPENSACIÓN DE DEUDAS',NULL,'2023-01-17 02:18:55','2023-01-17 02:18:55',NULL,'15'),(12,'BG-POS-20230216-063507',1,NULL,5,1,26,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-16 23:35:07','2023-02-16 23:35:07',NULL,'01'),(13,'BG-POS-20230216-064247',1,NULL,6,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-16 23:42:47','2023-02-16 23:42:47',NULL,'01'),(14,'BG-POS-20230216-064356',1,NULL,7,1,39,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-16 23:43:56','2023-02-16 23:43:56',NULL,'01'),(15,'ppr-20230216-064720',1,15,NULL,1,384,0,'Cash',NULL,'2023-02-16 23:47:20','2023-02-16 23:47:20',NULL,NULL),(16,'BG-POS-20230216-064850',1,NULL,9,1,28,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-16 23:48:50','2023-02-16 23:48:50',NULL,'01'),(17,'BG-POS-20230216-103032',1,NULL,10,1,120.76,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:30:32','2023-02-17 03:30:32',NULL,'01'),(18,'BG-POS-20230216-103124',1,NULL,11,1,130.84,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:31:24','2023-02-17 03:31:24',NULL,'01'),(19,'BG-POS-20230216-103338',1,NULL,12,1,94.76,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:33:38','2023-02-17 03:33:38',NULL,'01'),(20,'BG-POS-20230216-103646',1,NULL,13,1,209,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:36:46','2023-02-17 03:36:46',NULL,'01'),(21,'BG-POS-20230216-103852',1,NULL,14,1,403,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:38:52','2023-02-17 03:38:52',NULL,'01'),(22,'BG-POS-20230216-104356',1,NULL,15,1,390,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:43:56','2023-02-17 03:43:56',NULL,'01'),(23,'BG-POS-20230216-104426',1,NULL,16,1,545,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:44:26','2023-02-17 03:44:26',NULL,'01'),(24,'BG-POS-20230216-104451',1,NULL,17,1,349,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:44:51','2023-02-17 03:44:51',NULL,'01'),(25,'BG-POS-20230216-104508',1,NULL,18,1,349,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:45:08','2023-02-17 03:45:08',NULL,'01'),(26,'BG-POS-20230216-104848',1,NULL,19,1,222,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:48:48','2023-02-17 03:48:48',NULL,'01'),(27,'BG-POS-20230216-104913',1,NULL,20,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:49:13','2023-02-17 03:49:13',NULL,'01'),(28,'BG-POS-20230216-104926',1,NULL,21,1,84,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:49:26','2023-02-17 03:49:26',NULL,'01'),(29,'BG-POS-20230216-104948',1,NULL,22,1,168,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:49:48','2023-02-17 03:49:48',NULL,'01'),(30,'BG-POS-20230216-105022',1,NULL,23,1,168,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:50:22','2023-02-17 03:50:22',NULL,'01'),(31,'BG-POS-20230216-105133',1,NULL,24,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:51:33','2023-02-17 03:51:33',NULL,'01'),(32,'BG-POS-20230216-105200',1,NULL,25,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:52:00','2023-02-17 03:52:00',NULL,'01'),(33,'BG-POS-20230216-105231',1,NULL,26,1,28,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:52:31','2023-02-17 03:52:31',NULL,'01'),(34,'BG-POS-20230216-105250',1,NULL,27,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 03:52:50','2023-02-17 03:52:50',NULL,'01'),(35,'BG-POS-20230216-113252',1,NULL,28,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:32:52','2023-02-17 04:32:52',NULL,'01'),(36,'BG-POS-20230216-113955',1,NULL,29,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:39:55','2023-02-17 04:39:55',NULL,'01'),(37,'BG-POS-20230216-114334',1,NULL,30,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:43:34','2023-02-17 04:43:34',NULL,'01'),(38,'BG-POS-20230216-114348',1,NULL,31,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:43:48','2023-02-17 04:43:48',NULL,'01'),(39,'BG-POS-20230216-114443',1,NULL,32,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:44:43','2023-02-17 04:44:43',NULL,'01'),(40,'BG-POS-20230216-114457',1,NULL,33,1,168,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:44:57','2023-02-17 04:44:57',NULL,'01'),(41,'BG-POS-20230216-114515',1,NULL,34,1,28,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:45:15','2023-02-17 04:45:15',NULL,'01'),(42,'BG-POS-20230216-114530',1,NULL,35,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:45:30','2023-02-17 04:45:30',NULL,'01'),(43,'BG-POS-20230216-114628',1,NULL,36,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:46:28','2023-02-17 04:46:28',NULL,'01'),(44,'BG-POS-20230216-114736',1,NULL,37,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 04:47:36','2023-02-17 04:47:36',NULL,'01'),(45,'BG-POS-20230217-120352',1,NULL,38,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:03:52','2023-02-17 05:03:52',NULL,'01'),(46,'BG-POS-20230217-120402',1,NULL,39,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:04:02','2023-02-17 05:04:02',NULL,'01'),(47,'BG-POS-20230217-120605',1,NULL,40,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:06:05','2023-02-17 05:06:05',NULL,'01'),(48,'BG-POS-20230217-120803',1,NULL,41,1,362,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:08:03','2023-02-17 05:08:03',NULL,'01'),(49,'BG-POS-20230217-122522',1,NULL,42,1,168,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:25:22','2023-02-17 05:25:22',NULL,'01'),(50,'BG-POS-20230217-122557',1,NULL,43,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:25:57','2023-02-17 05:25:57',NULL,'01'),(51,'BG-POS-20230217-122642',1,NULL,44,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:26:42','2023-02-17 05:26:42',NULL,'01'),(52,'BG-POS-20230217-122652',1,NULL,45,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:26:52','2023-02-17 05:26:52',NULL,'01'),(53,'BG-POS-20230217-122712',1,NULL,46,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:27:12','2023-02-17 05:27:12',NULL,'01'),(54,'BG-POS-20230217-122722',1,NULL,47,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:27:22','2023-02-17 05:27:22',NULL,'01'),(55,'BG-POS-20230217-122730',1,NULL,48,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:27:30','2023-02-17 05:27:30',NULL,'01'),(56,'BG-POS-20230217-122804',1,NULL,49,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:28:04','2023-02-17 05:28:04',NULL,'01'),(57,'BG-POS-20230217-122905',1,NULL,50,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:29:05','2023-02-17 05:29:05',NULL,'01'),(58,'BG-POS-20230217-123004',1,NULL,51,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:30:04','2023-02-17 05:30:04',NULL,'01'),(59,'BG-POS-20230217-123121',1,NULL,52,1,168,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:31:21','2023-02-17 05:31:21',NULL,'01'),(60,'BG-POS-20230217-123138',1,NULL,53,1,26,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:31:38','2023-02-17 05:31:38',NULL,'01'),(61,'BG-POS-20230217-123156',1,NULL,54,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:31:56','2023-02-17 05:31:56',NULL,'01'),(62,'BG-POS-20230217-123220',1,NULL,55,1,13,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-02-17 05:32:20','2023-02-17 05:32:20',NULL,'01'),(63,'BG-POS-20230404-054145',1,NULL,119,1,16,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-04-04 22:41:45','2023-04-04 22:41:45',NULL,'01'),(64,'BG-POS-20230404-054309',1,NULL,120,1,16,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-04-04 22:43:09','2023-04-04 22:43:09',NULL,'01'),(65,'BG-POS-20230406-125222',1,NULL,146,1,16,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-04-06 17:52:22','2023-04-06 17:52:22',NULL,'01'),(66,'BG-POS-20230406-063345',1,NULL,157,1,16,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-04-06 23:33:45','2023-04-06 23:33:45',NULL,'01'),(67,'BG-POS-20230528-115352',1,NULL,199,1,16,0,'SIN UTILIZACION DEL SISTEMA FINANCIERO',NULL,'2023-05-28 16:53:52','2023-05-28 16:53:52',NULL,'01');

--
-- Table structure for table `payrolls`
--

CREATE TABLE `payrolls` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `employee_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `paying_method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payrolls`
--

INSERT INTO `payrolls` VALUES (1,'payroll-20210124-023455',2,1,1,120,'0',NULL,'2021-01-24 19:34:55','2021-01-24 19:34:55',NULL);

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) 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=91 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` VALUES (4,'products-edit','web','2018-06-03 01:00:09','2018-06-03 01:00:09'),(5,'products-delete','web','2018-06-03 22:54:22','2018-06-03 22:54:22'),(6,'products-add','web','2018-06-04 00:34:14','2018-06-04 00:34:14'),(7,'products-index','web','2018-06-04 03:34:27','2018-06-04 03:34:27'),(8,'purchases-index','web','2018-06-04 08:03:19','2018-06-04 08:03:19'),(9,'purchases-add','web','2018-06-04 08:12:25','2018-06-04 08:12:25'),(10,'purchases-edit','web','2018-06-04 09:47:36','2018-06-04 09:47:36'),(11,'purchases-delete','web','2018-06-04 09:47:36','2018-06-04 09:47:36'),(12,'sales-index','web','2018-06-04 10:49:08','2018-06-04 10:49:08'),(13,'sales-add','web','2018-06-04 10:49:52','2018-06-04 10:49:52'),(14,'sales-edit','web','2018-06-04 10:49:52','2018-06-04 10:49:52'),(15,'sales-delete','web','2018-06-04 10:49:53','2018-06-04 10:49:53'),(16,'quotes-index','web','2018-06-04 22:05:10','2018-06-04 22:05:10'),(17,'quotes-add','web','2018-06-04 22:05:10','2018-06-04 22:05:10'),(18,'quotes-edit','web','2018-06-04 22:05:10','2018-06-04 22:05:10'),(19,'quotes-delete','web','2018-06-04 22:05:10','2018-06-04 22:05:10'),(20,'transfers-index','web','2018-06-04 22:30:03','2018-06-04 22:30:03'),(21,'transfers-add','web','2018-06-04 22:30:03','2018-06-04 22:30:03'),(22,'transfers-edit','web','2018-06-04 22:30:03','2018-06-04 22:30:03'),(23,'transfers-delete','web','2018-06-04 22:30:03','2018-06-04 22:30:03'),(24,'returns-index','web','2018-06-04 22:50:24','2018-06-04 22:50:24'),(25,'returns-add','web','2018-06-04 22:50:24','2018-06-04 22:50:24'),(26,'returns-edit','web','2018-06-04 22:50:25','2018-06-04 22:50:25'),(27,'returns-delete','web','2018-06-04 22:50:25','2018-06-04 22:50:25'),(28,'customers-index','web','2018-06-04 23:15:54','2018-06-04 23:15:54'),(29,'customers-add','web','2018-06-04 23:15:55','2018-06-04 23:15:55'),(30,'customers-edit','web','2018-06-04 23:15:55','2018-06-04 23:15:55'),(31,'customers-delete','web','2018-06-04 23:15:55','2018-06-04 23:15:55'),(32,'suppliers-index','web','2018-06-04 23:40:12','2018-06-04 23:40:12'),(33,'suppliers-add','web','2018-06-04 23:40:12','2018-06-04 23:40:12'),(34,'suppliers-edit','web','2018-06-04 23:40:12','2018-06-04 23:40:12'),(35,'suppliers-delete','web','2018-06-04 23:40:12','2018-06-04 23:40:12'),(36,'product-report','web','2018-06-24 23:05:33','2018-06-24 23:05:33'),(37,'purchase-report','web','2018-06-24 23:24:56','2018-06-24 23:24:56'),(38,'sale-report','web','2018-06-24 23:33:13','2018-06-24 23:33:13'),(39,'customer-report','web','2018-06-24 23:36:51','2018-06-24 23:36:51'),(40,'due-report','web','2018-06-24 23:39:52','2018-06-24 23:39:52'),(41,'users-index','web','2018-06-25 00:00:10','2018-06-25 00:00:10'),(42,'users-add','web','2018-06-25 00:00:10','2018-06-25 00:00:10'),(43,'users-edit','web','2018-06-25 00:01:30','2018-06-25 00:01:30'),(44,'users-delete','web','2018-06-25 00:01:30','2018-06-25 00:01:30'),(45,'profit-loss','web','2018-07-14 21:50:05','2018-07-14 21:50:05'),(46,'best-seller','web','2018-07-14 22:01:38','2018-07-14 22:01:38'),(47,'daily-sale','web','2018-07-14 22:24:21','2018-07-14 22:24:21'),(48,'monthly-sale','web','2018-07-14 22:30:41','2018-07-14 22:30:41'),(49,'daily-purchase','web','2018-07-14 22:36:46','2018-07-14 22:36:46'),(50,'monthly-purchase','web','2018-07-14 22:48:17','2018-07-14 22:48:17'),(51,'payment-report','web','2018-07-14 23:10:41','2018-07-14 23:10:41'),(52,'warehouse-stock-report','web','2018-07-14 23:16:55','2018-07-14 23:16:55'),(53,'product-qty-alert','web','2018-07-14 23:33:21','2018-07-14 23:33:21'),(54,'supplier-report','web','2018-07-30 03:00:01','2018-07-30 03:00:01'),(55,'expenses-index','web','2018-09-05 01:07:10','2018-09-05 01:07:10'),(56,'expenses-add','web','2018-09-05 01:07:10','2018-09-05 01:07:10'),(57,'expenses-edit','web','2018-09-05 01:07:10','2018-09-05 01:07:10'),(58,'expenses-delete','web','2018-09-05 01:07:11','2018-09-05 01:07:11'),(59,'general_setting','web','2018-10-19 23:10:04','2018-10-19 23:10:04'),(60,'mail_setting','web','2018-10-19 23:10:04','2018-10-19 23:10:04'),(61,'pos_setting','web','2018-10-19 23:10:04','2018-10-19 23:10:04'),(62,'hrm_setting','web','2019-01-02 10:30:23','2019-01-02 10:30:23'),(63,'purchase-return-index','web','2019-01-02 21:45:14','2019-01-02 21:45:14'),(64,'purchase-return-add','web','2019-01-02 21:45:14','2019-01-02 21:45:14'),(65,'purchase-return-edit','web','2019-01-02 21:45:14','2019-01-02 21:45:14'),(66,'purchase-return-delete','web','2019-01-02 21:45:14','2019-01-02 21:45:14'),(67,'account-index','web','2019-01-02 22:06:13','2019-01-02 22:06:13'),(68,'balance-sheet','web','2019-01-02 22:06:14','2019-01-02 22:06:14'),(69,'account-statement','web','2019-01-02 22:06:14','2019-01-02 22:06:14'),(70,'department','web','2019-01-02 22:30:01','2019-01-02 22:30:01'),(71,'attendance','web','2019-01-02 22:30:01','2019-01-02 22:30:01'),(72,'payroll','web','2019-01-02 22:30:01','2019-01-02 22:30:01'),(73,'employees-index','web','2019-01-02 22:52:19','2019-01-02 22:52:19'),(74,'employees-add','web','2019-01-02 22:52:19','2019-01-02 22:52:19'),(75,'employees-edit','web','2019-01-02 22:52:19','2019-01-02 22:52:19'),(76,'employees-delete','web','2019-01-02 22:52:19','2019-01-02 22:52:19'),(77,'user-report','web','2019-01-16 06:48:18','2019-01-16 06:48:18'),(78,'stock_count','web','2019-02-17 10:32:01','2019-02-17 10:32:01'),(79,'adjustment','web','2019-02-17 10:32:02','2019-02-17 10:32:02'),(80,'sms_setting','web','2019-02-22 05:18:03','2019-02-22 05:18:03'),(81,'create_sms','web','2019-02-22 05:18:03','2019-02-22 05:18:03'),(82,'print_barcode','web','2019-03-07 05:02:19','2019-03-07 05:02:19'),(83,'empty_database','web','2019-03-07 05:02:19','2019-03-07 05:02:19'),(84,'customer_group','web','2019-03-07 05:37:15','2019-03-07 05:37:15'),(85,'unit','web','2019-03-07 05:37:15','2019-03-07 05:37:15'),(86,'tax','web','2019-03-07 05:37:15','2019-03-07 05:37:15'),(87,'gift_card','web','2019-03-07 06:29:38','2019-03-07 06:29:38'),(88,'coupon','web','2019-03-07 06:29:38','2019-03-07 06:29:38'),(89,'holiday','web','2019-10-19 08:57:15','2019-10-19 08:57:15'),(90,'warehouse-report','web','2019-10-22 06:00:23','2019-10-22 06:00:23');

--
-- Table structure for table `product_adjustments`
--

CREATE TABLE `product_adjustments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `adjustment_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `action` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_adjustments`
--


--
-- Table structure for table `product_images`
--

CREATE TABLE `product_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `imagen_base64` longtext,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `products_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product_images`
--

INSERT INTO `product_images` VALUES (1,'data:image/jpeg;base64,[BLOB]',NULL,NULL,1);

--
-- Table structure for table `product_nota_credito`
--

CREATE TABLE `product_nota_credito` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `nota_credito_id` int(11) DEFAULT NULL,
  `qty` double DEFAULT NULL,
  `net_unit_price` double DEFAULT NULL,
  `discount` double DEFAULT NULL,
  `tax_rate` double DEFAULT NULL,
  `tax` double DEFAULT NULL,
  `total` double DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `ice` double DEFAULT NULL,
  `irbpnr` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product_nota_credito`
--

INSERT INTO `product_nota_credito` VALUES (1,1,1,2,16,0,12,3.43,35.43,'2023-04-06 17:53:55','2023-04-06 17:53:55',0,0),(2,1,2,1,16,0,12,1.71,17.71,'2023-04-06 17:59:54','2023-04-06 17:59:54',0,0),(3,1,3,1,16,0,12,1.71,17.71,'2023-04-06 18:06:22','2023-04-06 18:06:22',0,0),(4,1,4,1,16,0,12,1.71,17.71,'2023-04-06 18:09:36','2023-04-06 18:09:36',0,0),(5,1,5,1,16,0,12,1.71,17.71,'2023-04-06 18:10:14','2023-04-06 18:10:14',0,0),(6,1,6,1,16,0,12,1.71,17.71,'2023-04-06 18:13:41','2023-04-06 18:13:41',0,0),(7,1,9,1,16,0,12,1.71,17.71,'2023-04-06 18:17:11','2023-04-06 18:17:11',0,0),(8,1,14,1,16,0,12,1.71,17.71,'2023-04-06 18:18:18','2023-04-06 18:18:18',0,0),(9,1,16,1,16,0,12,1.71,17.71,'2023-04-06 18:21:23','2023-04-06 18:21:23',0,0),(10,1,17,1,16,0,12,1.71,17.71,'2023-04-06 18:27:01','2023-04-06 18:27:01',0,0),(11,1,18,6,16,0,12,10.29,106.29,'2023-04-06 18:31:31','2023-04-06 18:31:31',0,0),(12,1,19,2,16,0,12,3.43,35.43,'2023-04-13 04:07:33','2023-04-13 04:07:33',0,0);

--
-- Table structure for table `product_purchases`
--

CREATE TABLE `product_purchases` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `recieved` double NOT NULL,
  `purchase_unit_id` int(11) NOT NULL,
  `net_unit_cost` double NOT NULL,
  `discount` double NOT NULL,
  `tax_rate` double NOT NULL,
  `tax` double NOT NULL,
  `total` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_purchases`
--

INSERT INTO `product_purchases` VALUES (1,1,1,200,200,1,10.71,0,12,257.14,2400,'2023-04-02 07:03:54','2023-04-02 07:03:54',NULL),(2,2,1,1,1,1,10.71,0,12,1.29,12,'2023-04-06 21:27:56','2023-04-06 21:27:56',NULL),(3,3,1,1,1,1,10.71,0,12,1.29,12,'2023-04-13 04:17:18','2023-04-13 04:17:18',NULL);

--
-- Table structure for table `product_quotation`
--

CREATE TABLE `product_quotation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `quotation_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `sale_unit_id` int(11) NOT NULL,
  `net_unit_price` double NOT NULL,
  `discount` double NOT NULL,
  `tax_rate` double NOT NULL,
  `tax` double NOT NULL,
  `total` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_quotation`
--


--
-- Table structure for table `product_returns`
--

CREATE TABLE `product_returns` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `return_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `sale_unit_id` int(11) NOT NULL,
  `net_unit_price` double NOT NULL,
  `discount` double NOT NULL,
  `tax_rate` double NOT NULL,
  `tax` double NOT NULL,
  `total` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_returns`
--


--
-- Table structure for table `product_sales`
--

CREATE TABLE `product_sales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sale_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `sale_unit_id` int(11) NOT NULL,
  `net_unit_price` double NOT NULL,
  `discount` double NOT NULL,
  `tax_rate` double NOT NULL,
  `tax` double NOT NULL,
  `total` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_sales`
--


--
-- Table structure for table `product_transfer`
--

CREATE TABLE `product_transfer` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `transfer_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `purchase_unit_id` int(11) NOT NULL,
  `net_unit_cost` double NOT NULL,
  `tax_rate` double NOT NULL,
  `tax` double NOT NULL,
  `total` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_transfer`
--


--
-- Table structure for table `product_warehouse`
--

CREATE TABLE `product_warehouse` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_warehouse`
--


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode_symbology` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `brand_id` int(11) DEFAULT NULL,
  `category_id` int(11) NOT NULL,
  `unit_id` int(11) NOT NULL,
  `purchase_unit_id` int(11) NOT NULL,
  `sale_unit_id` int(11) NOT NULL,
  `cost` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty` double DEFAULT NULL,
  `alert_quantity` double DEFAULT NULL,
  `promotion` tinyint(4) DEFAULT NULL,
  `promotion_price` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `starting_date` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_date` date DEFAULT NULL,
  `tax_id` int(11) DEFAULT NULL,
  `tax_method` int(11) DEFAULT NULL,
  `image` longtext COLLATE utf8mb4_unicode_ci,
  `file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `featured` tinyint(4) DEFAULT NULL,
  `product_list` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `qty_list` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price_list` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_details` text COLLATE utf8mb4_unicode_ci,
  `product_invoice_details` text COLLATE utf8mb4_unicode_ci,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `web` tinyint(1) DEFAULT NULL,
  `mobile` tinyint(1) DEFAULT NULL,
  `destacado` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` VALUES (1,'Test','99417503','standard','C128',NULL,12,1,1,1,'12','16',58,2,NULL,NULL,NULL,NULL,1,2,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,1,'2023-04-02 07:03:32','2023-05-28 17:09:50',NULL,NULL,NULL,NULL);

--
-- Table structure for table `provincia`
--

CREATE TABLE `provincia` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) DEFAULT NULL,
  `costo_base` varchar(45) DEFAULT NULL,
  `pais_id` int(11) NOT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_provincia_pais1_idx` (`pais_id`),
  CONSTRAINT `fk_provincia_pais1` FOREIGN KEY (`pais_id`) REFERENCES `pais` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `provincia`
--

INSERT INTO `provincia` VALUES (1,'PICHINCHA','2',1,1,NULL,NULL),(2,'TUNGURAHUA','2.50',1,1,NULL,NULL),(3,'MANABI','3',1,1,NULL,NULL),(4,'GUAYAS','3',1,1,NULL,NULL),(5,'PASTAZA','4',1,1,NULL,NULL);

--
-- Table structure for table `purchase_product_return`
--

CREATE TABLE `purchase_product_return` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `return_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `qty` double NOT NULL,
  `purchase_unit_id` int(11) NOT NULL,
  `net_unit_cost` double NOT NULL,
  `discount` double NOT NULL,
  `tax_rate` double NOT NULL,
  `tax` double NOT NULL,
  `total` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_product_return`
--


--
-- Table structure for table `purchases`
--

CREATE TABLE `purchases` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `item` int(11) NOT NULL,
  `total_qty` double NOT NULL,
  `total_discount` double NOT NULL,
  `total_tax` double NOT NULL,
  `total_cost` double NOT NULL,
  `order_tax_rate` double DEFAULT NULL,
  `order_tax` double DEFAULT NULL,
  `order_discount` double DEFAULT NULL,
  `shipping_cost` double DEFAULT NULL,
  `grand_total` double NOT NULL,
  `paid_amount` double NOT NULL,
  `status` int(11) NOT NULL,
  `payment_status` int(11) NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `clave_acceso` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado_sri` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fecha_emision` date DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  `secuencial` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `plazo` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `forma_pago` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo_documento` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `liquidacion` tinyint(4) DEFAULT NULL,
  `ambiente` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchases`
--

INSERT INTO `purchases` VALUES (1,'BG-20230402-020354',1,1,3,1,200,0,257.14,2400,0,0,NULL,NULL,2400,0,1,1,NULL,NULL,'2023-04-02 07:03:54','2023-04-02 07:03:54',NULL,NULL,'creado',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(2,'BG-20230406-042756',1,1,3,1,1,0,1.29,12,0,0,NULL,NULL,12,0,1,1,NULL,NULL,'2023-04-06 21:27:56','2023-04-06 21:28:07',NULL,'0604202303172185467500110010010000000011234567817','autorizado','2023-04-06','2023-04-06','1','0','01','04',1,'1'),(3,'BG-20230412-111718',1,1,3,1,1,0,1.29,12,0,0,NULL,NULL,12,0,1,1,NULL,NULL,'2023-04-13 04:17:18','2023-04-13 04:17:30',NULL,'1204202303172185467500110010010000000021234567818','autorizado','2023-04-12','2023-04-12','2',NULL,'01','04',1,'1');

--
-- Table structure for table `quotations`
--

CREATE TABLE `quotations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `biller_id` int(11) NOT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `customer_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `item` int(11) NOT NULL,
  `total_qty` double NOT NULL,
  `total_discount` double NOT NULL,
  `total_tax` double NOT NULL,
  `total_price` double NOT NULL,
  `order_tax_rate` double DEFAULT NULL,
  `order_tax` double DEFAULT NULL,
  `order_discount` double DEFAULT NULL,
  `shipping_cost` double DEFAULT NULL,
  `grand_total` double NOT NULL,
  `quotation_status` int(11) NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `quotations`
--


--
-- Table structure for table `retenciones`
--

CREATE TABLE `retenciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ambiente` varchar(5) DEFAULT NULL,
  `sujeto_retenido` int(11) DEFAULT NULL,
  `tipo_sujeto` varchar(45) DEFAULT NULL,
  `clave_acceso` varchar(51) DEFAULT NULL,
  `estado_sri` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `secuencial_auxiliar` int(11) DEFAULT NULL,
  `numero_documento` varchar(45) DEFAULT NULL,
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `fecha_emision` date DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  `periodo_fiscal` varchar(45) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `retenciones`
--

INSERT INTO `retenciones` VALUES (1,'1',3,'provedor','0604202307172185467500110010010000000011234567812','creado','2023-04-06 21:29:13','2023-04-06 21:29:13',1,1,'001-001-000000001',NULL,NULL,NULL,'01/2022',1),(2,'1',3,'provedor','0604202307172185467500110010010000000021234567818','creado','2023-04-06 22:23:33','2023-04-06 22:23:34',1,2,'001-001-000000002',NULL,'2023-04-06',NULL,'01/2022',1),(3,'1',3,'provedor','0604202307172185467500110010010000000031234567813','creado','2023-04-06 22:26:17','2023-04-06 22:26:17',1,3,'001-001-000000003',NULL,'2023-04-06',NULL,'01/2022',1),(4,'1',3,'provedor','0604202307172185467500110010010000000041234567819','creado','2023-04-06 22:29:05','2023-04-06 22:29:05',1,4,'001-001-000000004',NULL,'2023-04-06',NULL,'01/2023',1),(5,'1',3,'provedor','0604202307172185467500110010010000000051234567814','creado','2023-04-06 22:31:22','2023-04-06 22:31:22',1,5,'001-001-000000005',NULL,'2023-04-06',NULL,'01/2023',1),(6,'1',3,'provedor','0604202307172185467500110010010000000061234567811','creado','2023-04-06 22:33:16','2023-04-06 22:33:16',1,6,'001-001-000000006',NULL,'2023-04-06',NULL,'01/2023',1),(7,'1',3,'provedor','0604202307172185467500110010010000000071234567815','autorizado','2023-04-06 22:34:17','2023-04-06 22:34:25',1,7,'001-001-000000007',NULL,'2023-04-06','2023-04-06','01/2023',1),(8,'1',3,'provedor','1204202307172185467500110010010000000081234567816','autorizado','2023-04-13 04:14:45','2023-04-13 04:14:54',1,8,'001-001-000000008',NULL,'2023-04-12','2023-04-12','02/2022',1);

--
-- Table structure for table `return_purchases`
--

CREATE TABLE `return_purchases` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `warehouse_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `item` int(11) NOT NULL,
  `total_qty` double NOT NULL,
  `total_discount` double NOT NULL,
  `total_tax` double NOT NULL,
  `total_cost` double NOT NULL,
  `order_tax_rate` double DEFAULT NULL,
  `order_tax` double DEFAULT NULL,
  `grand_total` double NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_note` text COLLATE utf8mb4_unicode_ci,
  `staff_note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `return_purchases`
--

INSERT INTO `return_purchases` VALUES (1,'prr-20230307-103247',3,1,1,1,1,1,0,0.9,8.4,0,0,8.4,NULL,NULL,NULL,'2023-03-07 15:32:47','2023-03-07 15:32:47',NULL),(2,'prr-20230307-103346',3,1,1,1,1,1,0,0.9,8.4,0,0,8.4,NULL,NULL,NULL,'2023-03-07 15:33:46','2023-03-07 15:33:46',NULL);

--
-- Table structure for table `returns`
--

CREATE TABLE `returns` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `biller_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `item` int(11) NOT NULL,
  `total_qty` double NOT NULL,
  `total_discount` double NOT NULL,
  `total_tax` double NOT NULL,
  `total_price` double NOT NULL,
  `order_tax_rate` double DEFAULT NULL,
  `order_tax` double DEFAULT NULL,
  `grand_total` double NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_note` text COLLATE utf8mb4_unicode_ci,
  `staff_note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `returns`
--

INSERT INTO `returns` VALUES (1,'rr-20230307-102208',1,1,1,1,1,1,1,0,1.39,13,0,0,13,NULL,NULL,NULL,'2023-03-07 15:22:08','2023-03-07 15:22:08',NULL),(2,'rr-20230307-103220',1,1,1,1,1,1,1,0,1.39,13,0,0,13,NULL,NULL,NULL,'2023-03-07 15:32:20','2023-03-07 15:32:20',NULL);

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`),
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` VALUES (4,1,NULL),(4,2,NULL),(4,5,NULL),(5,1,NULL),(5,2,NULL),(6,1,NULL),(6,2,NULL),(6,4,NULL),(6,5,NULL),(7,1,NULL),(7,2,NULL),(7,4,NULL),(7,5,NULL),(8,1,NULL),(8,2,NULL),(8,4,NULL),(9,1,NULL),(9,2,NULL),(9,4,NULL),(10,1,NULL),(10,2,NULL),(11,1,NULL),(11,2,NULL),(12,1,NULL),(12,2,NULL),(12,4,NULL),(12,5,NULL),(13,1,NULL),(13,2,NULL),(13,4,NULL),(13,5,NULL),(14,1,NULL),(14,2,NULL),(14,5,NULL),(15,1,NULL),(15,2,NULL),(16,1,NULL),(16,2,NULL),(16,5,NULL),(17,1,NULL),(17,2,NULL),(17,5,NULL),(18,1,NULL),(18,2,NULL),(18,5,NULL),(19,1,NULL),(19,2,NULL),(20,1,NULL),(20,2,NULL),(20,4,NULL),(21,1,NULL),(21,2,NULL),(21,4,NULL),(22,1,NULL),(22,2,NULL),(23,1,NULL),(23,2,NULL),(24,1,NULL),(24,2,NULL),(24,4,NULL),(24,5,NULL),(25,1,NULL),(25,2,NULL),(25,4,NULL),(25,5,NULL),(26,1,NULL),(26,2,NULL),(26,5,NULL),(27,1,NULL),(27,2,NULL),(28,1,NULL),(28,2,NULL),(28,4,NULL),(29,1,NULL),(29,2,NULL),(29,4,NULL),(30,1,NULL),(30,2,NULL),(31,1,NULL),(31,2,NULL),(32,1,NULL),(32,2,NULL),(33,1,NULL),(33,2,NULL),(34,1,NULL),(34,2,NULL),(35,1,NULL),(35,2,NULL),(36,1,NULL),(36,2,NULL),(37,1,NULL),(37,2,NULL),(38,1,NULL),(38,2,NULL),(39,1,NULL),(39,2,NULL),(40,1,NULL),(40,2,NULL),(41,1,NULL),(41,2,NULL),(42,1,NULL),(42,2,NULL),(43,1,NULL),(43,2,NULL),(44,1,NULL),(44,2,NULL),(45,1,NULL),(45,2,NULL),(46,1,NULL),(46,2,NULL),(46,5,NULL),(47,1,NULL),(47,2,NULL),(48,1,NULL),(48,2,NULL),(49,1,NULL),(49,2,NULL),(50,1,NULL),(50,2,NULL),(51,1,NULL),(51,2,NULL),(52,1,NULL),(52,2,NULL),(53,1,NULL),(53,2,NULL),(54,1,NULL),(54,2,NULL),(55,1,NULL),(55,2,NULL),(56,1,NULL),(56,2,NULL),(57,1,NULL),(57,2,NULL),(58,1,NULL),(58,2,NULL),(59,1,NULL),(59,2,NULL),(60,1,NULL),(60,2,NULL),(61,1,NULL),(61,2,NULL),(62,1,NULL),(62,2,NULL),(63,1,NULL),(63,2,NULL),(63,4,NULL),(64,1,NULL),(64,2,NULL),(64,4,NULL),(65,1,NULL),(65,2,NULL),(66,1,NULL),(66,2,NULL),(67,1,NULL),(67,2,NULL),(68,1,NULL),(68,2,NULL),(69,1,NULL),(69,2,NULL),(69,5,NULL),(70,1,NULL),(70,2,NULL),(71,1,NULL),(71,2,NULL),(72,1,NULL),(72,2,NULL),(73,1,NULL),(73,2,NULL),(74,1,NULL),(74,2,NULL),(75,1,NULL),(75,2,NULL),(76,1,NULL),(76,2,NULL),(77,1,NULL),(77,2,NULL),(78,1,NULL),(78,2,NULL),(79,1,NULL),(79,2,NULL),(80,1,NULL),(80,2,NULL),(81,1,NULL),(81,2,NULL),(82,1,NULL),(82,2,NULL),(83,1,NULL),(83,2,NULL),(84,1,NULL),(84,2,NULL),(85,1,NULL),(85,2,NULL),(85,5,NULL),(86,1,NULL),(86,2,NULL),(87,1,NULL),(87,2,NULL),(88,1,NULL),(88,2,NULL),(89,1,NULL),(90,1,NULL);

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

CREATE TABLE `roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'Admin','admin puede acceder a toda la data','web',1,'2018-06-01 23:46:44','2020-05-05 02:14:43',1),(2,'Owner','Dueño de la tienda','web',1,'2018-10-22 02:38:13','2020-05-05 02:15:02',1),(4,'staff','Tiene accesos especificos','web',1,'2018-06-02 00:05:27','2020-05-05 02:15:28',1),(5,'vendedor','solo permisos para realizar ventas','web',1,'2020-05-05 02:34:54','2020-05-05 02:34:54',NULL),(6,'nuevo rol','demo','web',0,'2020-05-05 02:35:59','2020-09-22 16:09:17',1);

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `biller_id` int(11) DEFAULT NULL,
  `item` int(11) NOT NULL,
  `total_qty` double NOT NULL,
  `total_discount` double NOT NULL,
  `total_tax` double NOT NULL,
  `total_price` double NOT NULL,
  `grand_total` double NOT NULL,
  `order_tax_rate` double DEFAULT NULL,
  `order_tax` double DEFAULT NULL,
  `order_discount` double DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `coupon_discount` double DEFAULT NULL,
  `shipping_cost` double DEFAULT NULL,
  `sale_status` int(11) NOT NULL,
  `payment_status` int(11) NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paid_amount` double DEFAULT NULL,
  `sale_note` text COLLATE utf8mb4_unicode_ci,
  `staff_note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `forma_pago` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo_documento` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `clave_acceso` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado_fact_sri` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fecha_emision` date DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `secuencial` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `plazo` int(11) DEFAULT NULL,
  `ambiente` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `numero_documento` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content_xml` blob,
  `autorization_xml` blob,
  `ride` blob,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sales`
--


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` VALUES ('KmWlnoTUxiRfm3qQu6gU7pdji6RXZZOcKW9agESN',NULL,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0','YTozOntzOjY6Il90b2tlbiI7czo0MDoiamZMV1BHbWJrNEs1RUVTRUU5bTVUZ3ZzNDRVbFNnaWs0MjNEejhYYyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzA6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9yZWdpc3RlciI7fX0=',1604624563);

--
-- Table structure for table `shoping_cart`
--

CREATE TABLE `shoping_cart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` bigint(20) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `description` varchar(191) DEFAULT NULL,
  `quantity` varchar(191) DEFAULT NULL,
  `price` varchar(191) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `session` varchar(191) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `shoping_cart`
--


--
-- Table structure for table `stock_counts`
--

CREATE TABLE `stock_counts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `category_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `brand_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `initial_file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `final_file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `is_adjusted` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stock_counts`
--

INSERT INTO `stock_counts` VALUES (1,'scr-20190228-124939',2,NULL,NULL,1,'full','20190228-124939.csv',NULL,NULL,0,'2019-02-28 06:49:39','2019-02-28 06:49:39',NULL),(2,'scr-20200917-010641',7,NULL,NULL,1,'full','20200917-010641.csv',NULL,NULL,0,'2020-09-17 18:06:41','2020-09-17 18:06:41',NULL),(3,'scr-20200922-033654',7,NULL,NULL,1,'full','20200922-033654.csv',NULL,NULL,0,'2020-09-22 20:36:54','2020-09-22 20:36:54',1);

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `vat_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `tipo_documento` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `suppliers`
--

INSERT INTO `suppliers` VALUES (1,'proveedor demo',NULL,'demo','0102939451001','example@gmail.com','00000000','Av. El Inca N12-23','Quito','Pichincha','00000','Ecuador',0,'2020-12-03 20:26:42','2021-01-24 19:20:29',1,'04'),(2,'FÁREZ VÉLEZ DIGNA AMÉRICA',NULL,'demo2','0102939451001','example2@gmail.com','0989878765','Av America N12-123','Quito','Pichincha','00000','ECUADOR',0,'2021-01-07 23:59:29','2021-01-16 20:08:37',1,NULL),(3,'YOLANDA TIPAN','IDCMAYORISTAENCOMPUTACIONCA.png','IDC-MAYORISTA EN COMPUTACION CA','1792840821001','yolandatipan@idcmayoristas.com','098405182','Av. Colón Oe2-24 entre Av. 10 de Agosto y Versalles','Quito','Pichincha',NULL,'Ecuador',1,'2021-01-24 19:25:40','2021-01-24 19:25:40',NULL,'04');

--
-- Table structure for table `taxes`
--

CREATE TABLE `taxes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `taxes`
--

INSERT INTO `taxes` VALUES (1,'IVA 12%',12,1,'2020-12-03 20:11:41','2020-12-03 20:11:41',1),(2,'IVA 0%',0,1,'2020-12-03 20:11:51','2020-12-03 20:11:51',1);

--
-- Table structure for table `tipo_documento`
--

CREATE TABLE `tipo_documento` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(45) DEFAULT NULL,
  `descripcion` varchar(192) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tipo_documento`
--

INSERT INTO `tipo_documento` VALUES (1,'04','RUC',NULL,NULL),(2,'05','CÉDULA',NULL,NULL),(3,'06','PASAPORTE',NULL,NULL),(4,'07','CONSUMIDOR FINAL',NULL,NULL),(5,'08','EXTERIOR',NULL,NULL);

--
-- Table structure for table `tipo_documento_electronico`
--

CREATE TABLE `tipo_documento_electronico` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(5) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tipo_documento_electronico`
--

INSERT INTO `tipo_documento_electronico` VALUES (1,'01','FACTURA',NULL,NULL),(2,'03','LIQUIDACIÓN DE COMPRA DE',NULL,NULL),(3,'04','NOTA DE CRÉDITO ',NULL,NULL),(4,'05','NOTA DE DÉBITO ',NULL,NULL),(5,'06','GUÍA DE REMISIÓN ',NULL,NULL),(6,'07','COMPROBANTE DE RETENCIÓN',NULL,NULL);

--
-- Table structure for table `tipo_impuesto`
--

CREATE TABLE `tipo_impuesto` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `codigo` varchar(5) DEFAULT NULL,
  `name` varchar(75) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tipo_impuesto`
--

INSERT INTO `tipo_impuesto` VALUES (1,'2','IVA ',NULL,NULL),(2,'3','ICE',NULL,NULL),(3,'5','IRBPNR',NULL,NULL);

--
-- Table structure for table `transfers`
--

CREATE TABLE `transfers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `from_warehouse_id` int(11) NOT NULL,
  `to_warehouse_id` int(11) NOT NULL,
  `item` int(11) NOT NULL,
  `total_qty` double NOT NULL,
  `total_tax` double NOT NULL,
  `total_cost` double NOT NULL,
  `shipping_cost` double DEFAULT NULL,
  `grand_total` double NOT NULL,
  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transfers`
--

INSERT INTO `transfers` VALUES (1,'tr-20230307-104056',1,1,1,3,1,1,0.9,8.4,NULL,8.4,NULL,NULL,'2023-03-07 15:40:56','2023-03-07 15:40:56',NULL),(2,'tr-20230307-104223',1,1,1,3,1,1,15.48,144.48,NULL,144.48,NULL,NULL,'2023-03-07 15:42:23','2023-03-07 15:42:23',NULL);

--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `unit_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `base_unit` int(11) DEFAULT NULL,
  `operator` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `operation_value` double DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `units`
--

INSERT INTO `units` VALUES (1,'pc','Pieza',NULL,'*',1,1,'2018-05-12 02:27:46','2018-08-17 21:41:53',1),(2,'dozen','dozen box',1,'*',12,1,'2018-05-12 09:57:05','2018-05-12 09:57:05',NULL),(3,'cartoon','cartoon box',1,'*',24,1,'2018-05-12 09:57:45','2018-05-12 09:57:45',NULL),(4,'m','metro',NULL,'*',1,1,'2018-05-12 09:58:07','2018-05-27 23:20:57',1),(6,'test','test',NULL,'*',1,0,'2018-05-27 23:20:20','2018-05-27 23:20:25',NULL),(7,'kg','kilogramo',NULL,'*',1,1,'2018-06-25 00:49:26','2018-06-25 00:49:26',1),(8,'20','ni33',8,'*',1,0,'2018-07-31 22:35:51','2018-07-31 22:40:54',NULL),(9,'gm','gram',7,'/',1000,0,'2018-09-01 00:06:28','2021-01-24 19:38:27',1),(10,'gz','goz',NULL,'*',1,0,'2018-11-29 03:40:29','2019-03-02 11:53:29',NULL),(11,'cnc','Canecas',NULL,'*',1,0,'2020-05-06 01:42:45','2021-01-24 19:38:19',1),(12,'lt','Litro',NULL,'*',1,0,'2020-05-06 01:43:09','2021-01-24 19:38:11',1);

--
-- Table structure for table `warehouses`
--

CREATE TABLE `warehouses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `codigo` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `emisor_id` int(11) DEFAULT NULL,
  `codigo_numerico` varchar(9) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cod_ref` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `warehouses`
--

INSERT INTO `warehouses` VALUES (1,'MATRIZ','0939693348','oscardiaz0077@hotmail.com','ARCHIDONA BARRIO SAN AGUSTIN C16 Y TRANSV. 20',1,'2020-12-03 00:16:56','2021-01-24 15:34:10',1,'001',1,'12345678','BG'),(2,'LOCAL N1 - LA MARIN','0960898765','example2@gmail.com','Autopista General Rumiñahui N12-234',0,'2020-12-03 19:55:44','2021-01-24 15:33:24',1,'001',1,'12345678','TO'),(3,'Prueba 1','0988776897','rgsistemas7@gmail.com','Manta',0,'2021-03-29 22:18:07','2023-05-28 17:41:26',NULL,'002',1,'002','Ninguno');


