--
-- Host: localhost    Database: fursocial
-- ------------------------------------------------------


--
-- Table structure for table `abonos`
--

CREATE TABLE `abonos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idfactura` bigint unsigned NOT NULL,
  `nc` int DEFAULT '0',
  `consecutivo` int DEFAULT '0',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `saldoinicialfactura` double NOT NULL DEFAULT '0',
  `cc` int DEFAULT '2',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `saldoinicial` double NOT NULL DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '1',
  `observacionesabono` varchar(300) DEFAULT NULL,
  `observacionesabonos` varchar(100) DEFAULT NULL,
  `consecutivosistema` int DEFAULT NULL,
  `idoorden` int DEFAULT '0',
  `idorden` int DEFAULT '0',
  `idtercero` int DEFAULT '0',
  `destino` varchar(25) DEFAULT NULL,
  `idreserva` int DEFAULT '0',
  `idasesor` int DEFAULT '0',
  `abonogeneral` varchar(25) DEFAULT NULL,
  `idrecibogeneral` int DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idfactura` (`idfactura`),
  CONSTRAINT `abonos_ibfk_1` FOREIGN KEY (`idz`) REFERENCES `z` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonos`
--


--
-- Table structure for table `abonoscompras`
--

CREATE TABLE `abonoscompras` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idmayorcompras` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` int DEFAULT '0',
  `valorinicial` int NOT NULL DEFAULT '0',
  `fecha` date DEFAULT NULL,
  `cc` bigint unsigned NOT NULL,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  `mediodepago` varchar(25) DEFAULT NULL,
  `afectacaja` int DEFAULT '1',
  `observacionesabonocompra` varchar(200) DEFAULT NULL,
  `abonogeneral` varchar(25) DEFAULT NULL,
  `idtercero` int DEFAULT '0',
  `consecutivoac` int DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idmayorcompras` (`idmayorcompras`),
  KEY `idz` (`idz`),
  CONSTRAINT `abonoscompras_ibfk_1` FOREIGN KEY (`idmayorcompras`) REFERENCES `mayorescompras` (`id`),
  CONSTRAINT `abonoscompras_ibfk_2` FOREIGN KEY (`idz`) REFERENCES `z` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonoscompras`
--


--
-- Table structure for table `abonosordenservicio`
--

CREATE TABLE `abonosordenservicio` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idorden` bigint unsigned NOT NULL,
  `consecutivo` int DEFAULT '0',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  `facturado` int DEFAULT '0',
  `abonado` int DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idfactura` (`idorden`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonosordenservicio`
--


--
-- Table structure for table `abonosprestamos`
--

CREATE TABLE `abonosprestamos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `valor` int DEFAULT NULL,
  `saldoinicial` int DEFAULT NULL,
  `saldofinal` int DEFAULT NULL,
  `idz` int DEFAULT '1',
  `idusuario` int DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idprestamo` int DEFAULT NULL,
  `consecutivo` int DEFAULT NULL,
  `idcliente` int DEFAULT '0',
  `cc` int DEFAULT '0',
  `mediodepago` varchar(25) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonosprestamos`
--


--
-- Table structure for table `abonosprestamosin`
--

CREATE TABLE `abonosprestamosin` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `valor` int DEFAULT NULL,
  `saldoinicial` int DEFAULT NULL,
  `saldofinal` int DEFAULT NULL,
  `idz` int DEFAULT '1',
  `idusuario` int DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idprestamo` int DEFAULT NULL,
  `consecutivo` int DEFAULT NULL,
  `idcliente` int DEFAULT '0',
  `cc` int DEFAULT '0',
  `mediodepago` varchar(25) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '0',
  `observaciones` varchar(100) DEFAULT NULL,
  `abonado` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonosprestamosin`
--

INSERT INTO `abonosprestamosin` (`id`, `valor`, `saldoinicial`, `saldofinal`, `idz`, `idusuario`, `fechacreacion`, `idprestamo`, `consecutivo`, `idcliente`, `cc`, `mediodepago`, `pv`, `afectacaja`, `observaciones`, `abonado`) VALUES (1,25000,0,NULL,562,2,'2025-04-24 19:29:37',1,NULL,0,0,'EFECTIVO','KALDI',1,'asd fasdfasdf',0);

--
-- Table structure for table `abonosreservas`
--

CREATE TABLE `abonosreservas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idfactura` bigint unsigned NOT NULL,
  `nc` int DEFAULT '0',
  `consecutivo` int DEFAULT '0',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `saldoinicialfactura` double NOT NULL DEFAULT '0',
  `cc` int DEFAULT '2',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `saldoinicial` double NOT NULL DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '1',
  `observacionesabono` varchar(100) DEFAULT NULL,
  `observacionesabonos` varchar(100) DEFAULT NULL,
  `consecutivosistema` int DEFAULT NULL,
  `abonado` int DEFAULT '0',
  `idorden` int DEFAULT '0',
  `idtercero` int DEFAULT '0',
  `destino` varchar(25) DEFAULT NULL,
  `idreserva` int DEFAULT '0',
  `mediodepago` varchar(25) DEFAULT 'EFECTIVO',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idfactura` (`idfactura`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonosreservas`
--


--
-- Table structure for table `abonosseparados`
--

CREATE TABLE `abonosseparados` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idmayorseparados` bigint unsigned NOT NULL,
  `nc` int DEFAULT '0',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `saldoinicialfactura` double NOT NULL DEFAULT '0',
  `consecutivo` int NOT NULL DEFAULT '0',
  `cc` bigint unsigned NOT NULL,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `saldoinicial` double NOT NULL DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `idgasto` int DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idmayorseparados` (`idmayorseparados`),
  CONSTRAINT `abonosseparados_ibfk_1` FOREIGN KEY (`idz`) REFERENCES `z` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `abonosseparados`
--


--
-- Table structure for table `adicionales`
--

CREATE TABLE `adicionales` (
  `id` int NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned DEFAULT NULL,
  `idadicional` bigint unsigned DEFAULT NULL,
  `incremento` decimal(5,2) DEFAULT '0.00',
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` bigint unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idarticulo_2` (`idarticulo`,`idadicional`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idadicional` (`idadicional`),
  KEY `idusuario` (`idusuario`),
  CONSTRAINT `adicionales_ibfk_1` FOREIGN KEY (`idadicional`) REFERENCES `articulos` (`id`),
  CONSTRAINT `adicionales_ibfk_2` FOREIGN KEY (`idarticulo`) REFERENCES `articulos` (`id`),
  CONSTRAINT `adicionales_ibfk_3` FOREIGN KEY (`idadicional`) REFERENCES `articulos` (`id`),
  CONSTRAINT `adicionales_ibfk_4` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=458 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `adicionales`
--


--
-- Table structure for table `adicionales_grupo`
--

CREATE TABLE `adicionales_grupo` (
  `id` int NOT NULL AUTO_INCREMENT,
  `idgrupo` int NOT NULL,
  `idadicional` bigint unsigned NOT NULL,
  `incremento` decimal(5,2) DEFAULT '0.00',
  `fechacreacion` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idgrupo_adicional` (`idgrupo`,`idadicional`),
  KEY `idgrupo` (`idgrupo`),
  KEY `idadicional` (`idadicional`),
  CONSTRAINT `adicionales_grupo_ibfk_1` FOREIGN KEY (`idgrupo`) REFERENCES `grupos_adicionales` (`id`),
  CONSTRAINT `adicionales_grupo_ibfk_2` FOREIGN KEY (`idadicional`) REFERENCES `articulos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `adicionales_grupo`
--


--
-- Table structure for table `ajustesdebodega`
--

CREATE TABLE `ajustesdebodega` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `descripcion` varchar(100) DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `cantidad` int DEFAULT NULL,
  `detalle` varchar(100) NOT NULL DEFAULT '',
  `idusuario` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idusuario` (`idusuario`),
  KEY `cc` (`cc`),
  CONSTRAINT `ajustesdebodega_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `ajustesdebodega_ibfk_3` FOREIGN KEY (`idarticulo`) REFERENCES `articulos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `ajustesdebodega`
--


--
-- Table structure for table `ajustesdeinventario`
--

CREATE TABLE `ajustesdeinventario` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `descripcion` varchar(100) DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `cantidad` int DEFAULT NULL,
  `detalle` varchar(100) NOT NULL DEFAULT '',
  `idusuario` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idusuario` (`idusuario`),
  KEY `cc` (`cc`),
  CONSTRAINT `ajustesdeinventario_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `ajustesdeinventario`
--


--
-- Table structure for table `anticipos`
--

CREATE TABLE `anticipos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `fechacreacion` date DEFAULT NULL,
  `valor` int DEFAULT '0',
  `mediodepago` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'EFECTIVO',
  `afectacaja` tinyint unsigned DEFAULT '1',
  `observaciones` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `idorden` int DEFAULT '0',
  `idusuario` int DEFAULT '0',
  `consecutivo` int DEFAULT '0',
  `idz` int DEFAULT '1',
  `idfactura` int DEFAULT '0',
  `idcliente` int DEFAULT '0',
  `anticpoencm` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `anticipos`
--

INSERT INTO `anticipos` (`id`, `fechacreacion`, `valor`, `mediodepago`, `afectacaja`, `observaciones`, `idorden`, `idusuario`, `consecutivo`, `idz`, `idfactura`, `idcliente`, `anticpoencm`) VALUES (1,'2024-08-13',500,'EFECTIVO',1,NULL,2,1,1,562,47740,3161,0),(2,'2024-08-13',100,'EFECTIVO',1,NULL,2,1,3,562,47740,3161,0),(3,'2024-08-13',3000,'TRANSFERENCIA',1,NULL,7,1,4,562,47741,3161,0),(4,'2024-08-13',5000,'TRANSFERENCIA',0,NULL,7,1,5,562,47741,3161,0);

--
-- Table structure for table `anticiposeliminados`
--

CREATE TABLE `anticiposeliminados` (
  `id` int NOT NULL AUTO_INCREMENT,
  `fechacreacion` date DEFAULT NULL,
  `valor` int DEFAULT '0',
  `mediodepago` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `afectacaja` tinyint unsigned DEFAULT '1',
  `observaciones` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `idorden` int DEFAULT '0',
  `idusuario` int DEFAULT '0',
  `consecutivo` int DEFAULT '0',
  `idcliente` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `anticiposeliminados`
--


--
-- Table structure for table `articulos`
--

CREATE TABLE `articulos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idtienda` int DEFAULT '1',
  `esmp` bit(1) DEFAULT b'1',
  `seproduce` int DEFAULT '0',
  `sedesccomponeenventa` int NOT NULL DEFAULT '1',
  `idseccion` int DEFAULT '0',
  `SUBseccion` varchar(50) DEFAULT 'GENERAL',
  `ordendelarticulo` int DEFAULT '0',
  `referencia` varchar(20) NOT NULL DEFAULT '',
  `alias` varchar(20) NOT NULL DEFAULT '',
  `codabajo` varchar(5) NOT NULL DEFAULT '',
  `CODARTICULOABAJO` varchar(5) NOT NULL DEFAULT '',
  `situacioncocina` varchar(25) DEFAULT 'CAJA',
  `descripcion` varchar(100) NOT NULL DEFAULT ' ',
  `descripcionlarga` varchar(300) NOT NULL DEFAULT ' ',
  `seccion` varchar(50) NOT NULL DEFAULT 'SELECCIONE',
  `valordeventa` double NOT NULL DEFAULT '0',
  `cantidad` double NOT NULL DEFAULT '0',
  `cantidadenbodega` int DEFAULT '0',
  `fechadecreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `extension` varchar(5) NOT NULL DEFAULT ' ',
  `cc` bigint unsigned NOT NULL DEFAULT '0',
  `ultimocoste` double NOT NULL DEFAULT '0',
  `tienecomposicion` int NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `saleenlamesa` int DEFAULT '1',
  `esmodificador` int DEFAULT '1',
  `costomedio` double NOT NULL DEFAULT '0',
  `costoactual` double NOT NULL DEFAULT '0',
  `cantidadminima` int DEFAULT '0',
  `numerodelineas` int NOT NULL DEFAULT '1',
  `porcentajeiva` decimal(5,2) DEFAULT '0.00',
  `linea` varchar(50) NOT NULL DEFAULT 'SELECCIONE',
  `familiademodificadores` varchar(50) NOT NULL DEFAULT 'SELECCIONE',
  `descuentomaximo` int DEFAULT '0',
  `valordistribuidor` int NOT NULL DEFAULT '0',
  `descatalogado` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `tienemodificadores` int NOT NULL DEFAULT '0',
  `valordeventatiendas` double NOT NULL DEFAULT '0',
  `valordeventafundaciones` double NOT NULL DEFAULT '0',
  `valortiendavirtual` decimal(11,2) DEFAULT NULL,
  `comision` int NOT NULL DEFAULT '0',
  `orden` int NOT NULL DEFAULT '0',
  `semonitorea` int NOT NULL DEFAULT '0',
  `idunidaddemedida` bigint unsigned NOT NULL DEFAULT '1',
  `idrapi` varchar(25) DEFAULT NULL,
  `sesubeaifood` int DEFAULT '0',
  `sesubearappi` int DEFAULT '0',
  `secompra` int DEFAULT '0',
  `marca` varchar(25) DEFAULT NULL,
  `talla` varchar(5) DEFAULT NULL,
  `referenciacruzada` varchar(25) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  `COD_SATELITE_ARTICULO` varchar(25) DEFAULT NULL,
  `fabricante` varchar(100) DEFAULT NULL,
  `modelo` varchar(100) DEFAULT NULL,
  `serial` varchar(100) DEFAULT NULL,
  `usuarioedita` varchar(100) DEFAULT NULL,
  `ultimaedicion` datetime DEFAULT CURRENT_TIMESTAMP,
  `cantidad2` int DEFAULT '0',
  `situacioncocina2` varchar(25) DEFAULT 'SELECCIONE',
  `idifood` varchar(50) DEFAULT NULL,
  `valordeventaregular` int DEFAULT '0',
  `sesubeashopify` int DEFAULT '0',
  `codigoarea` int DEFAULT NULL,
  `materiales` varchar(300) DEFAULT NULL,
  `idlinea` int DEFAULT NULL,
  `porcentajecomision` decimal(5,2) DEFAULT NULL,
  `cuenta_impuesto` int DEFAULT NULL,
  `urlfotoarticulo` varchar(500) DEFAULT 'https://susoftware.es/imagenes/susoftware.png',
  `imei` varchar(50) DEFAULT NULL,
  `sefactura` bit(1) DEFAULT b'1',
  `cupon_vence` date DEFAULT NULL,
  `porcentajeutilidad1` decimal(5,2) DEFAULT NULL,
  `porcentajeutilidad2` decimal(5,2) DEFAULT NULL,
  `tipoanimal` bit(1) DEFAULT b'0',
  `tiendavirtual` bit(1) DEFAULT b'1',
  `sevendeacero` bit(1) DEFAULT b'0',
  `descuentodeldia` int DEFAULT '0',
  `conteodiario` int DEFAULT '0',
  `cantidadbodega` bit(1) DEFAULT b'0',
  `verenventas` bit(1) DEFAULT b'0',
  `mostraartodosentv` int DEFAULT '1',
  `impultraprocesados` int DEFAULT '0',
  `urlfoto` bit(1) DEFAULT b'0',
  `meta` bit(1) DEFAULT b'0',
  `promocionar_t` int DEFAULT '0',
  `p_descuento1` decimal(3,2) DEFAULT '0.00',
  `compraminima` int DEFAULT '1',
  `vrventapublico` double DEFAULT '0',
  `dia` int DEFAULT '0',
  `lunes` int DEFAULT '0',
  `martes` int DEFAULT '0',
  `miercoles` int DEFAULT '0',
  `jueves` int DEFAULT '0',
  `viernes` int DEFAULT '0',
  `sabado` int DEFAULT '0',
  `domingo` int DEFAULT '0',
  `inilunes` time DEFAULT '00:00:00',
  `inimartes` time DEFAULT '00:00:00',
  `inimiercoles` time DEFAULT '00:00:00',
  `inijueves` time DEFAULT '00:00:00',
  `iniviernes` time DEFAULT '00:00:00',
  `inisabado` time DEFAULT '00:00:00',
  `inidomingo` time DEFAULT '00:00:00',
  `finlunes` time DEFAULT '00:00:00',
  `finmartes` time DEFAULT '00:00:00',
  `finmiercoles` time DEFAULT '00:00:00',
  `finjueves` time DEFAULT '00:00:00',
  `finviernes` time DEFAULT '00:00:00',
  `finsabado` time DEFAULT '00:00:00',
  `findomingo` time DEFAULT '00:00:00',
  `descuentodeldiaentv` int DEFAULT '0',
  `porcentaje_ganancia_en_venta` decimal(5,2) DEFAULT '0.00',
  `factorpresentacion` int DEFAULT '1',
  `idpresentacion` int DEFAULT '0',
  `presentacion` varchar(25) DEFAULT NULL,
  `valorporfactor` decimal(8,2) DEFAULT '0.00',
  `fecha_vence_articulos` date DEFAULT NULL,
  `division` int DEFAULT '1',
  `varlorventa1` int DEFAULT '0',
  `referencia2` varchar(25) DEFAULT NULL,
  `compromisoactual` int DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idunidaddemedida` (`idunidaddemedida`),
  CONSTRAINT `articulos_ibfk_1` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `articulos_ibfk_3` FOREIGN KEY (`idunidaddemedida`) REFERENCES `unidadesdemedida` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `articulos`
--

INSERT INTO `articulos` (`id`, `idtienda`, `esmp`, `seproduce`, `sedesccomponeenventa`, `idseccion`, `SUBseccion`, `ordendelarticulo`, `referencia`, `alias`, `codabajo`, `CODARTICULOABAJO`, `situacioncocina`, `descripcion`, `descripcionlarga`, `seccion`, `valordeventa`, `cantidad`, `cantidadenbodega`, `fechadecreacion`, `extension`, `cc`, `ultimocoste`, `tienecomposicion`, `idusuario`, `saleenlamesa`, `esmodificador`, `costomedio`, `costoactual`, `cantidadminima`, `numerodelineas`, `porcentajeiva`, `linea`, `familiademodificadores`, `descuentomaximo`, `valordistribuidor`, `descatalogado`, `subido`, `tienemodificadores`, `valordeventatiendas`, `valordeventafundaciones`, `valortiendavirtual`, `comision`, `orden`, `semonitorea`, `idunidaddemedida`, `idrapi`, `sesubeaifood`, `sesubearappi`, `secompra`, `marca`, `talla`, `referenciacruzada`, `pv`, `COD_SATELITE_ARTICULO`, `fabricante`, `modelo`, `serial`, `usuarioedita`, `ultimaedicion`, `cantidad2`, `situacioncocina2`, `idifood`, `valordeventaregular`, `sesubeashopify`, `codigoarea`, `materiales`, `idlinea`, `porcentajecomision`, `cuenta_impuesto`, `urlfotoarticulo`, `imei`, `sefactura`, `cupon_vence`, `porcentajeutilidad1`, `porcentajeutilidad2`, `tipoanimal`, `tiendavirtual`, `sevendeacero`, `descuentodeldia`, `conteodiario`, `cantidadbodega`, `verenventas`, `mostraartodosentv`, `impultraprocesados`, `urlfoto`, `meta`, `promocionar_t`, `p_descuento1`, `compraminima`, `vrventapublico`, `dia`, `lunes`, `martes`, `miercoles`, `jueves`, `viernes`, `sabado`, `domingo`, `inilunes`, `inimartes`, `inimiercoles`, `inijueves`, `iniviernes`, `inisabado`, `inidomingo`, `finlunes`, `finmartes`, `finmiercoles`, `finjueves`, `finviernes`, `finsabado`, `findomingo`, `descuentodeldiaentv`, `porcentaje_ganancia_en_venta`, `factorpresentacion`, `idpresentacion`, `presentacion`, `valorporfactor`, `fecha_vence_articulos`, `division`, `varlorventa1`, `referencia2`, `compromisoactual`) VALUES (1,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','EN ESPERA',' ','SELECCIONE',0,0,0,'2025-09-03 16:31:32',' ',2,0,0,1,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,'-1','KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-03 16:31:32',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(2,1,_binary '',0,1,0,'GENERAL',0,'','','','','CAJA','','','SELECCIONE',0,0,0,'2025-09-22 13:33:42',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 13:33:42',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(3,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','Alquiler de equipos','','SELECCIONE',0,0,0,'2025-09-22 14:49:07',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 14:49:07',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(4,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','Actividad cultural','','SELECCIONE',0,0,0,'2025-09-22 14:51:59',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 14:51:59',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(5,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','Transporte','','SELECCIONE',0,0,0,'2025-09-22 14:52:37',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 14:52:37',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(6,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','Productos','','SELECCIONE',0,0,0,'2025-09-22 14:53:05',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 14:53:05',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(7,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','Logistica','','SELECCIONE',0,0,0,'2025-09-22 14:53:16',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 14:53:16',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0),(8,1,_binary '',0,1,1,'GENERAL',0,'','','','','CAJA','Catering','','SELECCIONE',0,0,0,'2025-09-22 14:53:29',' ',0,0,0,2,1,1,0,0,0,1,0.00,'SELECCIONE','SELECCIONE',0,0,0,0,0,0,0,NULL,0,0,0,1,NULL,0,0,0,NULL,NULL,NULL,'KALDI',NULL,NULL,NULL,NULL,NULL,'2025-09-22 14:53:29',0,'SELECCIONE',NULL,0,0,NULL,NULL,NULL,NULL,NULL,'https://susoftware.es/imagenes/susoftware.png',NULL,_binary '',NULL,NULL,NULL,_binary '\0',_binary '',_binary '\0',0,0,_binary '\0',_binary '\0',1,0,_binary '\0',_binary '\0',0,0.00,1,0,0,0,0,0,0,0,0,0,'00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00','00:00:00',0,0.00,1,0,NULL,0.00,NULL,1,0,NULL,0);

--
-- Table structure for table `articulos_grupos`
--

CREATE TABLE `articulos_grupos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `idgrupo` int NOT NULL,
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` bigint unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idarticulo_grupo` (`idarticulo`,`idgrupo`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idgrupo` (`idgrupo`),
  CONSTRAINT `articulos_grupos_ibfk_1` FOREIGN KEY (`idarticulo`) REFERENCES `articulos` (`id`),
  CONSTRAINT `articulos_grupos_ibfk_2` FOREIGN KEY (`idgrupo`) REFERENCES `grupos_adicionales` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `articulos_grupos`
--


--
-- Table structure for table `asignacionarticulosfamiliasmodificadores`
--

CREATE TABLE `asignacionarticulosfamiliasmodificadores` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `familiademodificadores` varchar(50) NOT NULL DEFAULT '',
  `activo` int DEFAULT '0',
  `idfamilia` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sesubeaifood` int DEFAULT '0',
  `idrapi` varchar(25) DEFAULT NULL,
  `papa` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `orden` int DEFAULT '0',
  `sesubearappi` int DEFAULT '1',
  `minimo` int DEFAULT '0',
  `maximo` int DEFAULT '0',
  `ordenasignaionfm` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idfamilia` (`idfamilia`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignacionarticulosfamiliasmodificadores`
--


--
-- Table structure for table `asignacionarticulosturnos`
--

CREATE TABLE `asignacionarticulosturnos` (
  `id` bigint unsigned NOT NULL,
  `idarticulo` int NOT NULL,
  `idturno` int NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `cc` int NOT NULL DEFAULT '0',
  `idarticulooriginal` int NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignacionarticulosturnos`
--


--
-- Table structure for table `asignacionclientesturnos`
--

CREATE TABLE `asignacionclientesturnos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idcliente` bigint unsigned DEFAULT NULL,
  `idturno` bigint unsigned DEFAULT NULL,
  `fechacreacion` date DEFAULT NULL,
  `idusuario` bigint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idcliente` (`idcliente`),
  KEY `idturno` (`idturno`),
  KEY `idusuario` (`idusuario`),
  CONSTRAINT `asignacionclientesturnos_ibfk_1` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `asignacionclientesturnos_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `asignacionclientesturnos_ibfk_3` FOREIGN KEY (`idturno`) REFERENCES `turnos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignacionclientesturnos`
--


--
-- Table structure for table `asignacioncupones`
--

CREATE TABLE `asignacioncupones` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `idcupon` bigint DEFAULT NULL,
  `fechainicio` date DEFAULT NULL,
  `fechafin` date DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `porcentajedescuento` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idfamilia` (`fechafin`),
  KEY `idcupon` (`idcupon`),
  CONSTRAINT `asignacioncupones_ibfk_1` FOREIGN KEY (`idcupon`) REFERENCES `cupones` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignacioncupones`
--


--
-- Table structure for table `asignaciondescuentos`
--

CREATE TABLE `asignaciondescuentos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `idcliente` int DEFAULT NULL,
  `fechainicio` date DEFAULT NULL,
  `fechafin` date DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `porcentajedescuento` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idfamilia` (`fechafin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignaciondescuentos`
--


--
-- Table structure for table `asignacionseccionesterceros`
--

CREATE TABLE `asignacionseccionesterceros` (
  `idcliente` bigint unsigned NOT NULL,
  `idseccion` bigint unsigned NOT NULL,
  `activo` int DEFAULT '1',
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `idcliente_2` (`idcliente`,`idseccion`),
  KEY `idseccion` (`idseccion`),
  KEY `idcliente` (`idcliente`),
  CONSTRAINT `asig1` FOREIGN KEY (`idseccion`) REFERENCES `secciones` (`id`),
  CONSTRAINT `asig12` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignacionseccionesterceros`
--

INSERT INTO `asignacionseccionesterceros` (`idcliente`, `idseccion`, `activo`, `id`) VALUES (1,1,1,1),(2,1,1,2),(5,1,1,4),(6,1,1,5),(7,1,1,8);

--
-- Table structure for table `asignacionzonasterceros`
--

CREATE TABLE `asignacionzonasterceros` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idcliente` bigint unsigned NOT NULL,
  `idzona` bigint unsigned NOT NULL,
  `activo` int DEFAULT '1',
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `idcliente` (`idcliente`,`idzona`),
  KEY `clienteszonas2` (`idzona`),
  CONSTRAINT `clienteszonas1` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `clienteszonas2` FOREIGN KEY (`idzona`) REFERENCES `zonas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `asignacionzonasterceros`
--

INSERT INTO `asignacionzonasterceros` (`id`, `idcliente`, `idzona`, `activo`) VALUES (1,2,1,1),(2,1,1,1),(5,1,2,1),(6,2,2,1),(9,5,1,1),(10,5,2,1),(12,6,1,1),(13,6,2,1),(17,7,1,1),(18,7,2,1);

--
-- Table structure for table `auxiliarbuscarpadre`
--

CREATE TABLE `auxiliarbuscarpadre` (
  `a` int NOT NULL,
  `b` int NOT NULL,
  `idusuario` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `auxiliarbuscarpadre`
--


--
-- Table structure for table `auxiliarcambiodeprecios`
--

CREATE TABLE `auxiliarcambiodeprecios` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idinsumo` bigint unsigned NOT NULL DEFAULT '1',
  `idarticulo` bigint unsigned NOT NULL DEFAULT '1',
  `cc` bigint unsigned NOT NULL,
  `cantidad` double NOT NULL DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idinsumo`),
  KEY `idcaja` (`idarticulo`),
  KEY `cc` (`cc`),
  CONSTRAINT `auxiliarcambiodeprecios_ibfk_1` FOREIGN KEY (`idarticulo`) REFERENCES `articulos` (`id`),
  CONSTRAINT `auxiliarcambiodeprecios_ibfk_2` FOREIGN KEY (`idinsumo`) REFERENCES `articulos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `auxiliarcambiodeprecios`
--


--
-- Table structure for table `auxiliarcostoagrupado`
--

CREATE TABLE `auxiliarcostoagrupado` (
  `idarticulo` int NOT NULL,
  `idinsumo` int NOT NULL,
  `idusuario` int NOT NULL,
  `cantidad` double NOT NULL,
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `auxiliarcostoagrupado`
--


--
-- Table structure for table `auxiliarcotizarreceta`
--

CREATE TABLE `auxiliarcotizarreceta` (
  `idarticulo` int NOT NULL,
  `idinsumo` int NOT NULL,
  `idusuario` int NOT NULL,
  `cantidad` double NOT NULL,
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `auxiliarcotizarreceta`
--


--
-- Table structure for table `bajas`
--

CREATE TABLE `bajas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `codvendedor` int NOT NULL DEFAULT '0',
  `REFERENCIA` varchar(20) DEFAULT NULL,
  `situacioncocina` varchar(50) DEFAULT NULL,
  `idmayor` bigint unsigned NOT NULL,
  `consecutivo` int NOT NULL,
  `INCREMENTO` int NOT NULL,
  `codarticulo` int NOT NULL,
  `codsituacion` int NOT NULL,
  `porcentajedescuento` double DEFAULT '0',
  `referenciafront` varchar(15) DEFAULT NULL,
  `impuesto` double DEFAULT '0',
  `idarticulo` bigint unsigned NOT NULL,
  `descripcion` bigint unsigned NOT NULL,
  `esmodificador` int DEFAULT '0',
  `nombrearticulo` varchar(100) DEFAULT NULL,
  `cantidad` double NOT NULL DEFAULT '0',
  `comentario` varchar(200) DEFAULT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `valorunitario` double NOT NULL DEFAULT '0',
  `idmesa` int NOT NULL DEFAULT '1',
  `bruto` double NOT NULL DEFAULT '0',
  `baseunitario` double NOT NULL DEFAULT '0',
  `ivaunitario` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `cc` bigint unsigned NOT NULL,
  `documento` varchar(3) NOT NULL DEFAULT 'V',
  `origen` varchar(8) NOT NULL DEFAULT 'MESAS',
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `HORAINI` datetime DEFAULT NULL,
  `HORAFIN` datetime DEFAULT NULL,
  `ultimaedicion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idcliente` bigint unsigned NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `abonado` int NOT NULL DEFAULT '0',
  `idfacturaqueabona` int NOT NULL DEFAULT '0',
  `costomedio` double DEFAULT '0',
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `base` double NOT NULL DEFAULT '0',
  `iva` double NOT NULL DEFAULT '0',
  `esbolsillo` int NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1',
  `escortesia` int NOT NULL DEFAULT '0',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `idnc` bigint unsigned NOT NULL DEFAULT '1',
  `nc` int DEFAULT '0',
  `idusuarionc` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(25) NOT NULL DEFAULT 'EFECTIVO',
  `comision` int NOT NULL DEFAULT '0',
  `devolucionrevisada` int DEFAULT '0',
  `fechaabonado` datetime DEFAULT NULL,
  `fechamc` datetime DEFAULT NULL,
  `tienenc` int NOT NULL DEFAULT '0',
  `marcadoparanc` int NOT NULL DEFAULT '0',
  `servicio` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `CODMODIF` varchar(2) NOT NULL DEFAULT '0',
  `esmodif` int NOT NULL DEFAULT '0',
  `CODARTICULOABAJO` varchar(12) NOT NULL DEFAULT '',
  `PRECIOIVA` int NOT NULL DEFAULT '0',
  `NUMMODIF` int NOT NULL DEFAULT '0',
  `numservicio` int NOT NULL DEFAULT '0',
  `aliasespera` int NOT NULL DEFAULT '1',
  `impresiones` int NOT NULL DEFAULT '1',
  `IDMOTIVODTO` varchar(2) NOT NULL DEFAULT '-1',
  `DETALLEDENUMLINEA` varchar(2) NOT NULL DEFAULT '0',
  `FAMILIAAENA` varchar(2) NOT NULL DEFAULT '0',
  `DETALLEMODIF` varchar(2) NOT NULL DEFAULT '0',
  `ABONODE_NUMERO` varchar(2) NOT NULL DEFAULT '0',
  `ABONODE_N` varchar(2) NOT NULL DEFAULT '0',
  `ABONODE_SERIE` varchar(2) NOT NULL DEFAULT '0',
  `ABONODE_FO` varchar(2) NOT NULL DEFAULT '-1',
  `NORDERTIQUET` varchar(1) NOT NULL DEFAULT '0',
  `SORDERTIQUET` varchar(1) NOT NULL DEFAULT '',
  `REQ` int NOT NULL DEFAULT '0',
  `COSTEIVA` int NOT NULL DEFAULT '0',
  `DTO` int NOT NULL DEFAULT '0',
  `TIPO` varchar(2) NOT NULL DEFAULT 'V',
  `CODMACRO` int NOT NULL DEFAULT '0',
  `CODFORMATO` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idmayor` (`idmayor`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcc` (`cc`),
  KEY `idcliente` (`idcliente`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idvendedor` (`idvendedor`),
  CONSTRAINT `bajas_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `bajas_ibfk_3` FOREIGN KEY (`idz`) REFERENCES `z` (`id`),
  CONSTRAINT `bajas_ibfk_4` FOREIGN KEY (`idvendedor`) REFERENCES `clientes` (`id`),
  CONSTRAINT `bajas_ibfk_6` FOREIGN KEY (`idmayor`) REFERENCES `mayoresbajas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `bajas`
--


--
-- Table structure for table `bajasauxiliar`
--

CREATE TABLE `bajasauxiliar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `estadoimpresion` int DEFAULT '0',
  `identificador` varchar(100) DEFAULT NULL,
  `referenciapayu` varchar(200) DEFAULT NULL,
  `referenciafront` varchar(15) DEFAULT NULL,
  `descripcion` varchar(50) DEFAULT NULL,
  `pagarcontraentrega` int DEFAULT '0',
  `idmesa` int DEFAULT '1',
  `descuento` double NOT NULL DEFAULT '0',
  `codsituacion` int NOT NULL,
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `idarticulo` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL DEFAULT '2',
  `origen` varchar(8) NOT NULL DEFAULT 'MESAS',
  `comentario` varchar(200) DEFAULT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `valorunitario` double NOT NULL DEFAULT '0',
  `cantidad` int DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechaentregado` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `costomedio` double DEFAULT '0',
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `observacion` varchar(25) NOT NULL DEFAULT '',
  `despachado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÆ’Ã‚Â² el producto',
  `entregado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÆ’Ã‚Â² el producto',
  `enespera` int NOT NULL DEFAULT '0' COMMENT 'para que el mesero ya no pueda eliminar',
  `comision` int NOT NULL DEFAULT '0',
  `porcentajedescuento` double NOT NULL DEFAULT '0',
  `impuesto` double NOT NULL DEFAULT '0',
  `base` double NOT NULL DEFAULT '0',
  `servicio` double NOT NULL DEFAULT '0',
  `CODMODIF` int NOT NULL DEFAULT '0',
  `numlinea` int NOT NULL DEFAULT '0',
  `esmodif` int NOT NULL DEFAULT '0',
  `situacioncocina` varchar(50) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idvendedor` (`idvendedor`),
  KEY `idcliente` (`idcliente`),
  CONSTRAINT `bajasauxiliar_ibfk_1` FOREIGN KEY (`idarticulo`) REFERENCES `articulos` (`id`),
  CONSTRAINT `bajasauxiliar_ibfk_3` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `bajasauxiliar_ibfk_4` FOREIGN KEY (`idvendedor`) REFERENCES `clientes` (`id`),
  CONSTRAINT `bajasauxiliar_ibfk_6` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `bajasauxiliar`
--


--
-- Table structure for table `banco`
--

CREATE TABLE `banco` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` int DEFAULT NULL,
  `valor` double DEFAULT '0',
  `tipo` varchar(25) DEFAULT NULL,
  `descripcion` varchar(25) DEFAULT NULL,
  `concepto` varchar(200) DEFAULT NULL,
  `idz` int DEFAULT '1',
  `fecha` date DEFAULT NULL,
  `valorinicial` double DEFAULT '0',
  `valorfinal` double DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `banco`
--


--
-- Table structure for table `barrios`
--

CREATE TABLE `barrios` (
  `barrio` varchar(150) DEFAULT NULL,
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `incremento` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `barrio` (`barrio`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `barrios`
--

INSERT INTO `barrios` (`barrio`, `id`, `incremento`) VALUES ('',1,0),('horizontes',2,0);

--
-- Table structure for table `bases`
--

CREATE TABLE `bases` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `base` int NOT NULL DEFAULT '0',
  `fechacreacion` datetime NOT NULL,
  `idz` int NOT NULL DEFAULT '1',
  `idusuario` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `usuario` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `idz` (`idz`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `bases`
--


--
-- Table structure for table `bitacora`
--

CREATE TABLE `bitacora` (
  `id` int NOT NULL,
  `texto` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `fecha` date DEFAULT NULL,
  `fechacreacion` datetime DEFAULT NULL,
  `idcliente` bigint unsigned DEFAULT NULL,
  `idusuario` bigint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idcliente` (`idcliente`),
  KEY `idusuario` (`idusuario`),
  CONSTRAINT `bitacora_ibfk_1` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `bitacora_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `bitacora`
--


--
-- Table structure for table `bolsillos`
--

CREATE TABLE `bolsillos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `idcliente` bigint unsigned NOT NULL,
  `valorinicial` double NOT NULL DEFAULT '0',
  `valorfinal` double NOT NULL DEFAULT '0',
  `cc` bigint unsigned NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idfactura` int DEFAULT '0',
  `movimiento` varchar(8) DEFAULT 'INGRESO',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idcliente` (`idcliente`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  CONSTRAINT `bolsillos_ibfk_1` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `bolsillos_ibfk_2` FOREIGN KEY (`idz`) REFERENCES `z` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `bolsillos`
--


--
-- Table structure for table `cajamayor`
--

CREATE TABLE `cajamayor` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` int DEFAULT NULL,
  `valor` double DEFAULT '0',
  `tipo` varchar(25) DEFAULT NULL,
  `descripcion` varchar(25) DEFAULT NULL,
  `concepto` varchar(25) DEFAULT NULL,
  `idz` int DEFAULT '1',
  `fecha` date DEFAULT NULL,
  `valorinicial` double DEFAULT '0',
  `valorfinal` double DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cajamayor`
--


--
-- Table structure for table `cajamayor2`
--

CREATE TABLE `cajamayor2` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` int DEFAULT NULL,
  `valor` double DEFAULT '0',
  `tipo` varchar(25) DEFAULT NULL,
  `descripcion` varchar(100) DEFAULT '',
  `concepto` varchar(120) DEFAULT NULL,
  `idz` int DEFAULT '1',
  `fecha` date DEFAULT NULL,
  `valorinicial` double DEFAULT '0',
  `valorfinal` double DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `mediodepago` varchar(25) DEFAULT NULL,
  `entrada` double DEFAULT '0',
  `salida` double DEFAULT '0',
  `idprestamoin` int DEFAULT NULL,
  `idtabla` int DEFAULT '0',
  `tabla` varchar(12) DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cajamayor2`
--


--
-- Table structure for table `cajas`
--

CREATE TABLE `cajas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `caja` varchar(25) NOT NULL DEFAULT '',
  `cc` bigint unsigned NOT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cajas`
--

INSERT INTO `cajas` (`id`, `caja`, `cc`, `pv`) VALUES (1,'1',1,'KALDI'),(2,'1',2,'KALDI');

--
-- Table structure for table `calendario`
--

CREATE TABLE `calendario` (
  `id` bigint NOT NULL,
  `descripcion` varchar(200) DEFAULT NULL,
  `titulo` varchar(200) DEFAULT NULL,
  `start` datetime DEFAULT NULL,
  `fechacreacion` datetime DEFAULT NULL,
  `end` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `calendario`
--


--
-- Table structure for table `cambios`
--

CREATE TABLE `cambios` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `bruto` double DEFAULT '0',
  `estadoimpresion` int DEFAULT '0',
  `identificador` varchar(100) DEFAULT NULL,
  `referenciapayu` varchar(200) DEFAULT NULL,
  `referenciafront` varchar(15) DEFAULT NULL,
  `descripcion` varchar(120) DEFAULT NULL,
  `pagarcontraentrega` int DEFAULT '0',
  `idfactura` int DEFAULT NULL,
  `descuento` double NOT NULL DEFAULT '0',
  `codsituacion` int NOT NULL,
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `idarticulo` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL DEFAULT '2',
  `origen` varchar(25) DEFAULT NULL,
  `mediodepago` varchar(25) DEFAULT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `valorunitario` double NOT NULL DEFAULT '0',
  `cantidad` int DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechaentregado` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `costomedio` double DEFAULT '0',
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `tipo` varchar(25) DEFAULT NULL,
  `despachado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÂ² el producto',
  `entregado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÂ² el producto',
  `enespera` int NOT NULL DEFAULT '0' COMMENT 'para que el mesero ya no pueda eliminar',
  `comision` int NOT NULL DEFAULT '0',
  `porcentajedescuento` double NOT NULL DEFAULT '0',
  `impuesto` double NOT NULL DEFAULT '0',
  `base` double NOT NULL DEFAULT '0',
  `servicio` double NOT NULL DEFAULT '0',
  `CODMODIF` int NOT NULL DEFAULT '0',
  `numlinea` int NOT NULL DEFAULT '0',
  `esmodif` int NOT NULL DEFAULT '0',
  `situacioncocina` varchar(50) DEFAULT NULL,
  `CODARTICULOABAJO` int NOT NULL DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `unidaddemedida` varchar(25) DEFAULT NULL,
  `impreso` int DEFAULT '0',
  `domicilio` int DEFAULT '0',
  `enviaraproduccion` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '1',
  `referencia` varchar(25) DEFAULT NULL,
  `consecutivo` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idvendedor` (`idvendedor`),
  KEY `idcliente` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cambios`
--


--
-- Table structure for table `cambiosauxiliar`
--

CREATE TABLE `cambiosauxiliar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `bruto` double DEFAULT '0',
  `estadoimpresion` int DEFAULT '0',
  `identificador` varchar(100) DEFAULT NULL,
  `referenciapayu` varchar(200) DEFAULT NULL,
  `iva` double DEFAULT '0',
  `descripcion` varchar(120) DEFAULT NULL,
  `pagarcontraentrega` int DEFAULT '0',
  `idfactura` int DEFAULT NULL,
  `descuento` double NOT NULL DEFAULT '0',
  `codsituacion` int NOT NULL,
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `idarticulo` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL DEFAULT '2',
  `origen` varchar(25) DEFAULT NULL,
  `comentario` varchar(200) DEFAULT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `valorunitario` double NOT NULL DEFAULT '0',
  `cantidad` int DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechaentregado` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `costomedio` double DEFAULT '0',
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `observacion` varchar(25) NOT NULL DEFAULT '',
  `despachado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÂ² el producto',
  `entregado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÂ² el producto',
  `enespera` int NOT NULL DEFAULT '0' COMMENT 'para que el mesero ya no pueda eliminar',
  `comision` int NOT NULL DEFAULT '0',
  `porcentajedescuento` double NOT NULL DEFAULT '0',
  `impuesto` double NOT NULL DEFAULT '0',
  `base` double NOT NULL DEFAULT '0',
  `servicio` double NOT NULL DEFAULT '0',
  `CODMODIF` int NOT NULL DEFAULT '0',
  `numlinea` int NOT NULL DEFAULT '0',
  `esmodif` int NOT NULL DEFAULT '0',
  `situacioncocina` varchar(50) DEFAULT NULL,
  `CODARTICULOABAJO` int NOT NULL DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `unidaddemedida` varchar(25) DEFAULT NULL,
  `impreso` int DEFAULT '0',
  `domicilio` int DEFAULT '0',
  `enviaraproduccion` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '1',
  `referencia` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idvendedor` (`idvendedor`),
  KEY `idcliente` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cambiosauxiliar`
--


--
-- Table structure for table `cambiosrecibidoauxiliar`
--

CREATE TABLE `cambiosrecibidoauxiliar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `bruto` double DEFAULT '0',
  `estadoimpresion` int DEFAULT '0',
  `identificador` varchar(100) DEFAULT NULL,
  `referenciapayu` varchar(200) DEFAULT NULL,
  `referenciafront` varchar(15) DEFAULT NULL,
  `descripcion` varchar(120) DEFAULT NULL,
  `pagarcontraentrega` int DEFAULT '0',
  `idfactura` int DEFAULT NULL,
  `descuento` double NOT NULL DEFAULT '0',
  `codsituacion` int NOT NULL,
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `idarticulo` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL DEFAULT '2',
  `origen` varchar(25) DEFAULT NULL,
  `comentario` varchar(200) DEFAULT NULL,
  `observaciones` varchar(200) DEFAULT NULL,
  `valorunitario` double NOT NULL DEFAULT '0',
  `cantidad` int DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechaentregado` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `costomedio` double DEFAULT '0',
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `tipo` varchar(25) DEFAULT NULL,
  `observacion` varchar(25) NOT NULL DEFAULT '',
  `despachado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÂ² el producto',
  `entregado` int NOT NULL DEFAULT '0' COMMENT 'Significa que la cocina ya sirviÃƒÂ² el producto',
  `enespera` int NOT NULL DEFAULT '0' COMMENT 'para que el mesero ya no pueda eliminar',
  `comision` int NOT NULL DEFAULT '0',
  `porcentajedescuento` double NOT NULL DEFAULT '0',
  `impuesto` double NOT NULL DEFAULT '0',
  `base` double NOT NULL DEFAULT '0',
  `servicio` double NOT NULL DEFAULT '0',
  `CODMODIF` int NOT NULL DEFAULT '0',
  `numlinea` int NOT NULL DEFAULT '0',
  `esmodif` int NOT NULL DEFAULT '0',
  `situacioncocina` varchar(50) DEFAULT NULL,
  `CODARTICULOABAJO` int NOT NULL DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `unidaddemedida` varchar(25) DEFAULT NULL,
  `impreso` int DEFAULT '0',
  `domicilio` int DEFAULT '0',
  `enviaraproduccion` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `afectacaja` int DEFAULT '1',
  `referencia` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idvendedor` (`idvendedor`),
  KEY `idcliente` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cambiosrecibidoauxiliar`
--


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

CREATE TABLE `cargos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cargo` varchar(120) NOT NULL DEFAULT '',
  `cc` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3;

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

INSERT INTO `cargos` (`id`, `cargo`, `cc`, `pv`) VALUES (3,'MESERO',2,'KALDI'),(8,'',2,'KALDI');

--
-- Table structure for table `causaciones`
--

CREATE TABLE `causaciones` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `valor` int DEFAULT '0',
  `idcliente` int DEFAULT NULL,
  `tipo` varchar(15) DEFAULT 'PAGO',
  `estado` varchar(25) DEFAULT 'ACTIVO',
  `idpadre3` varchar(25) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `fechacreacion` datetime DEFAULT CURRENT_TIMESTAMP,
  `fecharecibido4` date DEFAULT NULL,
  `devolucionreportada` bit(1) DEFAULT b'0',
  `fecharecibido7` datetime DEFAULT NULL,
  `fecharecibido10` datetime DEFAULT NULL,
  `fechaeliminado` datetime DEFAULT NULL,
  `usuarioelimina` varchar(150) DEFAULT NULL,
  `idfactura` int DEFAULT '0',
  `idpadre` int DEFAULT '0',
  `cliente` varchar(25) DEFAULT NULL,
  `padre` varchar(25) DEFAULT NULL,
  `idmayornomina` int DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `cc` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `causaciones`
--


--
-- Table structure for table `cc`
--

CREATE TABLE `cc` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `nombrecc` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cc`
--

INSERT INTO `cc` (`id`, `nombrecc`) VALUES (19,'MERCADO LIBRE G NATECH'),(22,'PAGINA WEB'),(23,'RAPPI NATECH'),(24,'MERCADO LIBRE G COMERCIA'),(25,'LUEGO PAGO'),(26,'RAPPI G COMERCIA'),(27,'ADDI'),(28,'FALABELLA G COMERCIA');

--
-- Table structure for table `centrosdecostos`
--

CREATE TABLE `centrosdecostos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `refrescarcache` int DEFAULT '0',
  `debepagarel` int DEFAULT '0',
  `direccion` varchar(120) NOT NULL DEFAULT ' ',
  `titulotirilla` varchar(50) DEFAULT NULL,
  `pagoefectivo` int DEFAULT '0',
  `cuenta_costodeventa` int DEFAULT NULL,
  `type_regime_id` int DEFAULT '0',
  `ultimomespagado` int DEFAULT '0',
  `telefono` varchar(20) NOT NULL DEFAULT ' ',
  `nit` varchar(20) NOT NULL DEFAULT ' ',
  `centrodecostos` varchar(100) NOT NULL DEFAULT 'ALIMENTOS DOGGY',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `representante` varchar(100) NOT NULL DEFAULT ' ',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idresolucion` bigint unsigned NOT NULL DEFAULT '1',
  `email` varchar(100) DEFAULT '',
  `regimen` varchar(45) DEFAULT NULL,
  `comentariotirilla` text,
  `convertirpedidoenfactura` int DEFAULT '0',
  `numero` varchar(40) DEFAULT '',
  `prefijo` varchar(5) DEFAULT NULL,
  `razonsocialcomanda` varchar(100) DEFAULT NULL,
  `mostrariva` int NOT NULL DEFAULT '0',
  `contacto` varchar(200) DEFAULT NULL,
  `telefonocontacto` varchar(25) DEFAULT NULL,
  `cuenta_ingreso` int DEFAULT NULL,
  `modulocontable` bit(1) DEFAULT b'0',
  `impresionfichaderegistro` varchar(7) DEFAULT 'TIRILLA',
  `cuenta_inventario` int DEFAULT NULL,
  `alerta2` varchar(100) DEFAULT NULL,
  `desde` int DEFAULT NULL,
  `hasta` int DEFAULT NULL,
  `porcentajeservicio` int DEFAULT '10',
  `lineaimpuestos` varchar(4) DEFAULT '12',
  `fecharesolucion` date DEFAULT NULL,
  `fechainicioresolucion` date DEFAULT NULL,
  `fechafinresolucion` date DEFAULT NULL,
  `codigodepartamento` varchar(2) DEFAULT NULL,
  `codigomunicipio` varchar(5) DEFAULT NULL,
  `ciudad` varchar(25) DEFAULT NULL,
  `departamento` varchar(25) DEFAULT NULL,
  `id_tipo_persona` int DEFAULT '2',
  `tipo_identificacion` varchar(3) DEFAULT 'NIT',
  `endpoint_taxxa` varchar(200) DEFAULT 'https://demo1.taxxa.co/api.djson',
  `prefijonc` varchar(2) DEFAULT NULL,
  `token_taxxa` varchar(150) DEFAULT NULL,
  `prefijofe` varchar(5) DEFAULT NULL,
  `puedeusar` int DEFAULT '0',
  `descuento` double DEFAULT '0',
  `descuentodeldia` int DEFAULT '0',
  `alerta` varchar(150) DEFAULT NULL,
  `hastafe` int DEFAULT '0',
  `fechahastafe` date DEFAULT NULL,
  `satelitecallcenter` varchar(25) DEFAULT 'SELECCIONE',
  `tituloimpuestos` varchar(50) DEFAULT 'DETALLE IMPOCONSUMO',
  `nombreimpuesto` varchar(50) DEFAULT 'IMPOCONSUMO',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `zonapostal` varchar(6) DEFAULT NULL,
  `prefijodocequivalente` varchar(5) DEFAULT NULL,
  `responsabilidades` varchar(10) DEFAULT NULL,
  `tipo_persona` varchar(7) DEFAULT 'company',
  `resdianfe` varchar(25) DEFAULT NULL,
  `desdefe` int DEFAULT '0',
  `fechafe` date DEFAULT NULL,
  `usuarioTaxxa` varchar(150) DEFAULT NULL,
  `claveTaxxa` varchar(15) DEFAULT NULL,
  `cuenta_devolucion` int DEFAULT NULL,
  `comosemideeltiempo` int DEFAULT '0',
  `minutosdescanso` int DEFAULT '0',
  `tiendaonline` bit(1) DEFAULT b'1',
  `cuenta_cxp` int DEFAULT NULL,
  `vence_firmadigital` date DEFAULT NULL,
  `ultimocobro` datetime DEFAULT NULL,
  `fechaproximopago` date DEFAULT NULL,
  `telegram_vendedor` varchar(25) DEFAULT NULL,
  `calculodeservicio` varchar(5) DEFAULT 'total',
  `textowsp` varchar(100) DEFAULT NULL,
  `wsp` varchar(100) DEFAULT NULL,
  `visitastv` int DEFAULT '0',
  `calculodescuento` varchar(5) DEFAULT 'total',
  `mostrarcategorias` varchar(2) DEFAULT 'SI',
  `calculodelcosto` varchar(5) DEFAULT 'total',
  `mostrarpventv` varchar(2) DEFAULT 'SI',
  `urlinstagram` varchar(200) DEFAULT NULL,
  `urlfacebook` varchar(200) DEFAULT NULL,
  `urltiktok` varchar(200) DEFAULT NULL,
  `titulocabecera` varchar(100) DEFAULT '',
  `piedepaginafe` varchar(500) DEFAULT NULL,
  `lunes` bit(1) DEFAULT b'1',
  `martes` bit(1) DEFAULT b'1',
  `miercoles` bit(1) DEFAULT b'1',
  `jueves` bit(1) DEFAULT b'1',
  `viernes` bit(1) DEFAULT b'1',
  `sabado` bit(1) DEFAULT b'1',
  `domingo` bit(1) DEFAULT b'1',
  `inilunes` time DEFAULT '08:00:00',
  `inimartes` time DEFAULT '08:00:00',
  `inimiercoles` time DEFAULT '08:00:00',
  `inijueves` time DEFAULT '08:00:00',
  `iniviernes` time DEFAULT '08:00:00',
  `inisabado` time DEFAULT '08:00:00',
  `inidomingo` time DEFAULT '08:00:00',
  `finlunes` time DEFAULT '23:00:00',
  `finmartes` time DEFAULT '23:00:00',
  `finmiercoles` time DEFAULT '23:00:00',
  `finjueves` time DEFAULT '23:00:00',
  `finviernes` time DEFAULT '23:00:00',
  `finsabado` time DEFAULT '23:00:00',
  `findomingo` time DEFAULT '23:00:00',
  `inilunes2` time DEFAULT '08:00:00',
  `finlunes2` time DEFAULT '08:00:00',
  `inimartes2` time DEFAULT '08:00:00',
  `finmartes2` time DEFAULT '08:00:00',
  `inimiercoles2` time DEFAULT '08:00:00',
  `finmiercoles2` time DEFAULT '08:00:00',
  `inijueves2` time DEFAULT '08:00:00',
  `finjueves2` time DEFAULT '08:00:00',
  `iniviernes2` time DEFAULT '08:00:00',
  `finviernes2` time DEFAULT '08:00:00',
  `inisabado2` time DEFAULT '08:00:00',
  `finsabado2` time DEFAULT '08:00:00',
  `inidomingo2` time DEFAULT '08:00:00',
  `findomingo2` time DEFAULT '08:00:00',
  `porcentajeips` int DEFAULT '0',
  `activarporcentajeips` int DEFAULT '0',
  `fechafinfe` date DEFAULT NULL,
  `desdeposelectronico` int DEFAULT '0',
  `hastaposelectronico` int DEFAULT '0',
  `fechaposelectronico` date DEFAULT NULL,
  `fechafinposelectronico` date DEFAULT NULL,
  `prefijope` varchar(4) DEFAULT NULL,
  `fechahastape` date DEFAULT NULL,
  `registromercantil` varchar(25) DEFAULT NULL,
  `digitodeverificacion` int DEFAULT NULL,
  `tokenapidian` varchar(100) DEFAULT NULL,
  `idsoftware` varchar(100) DEFAULT '',
  `parking_moto` int DEFAULT '3000',
  `firmadigital` text,
  `clavefirmadigital` varchar(50) DEFAULT NULL,
  `parking_carro` int DEFAULT '3000',
  `modulo` int DEFAULT '4',
  `SoftwareID` varchar(80) DEFAULT NULL,
  `clavefirma` varchar(20) DEFAULT NULL,
  `nombrecomercialcc` varchar(50) DEFAULT '',
  `porcentaje_ganancia_en_venta` decimal(5,2) DEFAULT NULL,
  `snotetop` varchar(150) DEFAULT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `centrosdecostos`
--

INSERT INTO `centrosdecostos` (`id`, `refrescarcache`, `debepagarel`, `direccion`, `titulotirilla`, `pagoefectivo`, `cuenta_costodeventa`, `type_regime_id`, `ultimomespagado`, `telefono`, `nit`, `centrodecostos`, `fechacreacion`, `representante`, `idusuario`, `idresolucion`, `email`, `regimen`, `comentariotirilla`, `convertirpedidoenfactura`, `numero`, `prefijo`, `razonsocialcomanda`, `mostrariva`, `contacto`, `telefonocontacto`, `cuenta_ingreso`, `modulocontable`, `impresionfichaderegistro`, `cuenta_inventario`, `alerta2`, `desde`, `hasta`, `porcentajeservicio`, `lineaimpuestos`, `fecharesolucion`, `fechainicioresolucion`, `fechafinresolucion`, `codigodepartamento`, `codigomunicipio`, `ciudad`, `departamento`, `id_tipo_persona`, `tipo_identificacion`, `endpoint_taxxa`, `prefijonc`, `token_taxxa`, `prefijofe`, `puedeusar`, `descuento`, `descuentodeldia`, `alerta`, `hastafe`, `fechahastafe`, `satelitecallcenter`, `tituloimpuestos`, `nombreimpuesto`, `pv`, `zonapostal`, `prefijodocequivalente`, `responsabilidades`, `tipo_persona`, `resdianfe`, `desdefe`, `fechafe`, `usuarioTaxxa`, `claveTaxxa`, `cuenta_devolucion`, `comosemideeltiempo`, `minutosdescanso`, `tiendaonline`, `cuenta_cxp`, `vence_firmadigital`, `ultimocobro`, `fechaproximopago`, `telegram_vendedor`, `calculodeservicio`, `textowsp`, `wsp`, `visitastv`, `calculodescuento`, `mostrarcategorias`, `calculodelcosto`, `mostrarpventv`, `urlinstagram`, `urlfacebook`, `urltiktok`, `titulocabecera`, `piedepaginafe`, `lunes`, `martes`, `miercoles`, `jueves`, `viernes`, `sabado`, `domingo`, `inilunes`, `inimartes`, `inimiercoles`, `inijueves`, `iniviernes`, `inisabado`, `inidomingo`, `finlunes`, `finmartes`, `finmiercoles`, `finjueves`, `finviernes`, `finsabado`, `findomingo`, `inilunes2`, `finlunes2`, `inimartes2`, `finmartes2`, `inimiercoles2`, `finmiercoles2`, `inijueves2`, `finjueves2`, `iniviernes2`, `finviernes2`, `inisabado2`, `finsabado2`, `inidomingo2`, `findomingo2`, `porcentajeips`, `activarporcentajeips`, `fechafinfe`, `desdeposelectronico`, `hastaposelectronico`, `fechaposelectronico`, `fechafinposelectronico`, `prefijope`, `fechahastape`, `registromercantil`, `digitodeverificacion`, `tokenapidian`, `idsoftware`, `parking_moto`, `firmadigital`, `clavefirmadigital`, `parking_carro`, `modulo`, `SoftwareID`, `clavefirma`, `nombrecomercialcc`, `porcentaje_ganancia_en_venta`, `snotetop`) VALUES (2,2,32,'','FACTURA DE VENTA',0,0,48,2,'','805030254','FUNDACION URDIMBRE SOCIAL','2020-12-24 19:28:24','',1,1,'fursocial2013@gmail.com','','',0,'18764070336005',NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'Tienes 10 facturas pendientes por tramitar a la Dian',NULL,NULL,10,'12',NULL,NULL,NULL,'76','66834','TULUA','VALLE DEL CAUCA',2,'NIT','https://demo1.taxxa.co/api2.djson',NULL,NULL,NULL,0,0,0,NULL,NULL,NULL,'SELECCIONE','','IVA','texasburgers','','DSE','O-23','company',NULL,NULL,NULL,NULL,NULL,NULL,0,0,_binary '',NULL,NULL,NULL,NULL,NULL,'total',NULL,NULL,10,'total','SI','total','1',NULL,NULL,NULL,'',NULL,_binary '',_binary '',_binary '',_binary '',_binary '',_binary '',_binary '','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','23:00:00','23:00:00','23:00:00','23:00:00','23:00:00','23:00:00','23:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00',0,1,NULL,1,500,'2024-05-29','2026-05-29','PT1','2026-05-29',NULL,2,NULL,'',2500,NULL,NULL,3000,1,NULL,NULL,'FURSOCIAL',NULL,NULL),(3,2,32,'Cra 14  9-07','FACTURA DE VENTA',0,0,0,2,'','901402281','FERRE COSTOS LA 14','2020-12-24 19:28:24','JUAN ALARCON',1,1,'raulotalvaro@gmail.com','PERSONA NATURAL','GRACIAS POR SU COMPRA la propina es voluntaria',0,'18764070336005',NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'Tienes 10 facturas pendientes por tramitar a la Dian',NULL,NULL,10,'12',NULL,NULL,NULL,'66','66001','PEREIRA','RISARALDA',2,'NIT','https://demo1.taxxa.co/api2.djson',NULL,NULL,NULL,0,0,0,NULL,NULL,NULL,'SELECCIONE','','IMPOCONSUMO','texasburgers','660001','DSE','O-49','person',NULL,NULL,NULL,NULL,NULL,NULL,0,0,_binary '',NULL,NULL,NULL,NULL,NULL,'total',NULL,NULL,5,'total','SI','total','1',NULL,NULL,NULL,'',NULL,_binary '',_binary '',_binary '',_binary '',_binary '',_binary '',_binary '','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','23:00:00','23:00:00','23:00:00','23:00:00','23:00:00','23:00:00','23:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00','08:00:00',0,1,NULL,1,500,'2024-05-29','2026-05-29','PT1','2026-05-29',NULL,NULL,NULL,'',2500,NULL,NULL,3000,1,NULL,NULL,'',NULL,NULL);

--
-- Table structure for table `cierres`
--

CREATE TABLE `cierres` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(50) DEFAULT '',
  `observaciones` varchar(200) DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `idz_2` (`idz`,`mediodepago`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  CONSTRAINT `cierres_ibfk_1` FOREIGN KEY (`idz`) REFERENCES `z` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cierres`
--


--
-- Table structure for table `cierresdecaja`
--

CREATE TABLE `cierresdecaja` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `m1` int NOT NULL DEFAULT '0',
  `m2` int NOT NULL DEFAULT '0',
  `m5` int NOT NULL DEFAULT '0',
  `m10` int NOT NULL DEFAULT '0',
  `m20` int NOT NULL DEFAULT '0',
  `m50` int NOT NULL DEFAULT '0',
  `m100` int NOT NULL DEFAULT '0',
  `m200` int NOT NULL DEFAULT '0',
  `m500` int NOT NULL DEFAULT '0',
  `m1000` int NOT NULL DEFAULT '0',
  `b5` int NOT NULL DEFAULT '0',
  `b20` int NOT NULL DEFAULT '0',
  `b10` int NOT NULL DEFAULT '0',
  `b50` int NOT NULL DEFAULT '0',
  `b100` int NOT NULL DEFAULT '0',
  `b1000` int NOT NULL DEFAULT '0',
  `b2000` int NOT NULL DEFAULT '0',
  `b5000` int NOT NULL DEFAULT '0',
  `b10000` int NOT NULL DEFAULT '0',
  `b20000` int NOT NULL DEFAULT '0',
  `b50000` int NOT NULL DEFAULT '0',
  `b100000` int NOT NULL DEFAULT '0',
  `tarjeta` int NOT NULL DEFAULT '0',
  `rappi` int NOT NULL DEFAULT '0',
  `uber` int NOT NULL DEFAULT '0',
  `ifood` int NOT NULL DEFAULT '0',
  `domi` int NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idcaja` bigint unsigned NOT NULL,
  `declarado` double NOT NULL DEFAULT '0',
  `efectivoenz` double NOT NULL DEFAULT '0',
  `diferencia` double NOT NULL DEFAULT '0',
  `observaciones` varchar(200) DEFAULT NULL,
  `cc` bigint unsigned NOT NULL,
  `venta` double DEFAULT '0',
  `domicilio` double DEFAULT '0',
  `base` double DEFAULT '0',
  `gasto` double DEFAULT '0',
  `esperado` double DEFAULT '0',
  `sobrante` double DEFAULT '0',
  `faltante` double DEFAULT '0',
  `servicio` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `cc` (`cc`),
  CONSTRAINT `cierresdecaja_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cierresdecaja`
--


--
-- Table structure for table `ciudades`
--

CREATE TABLE `ciudades` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ciudad` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `cc` bigint unsigned NOT NULL,
  `codigodepartamento` varchar(7) DEFAULT NULL,
  `departamento` varchar(25) DEFAULT NULL,
  `codigociudad` varchar(7) DEFAULT NULL,
  `codigopostal` varchar(7) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `idx_ciudad` (`ciudad`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `ciudades`
--

INSERT INTO `ciudades` (`id`, `ciudad`, `cc`, `codigodepartamento`, `departamento`, `codigociudad`, `codigopostal`, `pv`) VALUES (1,'SALENTO',2,'63','QUINDIO','63690','631020','KALDI'),(2,'POPAYAN ',2,'19','CAUCA','19001','190001','KALDI'),(3,'PEREIRA',2,'66','RISARALDA','66001','660001','KALDI'),(5,'IBAGUE',2,'73','TOLIMA','73001','730010','KALDI'),(6,'MEDELLIN',2,'05','ANTIOQUIA','05001','050001','KALDI'),(7,'CUCUTA',2,'54','NORTE DE SANTANDER','54001','540011','KALDI'),(10,'CHIA',2,'25','CUNDINAMARCA','25175','250001','KALDI'),(13,'ARMENIA',2,'63','QUINDIO','63001','630003','KALDI'),(15,'BOGOTA D.C',2,'11','BOGOTA  D.C','11001','110011','KALDI'),(16,'CALI',2,'76','VALLE DEL CAUCA','76001','760030','KALDI'),(17,'ITAGUI',2,'05','ANTIOQUIA','05360','055411','KALDI'),(18,'YUMBO ',2,'76','VALLE DEL CAUCA ','76892','760501','KALDI'),(19,'CANDELARIA',2,'76','VALLE DEL CAUCA','76130','763570','KALDI'),(20,'ALCALA ',2,'76','VALLE DEL CAUCA ','76020','762040','KALDI'),(21,'QUIBDO',2,'27','CHOCO ','27001','270001','KALDI'),(22,'TENJO',2,'25','CUNDINAMARCA','25779','250201','KALDI'),(23,'MANIZALES',2,'17','CALDAS','17001','170001','KALDI'),(24,'NEIVA',2,'41','HUILA','41001','410010','KALDI'),(25,'NARIÑO',2,'05','PASTO','05483','054840','KALDI'),(26,'CALARCA ',2,'63','QUINDIO ','63130','632001','KALDI'),(27,'SABANETA',2,'05','ANTIOQUIA ','05631','055450','KALDI'),(28,'COTA ',2,'25','CUNDINAMARCA ','25214','250010','KALDI'),(29,'LA ESTRELLA',2,'05','ANTIOQUIA','05380','055460','KALDI'),(30,'BARRANQUILLA ',2,'8','ATLÁNTICO','08001','080001','KALDI'),(31,'PALMIRA',2,'76','VALLE DEL CAUCA ','76520','763531','KALDI');

--
-- Table structure for table `clasesdevehiculo`
--

CREATE TABLE `clasesdevehiculo` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `clasedevehiculo` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `clasedevehiculo` (`clasedevehiculo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `clasesdevehiculo`
--


--
-- Table structure for table `clasificacionclientes`
--

CREATE TABLE `clasificacionclientes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `clasificacion` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `clasificacionclientes`
--


--
-- Table structure for table `clientes`
--

CREATE TABLE `clientes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `primernombre` varchar(100) DEFAULT NULL,
  `barrio` varchar(25) DEFAULT NULL,
  `grupo` varchar(50) DEFAULT NULL,
  `codabajo` int DEFAULT NULL,
  `primerapellido` varchar(25) DEFAULT '',
  `tipodepersona` int DEFAULT '2',
  `cedula` varchar(15) DEFAULT '',
  `direccion` varchar(100) DEFAULT '',
  `fechadenacimiento` date DEFAULT NULL,
  `celular` varchar(15) DEFAULT '',
  `fechadecreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ciudad` varchar(25) DEFAULT 'PEREIRA',
  `departamento` varchar(25) DEFAULT 'RISARALDA',
  `clave` text,
  `rol` varchar(25) NOT NULL DEFAULT 'CLIENTE',
  `email` varchar(100) DEFAULT '',
  `telefono` varchar(10) DEFAULT '',
  `edad` int NOT NULL DEFAULT '0',
  `genero` varchar(12) NOT NULL DEFAULT 'MASCULINO',
  `tipodedocumento` varchar(5) NOT NULL DEFAULT 'CC',
  `saldo` double NOT NULL DEFAULT '0',
  `cc` bigint unsigned NOT NULL,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `esproveedor` varchar(2) DEFAULT 'NO',
  `cuantoledebo` int DEFAULT '0',
  `bolsillo` int DEFAULT '0',
  `contacto` varchar(200) DEFAULT '',
  `telefonocontacto` varchar(25) DEFAULT '',
  `espersonajuridica` int NOT NULL DEFAULT '0',
  `enviarcorreo` int NOT NULL DEFAULT '0',
  `observacion` text,
  `numerocalle` varchar(4) DEFAULT NULL,
  `puntos` int NOT NULL DEFAULT '0',
  `esempleado` int NOT NULL DEFAULT '0',
  `idgrupo` int DEFAULT '0',
  `descatalogado` int DEFAULT '0',
  `eps` varchar(150) DEFAULT NULL,
  `afp` varchar(150) DEFAULT NULL,
  `codigociudad` varchar(7) DEFAULT '66001',
  `codigodepartamento` varchar(7) DEFAULT '66',
  `codigopostal` varchar(7) DEFAULT '660001',
  `segundonombre` varchar(25) DEFAULT NULL,
  `segundoapellido` varchar(25) DEFAULT NULL,
  `legalidad` int DEFAULT '0',
  `tipo_identificacion` varchar(5) DEFAULT 'CC',
  `razonsocial` varchar(200) DEFAULT NULL,
  `nombrecomercial` varchar(200) DEFAULT NULL,
  `dv` int DEFAULT NULL,
  `sfiscalresponsibilities` varchar(7) DEFAULT 'R-99-PN',
  `regimenfiscal` int DEFAULT '49',
  `expedicioncedula` date DEFAULT NULL,
  `marcavehiculo` varchar(25) DEFAULT NULL,
  `placavehiculo` varchar(6) DEFAULT NULL,
  `nacionalidad` varchar(25) DEFAULT NULL,
  `municipioexpedido` varchar(25) DEFAULT NULL,
  `departamentoexpedido` varchar(25) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'texasburgers',
  `sessionid` varchar(32) DEFAULT NULL,
  `huella` blob,
  `idcargo` int DEFAULT '0',
  `codigonomina` varchar(1) DEFAULT NULL,
  `codigozona` varchar(5) DEFAULT NULL,
  `areanomina` varchar(5) DEFAULT NULL,
  `idturno` int DEFAULT '0',
  `idturno2` int DEFAULT '0',
  `fechainicioturnoactual` date DEFAULT NULL,
  `fechafinturnoactual` date DEFAULT NULL,
  `fechainicioprooximoturno` date DEFAULT NULL,
  `fechaprooximoturno` date DEFAULT NULL,
  `iddomiciliarioyoyo` int DEFAULT NULL,
  `ciudadexpedicioncedula` varchar(25) DEFAULT NULL,
  `intentosfallidos` int DEFAULT '0',
  `ipultimoacceso` varchar(16) DEFAULT NULL,
  `codigoarea` varchar(5) DEFAULT NULL,
  `pagarextras` bit(1) DEFAULT b'0',
  `vencimientolicencia` date DEFAULT NULL,
  `tokendispositivo` varchar(250) DEFAULT NULL,
  `diacontacto1` int DEFAULT '0',
  `diacontacto2` int DEFAULT '0',
  `urlfotocliente` varchar(170) DEFAULT NULL,
  `sueldomensual` int DEFAULT '0',
  `auxtransportemensual` int DEFAULT '0',
  `clasificacion` varchar(25) DEFAULT 'CLIENTE FINAL',
  `instagram` varchar(50) DEFAULT NULL,
  `licenciaconduccion` varchar(25) DEFAULT NULL,
  `nombrereferencia1` varchar(150) DEFAULT NULL,
  `nombrereferencia2` varchar(150) DEFAULT NULL,
  `telefonoreferencia1` varchar(150) DEFAULT NULL,
  `telefonoreferencia2` varchar(150) DEFAULT NULL,
  `parentescorefererencia2` varchar(150) DEFAULT NULL,
  `parentesco` varchar(150) DEFAULT NULL,
  `parentescorefererencia1` varchar(150) DEFAULT NULL,
  `EDS` varchar(1) DEFAULT NULL,
  `comensalescliente` int DEFAULT '0',
  `idtelegram` varchar(25) DEFAULT NULL,
  `membrecia_hasta` date DEFAULT NULL,
  `idpadre2` int DEFAULT '0',
  `banco` varchar(25) DEFAULT NULL,
  `tipodecuenta` varchar(12) DEFAULT NULL,
  `cuentabancaria` varchar(15) DEFAULT NULL,
  `urlcedulacliente` varchar(100) DEFAULT NULL,
  `urlrutcliente` varchar(100) DEFAULT NULL,
  `urlcamaracliente` varchar(100) DEFAULT NULL,
  `fecha_expedicion` date DEFAULT NULL,
  `datosvalidados` int DEFAULT '0',
  `ultimavalidacion` date DEFAULT NULL,
  `cuentainscrita` int DEFAULT '0',
  `fechaactualizacionrut` date DEFAULT NULL,
  `direccion2` varchar(100) DEFAULT NULL,
  `direccion3` varchar(100) DEFAULT NULL,
  `identificadortv` varchar(30) DEFAULT NULL,
  `origencliente` varchar(10) DEFAULT 'CLIENTES',
  `aceptacondiciones` int DEFAULT '0',
  `fechaaceptacondiciones` date DEFAULT NULL,
  `HTTP_HOST` bit(1) DEFAULT b'0',
  `porcentaje_comision_enventa` int DEFAULT '0',
  `codigomasser` bit(1) DEFAULT b'0',
  `rutacualizado` varchar(2) DEFAULT 'NO',
  `tokenfirebase` varchar(500) DEFAULT NULL,
  `ocupacion` varchar(50) DEFAULT NULL,
  `origen_cliente` varchar(3) DEFAULT 'CON',
  `proximallamada` date DEFAULT NULL,
  `idpadre` int DEFAULT '0',
  `responsable` varchar(50) DEFAULT NULL,
  `campovalor_cliente` varchar(25) DEFAULT 'valordeventa',
  `aplicaretencion` int DEFAULT '0',
  `clientes_bloqueados` varchar(150) DEFAULT NULL,
  `puedehacerpedido` int DEFAULT '1',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `clientes`
--

INSERT INTO `clientes` (`id`, `primernombre`, `barrio`, `grupo`, `codabajo`, `primerapellido`, `tipodepersona`, `cedula`, `direccion`, `fechadenacimiento`, `celular`, `fechadecreacion`, `ciudad`, `departamento`, `clave`, `rol`, `email`, `telefono`, `edad`, `genero`, `tipodedocumento`, `saldo`, `cc`, `idusuario`, `esproveedor`, `cuantoledebo`, `bolsillo`, `contacto`, `telefonocontacto`, `espersonajuridica`, `enviarcorreo`, `observacion`, `numerocalle`, `puntos`, `esempleado`, `idgrupo`, `descatalogado`, `eps`, `afp`, `codigociudad`, `codigodepartamento`, `codigopostal`, `segundonombre`, `segundoapellido`, `legalidad`, `tipo_identificacion`, `razonsocial`, `nombrecomercial`, `dv`, `sfiscalresponsibilities`, `regimenfiscal`, `expedicioncedula`, `marcavehiculo`, `placavehiculo`, `nacionalidad`, `municipioexpedido`, `departamentoexpedido`, `pv`, `sessionid`, `huella`, `idcargo`, `codigonomina`, `codigozona`, `areanomina`, `idturno`, `idturno2`, `fechainicioturnoactual`, `fechafinturnoactual`, `fechainicioprooximoturno`, `fechaprooximoturno`, `iddomiciliarioyoyo`, `ciudadexpedicioncedula`, `intentosfallidos`, `ipultimoacceso`, `codigoarea`, `pagarextras`, `vencimientolicencia`, `tokendispositivo`, `diacontacto1`, `diacontacto2`, `urlfotocliente`, `sueldomensual`, `auxtransportemensual`, `clasificacion`, `instagram`, `licenciaconduccion`, `nombrereferencia1`, `nombrereferencia2`, `telefonoreferencia1`, `telefonoreferencia2`, `parentescorefererencia2`, `parentesco`, `parentescorefererencia1`, `EDS`, `comensalescliente`, `idtelegram`, `membrecia_hasta`, `idpadre2`, `banco`, `tipodecuenta`, `cuentabancaria`, `urlcedulacliente`, `urlrutcliente`, `urlcamaracliente`, `fecha_expedicion`, `datosvalidados`, `ultimavalidacion`, `cuentainscrita`, `fechaactualizacionrut`, `direccion2`, `direccion3`, `identificadortv`, `origencliente`, `aceptacondiciones`, `fechaaceptacondiciones`, `HTTP_HOST`, `porcentaje_comision_enventa`, `codigomasser`, `rutacualizado`, `tokenfirebase`, `ocupacion`, `origen_cliente`, `proximallamada`, `idpadre`, `responsable`, `campovalor_cliente`, `aplicaretencion`, `clientes_bloqueados`, `puedehacerpedido`) VALUES (1,'SYSTEM',NULL,NULL,NULL,'',0,'','MZ 1 c 13 Perla del sur','2006-06-11','3117326824','2017-12-20 22:34:05','Pereira','QUINDIO','$1$xgEatvV1$Hkc2Q63sQZbuLulxyZLwq1','ADMINISTRADOR',NULL,NULL,0,'MASCULINO','CC',0,1,1,'NO',0,39000,NULL,NULL,1,1,'','2',8,0,0,0,NULL,NULL,'66001','66','0',NULL,NULL,0,'NIT','',NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers','g7rajfvdfoelcc4l6cioa59rfi',NULL,0,NULL,'hola',NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,'45.225.224.36',NULL,_binary '',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO','',NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(2,'SOFTWARE','',NULL,NULL,'',2,'16369277','Cra 14  9-07','2050-12-12','','2022-12-06 06:58:59','PEREIRA','RISARALDA','19QcIOG0VRsy6','ADMINISTRADOR','raulotalvaro@gmail.com','',0,'MASCULINO','CC',0,2,1,'NO',0,0,'CONSUMIDOR FINAL','',0,0,NULL,'2',0,0,0,0,NULL,NULL,'66001','66','660001','','',0,'FN','','',0,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers','mn871p02n8405fuot2enf4cqti',NULL,0,NULL,'hola',NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,'46.6.213.132',NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO','{\"endpoint\":\"https://fcm.googleapis.com/fcm/send/fM_tPAPzgj8:APA91bFdHiizjdm7p0F3BJpYzweb9_vChdeWaru-yTDQ2JrAr1CkyoVlGcv52xxEZ9jvUsXHAGxKsUu4YNqhTpPiz6hq4Lf3wGYKj-IL6eQbl-Jfh0PfOmRhqHwMp2VSr53KyZMeS7AI\",\"expirationTime\":null,\"keys\":{\"p256dh\":\"BJBZ5Tq_PuKfWuKTiwCEz8RJs2gfynvatMK5tO_aCS7wIZlqpaPWWr6MNKh3-qRUeT7uhxtDQz0ncsOtBM89xw8\",\"auth\":\"_O9A41l21O0Lqo6S3XYnnA\"}}',NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(3,'CONSUMIDOR FINAL',NULL,NULL,NULL,'',2,'222222222222','',NULL,'','2025-09-03 16:31:32','PEREIRA','RISARALDA',NULL,'CLIENTE','','',0,'MASCULINO','CC',0,3,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(4,'VENTA DIRECTA',NULL,NULL,NULL,'',2,'VENTADIRECTA','',NULL,'','2025-09-03 16:31:32','PEREIRA','RISARALDA',NULL,'CLIENTE','','',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(5,'CLAUDIA',NULL,NULL,NULL,'TRUJILLO',2,'66963898','',NULL,'','2025-09-24 11:01:26','PEREIRA','RISARALDA','18cvAKzhmP7ns','ADMINISTRADOR','','',0,'MASCULINO','CC',0,2,2,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001','MILENA','QUICENO',0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers','d073kun6iu03mocp2ncc2v2hea',NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,'CONTADORA','CON',NULL,0,NULL,'valordeventa',0,NULL,1),(6,'MARIA',NULL,NULL,NULL,'MARIN',2,'1116267975','',NULL,'','2025-10-02 08:14:28','PEREIRA','RISARALDA','129XDwaIL2o0k','ADMINISTRADOR','','3052989638',0,'MASCULINO','CC',0,2,2,'NO',0,0,'','3052989638',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001','DE LOS ANGELES','ZULETA',0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers','aga9jau9q13djp3uco49n777it',NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,'190.107.19.227',NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,'AUX ADMINISTRATIVO Y CONTABLE','CON',NULL,0,NULL,'valordeventa',0,NULL,1),(7,'JOSE',NULL,NULL,NULL,'OVIRNE',2,'1112103788','',NULL,'','2025-10-02 08:58:46','PEREIRA','RISARALDA','14mLzg1BupARA','ADMINISTRADOR','','',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,'CONTRATISTA DESDE 1 OCT\nRUT OK',NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(8,'FURSOCIAL',NULL,NULL,NULL,'',2,'','',NULL,'','2025-10-02 09:09:15','PEREIRA','RISARALDA','','CLIENTE','','',0,'MASCULINO','CC',0,2,6,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(9,'',NULL,NULL,NULL,'',2,'','',NULL,'','2025-10-02 09:24:41','PEREIRA','RISARALDA','','CLIENTE','','',0,'MASCULINO','CC',0,2,6,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(10,'LUIS FERNANDO',NULL,NULL,NULL,'MANZANO',2,'1 1 1 4 0 6 3 3','',NULL,'','2025-10-14 09:42:18','PEREIRA','RISARALDA',NULL,'CLIENTE','','3182222055',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(11,'CAMILO ANTONIO',NULL,NULL,NULL,'CAMERO',2,'1 1 4 3 8 4 5 9','',NULL,'','2025-10-14 09:44:24','PEREIRA','RISARALDA',NULL,'CLIENTE','','3183633909',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(12,'EDISON ORLANDO',NULL,NULL,NULL,'ROMAN',2,'1 1 1 6 1 3 0 0','',NULL,'','2025-10-14 09:45:47','PEREIRA','RISARALDA',NULL,'CLIENTE','','3152777377',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(13,'CAMILO ANDRES',NULL,NULL,NULL,'VIEDMA',2,'1 1 1 6 0 7 0 4','',NULL,'','2025-10-14 09:47:02','PEREIRA','RISARALDA',NULL,'CLIENTE','','3017880215',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1),(14,'SANTIAGO',NULL,NULL,NULL,'GRAJALES',2,'1010109061','',NULL,'','2025-10-14 09:51:42','PEREIRA','RISARALDA',NULL,'CLIENTE','','3057664259',0,'MASCULINO','CC',0,2,1,'NO',0,0,'','',0,0,NULL,NULL,0,0,0,0,NULL,NULL,'66001','66','660001',NULL,NULL,0,'CC',NULL,NULL,NULL,'R-99-PN',49,NULL,NULL,NULL,NULL,NULL,NULL,'texasburgers',NULL,NULL,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,_binary '\0',NULL,NULL,0,0,NULL,0,0,'CLIENTE FINAL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,'CLIENTES',0,NULL,_binary '\0',0,_binary '\0','NO',NULL,NULL,'CON',NULL,0,NULL,'valordeventa',0,NULL,1);

--
-- Table structure for table `cocina_pedidos`
--

CREATE TABLE `cocina_pedidos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `idmesa` int NOT NULL,
  `idcliente` int NOT NULL,
  `idarticulo` int NOT NULL,
  `cantidad` decimal(10,2) NOT NULL,
  `valorunitario` decimal(10,2) NOT NULL,
  `descuento` decimal(10,2) DEFAULT '0.00',
  `valortotal` decimal(10,2) NOT NULL,
  `observaciones` text COLLATE utf8mb4_unicode_ci,
  `fechacreacion` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `despachado` tinyint(1) DEFAULT '0',
  `PrecuentaCallcenter` int DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `idx_mesa_despachado` (`idmesa`,`despachado`),
  KEY `idx_fechacreacion` (`fechacreacion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cocina_pedidos`
--


--
-- Table structure for table `colores`
--

CREATE TABLE `colores` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `color` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `color` (`color`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `colores`
--

INSERT INTO `colores` (`id`, `color`) VALUES (1,'BLANCO CLARO'),(2,'BLANCO VERDE'),(3,'BLANCO SAL'),(4,'BLANCO'),(5,'SUPER BLANCO '),(6,'BLANCO PERLADO'),(7,'BLANCO MAHLER'),(8,'BLANCO LECHE'),(9,'BLANCO  PERLADO'),(10,'BLANCO NEVADA BICAPA'),(11,'VERDE BLANCO'),(12,'SUPER BLANCO 2'),(13,'VERDE'),(14,'BLANCO NEVADO'),(15,'BLANCO BRILLANTE'),(16,'BLANCO PURO'),(17,'BLANCO CRISTAL'),(18,'BLANCO NEVADO BICAPA'),(19,'BLANCO CERAMICA'),(20,'BLANCO CANDY'),(21,'BLANCO PLATA'),(22,'BLANCO CHERY'),(23,'BLANCO  CERAMICA'),(24,'BLANCO LUNA'),(25,'BLANCO OLIMPICO'),(26,'BLANCO ARTICA'),(27,'BLANCO TITANIO'),(28,'BLANCO GLACIAL'),(29,'BLANCO  ARTICA'),(30,'BLANCO VAINILLA'),(31,'PENDIENTE'),(32,'BLANCO ARTICO'),(33,NULL);

--
-- Table structure for table `componentesarticulos`
--

CREATE TABLE `componentesarticulos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `idinsumo` bigint unsigned NOT NULL,
  `cantidad` double NOT NULL DEFAULT '1',
  `cc` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `tipo` varchar(12) DEFAULT NULL,
  `idpaparapi` int DEFAULT '0',
  `valor` double DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `idpapaifood` varchar(50) DEFAULT NULL,
  `PRECIOIVA` int DEFAULT '0',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idinsumo` (`idinsumo`),
  KEY `idarticulo` (`idarticulo`),
  CONSTRAINT `componentesarticulos_ibfk_1` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `componentesarticulos_ibfk_3` FOREIGN KEY (`idinsumo`) REFERENCES `articulos` (`id`),
  CONSTRAINT `componentesarticulos_ibfk_4` FOREIGN KEY (`idarticulo`) REFERENCES `articulos` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `componentesarticulos`
--


--
-- Table structure for table `compras`
--

CREATE TABLE `compras` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `cantidad` double NOT NULL DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `valorunitario` double NOT NULL DEFAULT '0',
  `idproveedor` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idmayor` bigint unsigned NOT NULL,
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `base` double DEFAULT '0',
  `afectacaja` int NOT NULL DEFAULT '1',
  `iva` double NOT NULL DEFAULT '0',
  `idunidaddemedida` bigint unsigned NOT NULL,
  `valorgramo` double NOT NULL DEFAULT '0',
  `factor` double NOT NULL DEFAULT '0',
  `cc` bigint unsigned NOT NULL,
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `nd` int DEFAULT '0',
  `compras` int DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  `tipodeiva` varchar(12) DEFAULT NULL,
  `descuento` double DEFAULT '0',
  `porcentajedescuento` double DEFAULT '0',
  `nombreimpuesto` varchar(3) DEFAULT 'IVA',
  `imei` varchar(50) DEFAULT NULL,
  `fechavencecompra` date DEFAULT NULL,
  `descripcionencompra` varchar(100) DEFAULT NULL,
  `ibua` int DEFAULT '0',
  `advalorem` int DEFAULT '0',
  `fletecompra` double DEFAULT '0',
  `proximocostomedio` double DEFAULT '0',
  `p_descuentosinfacturar` double DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idproveedor` (`idproveedor`),
  KEY `idmayor` (`idmayor`),
  KEY `idunidaddemedida` (`idunidaddemedida`),
  KEY `cc` (`cc`),
  KEY `idz` (`idz`),
  KEY `idusuario` (`idusuario`),
  CONSTRAINT `compras_ibfk_4` FOREIGN KEY (`idmayor`) REFERENCES `mayorescompras` (`id`),
  CONSTRAINT `compras_ibfk_6` FOREIGN KEY (`idz`) REFERENCES `z` (`id`),
  CONSTRAINT `compras_ibfk_7` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `compras`
--


--
-- Table structure for table `comprasauxiliar`
--

CREATE TABLE `comprasauxiliar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `cantidad` double NOT NULL DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `valorunitario` double NOT NULL DEFAULT '0',
  `idproveedor` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idmayor` bigint unsigned NOT NULL,
  `porcentajeiva` double NOT NULL DEFAULT '0',
  `base` double DEFAULT '0',
  `iva` double NOT NULL DEFAULT '0',
  `idunidaddemedida` bigint unsigned NOT NULL,
  `valorgramo` double NOT NULL DEFAULT '0',
  `factor` double NOT NULL DEFAULT '0',
  `cc` bigint unsigned NOT NULL,
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  `descuento` double DEFAULT '0',
  `porcentajedescuento` double DEFAULT '0',
  `tipodeiva` varchar(12) DEFAULT NULL,
  `nombreimpuesto` varchar(3) DEFAULT 'IVA',
  `imei` varchar(50) DEFAULT NULL,
  `fechavencecompra` date DEFAULT NULL,
  `ibua` int DEFAULT '0',
  `advalorem` int DEFAULT '0',
  `costomedioaux` double DEFAULT '0',
  `fleteaux` double DEFAULT '0',
  `proximocostomedio` double DEFAULT '0',
  `p_descuentosinfacturar` double DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `comprasauxiliar`
--

INSERT INTO `comprasauxiliar` (`id`, `idarticulo`, `fecha`, `cantidad`, `valortotal`, `valorunitario`, `idproveedor`, `fechacreacion`, `idmayor`, `porcentajeiva`, `base`, `iva`, `idunidaddemedida`, `valorgramo`, `factor`, `cc`, `idz`, `idusuario`, `idcaja`, `pv`, `descuento`, `porcentajedescuento`, `tipodeiva`, `nombreimpuesto`, `imei`, `fechavencecompra`, `ibua`, `advalorem`, `costomedioaux`, `fleteaux`, `proximocostomedio`, `p_descuentosinfacturar`) VALUES (19,76,'2025-04-05 10:05:03',1,0,3,2300,'2025-04-05 10:05:03',15,19,0,0,1,0,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(20,76,'2025-04-05 10:08:01',1,0,3,2300,'2025-04-05 10:08:01',15,19,0,0,1,0,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(21,127,'2025-04-05 10:08:10',1,0,3,2300,'2025-04-05 10:08:10',15,19,0,0,1,0,1,0,1,2,1,'KALDI',0.09,3,'SIN INCLUIR','IVA','','0000-00-00',0,0,0,0,0,0),(22,76,'2025-04-05 10:09:06',1,0,2,2300,'2025-04-05 10:09:06',15,19,0,0,1,0,1,0,1,2,1,'KALDI',0.06,3,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(23,76,'2025-04-05 10:09:11',1,0,2,2300,'2025-04-05 10:09:11',15,19,0,0,1,0,1,0,1,2,1,'KALDI',0.06,3,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(24,76,'2025-04-05 10:10:18',1,0.97,1,2300,'2025-04-05 10:10:18',15,19,0.8151260504201681,0.15487394957983194,1,0.97,1,0,1,2,1,'KALDI',0.03,3,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,98.6229071804703,0),(25,1786,'2025-04-07 05:27:33',2,159224.793,79612.3965,325,'2025-04-07 05:27:33',3730,5,151642.66,7582.133000000001,1,79612.3965,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(26,2153,'2025-04-07 05:27:33',1,331094.1795,331094.1795,325,'2025-04-07 05:27:33',3730,5,315327.79000000004,15766.389500000001,1,331094.1795,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(27,1798,'2025-04-07 05:27:33',2,228688.572,114344.286,325,'2025-04-07 05:27:33',3730,5,217798.63999999998,10889.931999999999,1,114344.286,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(28,2859,'2025-04-07 05:27:33',3,339673.69800000003,113224.566,325,'2025-04-07 05:27:33',3730,5,323498.76,16174.938,1,113224.566,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(29,2716,'2025-04-07 05:27:33',6,160164,26694,325,'2025-04-07 05:27:33',3730,0,160164,0,1,26694,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(30,985,'2025-04-07 05:27:33',6,484123.19999999995,80687.2,325,'2025-04-07 05:27:33',3730,0,484123.19999999995,0,1,80687.2,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(31,2582,'2025-04-07 05:27:33',2,88823.53,44411.765,325,'2025-04-07 05:27:33',3730,0,88823.53,0,1,44411.765,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(32,2516,'2025-04-07 05:27:33',1,72166.5,72166.5,325,'2025-04-07 05:27:33',3730,5,68730,3436.5,1,72166.5,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(33,2334,'2025-04-07 05:27:33',6,349411.74,58235.29,325,'2025-04-07 05:27:33',3730,0,349411.74,0,1,58235.29,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(34,982,'2025-04-07 05:27:33',8,569384.64,71173.08,325,'2025-04-07 05:27:33',3730,0,569384.64,0,1,71173.08,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(35,2335,'2025-04-07 05:27:33',1,91344.54,91344.54,325,'2025-04-07 05:27:33',3730,0,91344.54,0,1,91344.54,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(36,2855,'2025-04-07 05:27:33',1,55543.22,55543.22,325,'2025-04-07 05:27:33',3730,0,55543.22,0,1,55543.22,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(37,1641,'2025-04-07 05:27:33',10,438582.39999999997,43858.24,325,'2025-04-07 05:27:33',3730,0,438582.39999999997,0,1,43858.24,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(38,2983,'2025-04-07 05:27:33',2,593533.332,296766.666,325,'2025-04-07 05:27:33',3730,5,565269.8400000001,28263.492000000002,1,296766.666,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(39,978,'2025-04-07 05:27:33',6,181821.54,30303.59,325,'2025-04-07 05:27:33',3730,0,181821.54,0,1,30303.59,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(40,2524,'2025-04-07 05:27:33',5,230630,46126,325,'2025-04-07 05:27:33',3730,0,230630,0,1,46126,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(41,1786,'2025-04-07 05:27:38',2,159224.793,79612.3965,325,'2025-04-07 05:27:38',3730,5,151642.66,7582.133000000001,1,79612.3965,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(42,2153,'2025-04-07 05:27:38',1,331094.1795,331094.1795,325,'2025-04-07 05:27:38',3730,5,315327.79000000004,15766.389500000001,1,331094.1795,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(43,1798,'2025-04-07 05:27:38',2,228688.572,114344.286,325,'2025-04-07 05:27:38',3730,5,217798.63999999998,10889.931999999999,1,114344.286,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(44,2859,'2025-04-07 05:27:38',3,339673.69800000003,113224.566,325,'2025-04-07 05:27:38',3730,5,323498.76,16174.938,1,113224.566,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(45,2716,'2025-04-07 05:27:38',6,160164,26694,325,'2025-04-07 05:27:38',3730,0,160164,0,1,26694,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(46,985,'2025-04-07 05:27:38',6,484123.19999999995,80687.2,325,'2025-04-07 05:27:38',3730,0,484123.19999999995,0,1,80687.2,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(47,2582,'2025-04-07 05:27:38',2,88823.53,44411.765,325,'2025-04-07 05:27:38',3730,0,88823.53,0,1,44411.765,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(48,2516,'2025-04-07 05:27:38',1,72166.5,72166.5,325,'2025-04-07 05:27:38',3730,5,68730,3436.5,1,72166.5,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(49,2334,'2025-04-07 05:27:38',6,349411.74,58235.29,325,'2025-04-07 05:27:38',3730,0,349411.74,0,1,58235.29,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(50,982,'2025-04-07 05:27:38',8,569384.64,71173.08,325,'2025-04-07 05:27:38',3730,0,569384.64,0,1,71173.08,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(51,2335,'2025-04-07 05:27:38',1,91344.54,91344.54,325,'2025-04-07 05:27:38',3730,0,91344.54,0,1,91344.54,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(52,2855,'2025-04-07 05:27:38',1,55543.22,55543.22,325,'2025-04-07 05:27:38',3730,0,55543.22,0,1,55543.22,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(53,1641,'2025-04-07 05:27:38',10,438582.39999999997,43858.24,325,'2025-04-07 05:27:38',3730,0,438582.39999999997,0,1,43858.24,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(54,2983,'2025-04-07 05:27:38',2,593533.332,296766.666,325,'2025-04-07 05:27:38',3730,5,565269.8400000001,28263.492000000002,1,296766.666,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(55,978,'2025-04-07 05:27:38',6,181821.54,30303.59,325,'2025-04-07 05:27:38',3730,0,181821.54,0,1,30303.59,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(56,2524,'2025-04-07 05:27:38',5,230630,46126,325,'2025-04-07 05:27:38',3730,0,230630,0,1,46126,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(57,1786,'2025-04-07 05:27:50',2,159224.793,79612.3965,325,'2025-04-07 05:27:50',3730,5,151642.66,7582.133000000001,1,79612.3965,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(58,2153,'2025-04-07 05:27:50',1,331094.1795,331094.1795,325,'2025-04-07 05:27:50',3730,5,315327.79000000004,15766.389500000001,1,331094.1795,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(59,1798,'2025-04-07 05:27:50',2,228688.572,114344.286,325,'2025-04-07 05:27:50',3730,5,217798.63999999998,10889.931999999999,1,114344.286,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(60,2859,'2025-04-07 05:27:50',3,339673.69800000003,113224.566,325,'2025-04-07 05:27:50',3730,5,323498.76,16174.938,1,113224.566,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(61,2716,'2025-04-07 05:27:50',6,160164,26694,325,'2025-04-07 05:27:50',3730,0,160164,0,1,26694,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(62,985,'2025-04-07 05:27:50',6,484123.19999999995,80687.2,325,'2025-04-07 05:27:50',3730,0,484123.19999999995,0,1,80687.2,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(63,2582,'2025-04-07 05:27:50',2,88823.53,44411.765,325,'2025-04-07 05:27:50',3730,0,88823.53,0,1,44411.765,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(64,2516,'2025-04-07 05:27:50',1,72166.5,72166.5,325,'2025-04-07 05:27:50',3730,5,68730,3436.5,1,72166.5,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(65,2334,'2025-04-07 05:27:50',6,349411.74,58235.29,325,'2025-04-07 05:27:50',3730,0,349411.74,0,1,58235.29,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(66,982,'2025-04-07 05:27:50',8,569384.64,71173.08,325,'2025-04-07 05:27:50',3730,0,569384.64,0,1,71173.08,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(67,2335,'2025-04-07 05:27:50',1,91344.54,91344.54,325,'2025-04-07 05:27:50',3730,0,91344.54,0,1,91344.54,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(68,2855,'2025-04-07 05:27:50',1,55543.22,55543.22,325,'2025-04-07 05:27:50',3730,0,55543.22,0,1,55543.22,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(69,1641,'2025-04-07 05:27:50',10,438582.39999999997,43858.24,325,'2025-04-07 05:27:50',3730,0,438582.39999999997,0,1,43858.24,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(70,2983,'2025-04-07 05:27:50',2,593533.332,296766.666,325,'2025-04-07 05:27:50',3730,5,565269.8400000001,28263.492000000002,1,296766.666,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(71,978,'2025-04-07 05:27:50',6,181821.54,30303.59,325,'2025-04-07 05:27:50',3730,0,181821.54,0,1,30303.59,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(72,2524,'2025-04-07 05:27:50',5,230630,46126,325,'2025-04-07 05:27:50',3730,0,230630,0,1,46126,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(73,1786,'2025-04-07 05:28:17',2,159224.793,79612.3965,325,'2025-04-07 05:28:17',3730,5,151642.66,7582.133000000001,1,79612.3965,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(74,2153,'2025-04-07 05:28:17',1,331094.1795,331094.1795,325,'2025-04-07 05:28:17',3730,5,315327.79000000004,15766.389500000001,1,331094.1795,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(75,1798,'2025-04-07 05:28:17',2,228688.572,114344.286,325,'2025-04-07 05:28:17',3730,5,217798.63999999998,10889.931999999999,1,114344.286,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(76,2859,'2025-04-07 05:28:17',3,339673.69800000003,113224.566,325,'2025-04-07 05:28:17',3730,5,323498.76,16174.938,1,113224.566,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(77,2716,'2025-04-07 05:28:17',6,160164,26694,325,'2025-04-07 05:28:17',3730,0,160164,0,1,26694,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(78,985,'2025-04-07 05:28:17',6,484123.19999999995,80687.2,325,'2025-04-07 05:28:17',3730,0,484123.19999999995,0,1,80687.2,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(79,2582,'2025-04-07 05:28:17',2,88823.53,44411.765,325,'2025-04-07 05:28:17',3730,0,88823.53,0,1,44411.765,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(80,2516,'2025-04-07 05:28:17',1,72166.5,72166.5,325,'2025-04-07 05:28:17',3730,5,68730,3436.5,1,72166.5,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(81,2334,'2025-04-07 05:28:17',6,349411.74,58235.29,325,'2025-04-07 05:28:17',3730,0,349411.74,0,1,58235.29,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(82,982,'2025-04-07 05:28:17',8,569384.64,71173.08,325,'2025-04-07 05:28:17',3730,0,569384.64,0,1,71173.08,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(83,2335,'2025-04-07 05:28:17',1,91344.54,91344.54,325,'2025-04-07 05:28:17',3730,0,91344.54,0,1,91344.54,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(84,2855,'2025-04-07 05:28:17',1,55543.22,55543.22,325,'2025-04-07 05:28:17',3730,0,55543.22,0,1,55543.22,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(85,1641,'2025-04-07 05:28:17',10,438582.39999999997,43858.24,325,'2025-04-07 05:28:17',3730,0,438582.39999999997,0,1,43858.24,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(86,2983,'2025-04-07 05:28:17',2,593533.332,296766.666,325,'2025-04-07 05:28:17',3730,5,565269.8400000001,28263.492000000002,1,296766.666,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(87,978,'2025-04-07 05:28:17',6,181821.54,30303.59,325,'2025-04-07 05:28:17',3730,0,181821.54,0,1,30303.59,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(88,2524,'2025-04-07 05:28:17',5,230630,46126,325,'2025-04-07 05:28:17',3730,0,230630,0,1,46126,1,0,1,2,1,'KALDI',0,0,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,0,0),(89,76,'2025-05-05 01:43:32',74,81066.852,1231,2300,'2025-05-04 23:59:59',17,22,66448.2393442623,14618.612655737705,1,1098.498,1,0,1,2,1,'KALDI',135.502,11.007473598700244,'INCLUIDO','IVA','','0000-00-00',1,2,0,0,74.92060092165899,0),(90,154,'2025-05-05 01:43:40',1,2296.14,2343,2300,'2025-05-04 23:59:59',17,19,1929.5294117647059,366.61058823529413,1,2296.14,1,0,1,2,1,'KALDI',46.86,2,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,55689.80699999999,0),(91,127,'2025-05-05 01:43:48',4,16018.923200000001,3434,2300,'2025-05-04 23:59:59',17,19,13461.28,2557.6432,1,4004.7308000000003,1,0,1,2,1,'KALDI',68.68,2,'SIN INCLUIR','IVA','','0000-00-00',0,0,0,0,8246.554358271236,0),(92,143,'2025-05-05 02:32:08',2,842625.42,434343,2300,'2025-05-04 23:59:59',17,0,842625.42,0,1,421312.71,1,0,1,2,1,'KALDI',13030.29,3,'INCLUIDO','IVA','','0000-00-00',0,0,0,0,10117.390638722554,0);

--
-- Table structure for table `comprobantesdenomina`
--

CREATE TABLE `comprobantesdenomina` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuario` bigint unsigned NOT NULL,
  `idcliente` bigint unsigned NOT NULL,
  `consecutivo` int DEFAULT '0',
  `calculadodesde` date DEFAULT NULL,
  `calculadohasta` date DEFAULT NULL,
  `diaslaborados` int DEFAULT '0',
  `ingreso` int DEFAULT '0',
  `deducciones` int DEFAULT '0',
  `valorapgar` int DEFAULT '0',
  `idz` int DEFAULT '0',
  `salario` int DEFAULT '0',
  `mediodepago` varchar(25) DEFAULT NULL,
  `afectacaja` int DEFAULT '0',
  `desde` date DEFAULT NULL,
  `hasta` date DEFAULT NULL,
  `cedula` varchar(15) DEFAULT NULL,
  `nombre` varchar(150) DEFAULT NULL,
  `comisiones` int DEFAULT '0',
  `transporte` int DEFAULT '0',
  `pension` int DEFAULT '0',
  `salud` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `idcliente` (`idcliente`),
  CONSTRAINT `comprobantesdenomina_ibfk_2` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `comprobantesdenomina_ibfk_3` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `comprobantesdenomina`
--


--
-- Table structure for table `conceptosgastos`
--

CREATE TABLE `conceptosgastos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `concepto` varchar(200) DEFAULT NULL,
  `cc` bigint unsigned NOT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `conceptosgastos`
--

INSERT INTO `conceptosgastos` (`id`, `concepto`, `cc`, `pv`) VALUES (13,'ARRENDAMIENTO',1,'KALDI'),(14,'IMPREVISTOS',1,'KALDI');

--
-- Table structure for table `configuracion`
--

CREATE TABLE `configuracion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `clave` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `valor` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `descripcion` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `clave` (`clave`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `configuracion`
--

INSERT INTO `configuracion` (`id`, `clave`, `valor`, `descripcion`) VALUES (9,'Descontar inventario en venta','Del módulo de artículos','Del módulo de artículos/Del inventario del vendedor'),(10,'ITEM DIAN','ALQUILER DE EQUIPOS,PRODUCTOS,LOGISTICA,ACTIVIDAD CULTURAL,TRANSPORTE,CATERING',NULL),(12,'qr_login','','Permite poner un código QR en la pantalla de login'),(13,'Tipo de impresion abonos cartera','Carta','Carta, Media carta, Tirilla'),(14,'Imprimir comentario tirilla abonos cartera','Si','Si, No'),(15,'Fecha para guardar ventas a la madrugada','Fecha real','<ul><li>Fecha real</li><li>Fecha del turno actual</li></ul>'),(16,'Puede repetir celular en el callcenter','Si','<ul><li>Si</li><li>No</li></ul>'),(17,'Tipo de impresion para stickers de articulos v1','QR','<ul><li>BARCODE</li><li>QR</li></ul>');

--
-- Table structure for table `configuracion_incrementos`
--

CREATE TABLE `configuracion_incrementos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `idseccion` int NOT NULL,
  `base_calculo` enum('ultimocoste','valordeventatiendas') NOT NULL DEFAULT 'ultimocoste',
  `incremento_valordeventa` decimal(10,2) NOT NULL DEFAULT '15.00',
  `incremento_valordistribuidor` decimal(10,2) NOT NULL DEFAULT '12.00',
  `incremento_valordeventatiendas` decimal(10,2) NOT NULL DEFAULT '10.00',
  `incremento_vrventapublico` decimal(10,2) NOT NULL DEFAULT '40.00',
  `incremento_valortiendavirtual` decimal(10,2) NOT NULL DEFAULT '15.00',
  `redondeo` int NOT NULL DEFAULT '50',
  `activo` tinyint(1) NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL,
  `idusuario` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idseccion` (`idseccion`),
  KEY `activo` (`activo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `configuracion_incrementos`
--


--
-- Table structure for table `configuracionshopify`
--

CREATE TABLE `configuracionshopify` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `endpoint1` varchar(200) DEFAULT NULL,
  `endpoint2` varchar(200) DEFAULT NULL,
  `audience` varchar(100) DEFAULT NULL,
  `token1` varchar(200) DEFAULT NULL,
  `token2` varchar(200) DEFAULT NULL,
  `urltoken` varchar(100) DEFAULT NULL,
  `urlmenu` varchar(200) DEFAULT NULL,
  `storeId` varchar(50) NOT NULL,
  `urlactivaciones` varchar(200) DEFAULT NULL,
  `taken` varchar(150) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `configuracionshopify`
--


--
-- Table structure for table `configuraciontirilla`
--

CREATE TABLE `configuraciontirilla` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fuentemodificadorescomanda` int DEFAULT '12',
  `fuentelineascomanda` int DEFAULT '12',
  `COD_SATELITE` varchar(50) DEFAULT NULL,
  `user` varchar(200) DEFAULT NULL,
  `fuentedatosempresa` int DEFAULT '0',
  `fuentetitulo` int DEFAULT '0',
  `bdcontroldelcliente` varchar(300) DEFAULT NULL,
  `userbdcontroldelcliente` varchar(50) DEFAULT NULL,
  `quienrecibeelpedido` varchar(50) DEFAULT NULL,
  `dominiodelcliente` varchar(500) DEFAULT NULL COMMENT 'En este campo se buscan los archivos para devolver la configuración de la tirilla y los datos que se eimprimen',
  `rutaquehayparaimprimir` varchar(50) DEFAULT NULL,
  `master` varchar(200) DEFAULT NULL,
  `rutaborrarfactura` varchar(200) DEFAULT NULL,
  `masterparasubirdatosdeinformes` varchar(200) DEFAULT NULL,
  `bdparasubirdatosdeinformes` varchar(50) DEFAULT NULL,
  `tabladondeseeejecutaelprocedimiento` varchar(50) DEFAULT 'tabladondeseeejecutaelprocedimiento',
  `tamanopapel` int NOT NULL DEFAULT '1',
  `fuenteunocomanda` int NOT NULL DEFAULT '12',
  `cantidadletrasunocomanda` int NOT NULL DEFAULT '20',
  `fuentedoscomanda` int NOT NULL DEFAULT '12',
  `cantidadletrasdoscomanda` int NOT NULL DEFAULT '20',
  `fuentetrescomanda` int NOT NULL DEFAULT '10',
  `cantidadletrastrescomanda` int NOT NULL DEFAULT '10',
  `fuenteunofactura` int NOT NULL DEFAULT '12',
  `cantidadletrasunofactura` int NOT NULL DEFAULT '20',
  `fuentedosfactura` int NOT NULL DEFAULT '12',
  `cantidadletrasdosfactura` int NOT NULL DEFAULT '20',
  `fuentetresfactura` int NOT NULL DEFAULT '10',
  `cantidadletrastresfactura` int NOT NULL DEFAULT '10',
  `alergenos` int NOT NULL DEFAULT '0',
  `imprimir` int NOT NULL DEFAULT '1',
  `facturadeconfirmacion` int NOT NULL DEFAULT '0',
  `campoparaelconsecutivo` varchar(15) NOT NULL DEFAULT 'pendiente',
  `tipotirillafactura` varchar(4) DEFAULT 'pdf',
  `formatofechasistema` varchar(10) NOT NULL DEFAULT 'YYYY-MM-dd' COMMENT 'Para integracion, se refiere al idioma del sistema operativo donde corre el programa, sirve para arreglar los insert que tienen fechas que no ingresan en sql server',
  `lineaimpuestos` varchar(20) NOT NULL DEFAULT 'pendiente',
  `TIPOIVAPORDEFECTO` double NOT NULL DEFAULT '0' COMMENT 'Cuando lineaimpuestos es cero se utiliza este codigo para calcular el porcentaje del iva en la columna tipoiva de tiquetslin',
  `codigoenlace` varchar(1) NOT NULL DEFAULT '5',
  `titulotirilla` varchar(100) DEFAULT NULL,
  `nombreimpresora` varchar(100) DEFAULT NULL,
  `codalmacen` varchar(5) DEFAULT NULL,
  `codalmacenfapster` varchar(5) NOT NULL DEFAULT '7' COMMENT '(Integracion) Es el cod que se envía a fapster en la tabla pendientes de dbotaxml en la columna codalmacen ',
  `pagoepayco` int NOT NULL DEFAULT '0',
  `pagodatafono` int DEFAULT '0',
  `pagoqr` int NOT NULL DEFAULT '0',
  `pagoefectivo` int NOT NULL DEFAULT '0',
  `sizetextomediana` int NOT NULL DEFAULT '12',
  `sizetextomediano` int NOT NULL DEFAULT '12',
  `sizelineascomanda` int NOT NULL DEFAULT '12',
  `sizetitulo` int DEFAULT '12',
  `sizetextopequeno` int NOT NULL DEFAULT '12',
  `maxletrasencomanda` int NOT NULL DEFAULT '12',
  `maxletrasenfactura` int NOT NULL DEFAULT '30',
  `bd` varchar(50) DEFAULT NULL,
  `serie` varchar(5) DEFAULT NULL,
  `caja` int NOT NULL DEFAULT '1' COMMENT 'Valor fijo para tiquetscab y remtrasacciones',
  `serieresolucion` varchar(50) DEFAULT NULL,
  `fo` int NOT NULL DEFAULT '0',
  `n` varchar(1) NOT NULL DEFAULT 'B',
  `terminal` varchar(50) DEFAULT NULL,
  `seriedelequipo` varchar(50) DEFAULT NULL,
  `host` varchar(120) NOT NULL DEFAULT 'host',
  `regimen` varchar(50) DEFAULT NULL,
  `comentariotirilla` varchar(1200) DEFAULT NULL,
  `observacionalpie` varchar(500) DEFAULT '.' COMMENT 'Se utiliza para poner el texto sobre el destino de la propina, solo se usa en impresión automática',
  `email` varchar(120) DEFAULT NULL,
  `hasta` int DEFAULT NULL,
  `desde` int DEFAULT NULL,
  `fechainicioresolucion` varchar(20) DEFAULT NULL,
  `resolucioncontrol` varchar(20) DEFAULT NULL,
  `nit` varchar(20) DEFAULT NULL,
  `telefono` varchar(100) DEFAULT NULL,
  `subtitulo` varchar(100) DEFAULT NULL,
  `direccion` varchar(100) DEFAULT NULL,
  `razonsocial` varchar(100) DEFAULT NULL,
  `razonsocialcomanda` varchar(100) DEFAULT NULL,
  `numfacturaescero` int NOT NULL DEFAULT '0',
  `seimprimrecomandaconlafactura` int NOT NULL DEFAULT '1',
  `direccionparapush` text COMMENT 'Esta dirección se utiliza para enviar notificaciones al computador del cliente cuando el java se desconecta',
  `direccionservidorqueescucha` varchar(50) DEFAULT NULL,
  `tabla` varchar(25) DEFAULT NULL COMMENT 'Este es el nombre de la tabla donde se guardan las facturas de pendientes por imprimir',
  `imprimirfacturadoble` int NOT NULL DEFAULT '0',
  `fuentelineasfactura` int DEFAULT '14',
  `imprimirprecuentaconservicio` int NOT NULL DEFAULT '1' COMMENT '1 para que la precuenta imprima con la propina, 0 para que no lo haga',
  `pv` varchar(25) DEFAULT NULL,
  `fuentetitulop` int DEFAULT '12',
  `fuentedatosempresap` int DEFAULT '12',
  `fuentelineascomandap` int DEFAULT '12',
  `fuentemodificadorescomandap` int DEFAULT '12',
  `fuentetotalesp` int DEFAULT '16',
  `fuentehoracomanda` int DEFAULT '12',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `COD_SATELITE` (`COD_SATELITE`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `configuraciontirilla`
--

INSERT INTO `configuraciontirilla` (`id`, `fuentemodificadorescomanda`, `fuentelineascomanda`, `COD_SATELITE`, `user`, `fuentedatosempresa`, `fuentetitulo`, `bdcontroldelcliente`, `userbdcontroldelcliente`, `quienrecibeelpedido`, `dominiodelcliente`, `rutaquehayparaimprimir`, `master`, `rutaborrarfactura`, `masterparasubirdatosdeinformes`, `bdparasubirdatosdeinformes`, `tabladondeseeejecutaelprocedimiento`, `tamanopapel`, `fuenteunocomanda`, `cantidadletrasunocomanda`, `fuentedoscomanda`, `cantidadletrasdoscomanda`, `fuentetrescomanda`, `cantidadletrastrescomanda`, `fuenteunofactura`, `cantidadletrasunofactura`, `fuentedosfactura`, `cantidadletrasdosfactura`, `fuentetresfactura`, `cantidadletrastresfactura`, `alergenos`, `imprimir`, `facturadeconfirmacion`, `campoparaelconsecutivo`, `tipotirillafactura`, `formatofechasistema`, `lineaimpuestos`, `TIPOIVAPORDEFECTO`, `codigoenlace`, `titulotirilla`, `nombreimpresora`, `codalmacen`, `codalmacenfapster`, `pagoepayco`, `pagodatafono`, `pagoqr`, `pagoefectivo`, `sizetextomediana`, `sizetextomediano`, `sizelineascomanda`, `sizetitulo`, `sizetextopequeno`, `maxletrasencomanda`, `maxletrasenfactura`, `bd`, `serie`, `caja`, `serieresolucion`, `fo`, `n`, `terminal`, `seriedelequipo`, `host`, `regimen`, `comentariotirilla`, `observacionalpie`, `email`, `hasta`, `desde`, `fechainicioresolucion`, `resolucioncontrol`, `nit`, `telefono`, `subtitulo`, `direccion`, `razonsocial`, `razonsocialcomanda`, `numfacturaescero`, `seimprimrecomandaconlafactura`, `direccionparapush`, `direccionservidorqueescucha`, `tabla`, `imprimirfacturadoble`, `fuentelineasfactura`, `imprimirprecuentaconservicio`, `pv`, `fuentetitulop`, `fuentedatosempresap`, `fuentelineascomandap`, `fuentemodificadorescomandap`, `fuentetotalesp`, `fuentehoracomanda`) VALUES (2,12,12,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'tabladondeseeejecutaelprocedimiento',80,12,20,12,20,10,10,12,20,12,20,10,10,0,1,0,'pendiente','html','YYYY-MM-dd','pendiente',0,'5',NULL,NULL,NULL,'7',0,0,0,0,12,12,12,12,12,12,30,NULL,NULL,1,NULL,0,'B',NULL,NULL,'host',NULL,NULL,'.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,NULL,NULL,NULL,0,14,1,NULL,12,12,12,12,16,12);

--
-- Table structure for table `consecutivos`
--

CREATE TABLE `consecutivos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `consecutivo` bigint NOT NULL DEFAULT '1',
  `cc` bigint unsigned NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `tipo` varchar(50) NOT NULL DEFAULT 'VENTAS',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `consecutivos`
--

INSERT INTO `consecutivos` (`id`, `consecutivo`, `cc`, `fechacreacion`, `tipo`, `idusuario`, `pv`) VALUES (1,57,1,'2020-12-24 19:28:24','VENTAS',1,'KALDI'),(2,1,2,'2020-12-24 19:28:24','VENTAS',1,'KALDI'),(3,981,1,'2020-12-24 19:28:24','Z',1,'KALDI'),(4,1,2,'2020-12-24 19:28:24','Z',1,'KALDI'),(5,181,1,'2020-12-24 19:28:24','ABONOS',1,'KALDI'),(6,1,2,'2020-12-24 19:28:24','ABONOS',1,'KALDI'),(7,1,1,'2020-12-24 19:28:24','NOTASCREDITO',1,'KALDI'),(8,1,2,'2020-12-24 19:28:24','NOTASCREDITO',1,'KALDI'),(9,1,1,'2020-12-24 19:28:24','NOTASDEBITO',1,'KALDI'),(10,1,2,'2020-12-24 19:28:24','NOTASDEBITO',1,'KALDI'),(11,1,1,'2020-12-24 19:28:24','CORTESIAS',1,'KALDI'),(12,1,2,'2020-12-24 19:28:24','CORTESIAS',1,'KALDI'),(13,2,1,'2020-12-24 19:28:24','COMPROBANTE DE EGRESOS',1,'KALDI'),(14,20,2,'2020-12-24 19:28:24','COMPROBANTE DE EGRESOS',1,'KALDI'),(15,1,1,'2020-12-24 19:28:24','SEPARADOS',1,'KALDI'),(16,1,2,'2020-12-24 19:28:24','SEPARADOS',1,'KALDI'),(17,1,1,'2020-12-24 19:28:24','PRODUCCION',1,'KALDI'),(18,1,2,'2020-12-24 19:28:24','PRODUCCION',1,'KALDI'),(19,1,2,'2020-12-24 19:28:24','SOLICITUDES',1,'KALDI'),(20,1,2,'2020-12-24 19:28:24','SOLICITUDES',1,'KALDI'),(21,16,1,'2021-04-04 18:41:42','BAJAS',1,'KALDI'),(22,1,2,'2021-04-04 18:41:52','BAJAS',1,'KALDI'),(23,1,2,'2021-08-31 05:13:46','ABONOS PRESTAMOS',1,'KALDI'),(24,1,2,'2021-09-02 21:51:07','ABONOS SEPARADOS',1,'KALDI'),(25,1,2,'2021-10-09 01:38:11','RecepcionEquipo',1,'KALDI'),(26,1,2,'2022-01-16 08:30:58','TRASLADOS',1,'KALDI'),(27,1,2,'2022-01-24 12:25:47','PrecuentaCallcenter',1,'KALDI'),(28,1,2,'2022-02-04 19:54:59','FICHA DE REGISTRO',1,'KALDI'),(29,1,2,'2022-08-12 19:58:36','DOCUMENTO SOPORTE',1,'KALDI'),(30,1,2,'2023-01-26 09:53:10','DEVOLUCIONES POR PAGAR',1,'KALDI'),(31,1,2,'2023-02-26 05:14:06','FE',1,'KALDI'),(32,1,2,'2024-01-16 18:29:10','NOTACREDITOFE',1,'KALDI'),(33,1,2,'2024-06-01 17:53:45','POS ELECTRONICO',1,'KALDI'),(34,1,2,'2024-08-13 10:13:50','ANTICIPOS',1,'KALDI'),(35,34,0,'2025-03-13 16:29:02','RECIBO GENERAL',1,'KALDI'),(36,44,0,'2025-03-30 00:31:37','RUTAS',1,'KALDI'),(37,2,0,'2025-05-03 19:57:10','ABONOS COMPRAS',1,'KALDI'),(41,8,0,'2025-05-16 03:33:14','PEDIDOS',1,'KALDI'),(42,1,2,'2025-05-26 13:43:49','FEN',1,'KALDI'),(43,1,0,'2025-06-18 04:23:09','NOMINA',1,'KALDI');

--
-- Table structure for table `consultas`
--

CREATE TABLE `consultas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `consulta` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `consultas`
--


--
-- Table structure for table `contable`
--

CREATE TABLE `contable` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT NULL,
  `idfactura` bigint unsigned NOT NULL,
  `idusuario` bigint unsigned NOT NULL,
  `idcliente` bigint unsigned NOT NULL,
  `cuenta` varchar(8) DEFAULT NULL,
  `debito` decimal(11,2) DEFAULT '0.00',
  `credito` decimal(11,2) DEFAULT '0.00',
  `descripcioncuenta` varchar(25) DEFAULT NULL,
  `tipo` varchar(25) DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `idfactura` (`idfactura`),
  KEY `contable_ibfk_3` (`idcliente`),
  CONSTRAINT `contable_ibfk_1` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `contable_ibfk_2` FOREIGN KEY (`idfactura`) REFERENCES `facturas` (`id`),
  CONSTRAINT `contable_ibfk_3` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `contable`
--


--
-- Table structure for table `conteodiario`
--

CREATE TABLE `conteodiario` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `descripcion` varchar(100) NOT NULL DEFAULT '',
  `cantidad` double NOT NULL DEFAULT '0',
  `mes` int NOT NULL,
  `ano` int NOT NULL,
  `costomedio` double NOT NULL,
  `idusuario` bigint unsigned NOT NULL,
  `cc` bigint unsigned NOT NULL,
  `fechacracion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fisico` double NOT NULL DEFAULT '0',
  `idmayor` bigint unsigned NOT NULL DEFAULT '0',
  `fecha` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `idmayor` (`idusuario`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idmayor_2` (`idmayor`),
  CONSTRAINT `conteodiario_ibfk_1` FOREIGN KEY (`idmayor`) REFERENCES `mayoresconteodiario` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `conteodiario`
--


--
-- Table structure for table `cotizaciondereceta`
--

CREATE TABLE `cotizaciondereceta` (
  `idarticulo` int NOT NULL,
  `cantidad` double NOT NULL,
  `idusuario` int NOT NULL,
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `revisado` int NOT NULL DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cotizaciondereceta`
--

INSERT INTO `cotizaciondereceta` (`idarticulo`, `cantidad`, `idusuario`, `id`, `revisado`, `pv`) VALUES (20,1,1,13,1,'KALDI');

--
-- Table structure for table `cotizaciones`
--

CREATE TABLE `cotizaciones` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idmayor` bigint unsigned NOT NULL,
  `consecutivo` int NOT NULL,
  `idarticulo` bigint unsigned NOT NULL,
  `cantidad` int NOT NULL DEFAULT '0',
  `valorunitario` double NOT NULL DEFAULT '0',
  `bruto` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `valortotal` double NOT NULL DEFAULT '0',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idcliente` bigint unsigned NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `escortesiadeconvenio` int NOT NULL DEFAULT '0',
  `fechaabonado` datetime DEFAULT NULL,
  `descripcion` varchar(25) DEFAULT NULL,
  `porcentajedescuento` double DEFAULT '0',
  `porcentajeiva` decimal(5,2) DEFAULT '0.00',
  `base` double DEFAULT '0',
  `impuesto` double DEFAULT '0',
  `numlinea` text,
  `unidaddemedida` text,
  `talla` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idmayor` (`idmayor`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcliente` (`idcliente`),
  KEY `idusuario` (`idusuario`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cotizaciones`
--

INSERT INTO `cotizaciones` (`id`, `idmayor`, `consecutivo`, `idarticulo`, `cantidad`, `valorunitario`, `bruto`, `descuento`, `valortotal`, `fechacreacion`, `idcliente`, `idusuario`, `escortesiadeconvenio`, `fechaabonado`, `descripcion`, `porcentajedescuento`, `porcentajeiva`, `base`, `impuesto`, `numlinea`, `unidaddemedida`, `talla`) VALUES (1,5,0,0,0,7532000,0,0,0,'2025-04-14 17:59:25',0,1,0,NULL,'DISEÑO Y FABRICACIÓN DE M',0,0.00,0,0,'1','gl',NULL),(2,5,0,0,0,5000000,0,0,0,'2025-04-14 17:59:25',0,1,0,NULL,'FABRICACIÓN DE RODILLO SE',0,0.00,0,0,'2','gl',NULL),(3,6,0,0,0,7532000,0,0,0,'2025-04-14 18:37:15',0,1,0,NULL,'DISEÑO Y FABRICACIÓN DE M',0,0.00,0,0,'1','gl',NULL),(4,6,0,0,0,5000000,0,0,0,'2025-04-14 18:37:15',0,1,0,NULL,'FABRICACIÓN DE RODILLO SE',0,0.00,0,0,'2','gl',NULL),(5,6,0,0,0,10000,0,0,0,'2025-04-14 18:37:15',0,1,0,NULL,'as fñalds fañsfljkañsflk',0,0.00,0,0,'3','gl',NULL);

--
-- Table structure for table `cuentadecobro`
--

CREATE TABLE `cuentadecobro` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `consecutivo` int NOT NULL DEFAULT '0',
  `idusuario` bigint NOT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` float NOT NULL DEFAULT '0',
  `concepto` text,
  `idcliente` bigint NOT NULL,
  `tipodeventa` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cuentadecobro`
--


--
-- Table structure for table `cuentas`
--

CREATE TABLE `cuentas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tipo` varchar(25) DEFAULT NULL,
  `cuenta` int DEFAULT NULL,
  `Nombre` varchar(25) DEFAULT NULL,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `porcentaje` decimal(5,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `tipo` (`tipo`,`porcentaje`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cuentas`
--


--
-- Table structure for table `cupones`
--

CREATE TABLE `cupones` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `nombre` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cupones`
--


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

CREATE TABLE `departments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `country_id` bigint unsigned NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` char(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `departments_country_id_foreign` (`country_id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `departments` (`id`, `country_id`, `name`, `code`, `created_at`, `updated_at`) VALUES (1,46,'Amazonas','91','2024-06-21 01:05:20','2024-06-21 01:05:20'),(2,46,'Antioquia','05','2024-06-21 01:05:20','2024-06-21 01:05:20'),(3,46,'Arauca','81','2024-06-21 01:05:20','2024-06-21 01:05:20'),(4,46,'Atlántico','08','2024-06-21 01:05:20','2024-06-21 01:05:20'),(5,46,'Bogotá','11','2024-06-21 01:05:20','2024-06-21 01:05:20'),(6,46,'Bolívar','13','2024-06-21 01:05:20','2024-06-21 01:05:20'),(7,46,'Boyacá','15','2024-06-21 01:05:20','2024-06-21 01:05:20'),(8,46,'Caldas','17','2024-06-21 01:05:20','2024-06-21 01:05:20'),(9,46,'Caquetá','18','2024-06-21 01:05:20','2024-06-21 01:05:20'),(10,46,'Casanare','85','2024-06-21 01:05:20','2024-06-21 01:05:20'),(11,46,'Cauca','19','2024-06-21 01:05:20','2024-06-21 01:05:20'),(12,46,'Cesar','20','2024-06-21 01:05:20','2024-06-21 01:05:20'),(13,46,'Chocó','27','2024-06-21 01:05:20','2024-06-21 01:05:20'),(14,46,'Córdoba','23','2024-06-21 01:05:20','2024-06-21 01:05:20'),(15,46,'Cundinamarca','25','2024-06-21 01:05:20','2024-06-21 01:05:20'),(16,46,'Guainía','94','2024-06-21 01:05:20','2024-06-21 01:05:20'),(17,46,'Guaviare','95','2024-06-21 01:05:20','2024-06-21 01:05:20'),(18,46,'Huila','41','2024-06-21 01:05:20','2024-06-21 01:05:20'),(19,46,'La Guajira','44','2024-06-21 01:05:20','2024-06-21 01:05:20'),(20,46,'Magdalena','47','2024-06-21 01:05:20','2024-06-21 01:05:20'),(21,46,'Meta','50','2024-06-21 01:05:20','2024-06-21 01:05:20'),(22,46,'Nariño','52','2024-06-21 01:05:20','2024-06-21 01:05:20'),(23,46,'Norte de Santander','54','2024-06-21 01:05:20','2024-06-21 01:05:20'),(24,46,'Putumayo','86','2024-06-21 01:05:20','2024-06-21 01:05:20'),(25,46,'Quindío','63','2024-06-21 01:05:20','2024-06-21 01:05:20'),(26,46,'Risaralda','66','2024-06-21 01:05:20','2024-06-21 01:05:20'),(27,46,'San Andrés y Providencia','88','2024-06-21 01:05:20','2024-06-21 01:05:20'),(28,46,'Santander','68','2024-06-21 01:05:20','2024-06-21 01:05:20'),(29,46,'Sucre','70','2024-06-21 01:05:20','2024-06-21 01:05:20'),(30,46,'Tolima','73','2024-06-21 01:05:20','2024-06-21 01:05:20'),(31,46,'Valle del Cauca','76','2024-06-21 01:05:20','2024-06-21 01:05:20'),(32,46,'Vaupés','97','2024-06-21 01:05:20','2024-06-21 01:05:20'),(33,46,'Vichada','99','2024-06-21 01:05:20','2024-06-21 01:05:20');

--
-- Table structure for table `descuentosporgrupo`
--

CREATE TABLE `descuentosporgrupo` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idgrupo` bigint unsigned NOT NULL DEFAULT '1',
  `cc` bigint unsigned NOT NULL DEFAULT '1',
  `porcentaje` int NOT NULL DEFAULT '0',
  `linea` varchar(25) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idgrupo` (`idgrupo`),
  KEY `cc` (`cc`),
  CONSTRAINT `descuentosporgrupo_ibfk_1` FOREIGN KEY (`idgrupo`) REFERENCES `gruposdepersonas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `descuentosporgrupo`
--


--
-- Table structure for table `descuentosprogramados`
--

CREATE TABLE `descuentosprogramados` (
  `id` int NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` bigint unsigned NOT NULL,
  `idcliente` bigint unsigned NOT NULL,
  `valor` int DEFAULT NULL,
  `mes` tinyint unsigned DEFAULT NULL,
  `ano` year DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idcliente_2` (`idcliente`,`mes`,`ano`),
  KEY `idusuario` (`idusuario`),
  KEY `idcliente` (`idcliente`)
) ENGINE=InnoDB AUTO_INCREMENT=505 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `descuentosprogramados`
--


--
-- Table structure for table `devolucionesporpagar`
--

CREATE TABLE `devolucionesporpagar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idfactura` bigint unsigned NOT NULL,
  `consecutivo` int DEFAULT '0',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `valor` double NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `pagado` bit(1) DEFAULT b'0',
  `fechapagado` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idusuariopaga` bigint unsigned NOT NULL DEFAULT '1',
  `idcliente` bigint unsigned DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `idfactura` (`idfactura`),
  CONSTRAINT `cons_devporpgagar_1` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `cons_devporpgagar_2` FOREIGN KEY (`idfactura`) REFERENCES `facturas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `devolucionesporpagar`
--


--
-- Table structure for table `direcciones`
--

CREATE TABLE `direcciones` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `direccion` varchar(300) DEFAULT NULL,
  `telefono` varchar(15) DEFAULT NULL,
  `idcliente` bigint unsigned NOT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `direccion` (`direccion`,`idcliente`),
  KEY `idcliente` (`idcliente`),
  CONSTRAINT `direcciones_ibfk_1` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `direcciones`
--


--
-- Table structure for table `ediciones`
--

CREATE TABLE `ediciones` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tabla` varchar(300) DEFAULT NULL,
  `tarea` varchar(600) DEFAULT NULL,
  `usuario` varchar(300) DEFAULT NULL,
  `fechacreacion` varchar(300) DEFAULT NULL,
  `antes` varchar(300) DEFAULT NULL,
  `despues` varchar(300) DEFAULT NULL,
  `campo` varchar(150) DEFAULT NULL,
  `idtabla` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=269 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ediciones`
--

INSERT INTO `ediciones` (`id`, `tabla`, `tarea`, `usuario`, `fechacreacion`, `antes`, `despues`, `campo`, `idtabla`) VALUES (1,'secciones','En el modulo borrarbasededatos.php se eliminaron todos los registros de la tabla secciones, el usuario estaba en la ip 81.0.35.4',' ','2025-09-03 16:30:54',NULL,NULL,NULL,0),(2,'clientes','En el modulo borrarbasededatos.php se eliminaron todos los registros de la tabla clientes, el usuario estaba en la ip 81.0.35.4',' ','2025-09-03 16:30:56',NULL,NULL,NULL,0),(3,'iniciosdesesion','En el modulo borrarbasededatos.php se eliminaron todos los registros de la tabla iniciosdesesion, el usuario estaba en la ip 81.0.35.4',' ','2025-09-03 16:30:58',NULL,NULL,NULL,0),(4,'usuarios','En el modulo borrarbasededatos.php se eliminaron todos los registros de la tabla usuarios, el usuario estaba en la ip 81.0.35.4',' ','2025-09-03 16:30:59',NULL,NULL,NULL,0),(5,'clientes','editar id 2 SOFTWARE   ',' ','2025-09-03 16:31:17','','16369277','cedula',NULL),(6,'clientes','editar id 2 SOFTWARE   ',' ','2025-09-03 16:31:21','12cQDaeLVCpC6','16369277','clave',NULL),(7,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:26:38','FERRE COSTOS LA 14','FUNDACION URDIMBRE SOCIAL','centrodecostos',NULL),(8,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:26:42','','FURSOCIAL','nombrecomercialcc',NULL),(9,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:26:51','JUAN ALARCON','','representante',NULL),(10,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:27:03','901402281','805030254','nit',NULL),(11,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:27:48',NULL,'2','digitodeverificacion',NULL),(12,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:27:50','person','company','tipo_persona',NULL),(13,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:28:02','Cra 14  9-07','','direccion',NULL),(14,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:29:21','raulotalvaro@gmail.com','fursocial2013@gmail.com','email',NULL),(15,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:29:26','0','48','type_regime_id',NULL),(16,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:29:43','O-49','O-23','responsabilidades',NULL),(17,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:30:02','PERSONA NATURAL','','regimen',NULL),(18,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:30:14','IMPOCONSUMO','IVA','nombreimpuesto',NULL),(19,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:30:36','RISARALDA','VALLE DEL CAUCA','departamento',NULL),(20,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:31:04','66001','66834','codigomunicipio',NULL),(21,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:31:07','66','76','codigodepartamento',NULL),(22,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:31:12','PEREIRA','TULUA','ciudad',NULL),(23,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:31:13','660001','','zonapostal',NULL),(24,'centrosdecostos','editar id 2 ','SOFTWARE   ','2025-09-22 13:31:39','GRACIAS POR SU COMPRA la propina es voluntaria','','comentariotirilla',NULL),(25,'articulos','editar id 3 ','SOFTWARE   ','2025-09-22 14:50:40','','Alquiler de equipos','referencia',3),(26,'articulos','editar id 4 ','SOFTWARE   ','2025-09-22 14:52:18','','Actividad cultural','referencia',4),(27,'articulos','editar id 5 ','SOFTWARE   ','2025-09-22 14:52:44','','Transporte','referencia',5),(28,'articulos','editar id 6 ','SOFTWARE   ','2025-09-22 14:53:15','','Productos','referencia',6),(29,'articulos','editar id 7 ','SOFTWARE   ','2025-09-22 14:53:22','','Logistica','referencia',7),(30,'articulos','editar id 8 ','SOFTWARE   ','2025-09-22 14:56:17','','Catering','referencia',8),(31,'secciones','Editar: 1','SOFTWARE   ','2025-09-22 15:01:08','','SERVICIOS','seccion',NULL),(32,'articulos','Editar id 3 ','SOFTWARE   ','2025-09-22 15:08:26','0','1','idseccion',NULL),(33,'articulos','Editar id 4 ','SOFTWARE   ','2025-09-22 15:08:33','0','1','idseccion',NULL),(34,'articulos','Editar id 5 ','SOFTWARE   ','2025-09-22 15:08:37','0','1','idseccion',NULL),(35,'articulos','Editar id 6 ','SOFTWARE   ','2025-09-22 15:08:40','0','1','idseccion',NULL),(36,'articulos','Editar id 7 ','SOFTWARE   ','2025-09-22 15:08:44','0','1','idseccion',NULL),(37,'articulos','Editar id 8 ','SOFTWARE   ','2025-09-22 15:08:47','0','1','idseccion',NULL),(38,'articulos','Editar id 1 EN ESPERA','SOFTWARE   ','2025-09-22 15:08:50','0','1','idseccion',NULL),(39,'secciones','Editar: 1','SOFTWARE   ','2025-09-22 15:10:48','SERVICIOS','UCEVA','seccion',NULL),(40,'articulos','editar id 3 ','SOFTWARE   ','2025-09-22 16:20:07','Alquiler de equipos','','referencia',3),(41,'articulos','Editar id 3 ','SOFTWARE   ','2025-09-22 16:22:28','','Alquiler de equipos','descripcion',NULL),(42,'articulos','editar id 4 ','SOFTWARE   ','2025-09-22 16:22:35','Actividad cultural','','referencia',4),(43,'articulos','Editar id 4 ','SOFTWARE   ','2025-09-22 16:22:41','','Actividad cultural','descripcion',NULL),(44,'articulos','editar id 5 ','SOFTWARE   ','2025-09-22 16:22:45','Transporte','','referencia',5),(45,'articulos','Editar id 5 ','SOFTWARE   ','2025-09-22 16:22:49','','Transporte','descripcion',NULL),(46,'articulos','editar id 6 ','SOFTWARE   ','2025-09-22 16:22:54','Productos','','referencia',6),(47,'articulos','Editar id 6 ','SOFTWARE   ','2025-09-22 16:22:58','','Productos','descripcion',NULL),(48,'articulos','editar id 7 ','SOFTWARE   ','2025-09-22 16:23:02','Logistica','','referencia',7),(49,'articulos','Editar id 7 ','SOFTWARE   ','2025-09-22 16:23:08','','Logistica','descripcion',NULL),(50,'articulos','editar id 8 ','SOFTWARE   ','2025-09-22 16:23:13','Catering','','referencia',8),(51,'articulos','Editar id 8 ','SOFTWARE   ','2025-09-22 16:23:50','','Catering','descripcion',NULL),(52,'articulos','editar id 4 ','SOFTWARE   ','2025-09-23 17:48:17','Actividad cultural','','referencia',4),(53,'articulos','editar id 3 ','SOFTWARE   ','2025-09-23 17:48:21','Alquiler de equipos','','referencia',3),(54,'articulos','editar id 8 ','SOFTWARE   ','2025-09-23 17:48:24','Catering','','referencia',8),(55,'articulos','editar id 7 ','SOFTWARE   ','2025-09-23 17:48:31','Logistica','','referencia',7),(56,'articulos','editar id 6 ','SOFTWARE   ','2025-09-23 17:48:34','Productos','','referencia',6),(57,'articulos','editar id 5 ','SOFTWARE   ','2025-09-23 17:48:38','Transporte','','referencia',5),(58,'modulos','editar id 256 ',' ','2025-09-23 18:39:12','','Gastos','modulo',NULL),(59,'modulos','editar id 256 ',' ','2025-09-23 18:39:14',NULL,'General','grupo',NULL),(60,'ingresos_fur','Eliminación masiva de registros',' ','2025-09-23 19:08:10',NULL,NULL,NULL,0),(61,'configuracion','editar id 10 ',' ','2025-09-23 19:13:44','','ALQUILER DE EQUIPOS,PRODUCTOS,LOGISTICA,ACTIVIDAD CULTURAL,TRANSPORTE,CATERING','valor',10),(62,'ingresos_fur','Eliminación de registro',' ','2025-09-23 19:17:44',NULL,NULL,NULL,1),(63,'ingresos_fur','Eliminación de registro',' ','2025-09-23 19:17:46',NULL,NULL,NULL,2),(64,'ingresos_fur','Edición campo itemfursocial',' ','2025-09-23 19:18:56',NULL,NULL,NULL,3),(65,'ingresos_fur','Edición campo clasificacion',' ','2025-09-23 19:21:14',NULL,NULL,NULL,3),(66,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-23 19:22:35',NULL,NULL,NULL,4),(67,'ingresos_fur','Edición campo valorbase',' ','2025-09-23 19:22:42',NULL,NULL,NULL,4),(68,'ingresos_fur','Edición campo itemfursocial','SOFTWARE   ','2025-09-24 09:12:14',NULL,NULL,NULL,7),(69,'ingresos_fur','Edición campo orden','SOFTWARE   ','2025-09-24 09:12:52',NULL,NULL,NULL,6),(70,'ingresos_fur','Edición campo orden','SOFTWARE   ','2025-09-24 09:12:57',NULL,NULL,NULL,7),(71,'ingresos_fur','Edición campo valorbase','SOFTWARE   ','2025-09-24 09:13:05',NULL,NULL,NULL,7),(72,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 09:15:22',NULL,NULL,NULL,7),(73,'clientes','editar id 5    ','SOFTWARE   ','2025-09-24 11:02:14','','Valentina','primernombre',NULL),(74,'clientes','editar id 5 Valentina   ','SOFTWARE   ','2025-09-24 11:02:21','','Arboleda','primerapellido',NULL),(75,'clientes','editar id 5 Valentina  Arboleda ','SOFTWARE   ','2025-09-24 11:02:28','Arboleda','','primerapellido',NULL),(76,'clientes','editar id 5 Valentina   ','SOFTWARE   ','2025-09-24 11:02:35','Valentina','Claudia','primernombre',NULL),(77,'clientes','editar id 5 Claudia   ','SOFTWARE   ','2025-09-24 11:02:43','','Trujillo','primerapellido',NULL),(78,'clientes','editar id 5 Claudia  Trujillo ','SOFTWARE   ','2025-09-24 11:02:59','','66963898','cedula',NULL),(79,'clientes','editar id 5 Claudia  Trujillo ','SOFTWARE   ','2025-09-24 11:03:11','CLIENTE','ADMINISTRADOR','rol',NULL),(80,'clientes','editar id 5 Claudia  Trujillo ','SOFTWARE   ','2025-09-24 11:04:28','','ClaudiaMilena+898','clave',NULL),(81,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:29:09',NULL,NULL,NULL,3),(82,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:29:13',NULL,NULL,NULL,4),(83,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:30:09',NULL,NULL,NULL,3),(84,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:35:18',NULL,NULL,NULL,3),(85,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:35:22',NULL,NULL,NULL,10),(86,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:35:29',NULL,NULL,NULL,13),(87,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:35:31',NULL,NULL,NULL,13),(88,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:36:39',NULL,NULL,NULL,13),(89,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:36:42',NULL,NULL,NULL,13),(90,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:36:44',NULL,NULL,NULL,13),(91,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:20',NULL,NULL,NULL,13),(92,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:22',NULL,NULL,NULL,10),(93,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:23',NULL,NULL,NULL,9),(94,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:24',NULL,NULL,NULL,5),(95,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:25',NULL,NULL,NULL,4),(96,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:26',NULL,NULL,NULL,11),(97,'ingresos_fur','Eliminación de registro',' ','2025-09-24 13:37:27',NULL,NULL,NULL,12),(98,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:37:38',NULL,NULL,NULL,14),(99,'ingresos_fur','Edición campo total',' ','2025-09-24 13:40:22',NULL,NULL,NULL,14),(100,'ingresos_fur','Edición campo total',' ','2025-09-24 13:40:27',NULL,NULL,NULL,14),(101,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:40:31',NULL,NULL,NULL,14),(102,'ingresos_fur','Edición campo total',' ','2025-09-24 13:40:34',NULL,NULL,NULL,14),(103,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:40:59',NULL,NULL,NULL,14),(104,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:42:02',NULL,NULL,NULL,14),(105,'ingresos_fur','Edición campo total',' ','2025-09-24 13:42:08',NULL,NULL,NULL,14),(106,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:42:10',NULL,NULL,NULL,14),(107,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:42:12',NULL,NULL,NULL,14),(108,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:42:15',NULL,NULL,NULL,14),(109,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:42:22',NULL,NULL,NULL,14),(110,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:42:25',NULL,NULL,NULL,14),(111,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:45:55',NULL,NULL,NULL,14),(112,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:45:57',NULL,NULL,NULL,14),(113,'ingresos_fur','Edición campo tarifaimpuesto',' ','2025-09-24 13:45:59',NULL,NULL,NULL,14),(114,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 14:30:48',NULL,NULL,NULL,6),(115,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 14:30:50',NULL,NULL,NULL,8),(116,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:05:29',NULL,NULL,NULL,14),(117,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:05:34',NULL,NULL,NULL,14),(118,'ingresos_fur','Eliminación de registro',' ','2025-09-24 15:06:46',NULL,NULL,NULL,14),(119,'ingresos_fur','Eliminación de registro',' ','2025-09-24 15:06:48',NULL,NULL,NULL,16),(120,'ingresos_fur','Eliminación de registro',' ','2025-09-24 15:06:48',NULL,NULL,NULL,16),(121,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:07:22',NULL,NULL,NULL,15),(122,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:07:29',NULL,NULL,NULL,16),(123,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:07:32',NULL,NULL,NULL,17),(124,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:07:34',NULL,NULL,NULL,18),(125,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:15:12',NULL,NULL,NULL,19),(126,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:15:15',NULL,NULL,NULL,20),(127,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-24 15:15:35',NULL,NULL,NULL,21),(128,'egresos_fur','Eliminación de egreso',' ','2025-09-26 16:55:02',NULL,NULL,NULL,5),(129,'egresos_fur','Eliminación de egreso',' ','2025-09-26 16:55:05',NULL,NULL,NULL,3),(130,'egresos_fur','Eliminación de egreso',' ','2025-09-26 16:55:07',NULL,NULL,NULL,6),(131,'egresos_fur','Eliminación de egreso',' ','2025-09-26 16:55:09',NULL,NULL,NULL,4),(132,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:47:26',NULL,NULL,NULL,26),(133,'egresos_fur','Eliminación de egreso','SOFTWARE   ','2025-09-27 07:51:16',NULL,NULL,NULL,11),(134,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:52:06',NULL,NULL,NULL,26),(135,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:52:13',NULL,NULL,NULL,27),(136,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:52:16',NULL,NULL,NULL,28),(137,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:53:53',NULL,NULL,NULL,28),(138,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:54:55',NULL,NULL,NULL,29),(139,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 07:55:07',NULL,NULL,NULL,30),(140,'ingresos_fur','Eliminación de registro','SOFTWARE   ','2025-09-27 12:46:26',NULL,NULL,NULL,28),(141,'ingresos_fur','Eliminación de registro',' ','2025-09-27 18:18:43',NULL,NULL,NULL,25),(142,'egresos_fur','Eliminación de egreso',' ','2025-09-27 18:22:17',NULL,NULL,NULL,8),(143,'egresos_fur','Eliminación de egreso',' ','2025-09-27 18:22:18',NULL,NULL,NULL,9),(144,'ingresos_fur','Eliminación de registro',' ','2025-09-27 18:22:22',NULL,NULL,NULL,29),(145,'egresos_fur','Eliminación de egreso',' ','2025-09-27 18:22:25',NULL,NULL,NULL,10),(146,'egresos_fur','Eliminación de egreso',' ','2025-09-27 18:22:26',NULL,NULL,NULL,7),(147,'ingresos_fur','Eliminación de registro',' ','2025-09-27 18:22:27',NULL,NULL,NULL,28),(148,'eventos','Eliminación de evento',' ','2025-09-27 18:22:37',NULL,NULL,NULL,1),(149,'eventos','Eliminación de evento',' ','2025-09-27 18:22:38',NULL,NULL,NULL,2),(150,'modulos','editar id 257 ',' ','2025-10-01 13:30:41','','Mostrar_retencion_en_gastos','modulo',NULL),(151,'modulos','editar id 257 ',' ','2025-10-01 13:30:45',NULL,'General','grupo',NULL),(152,'modulos','editar id 258 ',' ','2025-10-01 13:30:59','','Mostrar_iva_en_gastos','modulo',NULL),(153,'modulos','editar id 258 ',' ','2025-10-01 13:31:00',NULL,'General','grupo',NULL),(154,'clientes','editar id 6    ','SOFTWARE   ','2025-10-02 08:14:38','','MARIA','primernombre',NULL),(155,'clientes','editar id 6 MARIA   ','SOFTWARE   ','2025-10-02 08:14:42',NULL,'DE LOS ANGELES','segundonombre',NULL),(156,'clientes','editar id 6 MARIA DE LOS ANGELES  ','SOFTWARE   ','2025-10-02 08:14:45','','MARIN','primerapellido',NULL),(157,'clientes','editar id 6 MARIA DE LOS ANGELES MARIN ','SOFTWARE   ','2025-10-02 08:14:51',NULL,'ZULETA','segundoapellido',NULL),(158,'clientes','editar id 6 MARIA DE LOS ANGELES MARIN ZULETA','SOFTWARE   ','2025-10-02 08:14:57','','1116267975','cedula',NULL),(159,'clientes','editar id 6 MARIA DE LOS ANGELES MARIN ZULETA','SOFTWARE   ','2025-10-02 08:14:59','CLIENTE','ADMINISTRADOR','rol',NULL),(160,'clientes','editar id 6 MARIA DE LOS ANGELES MARIN ZULETA','SOFTWARE   ','2025-10-02 08:15:48','','3052989638','telefonocontacto',NULL),(161,'clientes','editar id 6 MARIA DE LOS ANGELES MARIN ZULETA','SOFTWARE   ','2025-10-02 08:16:03',NULL,'AUX ADMINISTRATIVO Y CONTABLE','ocupacion',NULL),(162,'clientes','editar id 6 MARIA DE LOS ANGELES MARIN ZULETA','SOFTWARE   ','2025-10-02 08:16:57','','Ang+267975','clave',NULL),(163,'clientes','editar id 5 Claudia  Trujillo ','SOFTWARE   ','2025-10-02 08:18:29','Claudia','CLAUDIA','primernombre',NULL),(164,'clientes','editar id 5 CLAUDIA  Trujillo ','SOFTWARE   ','2025-10-02 08:18:31',NULL,'MILENA','segundonombre',NULL),(165,'clientes','editar id 5 CLAUDIA MILENA Trujillo ','SOFTWARE   ','2025-10-02 08:18:33','Trujillo','TRUJILLO','primerapellido',NULL),(166,'clientes','editar id 5 CLAUDIA MILENA TRUJILLO ','SOFTWARE   ','2025-10-02 08:18:41',NULL,'QUICENO','segundoapellido',NULL),(167,'clientes','editar id 5 CLAUDIA MILENA TRUJILLO QUICENO','SOFTWARE   ','2025-10-02 08:18:53',NULL,'CONTADORA','ocupacion',NULL),(168,'clientes','editar id 5 CLAUDIA MILENA TRUJILLO QUICENO','SOFTWARE   ','2025-10-02 08:19:19','11z2d9t00CdSo','66963*Mile','clave',NULL),(169,'permisos','editar id 3468','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:01','2','1','valor',NULL),(170,'permisos','editar id 3554','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:02','2','1','valor',NULL),(171,'permisos','editar id 3564','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:04','2','1','valor',NULL),(172,'permisos','editar id 3582','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:07','2','1','valor',NULL),(173,'permisos','editar id 3600','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:11','2','1','valor',NULL),(174,'permisos','editar id 3618','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:13','2','1','valor',NULL),(175,'permisos','editar id 3630','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:24','2','1','valor',NULL),(176,'permisos','editar id 3743','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:45','2','1','valor',NULL),(177,'permisos','editar id 3760','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:29:54','2','1','valor',NULL),(178,'permisos','editar id 3947','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:30:21','2','1','valor',NULL),(179,'permisos','editar id 1221','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:30:33','2','1','valor',NULL),(180,'permisos','editar id 33','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:31:02','2','1','valor',NULL),(181,'permisos','editar id 3506','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:32:34','2','1','valor',NULL),(182,'permisos','editar id 3525','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:33:13','2','1','valor',NULL),(183,'permisos','editar id 778','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:34:49','2','1','valor',NULL),(184,'permisos','editar id 11','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:35:29','2','1','valor',NULL),(185,'permisos','editar id 3868','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:36:01','2','1','valor',NULL),(186,'permisos','editar id 2714','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:36:58','2','1','valor',NULL),(187,'permisos','editar id 976','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:37:52','2','1','valor',NULL),(188,'clientes','editar id 7 ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:59:02',NULL,'PEPITO','primernombre',NULL),(189,'clientes','editar id 7 ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 08:59:09','','PEPITO','primerapellido',NULL),(190,'clientes','editar id 7 PEPITO  PEPITO ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:07:21','PEPITO','JOSE OVIRNE','primernombre',NULL),(191,'clientes','editar id 7 JOSE OVIRNE  PEPITO ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:07:25','JOSE OVIRNE','JOSE','primernombre',NULL),(192,'clientes','editar id 7 JOSE  PEPITO ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:07:31','PEPITO','OVIRNE','primerapellido',NULL),(193,'clientes','editar id 7 JOSE  OVIRNE ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:07:59','123456','1112103788','cedula',NULL),(194,'clientes','editar id 7 JOSE  OVIRNE ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:08:00','CLIENTE','ADMINISTRADOR','rol',NULL),(195,'clientes','editar id 7 JOSE  OVIRNE ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:08:35',NULL,'Ovirne+88','clave',NULL),(196,'clientes','editar id 8    ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:09:38','','FURSOCIL','primernombre',NULL),(197,'clientes','editar id 8 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:10:53','FURSOCIL','FURSOCIAL','primernombre',NULL),(198,'gastos','eliminar id 7','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:20:04','valor=300000','tercero: FURSOCIAL    concepto: Bonos sorteo a rest filomena -semana de bienestar',NULL,NULL),(199,'gastos','eliminar id 6','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:20:05','valor=5000','tercero: FURSOCIAL    concepto: Compra de certificado camara ccio',NULL,NULL),(200,'clientes','editar id 7 JOSE  OVIRNE ','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:25:09',NULL,'CONTRATISTA DESDE 1 OCT\nRUT OK','observacion',NULL),(201,'egresos_fur','Eliminación de egreso','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:40:16',NULL,NULL,NULL,14),(202,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:40:41',NULL,NULL,NULL,31),(203,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:42:36',NULL,NULL,NULL,32),(204,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:42:50',NULL,NULL,NULL,31),(205,'egresos_fur','Eliminación de egreso','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:43:15',NULL,NULL,NULL,12),(206,'egresos_fur','Eliminación de egreso','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:43:17',NULL,NULL,NULL,13),(207,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:43:25',NULL,NULL,NULL,31),(208,'ingresos_fur','Edición campo total','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:53:44',NULL,NULL,NULL,33),(209,'ingresos_fur','Edición campo total','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:53:57',NULL,NULL,NULL,33),(210,'ingresos_fur','Edición campo itemdian','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:58:12',NULL,NULL,NULL,35),(211,'ingresos_fur','Edición campo itemdian','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 09:58:46',NULL,NULL,NULL,35),(212,'ingresos_fur','Edición campo itemdian','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 09:58:47',NULL,NULL,NULL,35),(213,'ingresos_fur','Edición campo itemfursocial','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:10:33',NULL,NULL,NULL,36),(214,'ingresos_fur','Edición campo itemfursocial','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:17:34',NULL,NULL,NULL,35),(215,'egresos_fur','Eliminación de egreso','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:26:28',NULL,NULL,NULL,16),(216,'eventos','Edición campo nombre','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:33:44',NULL,NULL,NULL,3),(217,'eventos','Edición campo nombre','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:33:57',NULL,NULL,NULL,3),(218,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:35:49',NULL,NULL,NULL,36),(219,'eventos','Edición campo descripcion','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:36:12',NULL,NULL,NULL,3),(220,'eventos','Edición campo fecha_evento','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:36:18',NULL,NULL,NULL,3),(221,'egresos_fur','Eliminación de egreso','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:36:18',NULL,NULL,NULL,15),(222,'eventos','Edición campo fecha_evento','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:36:21',NULL,NULL,NULL,3),(223,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:36:22',NULL,NULL,NULL,36),(224,'eventos','Edición campo fecha_evento','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:36:23',NULL,NULL,NULL,3),(225,'egresos_fur','Eliminación de egreso','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:36:27',NULL,NULL,NULL,17),(226,'eventos','Edición campo fecha_evento','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 10:36:28',NULL,NULL,NULL,3),(227,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:36:33',NULL,NULL,NULL,35),(228,'egresos_fur','Eliminación de egreso','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:37:22',NULL,NULL,NULL,18),(229,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:37:27',NULL,NULL,NULL,35),(230,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:52:45',NULL,NULL,NULL,34),(231,'ingresos_fur','Eliminación de registro','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:52:51',NULL,NULL,NULL,33),(232,'gastos','eliminar id 4','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:53:08','valor=1623500','tercero: MARIA DE LOS ANGELES MARIN ZULETA concepto: SERVICIOS SETIEMBRE 2025',NULL,NULL),(233,'gastos','eliminar id 3','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:53:12','valor=0','tercero: MARIA DE LOS ANGELES MARIN ZULETA concepto: ',NULL,NULL),(234,'gastos','eliminar id 5','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-02 10:53:35','valor=0','tercero: JOSE  OVIRNE  concepto: Restaurante la oca- SIN FE- evento 31 oct',NULL,NULL),(235,'permisos','editar id 5','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:18:56','2','1','valor',NULL),(236,'permisos','editar id 2499','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:19:05','2','1','valor',NULL),(237,'permisos','editar id 3116','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:19:49','2','1','valor',NULL),(238,'consecutivos','editar id 6','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:10','181','1','consecutivo',NULL),(239,'consecutivos','editar id 34','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:11','6','1','consecutivo',NULL),(240,'consecutivos','editar id 22','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:27','16','1','consecutivo',NULL),(241,'consecutivos','editar id 14','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:28','11','1','consecutivo',NULL),(242,'consecutivos','editar id 29','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:29','10','1','consecutivo',NULL),(243,'consecutivos','editar id 31','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:31','1002','1','consecutivo',NULL),(244,'consecutivos','editar id 42','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:32','3','1','consecutivo',NULL),(245,'consecutivos','editar id 32','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:34','9','1','consecutivo',NULL),(246,'consecutivos','editar id 18','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:37','2','1','consecutivo',NULL),(247,'consecutivos','editar id 2','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:38','73596','1','consecutivo',NULL),(248,'consecutivos','editar id 4','CLAUDIA MILENA TRUJILLO QUICENO','2025-10-02 11:23:39','5','1','consecutivo',NULL),(249,'gastos','eliminar id 9','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:41:01','valor=1623500','tercero: FURSOCIAL    concepto: sueldo luis manzano',NULL,NULL),(250,'clientes','editar id 10 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:42:31',NULL,'LUIS FERNANDO','primernombre',NULL),(251,'clientes','editar id 10 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:42:37','','MANZANO','primerapellido',NULL),(252,'clientes','editar id 10 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:42:58','','3182222055','telefono',NULL),(253,'clientes','editar id 11 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:44:37',NULL,'CAMILO ANTONIO','primernombre',NULL),(254,'clientes','editar id 11 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:44:40','','CAMERO','primerapellido',NULL),(255,'clientes','editar id 11 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:44:56','','3183633909','telefono',NULL),(256,'clientes','editar id 12 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:46:00',NULL,'EDISON ORLANDO','primernombre',NULL),(257,'clientes','editar id 12 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:46:04','','ROMAN','primerapellido',NULL),(258,'clientes','editar id 12 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:46:20','','3152777377','telefono',NULL),(259,'clientes','editar id 13 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:47:11',NULL,'CAMILO','primernombre',NULL),(260,'clientes','editar id 13 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:47:16','','VIEDMA','primerapellido',NULL),(261,'clientes','editar id 13 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:47:19','CAMILO','CAMILO ANDRES','primernombre',NULL),(262,'clientes','editar id 13 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:49:14','','3017880215','telefono',NULL),(263,'clientes','editar id 14 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:51:52',NULL,'SANTIAGO','primernombre',NULL),(264,'clientes','editar id 14 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:51:55','','GRAJALES','primerapellido',NULL),(265,'clientes','editar id 14 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:52:48','','3057664259','telefono',NULL),(266,'clientes','editar id 6 ','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 09:54:32','','3052989638','telefono',NULL),(267,'gastos','eliminar id 15','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-14 10:15:54','valor=0',NULL,NULL,NULL),(268,'gastos','eliminar id 24','MARIA DE LOS ANGELES MARIN ZULETA','2025-10-27 09:39:37','valor=0',NULL,NULL,NULL);

--
-- Table structure for table `egresos_fur`
--

CREATE TABLE `egresos_fur` (
  `id` int NOT NULL AUTO_INCREMENT,
  `idusuario` bigint unsigned NOT NULL,
  `idevento` int DEFAULT NULL,
  `itemdian` varchar(100) NOT NULL,
  `itemfursocial` varchar(100) NOT NULL,
  `valorbase` decimal(15,2) NOT NULL DEFAULT '0.00',
  `tarifaimpuesto` decimal(5,2) NOT NULL DEFAULT '0.00',
  `valorimpuesto` decimal(15,2) NOT NULL DEFAULT '0.00',
  `nombreimpuesto` varchar(50) NOT NULL DEFAULT 'iva',
  `total` decimal(15,2) NOT NULL DEFAULT '0.00',
  `clasificacion` text,
  `fechacreacion` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `orden` varchar(50) DEFAULT NULL,
  `idingreso` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idusuario` (`idusuario`),
  KEY `idx_evento` (`idevento`),
  KEY `idingreso` (`idingreso`),
  CONSTRAINT `egresos_fur_ibfk_1` FOREIGN KEY (`idingreso`) REFERENCES `ingresos_fur` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `egresos_fur_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `egresos_fur_ibfk_3` FOREIGN KEY (`idevento`) REFERENCES `eventos` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `egresos_fur`
--


--
-- Table structure for table `emailenviados`
--

CREATE TABLE `emailenviados` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT NULL,
  `texto` text,
  `destinatarios` text,
  `cantidad` int DEFAULT '1',
  `valorunitario` int DEFAULT '0',
  `valortotal` int DEFAULT '0',
  `response` text,
  PRIMARY KEY (`id`),
  KEY `cc` (`texto`(1024))
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `emailenviados`
--

INSERT INTO `emailenviados` (`id`, `fechacreacion`, `texto`, `destinatarios`, `cantidad`, `valorunitario`, `valortotal`, `response`) VALUES (9,'2025-06-10 01:48:10','{\"destinatarios\":[{\"email\":\"raulotalvaro@gmail.com\",\"name\":\"CONSUMIDOR FINAL   \"}],\"titulo\":\"Notificaciu00f3n de clave provisional\",\"from\":\"Control\",\"contenido\":\"    <!DOCTYPE html>\r\n    <html lang=\"es\" translate=\"no\">\r\n    <head>\r\n    <title>Notificaciu00f3n de clave provisional</title>\r\n    </head>\r\n    <body>            \r\n    <h1>Notificaciu00f3n de clave provisional</h1>\r\n    <p>Estimado/a <b>CONSUMIDOR FINAL   </b>,</p>\r\n    <p>Se le ha generado una clave provisional para acceder a nuestro sistema.</p>\r\n    <p>Su clave provisional es: <b>98674215</b></p>\r\n    <p>Le recomendamos cambiar esta clave temporal tan pronto como sea posible.</p>\r\n    <p>Si tiene alguna pregunta o necesita ayuda, no dude en contactarnos.</p>\r\n    <p>u00a1Gracias!</p>\r\n    </body>\r\n    </html>\"}',NULL,1,0,0,'Array\n(\n    [status_code] => 202\n    [headers] => Array\n        (\n            [Date] => Array\n                (\n                    [0] => Tue, 10 Jun 2025 06:48:11 GMT\n                )\n\n            [Content-Type] => Array\n                (\n                    [0] => text/html; charset=UTF-8\n                )\n\n            [Transfer-Encoding] => Array\n                (\n                    [0] => chunked\n                )\n\n            [Connection] => Array\n                (\n                    [0] => keep-alive\n                )\n\n            [Cf-Ray] => Array\n                (\n                    [0] => 94d6ebec4de8b73f-SLC\n                )\n\n            [X-Message-Id] => Array\n                (\n                    [0] => 6847d52b8e233b5f682f841c\n                )\n\n            [Cache-Control] => Array\n                (\n                    [0] => no-cache, private\n                )\n\n            [X-Apiquota-Remaining] => Array\n                (\n                    [0] => 99999\n                )\n\n            [X-Apiquota-Reset] => Array\n                (\n                    [0] => 2025-06-11T00:00:00Z\n                )\n\n            [X-Ratelimit-Limit] => Array\n                (\n                    [0] => 10\n                )\n\n            [X-Ratelimit-Remaining] => Array\n                (\n                    [0] => 9\n                )\n\n            [Strict-Transport-Security] => Array\n                (\n                    [0] => max-age=31536000; includeSubDomains\n                )\n\n            [Cf-Cache-Status] => Array\n                (\n                    [0] => DYNAMIC\n                )\n\n            [Server] => Array\n                (\n                    [0] => cloudflare\n                )\n\n        )\n\n    [body] => \n    [response] => GuzzleHttpPsr7Response Object\n        (\n            [reasonPhrase:GuzzleHttpPsr7Response:private] => Accepted\n            [statusCode:GuzzleHttpPsr7Response:private] => 202\n            [headers:GuzzleHttpPsr7Response:private] => Array\n                (\n                    [Date] => Array\n                        (\n                            [0] => Tue, 10 Jun 2025 06:48:11 GMT\n                        )\n\n                    [Content-Type] => Array\n                        (\n                            [0] => text/html; charset=UTF-8\n                        )\n\n                    [Transfer-Encoding] => Array\n                        (\n                            [0] => chunked\n                        )\n\n                    [Connection] => Array\n                        (\n                            [0] => keep-alive\n                        )\n\n                    [Cf-Ray] => Array\n                        (\n                            [0] => 94d6ebec4de8b73f-SLC\n                        )\n\n                    [X-Message-Id] => Array\n                        (\n                            [0] => 6847d52b8e233b5f682f841c\n                        )\n\n                    [Cache-Control] => Array\n                        (\n                            [0] => no-cache, private\n                        )\n\n                    [X-Apiquota-Remaining] => Array\n                        (\n                            [0] => 99999\n                        )\n\n                    [X-Apiquota-Reset] => Array\n                        (\n                            [0] => 2025-06-11T00:00:00Z\n                        )\n\n                    [X-Ratelimit-Limit] => Array\n                        (\n                            [0] => 10\n                        )\n\n                    [X-Ratelimit-Remaining] => Array\n                        (\n                            [0] => 9\n                        )\n\n                    [Strict-Transport-Security] => Array\n                        (\n                            [0] => max-age=31536000; includeSubDomains\n                        )\n\n                    [Cf-Cache-Status] => Array\n                        (\n                            [0] => DYNAMIC\n                        )\n\n                    [Server] => Array\n                        (\n                            [0] => cloudflare\n                        )\n\n                )\n\n            [headerNames:GuzzleHttpPsr7Response:private] => Array\n                (\n                    [date] => Date\n                    [content-type] => Content-Type\n                    [transfer-encoding] => Transfer-Encoding\n                    [connection] => Connection\n                    [cf-ray] => Cf-Ray\n                    [x-message-id] => X-Message-Id\n                    [cache-control] => Cache-Control\n                    [x-apiquota-remaining] => X-Apiquota-Remaining\n                    [x-apiquota-reset] => X-Apiquota-Reset\n                    [x-ratelimit-limit] => X-Ratelimit-Limit\n                    [x-ratelimit-remaining] => X-Ratelimit-Remaining\n                    [strict-transport-security] => Strict-Transport-Security\n                    [cf-cache-status] => Cf-Cache-Status\n                    [server] => Server\n                )\n\n            [protocol:GuzzleHttpPsr7Response:private] => 1.1\n            [stream:GuzzleHttpPsr7Response:private] => GuzzleHttpPsr7Stream Object\n                (\n                    [stream:GuzzleHttpPsr7Stream:private] => Resource id #135\n                    [size:GuzzleHttpPsr7Stream:private] => \n                    [seekable:GuzzleHttpPsr7Stream:private] => 1\n                    [readable:GuzzleHttpPsr7Stream:private] => 1\n                    [writable:GuzzleHttpPsr7Stream:private] => 1\n                    [uri:GuzzleHttpPsr7Stream:private] => php://temp\n                    [customMetadata:GuzzleHttpPsr7Stream:private] => Array\n                        (\n                        )\n\n                )\n\n        )\n\n)\n httpCode 200');

--
-- Table structure for table `enseres`
--

CREATE TABLE `enseres` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime DEFAULT CURRENT_TIMESTAMP,
  `idusuario` int DEFAULT NULL,
  `enser` varchar(150) DEFAULT NULL,
  `clase` varchar(25) DEFAULT NULL,
  `estado` varchar(25) DEFAULT NULL,
  `valor` double DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `enseres`
--


--
-- Table structure for table `epss`
--

CREATE TABLE `epss` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `eps` varchar(120) NOT NULL DEFAULT '',
  `cc` bigint unsigned NOT NULL DEFAULT '1',
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `epss`
--


--
-- Table structure for table `estilos`
--

CREATE TABLE `estilos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(25) DEFAULT NULL,
  `estilo` text,
  `js` text,
  `html` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `estilos`
--

INSERT INTO `estilos` (`id`, `nombre`, `estilo`, `js`, `html`) VALUES (1,'general','',NULL,NULL),(3,'Política','','',''),(2,'Tienda virtual','.ficha-articulo-img{display:none !important;}\n.ficha-articulo-btn{position:absolute !important;top:76px !important;max-width:104px !important;}\n.ficha-articulo {\n    height: 130px !important;   \nmin-height: 100px !important;  \n} \n.ficha-articulo-titulo{\ncolor:#ff7514;\nfont-size:14px !important;\nfont-weight:bold !important;\n}\n.ficha-articulo-desc{\ncolor:red;\nfont-size:14px !important;\nfont-weight:bold !important;\n}\n.hero-tienda-logo{\nbackground:none !important','','');

--
-- Table structure for table `eventos`
--

CREATE TABLE `eventos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci,
  `fecha_evento` date DEFAULT NULL,
  `estado` enum('activo','inactivo') COLLATE utf8mb4_unicode_ci DEFAULT 'activo',
  `idusuario` int NOT NULL,
  `fecha_creacion` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `fecha_actualizacion` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_usuario` (`idusuario`),
  KEY `idx_estado` (`estado`),
  KEY `idx_fecha_evento` (`fecha_evento`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `eventos`
--

INSERT INTO `eventos` (`id`, `nombre`, `descripcion`, `fecha_evento`, `estado`, `idusuario`, `fecha_creacion`, `fecha_actualizacion`) VALUES (3,'FIESTA DE COLORES','Uceva','2025-10-20','activo',2,'2025-09-25 13:54:02','2025-10-02 15:36:28');

--
-- Table structure for table `facturas`
--

CREATE TABLE `facturas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `observaciondelcleinte` varchar(200) DEFAULT NULL,
  `diasemana` varchar(200) DEFAULT NULL,
  `ordendia` int DEFAULT '0',
  `abonoinicial` int DEFAULT '0',
  `aliado` varchar(25) DEFAULT NULL,
  `IDMINUTA` int DEFAULT '0',
  `direccion` varchar(200) DEFAULT NULL,
  `barrio` varchar(50) DEFAULT NULL,
  `celular` varchar(50) DEFAULT NULL,
  `cliente` varchar(100) DEFAULT NULL,
  `horaentregadoaldomiciliario` datetime DEFAULT NULL,
  `horaentregadoalcliente` datetime DEFAULT NULL,
  `fecharesolucion` date DEFAULT NULL,
  `resolucion` varchar(20) DEFAULT NULL,
  `desde` int DEFAULT '1',
  `hasta` int DEFAULT '1',
  `iddomiciliario` int DEFAULT '0',
  `comandaf` varchar(11) DEFAULT NULL,
  `entregado` int DEFAULT '0',
  `despachado` int DEFAULT '0',
  `ese` int DEFAULT '0',
  `tienenc` int DEFAULT '0',
  `consecutivo` int NOT NULL DEFAULT '0',
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `horatotal` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `documento` varchar(2) NOT NULL DEFAULT 'V',
  `saldo` double NOT NULL DEFAULT '0',
  `observacion` text,
  `origen` varchar(25) DEFAULT NULL,
  `entrega` varchar(100) NOT NULL DEFAULT ' ',
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cc` int DEFAULT '2',
  `idmesa` int DEFAULT '1',
  `bruto` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `total` int DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `abonado` int NOT NULL DEFAULT '0',
  `idfacturaqueabona` int NOT NULL DEFAULT '0',
  `cerrado` int NOT NULL DEFAULT '0',
  `recibido` double NOT NULL DEFAULT '0',
  `devuelta` double NOT NULL DEFAULT '0',
  `iva` double DEFAULT '0',
  `vigenciadelcredito` int NOT NULL DEFAULT '0',
  `condicion` int NOT NULL DEFAULT '0',
  `fechavencimiento` date DEFAULT NULL,
  `ultimaedicion` datetime DEFAULT CURRENT_TIMESTAMP,
  `pedidonumero` varchar(50) DEFAULT NULL,
  `base` double NOT NULL DEFAULT '0',
  `inquiry` varchar(23) NOT NULL DEFAULT ' ',
  `esbolsillo` int NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1' COMMENT 'este vendedor no hizo toda la venta, solo abriÃƒÂ² la mesa',
  `emailenviado` int NOT NULL DEFAULT '0',
  `escortesia` int NOT NULL DEFAULT '0',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(25) NOT NULL DEFAULT 'EFECTIVO',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `fechaabonado` datetime DEFAULT NULL,
  `servicio` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `CODFORMAPAGO` varchar(5) DEFAULT '1',
  `codalmacen` varchar(25) DEFAULT '1',
  `TIPODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `n` varchar(1) NOT NULL DEFAULT 'B',
  `aliasespera` int NOT NULL DEFAULT '0',
  `codvendedor` int NOT NULL DEFAULT '0',
  `impresiones` int NOT NULL DEFAULT '0',
  `numservicio` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `consecutivoenviado` int DEFAULT '0',
  `esbarra` varchar(1) NOT NULL DEFAULT 'F',
  `CODTARIFA` varchar(1) NOT NULL DEFAULT '1',
  `ivainc` varchar(1) NOT NULL DEFAULT 'T',
  `codzona` int NOT NULL DEFAULT '1',
  `domicilio` double NOT NULL DEFAULT '0',
  `cedula` varchar(15) NOT NULL DEFAULT '999999',
  `codigociudad` varchar(7) DEFAULT '66001',
  `email` varchar(100) DEFAULT NULL,
  `codigopostal` varchar(7) DEFAULT '660001',
  `codigodepartamento` varchar(7) DEFAULT '66',
  `departamento` varchar(25) DEFAULT 'RISARALDA',
  `ciudad` varchar(25) DEFAULT 'PEREIRA',
  `cufe` varchar(250) DEFAULT NULL,
  `resoluciondesde` date DEFAULT NULL,
  `resolucionhasta` date DEFAULT NULL,
  `id_tipo_persona` int DEFAULT '0',
  `prefijofe` varchar(5) DEFAULT NULL,
  `consecutivofe` int DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `valornc` double DEFAULT '0',
  `notacreditofe` int DEFAULT '0',
  `cufenc` varchar(250) DEFAULT NULL,
  `numlineas` int DEFAULT '0',
  `razonsocial` varchar(200) DEFAULT NULL,
  `nombrecomercial` varchar(200) DEFAULT NULL,
  `tipodepersona` int DEFAULT '0',
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `dv` int DEFAULT NULL,
  `sfiscalresponsibilities` varchar(10) DEFAULT NULL,
  `regimenfiscal` int DEFAULT NULL,
  `contacto` varchar(100) DEFAULT NULL,
  `prefijo` varchar(5) DEFAULT 'FV',
  `conceptoanulado` varchar(150) DEFAULT NULL,
  `garantiahasta` date DEFAULT NULL,
  `cantidadmediosdepago` int DEFAULT '0',
  `snumsop` varchar(25) DEFAULT NULL,
  `inumoper` varchar(25) DEFAULT NULL,
  `domicilioexterno` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `numeroabajo` int DEFAULT '0',
  `alergenos` varchar(50) DEFAULT '0',
  `facturatienemodificadores` int DEFAULT '0',
  `conseuctivorappi` varchar(11) DEFAULT NULL,
  `delivery_method` varchar(25) DEFAULT NULL,
  `payment_method` varchar(25) DEFAULT NULL,
  `COD_CLIENTE_FRONT` int DEFAULT '0',
  `tipofactura` varchar(1) DEFAULT 'V' COMMENT 'Tipo de Factura: P=Parking, V=Ventas',
  `ssignature` text,
  `sqr` text,
  `observacionesnovedad` varchar(150) DEFAULT NULL,
  `horapreparado` datetime DEFAULT NULL,
  `resdianfe` varchar(25) DEFAULT NULL,
  `desdefe` int DEFAULT '0',
  `hastafe` int DEFAULT '0',
  `fecharesfe` date DEFAULT NULL,
  `fechafe` date DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `mediodoepagointegracion` varchar(25) DEFAULT NULL,
  `CONFIRMED` datetime DEFAULT NULL,
  `pancaliente` int DEFAULT '0',
  `DISPATCHED` datetime DEFAULT NULL,
  `CONCLUDED` datetime DEFAULT NULL,
  `CANCELLED` datetime DEFAULT NULL,
  `prefijoenviado` varchar(4) DEFAULT NULL,
  `aceptado` bit(1) DEFAULT b'0',
  `horaaceptado` datetime DEFAULT NULL,
  `fecha_registrofactura` datetime DEFAULT CURRENT_TIMESTAMP,
  `enviadoataxxa` bit(1) DEFAULT b'0',
  `horanovedad` datetime DEFAULT NULL,
  `novedad` bit(1) DEFAULT b'0',
  `costofactura` double DEFAULT '0',
  `aceptado_domiciliario` bit(1) DEFAULT b'0',
  `hora_aceptado_domiciliario` datetime DEFAULT NULL,
  `prooduco_recibido_domiciliario` bit(1) DEFAULT b'0',
  `hora_prooduco_recibido_domiciliario` datetime DEFAULT NULL,
  `impreso` bit(1) DEFAULT b'0',
  `pedidorechazado` bit(1) DEFAULT b'0',
  `horapedidorechazado` datetime DEFAULT NULL,
  `domicilioconciliado` bit(1) DEFAULT b'0',
  `fechancdian` datetime DEFAULT NULL,
  `tipodevolucion` varchar(25) DEFAULT NULL,
  `deberecoger` datetime DEFAULT NULL,
  `nombrecomercialfactura` varchar(50) DEFAULT NULL,
  `clasificacioncliente` varchar(20) DEFAULT 'CLIENTE FINAL',
  `codeudor` varchar(50) DEFAULT NULL,
  `telefonoocodeudor` varchar(30) DEFAULT NULL,
  `parentescocodeudor` varchar(25) DEFAULT NULL,
  `plazo` int DEFAULT NULL,
  `valorcuota` int DEFAULT NULL,
  `valorcuotainicial` int DEFAULT NULL,
  `fechacuotainicial` date DEFAULT NULL,
  `cuotasapartirde` date DEFAULT NULL,
  `modalidad` int DEFAULT NULL,
  `comensales_factura` int DEFAULT '0',
  `identificador` varchar(25) DEFAULT NULL,
  `impazucaradas` int DEFAULT '0',
  `impultraprocesados` int DEFAULT '0',
  `descuentoporflete` int DEFAULT '0',
  `otrosdescuentos` int DEFAULT '0',
  `sobrecargoeventosf` double DEFAULT '0',
  `forzar2222` varchar(2) DEFAULT 'no',
  `fechafinfe` date DEFAULT NULL,
  `fechahastape` date DEFAULT NULL,
  `prefijope` varchar(4) DEFAULT NULL,
  `fechafinposelectronico` date DEFAULT NULL,
  `fechaposelectronico` date DEFAULT NULL,
  `hastaposelectronico` int DEFAULT '0',
  `desdeposelectronico` int DEFAULT '0',
  `resposelectronico` varchar(25) DEFAULT NULL,
  `cufepos` varchar(250) DEFAULT NULL,
  `idmandante` int DEFAULT '0',
  `ZipKey` varchar(50) DEFAULT '',
  `error_taxxa` int DEFAULT '0',
  `revisiones` int DEFAULT '0',
  `repeticionesfe` int DEFAULT '0',
  `wdocumentstatus` varchar(1) DEFAULT NULL,
  `servicio_comedor` varchar(2) DEFAULT 'no',
  `retencion` double DEFAULT '0',
  `idruta` int DEFAULT '0',
  `centrodecostos` varchar(5) DEFAULT NULL,
  `periodicidad` varchar(5) DEFAULT NULL,
  `fechaprimercuota` date DEFAULT NULL,
  `cantidaddecuotas` int DEFAULT '0',
  `moduloenvia` varchar(25) DEFAULT NULL,
  `idusuarioanula` int DEFAULT '0',
  `grupofactura` varchar(25) DEFAULT NULL,
  `clasificacionfactura` varchar(20) DEFAULT NULL,
  `fecha_operacion` date DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idvendedor` (`idvendedor`),
  KEY `facturas_ibfk_3` (`idcliente`),
  CONSTRAINT `facturas_ibfk_1` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`),
  CONSTRAINT `facturas_ibfk_2` FOREIGN KEY (`idz`) REFERENCES `z` (`id`),
  CONSTRAINT `facturas_ibfk_3` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `facturas_ibfk_4` FOREIGN KEY (`idvendedor`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `facturas`
--


--
-- Table structure for table `facturas2`
--

CREATE TABLE `facturas2` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `observaciondelcleinte` varchar(200) DEFAULT NULL,
  `diasemana` varchar(200) DEFAULT NULL,
  `ordendia` int DEFAULT '0',
  `MESALIBERADA` int DEFAULT '1',
  `IDMOTIVODTO` int DEFAULT '1',
  `IDMINUTA` int DEFAULT '0',
  `direccion` varchar(200) DEFAULT NULL,
  `barrio` varchar(50) DEFAULT NULL,
  `celular` varchar(50) DEFAULT NULL,
  `cliente` varchar(100) DEFAULT NULL,
  `horaentregadoaldomiciliario` datetime DEFAULT NULL,
  `horaentregadoalcliente` datetime DEFAULT NULL,
  `fecharesolucion` date DEFAULT NULL,
  `resolucion` varchar(20) DEFAULT NULL,
  `desde` int DEFAULT '1',
  `hasta` int DEFAULT '1',
  `iddomiciliario` int DEFAULT '0',
  `comandaf` varchar(11) DEFAULT NULL,
  `entregado` int DEFAULT '0',
  `despachado` int DEFAULT '0',
  `ese` int DEFAULT '0',
  `tienenc` int DEFAULT '0',
  `consecutivo` int NOT NULL DEFAULT '0',
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `horatotal` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `documento` varchar(2) NOT NULL DEFAULT 'V',
  `saldo` double NOT NULL DEFAULT '0',
  `observacion` text,
  `origen` varchar(8) NOT NULL DEFAULT 'MESAS',
  `entrega` varchar(100) NOT NULL DEFAULT ' ',
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cc` bigint unsigned NOT NULL,
  `idmesa` int DEFAULT '1',
  `bruto` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `total` double NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `abonado` int NOT NULL DEFAULT '0',
  `idfacturaqueabona` int NOT NULL DEFAULT '0',
  `cerrado` int NOT NULL DEFAULT '0',
  `recibido` double NOT NULL DEFAULT '0',
  `devuelta` double NOT NULL DEFAULT '0',
  `iva` int NOT NULL DEFAULT '0',
  `vigenciadelcredito` int NOT NULL DEFAULT '0',
  `condicion` int NOT NULL DEFAULT '0',
  `fechavencimiento` datetime DEFAULT CURRENT_TIMESTAMP,
  `ultimaedicion` datetime DEFAULT CURRENT_TIMESTAMP,
  `pedidonumero` varchar(10) DEFAULT NULL,
  `base` double NOT NULL DEFAULT '0',
  `inquiry` varchar(23) NOT NULL DEFAULT ' ',
  `esbolsillo` int NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1' COMMENT 'este vendedor no hizo toda la venta, solo abriÃƒÂ² la mesa',
  `emailenviado` int NOT NULL DEFAULT '0',
  `escortesia` int NOT NULL DEFAULT '0',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(25) NOT NULL DEFAULT 'EFECTIVO',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `fechaabonado` datetime DEFAULT NULL,
  `servicio` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `CODFORMAPAGO` varchar(5) DEFAULT '1',
  `codalmacen` varchar(25) DEFAULT '1',
  `TIPODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `ESTADODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `n` varchar(1) NOT NULL DEFAULT 'B',
  `aliasespera` int NOT NULL DEFAULT '0',
  `codvendedor` int NOT NULL DEFAULT '0',
  `impresiones` int NOT NULL DEFAULT '0',
  `numservicio` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `CODTIPOTASA1` varchar(1) NOT NULL DEFAULT '1',
  `esbarra` varchar(1) NOT NULL DEFAULT 'F',
  `CODTARIFA` varchar(1) NOT NULL DEFAULT '1',
  `ivainc` varchar(1) NOT NULL DEFAULT 'T',
  `codzona` int NOT NULL DEFAULT '1',
  `domicilio` double NOT NULL DEFAULT '0',
  `cedula` varchar(15) NOT NULL DEFAULT '999999',
  `codigociudad` varchar(5) DEFAULT NULL,
  `email` varchar(5) DEFAULT NULL,
  `codigopostal` varchar(5) DEFAULT NULL,
  `codigodepartamento` varchar(5) DEFAULT NULL,
  `departamento` varchar(25) DEFAULT NULL,
  `ciudad` varchar(5) DEFAULT NULL,
  `cufe` varchar(250) DEFAULT NULL,
  `resoluciondesde` date DEFAULT NULL,
  `resolucionhasta` date DEFAULT NULL,
  `id_tipo_persona` int DEFAULT '0',
  `prefijofe` varchar(5) DEFAULT NULL,
  `consecutivofe` int DEFAULT '0',
  `fecha_registrofactura` varchar(20) DEFAULT NULL,
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `valornc` double DEFAULT '0',
  `notacreditofe` int DEFAULT '0',
  `cufenc` varchar(250) DEFAULT NULL,
  `domicilioexterno` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'KALDI',
  `numeroabajo` int DEFAULT '0',
  `alergenos` varchar(50) DEFAULT '0',
  `impazucaradas` int DEFAULT '0',
  `impultraprocesados` int DEFAULT '0',
  `placa` varchar(6) DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idvendedor` (`idvendedor`),
  KEY `facturas_ibfk_3` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `facturas2`
--


--
-- Table structure for table `facturas2021`
--

CREATE TABLE `facturas2021` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `observaciondelcleinte` varchar(200) DEFAULT NULL,
  `diasemana` varchar(200) DEFAULT NULL,
  `ordendia` int DEFAULT '0',
  `MESALIBERADA` int DEFAULT '1',
  `aliado` varchar(25) DEFAULT NULL,
  `IDMINUTA` int DEFAULT '0',
  `direccion` varchar(200) DEFAULT NULL,
  `barrio` varchar(50) DEFAULT NULL,
  `celular` varchar(50) DEFAULT NULL,
  `cliente` varchar(100) DEFAULT NULL,
  `horaentregadoaldomiciliario` datetime DEFAULT NULL,
  `horaentregadoalcliente` datetime DEFAULT NULL,
  `fecharesolucion` date DEFAULT NULL,
  `resolucion` varchar(20) DEFAULT NULL,
  `desde` int DEFAULT '1',
  `hasta` int DEFAULT '1',
  `iddomiciliario` int DEFAULT '0',
  `comandaf` varchar(11) DEFAULT NULL,
  `entregado` int DEFAULT '0',
  `despachado` int DEFAULT '0',
  `ese` int DEFAULT '0',
  `tienenc` int DEFAULT '0',
  `consecutivo` int NOT NULL DEFAULT '0',
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `horatotal` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `documento` varchar(2) NOT NULL DEFAULT 'V',
  `saldo` double NOT NULL DEFAULT '0',
  `observacion` text,
  `origen` varchar(25) DEFAULT NULL,
  `entrega` varchar(100) NOT NULL DEFAULT ' ',
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cc` int DEFAULT '2',
  `idmesa` int DEFAULT '1',
  `bruto` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `total` int DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `abonado` int NOT NULL DEFAULT '0',
  `idfacturaqueabona` int NOT NULL DEFAULT '0',
  `cerrado` int NOT NULL DEFAULT '0',
  `recibido` double NOT NULL DEFAULT '0',
  `devuelta` double NOT NULL DEFAULT '0',
  `iva` double DEFAULT '0',
  `vigenciadelcredito` int NOT NULL DEFAULT '0',
  `condicion` int NOT NULL DEFAULT '0',
  `fechavencimiento` date DEFAULT NULL,
  `ultimaedicion` datetime DEFAULT CURRENT_TIMESTAMP,
  `pedidonumero` varchar(50) DEFAULT NULL,
  `base` double NOT NULL DEFAULT '0',
  `inquiry` varchar(23) NOT NULL DEFAULT ' ',
  `esbolsillo` int NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1' COMMENT 'este vendedor no hizo toda la venta, solo abriÃƒÂ² la mesa',
  `emailenviado` int NOT NULL DEFAULT '0',
  `escortesia` int NOT NULL DEFAULT '0',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(25) NOT NULL DEFAULT 'EFECTIVO',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `fechaabonado` datetime DEFAULT NULL,
  `servicio` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `CODFORMAPAGO` varchar(5) DEFAULT '1',
  `codalmacen` varchar(25) DEFAULT '1',
  `TIPODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `ESTADODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `n` varchar(1) NOT NULL DEFAULT 'B',
  `aliasespera` int NOT NULL DEFAULT '0',
  `codvendedor` int NOT NULL DEFAULT '0',
  `impresiones` int NOT NULL DEFAULT '0',
  `numservicio` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `CODTIPOTASA1` varchar(1) NOT NULL DEFAULT '1',
  `esbarra` varchar(1) NOT NULL DEFAULT 'F',
  `CODTARIFA` varchar(1) NOT NULL DEFAULT '1',
  `ivainc` varchar(1) NOT NULL DEFAULT 'T',
  `codzona` int NOT NULL DEFAULT '1',
  `domicilio` double NOT NULL DEFAULT '0',
  `cedula` varchar(15) NOT NULL DEFAULT '999999',
  `codigociudad` varchar(7) DEFAULT '63001',
  `email` varchar(100) DEFAULT NULL,
  `codigopostal` varchar(7) DEFAULT '630003',
  `codigodepartamento` varchar(7) DEFAULT '63',
  `departamento` varchar(25) DEFAULT 'QUINDIO',
  `ciudad` varchar(25) DEFAULT 'ARMENIA',
  `cufe` varchar(250) DEFAULT NULL,
  `resoluciondesde` date DEFAULT NULL,
  `resolucionhasta` date DEFAULT NULL,
  `id_tipo_persona` int DEFAULT '0',
  `prefijofe` varchar(5) DEFAULT NULL,
  `consecutivofe` int DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `valornc` double DEFAULT '0',
  `notacreditofe` int DEFAULT '0',
  `cufenc` varchar(250) DEFAULT NULL,
  `numlineas` int DEFAULT '0',
  `razonsocial` varchar(200) DEFAULT NULL,
  `nombrecomercial` varchar(200) DEFAULT NULL,
  `tipodepersona` int DEFAULT '0',
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `dv` int DEFAULT NULL,
  `sfiscalresponsibilities` varchar(10) DEFAULT NULL,
  `regimenfiscal` int DEFAULT NULL,
  `contacto` varchar(100) DEFAULT NULL,
  `prefijo` varchar(5) DEFAULT 'FV',
  `conceptoanulado` varchar(150) DEFAULT NULL,
  `garantiahasta` date DEFAULT NULL,
  `cantidadmediosdepago` int DEFAULT '0',
  `snumsop` varchar(25) DEFAULT NULL,
  `inumoper` varchar(25) DEFAULT NULL,
  `domicilioexterno` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `numeroabajo` int DEFAULT '0',
  `alergenos` varchar(50) DEFAULT '0',
  `facturatienemodificadores` int DEFAULT '0',
  `conseuctivorappi` varchar(11) DEFAULT NULL,
  `delivery_method` varchar(25) DEFAULT NULL,
  `payment_method` varchar(25) DEFAULT NULL,
  `COD_CLIENTE_FRONT` int DEFAULT '0',
  `ID_CLIENTE_CONTROL` int DEFAULT '1',
  `ssignature` text,
  `sqr` text,
  `observacionesnovedad` varchar(150) DEFAULT NULL,
  `horapreparado` datetime DEFAULT NULL,
  `resdianfe` varchar(25) DEFAULT NULL,
  `desdefe` int DEFAULT '0',
  `hastafe` int DEFAULT '0',
  `fecharesfe` date DEFAULT NULL,
  `fechafe` date DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `mediodoepagointegracion` varchar(25) DEFAULT NULL,
  `CONFIRMED` datetime DEFAULT NULL,
  `READY_TO_PICKUP` datetime DEFAULT NULL,
  `DISPATCHED` datetime DEFAULT NULL,
  `CONCLUDED` datetime DEFAULT NULL,
  `CANCELLED` datetime DEFAULT NULL,
  `CANCELLATION_REQUESTED` datetime DEFAULT NULL,
  `aceptado` bit(1) DEFAULT b'0',
  `horaaceptado` datetime DEFAULT NULL,
  `fecha_registrofactura` datetime DEFAULT NULL,
  `enviadoataxxa` bit(1) DEFAULT b'0',
  `horanovedad` datetime DEFAULT NULL,
  `novedad` bit(1) DEFAULT b'0',
  `costofactura` double DEFAULT '0',
  `aceptado_domiciliario` bit(1) DEFAULT b'0',
  `hora_aceptado_domiciliario` datetime DEFAULT NULL,
  `prooduco_recibido_domiciliario` bit(1) DEFAULT b'0',
  `hora_prooduco_recibido_domiciliario` datetime DEFAULT NULL,
  `impreso` bit(1) DEFAULT b'0',
  `pedidorechazado` bit(1) DEFAULT b'0',
  `horapedidorechazado` datetime DEFAULT NULL,
  `domicilioconciliado` bit(1) DEFAULT b'0',
  `fechancdian` datetime DEFAULT NULL,
  `tipodevolucion` varchar(25) DEFAULT NULL,
  `deberecoger` datetime DEFAULT NULL,
  `nombrecomercialfactura` varchar(50) DEFAULT NULL,
  `clasificacioncliente` varchar(20) DEFAULT 'CLIENTE FINAL',
  `codeudor` varchar(50) DEFAULT NULL,
  `telefonoocodeudor` varchar(30) DEFAULT NULL,
  `parentescocodeudor` varchar(25) DEFAULT NULL,
  `plazo` int DEFAULT NULL,
  `valorcuota` int DEFAULT NULL,
  `valorcuotainicial` int DEFAULT NULL,
  `fechacuotainicial` date DEFAULT NULL,
  `cuotasapartirde` date DEFAULT NULL,
  `modalidad` int DEFAULT NULL,
  `comensales_factura` int DEFAULT '0',
  `identificador` varchar(25) DEFAULT NULL,
  `impazucaradas` int DEFAULT '0',
  `impultraprocesados` int DEFAULT '0',
  `descuentoporflete` int DEFAULT '0',
  `otrosdescuentos` int DEFAULT '0',
  `sobrecargoeventosf` double DEFAULT '0',
  `forzar2222` varchar(2) DEFAULT 'no',
  `fechafinfe` date DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idvendedor` (`idvendedor`),
  KEY `facturas_ibfk_3` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `facturas2021`
--


--
-- Table structure for table `facturas2022`
--

CREATE TABLE `facturas2022` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `observaciondelcleinte` varchar(200) DEFAULT NULL,
  `diasemana` varchar(200) DEFAULT NULL,
  `ordendia` int DEFAULT '0',
  `MESALIBERADA` int DEFAULT '1',
  `aliado` varchar(25) DEFAULT NULL,
  `IDMINUTA` int DEFAULT '0',
  `direccion` varchar(200) DEFAULT NULL,
  `barrio` varchar(50) DEFAULT NULL,
  `celular` varchar(50) DEFAULT NULL,
  `cliente` varchar(100) DEFAULT NULL,
  `horaentregadoaldomiciliario` datetime DEFAULT NULL,
  `horaentregadoalcliente` datetime DEFAULT NULL,
  `fecharesolucion` date DEFAULT NULL,
  `resolucion` varchar(20) DEFAULT NULL,
  `desde` int DEFAULT '1',
  `hasta` int DEFAULT '1',
  `iddomiciliario` int DEFAULT '0',
  `comandaf` varchar(11) DEFAULT NULL,
  `entregado` int DEFAULT '0',
  `despachado` int DEFAULT '0',
  `ese` int DEFAULT '0',
  `tienenc` int DEFAULT '0',
  `consecutivo` int NOT NULL DEFAULT '0',
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `horatotal` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `documento` varchar(2) NOT NULL DEFAULT 'V',
  `saldo` double NOT NULL DEFAULT '0',
  `observacion` text,
  `origen` varchar(25) DEFAULT NULL,
  `entrega` varchar(100) NOT NULL DEFAULT ' ',
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cc` int DEFAULT '2',
  `idmesa` int DEFAULT '1',
  `bruto` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `total` int DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `abonado` int NOT NULL DEFAULT '0',
  `idfacturaqueabona` int NOT NULL DEFAULT '0',
  `cerrado` int NOT NULL DEFAULT '0',
  `recibido` double NOT NULL DEFAULT '0',
  `devuelta` double NOT NULL DEFAULT '0',
  `iva` double DEFAULT '0',
  `vigenciadelcredito` int NOT NULL DEFAULT '0',
  `condicion` int NOT NULL DEFAULT '0',
  `fechavencimiento` date DEFAULT NULL,
  `ultimaedicion` datetime DEFAULT CURRENT_TIMESTAMP,
  `pedidonumero` varchar(50) DEFAULT NULL,
  `base` double NOT NULL DEFAULT '0',
  `inquiry` varchar(23) NOT NULL DEFAULT ' ',
  `esbolsillo` int NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1' COMMENT 'este vendedor no hizo toda la venta, solo abriÃƒÂ² la mesa',
  `emailenviado` int NOT NULL DEFAULT '0',
  `escortesia` int NOT NULL DEFAULT '0',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(25) NOT NULL DEFAULT 'EFECTIVO',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `fechaabonado` datetime DEFAULT NULL,
  `servicio` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `CODFORMAPAGO` varchar(5) DEFAULT '1',
  `codalmacen` varchar(25) DEFAULT '1',
  `TIPODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `ESTADODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `n` varchar(1) NOT NULL DEFAULT 'B',
  `aliasespera` int NOT NULL DEFAULT '0',
  `codvendedor` int NOT NULL DEFAULT '0',
  `impresiones` int NOT NULL DEFAULT '0',
  `numservicio` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `CODTIPOTASA1` varchar(1) NOT NULL DEFAULT '1',
  `esbarra` varchar(1) NOT NULL DEFAULT 'F',
  `CODTARIFA` varchar(1) NOT NULL DEFAULT '1',
  `ivainc` varchar(1) NOT NULL DEFAULT 'T',
  `codzona` int NOT NULL DEFAULT '1',
  `domicilio` double NOT NULL DEFAULT '0',
  `cedula` varchar(15) NOT NULL DEFAULT '999999',
  `codigociudad` varchar(7) DEFAULT '63001',
  `email` varchar(100) DEFAULT NULL,
  `codigopostal` varchar(7) DEFAULT '630003',
  `codigodepartamento` varchar(7) DEFAULT '63',
  `departamento` varchar(25) DEFAULT 'QUINDIO',
  `ciudad` varchar(25) DEFAULT 'ARMENIA',
  `cufe` varchar(250) DEFAULT NULL,
  `resoluciondesde` date DEFAULT NULL,
  `resolucionhasta` date DEFAULT NULL,
  `id_tipo_persona` int DEFAULT '0',
  `prefijofe` varchar(5) DEFAULT NULL,
  `consecutivofe` int DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `valornc` double DEFAULT '0',
  `notacreditofe` int DEFAULT '0',
  `cufenc` varchar(250) DEFAULT NULL,
  `numlineas` int DEFAULT '0',
  `razonsocial` varchar(200) DEFAULT NULL,
  `nombrecomercial` varchar(200) DEFAULT NULL,
  `tipodepersona` int DEFAULT '0',
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `dv` int DEFAULT NULL,
  `sfiscalresponsibilities` varchar(10) DEFAULT NULL,
  `regimenfiscal` int DEFAULT NULL,
  `contacto` varchar(100) DEFAULT NULL,
  `prefijo` varchar(5) DEFAULT 'FV',
  `conceptoanulado` varchar(150) DEFAULT NULL,
  `garantiahasta` date DEFAULT NULL,
  `cantidadmediosdepago` int DEFAULT '0',
  `snumsop` varchar(25) DEFAULT NULL,
  `inumoper` varchar(25) DEFAULT NULL,
  `domicilioexterno` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `numeroabajo` int DEFAULT '0',
  `alergenos` varchar(50) DEFAULT '0',
  `facturatienemodificadores` int DEFAULT '0',
  `conseuctivorappi` varchar(11) DEFAULT NULL,
  `delivery_method` varchar(25) DEFAULT NULL,
  `payment_method` varchar(25) DEFAULT NULL,
  `COD_CLIENTE_FRONT` int DEFAULT '0',
  `ID_CLIENTE_CONTROL` int DEFAULT '1',
  `ssignature` text,
  `sqr` text,
  `observacionesnovedad` varchar(150) DEFAULT NULL,
  `horapreparado` datetime DEFAULT NULL,
  `resdianfe` varchar(25) DEFAULT NULL,
  `desdefe` int DEFAULT '0',
  `hastafe` int DEFAULT '0',
  `fecharesfe` date DEFAULT NULL,
  `fechafe` date DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `mediodoepagointegracion` varchar(25) DEFAULT NULL,
  `CONFIRMED` datetime DEFAULT NULL,
  `READY_TO_PICKUP` datetime DEFAULT NULL,
  `DISPATCHED` datetime DEFAULT NULL,
  `CONCLUDED` datetime DEFAULT NULL,
  `CANCELLED` datetime DEFAULT NULL,
  `CANCELLATION_REQUESTED` datetime DEFAULT NULL,
  `aceptado` bit(1) DEFAULT b'0',
  `horaaceptado` datetime DEFAULT NULL,
  `fecha_registrofactura` datetime DEFAULT NULL,
  `enviadoataxxa` bit(1) DEFAULT b'0',
  `horanovedad` datetime DEFAULT NULL,
  `novedad` bit(1) DEFAULT b'0',
  `costofactura` double DEFAULT '0',
  `aceptado_domiciliario` bit(1) DEFAULT b'0',
  `hora_aceptado_domiciliario` datetime DEFAULT NULL,
  `prooduco_recibido_domiciliario` bit(1) DEFAULT b'0',
  `hora_prooduco_recibido_domiciliario` datetime DEFAULT NULL,
  `impreso` bit(1) DEFAULT b'0',
  `pedidorechazado` bit(1) DEFAULT b'0',
  `horapedidorechazado` datetime DEFAULT NULL,
  `domicilioconciliado` bit(1) DEFAULT b'0',
  `fechancdian` datetime DEFAULT NULL,
  `tipodevolucion` varchar(25) DEFAULT NULL,
  `deberecoger` datetime DEFAULT NULL,
  `nombrecomercialfactura` varchar(50) DEFAULT NULL,
  `clasificacioncliente` varchar(20) DEFAULT 'CLIENTE FINAL',
  `codeudor` varchar(50) DEFAULT NULL,
  `telefonoocodeudor` varchar(30) DEFAULT NULL,
  `parentescocodeudor` varchar(25) DEFAULT NULL,
  `plazo` int DEFAULT NULL,
  `valorcuota` int DEFAULT NULL,
  `valorcuotainicial` int DEFAULT NULL,
  `fechacuotainicial` date DEFAULT NULL,
  `cuotasapartirde` date DEFAULT NULL,
  `modalidad` int DEFAULT NULL,
  `comensales_factura` int DEFAULT '0',
  `identificador` varchar(25) DEFAULT NULL,
  `impazucaradas` int DEFAULT '0',
  `impultraprocesados` int DEFAULT '0',
  `descuentoporflete` int DEFAULT '0',
  `otrosdescuentos` int DEFAULT '0',
  `sobrecargoeventosf` double DEFAULT '0',
  `forzar2222` varchar(2) DEFAULT 'no',
  `fechafinfe` date DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idvendedor` (`idvendedor`),
  KEY `facturas_ibfk_3` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `facturas2022`
--


--
-- Table structure for table `facturas3`
--

CREATE TABLE `facturas3` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `observaciondelcleinte` varchar(200) DEFAULT NULL,
  `diasemana` varchar(200) DEFAULT NULL,
  `ordendia` int DEFAULT '0',
  `MESALIBERADA` int DEFAULT '1',
  `IDMOTIVODTO` int DEFAULT '1',
  `IDMINUTA` int DEFAULT '0',
  `direccion` varchar(200) DEFAULT NULL,
  `barrio` varchar(50) DEFAULT NULL,
  `celular` varchar(50) DEFAULT NULL,
  `cliente` varchar(100) DEFAULT NULL,
  `horaentregadoaldomiciliario` datetime DEFAULT NULL,
  `horaentregadoalcliente` datetime DEFAULT NULL,
  `fecharesolucion` date DEFAULT NULL,
  `resolucion` varchar(20) DEFAULT NULL,
  `desde` int DEFAULT '1',
  `hasta` int DEFAULT '1',
  `iddomiciliario` int DEFAULT '0',
  `comandaf` varchar(11) DEFAULT NULL,
  `entregado` int DEFAULT '0',
  `despachado` int DEFAULT '0',
  `ese` int DEFAULT '0',
  `tienenc` int DEFAULT '0',
  `consecutivo` int NOT NULL DEFAULT '0',
  `idcliente` bigint unsigned NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `horatotal` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `documento` varchar(2) NOT NULL DEFAULT 'V',
  `saldo` double NOT NULL DEFAULT '0',
  `observacion` text,
  `origen` varchar(25) DEFAULT NULL,
  `entrega` varchar(100) NOT NULL DEFAULT ' ',
  `cobra` varchar(100) NOT NULL DEFAULT ' ',
  `fecha` datetime DEFAULT CURRENT_TIMESTAMP,
  `cc` int DEFAULT '2',
  `idmesa` int DEFAULT '1',
  `bruto` double NOT NULL DEFAULT '0',
  `descuento` double NOT NULL DEFAULT '0',
  `total` int DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `abonado` int NOT NULL DEFAULT '0',
  `idfacturaqueabona` int NOT NULL DEFAULT '0',
  `cerrado` int NOT NULL DEFAULT '0',
  `recibido` double NOT NULL DEFAULT '0',
  `devuelta` double NOT NULL DEFAULT '0',
  `iva` double DEFAULT '0',
  `vigenciadelcredito` int NOT NULL DEFAULT '0',
  `condicion` int NOT NULL DEFAULT '0',
  `fechavencimiento` datetime DEFAULT CURRENT_TIMESTAMP,
  `ultimaedicion` datetime DEFAULT CURRENT_TIMESTAMP,
  `pedidonumero` varchar(50) DEFAULT NULL,
  `base` double NOT NULL DEFAULT '0',
  `inquiry` varchar(23) NOT NULL DEFAULT ' ',
  `esbolsillo` int NOT NULL DEFAULT '0',
  `idvendedor` bigint unsigned NOT NULL DEFAULT '1' COMMENT 'este vendedor no hizo toda la venta, solo abriÃƒÂ² la mesa',
  `emailenviado` int NOT NULL DEFAULT '0',
  `escortesia` int NOT NULL DEFAULT '0',
  `idcaja` bigint unsigned NOT NULL DEFAULT '1',
  `mediodepago` varchar(25) NOT NULL DEFAULT 'EFECTIVO',
  `nota` varchar(25) NOT NULL DEFAULT '',
  `fechaabonado` datetime DEFAULT NULL,
  `servicio` int NOT NULL DEFAULT '0',
  `subido` int NOT NULL DEFAULT '0',
  `CODFORMAPAGO` varchar(5) DEFAULT '1',
  `codalmacen` varchar(25) DEFAULT '1',
  `TIPODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `ESTADODELIVERY` varchar(1) NOT NULL DEFAULT '1',
  `n` varchar(1) NOT NULL DEFAULT 'B',
  `aliasespera` int NOT NULL DEFAULT '0',
  `codvendedor` int NOT NULL DEFAULT '0',
  `impresiones` int NOT NULL DEFAULT '0',
  `numservicio` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `CODTIPOTASA1` varchar(1) NOT NULL DEFAULT '1',
  `esbarra` varchar(1) NOT NULL DEFAULT 'F',
  `CODTARIFA` varchar(1) NOT NULL DEFAULT '1',
  `ivainc` varchar(1) NOT NULL DEFAULT 'T',
  `codzona` int NOT NULL DEFAULT '1',
  `domicilio` double NOT NULL DEFAULT '0',
  `cedula` varchar(15) NOT NULL DEFAULT '999999',
  `codigociudad` varchar(5) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `codigopostal` varchar(6) DEFAULT NULL,
  `codigodepartamento` varchar(5) DEFAULT NULL,
  `departamento` varchar(25) DEFAULT NULL,
  `ciudad` varchar(25) DEFAULT NULL,
  `cufe` varchar(250) DEFAULT NULL,
  `resoluciondesde` date DEFAULT NULL,
  `resolucionhasta` date DEFAULT NULL,
  `id_tipo_persona` int DEFAULT '0',
  `prefijofe` varchar(5) DEFAULT NULL,
  `consecutivofe` int DEFAULT '0',
  `COD_SATELITE` varchar(25) DEFAULT NULL,
  `valornc` double DEFAULT '0',
  `notacreditofe` int DEFAULT '0',
  `cufenc` varchar(250) DEFAULT NULL,
  `numlineas` int DEFAULT '0',
  `razonsocial` varchar(200) DEFAULT NULL,
  `nombrecomercial` varchar(200) DEFAULT NULL,
  `tipodepersona` int DEFAULT '0',
  `tipo_identificacion` varchar(5) DEFAULT NULL,
  `dv` int DEFAULT NULL,
  `sfiscalresponsibilities` varchar(10) DEFAULT NULL,
  `regimenfiscal` int DEFAULT NULL,
  `contacto` varchar(100) DEFAULT NULL,
  `prefijo` varchar(5) DEFAULT 'FV',
  `conceptoanulado` varchar(150) DEFAULT NULL,
  `garantiahasta` date DEFAULT NULL,
  `cantidadmediosdepago` int DEFAULT '0',
  `snumsop` varchar(25) DEFAULT NULL,
  `inumoper` varchar(25) DEFAULT NULL,
  `domicilioexterno` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `numeroabajo` int DEFAULT '0',
  `alergenos` varchar(50) DEFAULT '0',
  `facturatienemodificadores` int DEFAULT '0',
  `conseuctivorappi` varchar(11) DEFAULT NULL,
  `delivery_method` varchar(25) DEFAULT NULL,
  `payment_method` varchar(25) DEFAULT NULL,
  `COD_CLIENTE_FRONT` int DEFAULT '0',
  `ID_CLIENTE_CONTROL` int DEFAULT '1',
  `ssignature` text,
  `sqr` text,
  `observacionesnovedad` varchar(150) DEFAULT NULL,
  `horapreparado` datetime DEFAULT NULL,
  `resdianfe` varchar(25) DEFAULT NULL,
  `desdefe` int DEFAULT '0',
  `hastafe` int DEFAULT '0',
  `fecharesfe` date DEFAULT NULL,
  `fechafe` date DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `mediodoepagointegracion` varchar(25) DEFAULT NULL,
  `CONFIRMED` datetime DEFAULT NULL,
  `READY_TO_PICKUP` datetime DEFAULT NULL,
  `DISPATCHED` datetime DEFAULT NULL,
  `CONCLUDED` datetime DEFAULT NULL,
  `CANCELLED` datetime DEFAULT NULL,
  `CANCELLATION_REQUESTED` datetime DEFAULT NULL,
  `aceptado` bit(1) DEFAULT b'0',
  `horaaceptado` datetime DEFAULT NULL,
  `fecha_registrofactura` datetime DEFAULT NULL,
  `enviadoataxxa` bit(1) DEFAULT b'0',
  `horanovedad` datetime DEFAULT NULL,
  `novedad` bit(1) DEFAULT b'0',
  `costofactura` double DEFAULT '0',
  `aceptado_domiciliario` bit(1) DEFAULT b'0',
  `hora_aceptado_domiciliario` datetime DEFAULT NULL,
  `prooduco_recibido_domiciliario` bit(1) DEFAULT b'0',
  `hora_prooduco_recibido_domiciliario` datetime DEFAULT NULL,
  `impreso` bit(1) DEFAULT b'0',
  `pedidorechazado` bit(1) DEFAULT b'0',
  `horapedidorechazado` datetime DEFAULT NULL,
  `domicilioconciliado` bit(1) DEFAULT b'0',
  `fechancdian` datetime DEFAULT NULL,
  `tipodevolucion` varchar(25) DEFAULT NULL,
  `deberecoger` datetime DEFAULT NULL,
  `nombrecomercialfactura` varchar(50) DEFAULT NULL,
  `clasificacioncliente` varchar(20) DEFAULT 'CLIENTE FINAL',
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  KEY `idz` (`idz`),
  KEY `idvendedor` (`idvendedor`),
  KEY `facturas_ibfk_3` (`idcliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `facturas3`
--


--
-- Table structure for table `facturas_parqueadero`
--

CREATE TABLE `facturas_parqueadero` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ingreso` datetime DEFAULT NULL,
  `salida` datetime DEFAULT NULL,
  `tiempo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `placa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL,
  `fechacreacion` datetime DEFAULT NULL,
  `idusuario` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `facturas_parqueadero`
--

INSERT INTO `facturas_parqueadero` (`id`, `ingreso`, `salida`, `tiempo`, `placa`, `total`, `fechacreacion`, `idusuario`) VALUES (1,'0000-00-00 00:00:00','0000-00-00 00:00:00','0','123456',0.00,'2025-03-21 20:42:19',0),(2,'2025-03-21 20:42:13','2025-03-21 20:43:50','1','123456',900.00,'2025-03-21 20:43:52',0),(3,'2025-03-21 20:44:35','2025-03-21 20:44:43','0','123456',0.00,'2025-03-21 20:44:57',0),(4,'2025-03-21 20:45:43','2025-03-21 20:45:50','0','123456',0.00,'2025-03-21 20:45:51',0),(5,'2025-03-21 20:47:19','2025-03-21 20:47:23','0','123456',0.00,'2025-03-21 20:47:32',2),(6,'2025-03-22 11:32:11','2025-03-22 11:42:53','1','123456',900.00,'2025-03-22 11:42:56',2),(7,'2025-03-22 11:43:00','2025-03-22 11:43:38','0','123456',0.00,'2025-03-22 11:43:41',2),(8,'2025-03-22 11:43:48','2025-03-22 11:44:48','1','123456',900.00,'2025-03-22 11:44:49',2),(9,'2025-03-22 11:44:53','2025-03-22 11:45:11','0','123456',0.00,'2025-03-22 11:45:14',2),(10,'2025-03-22 11:45:38','2025-03-22 11:45:57','0','123456',0.00,'2025-03-22 11:46:02',2),(11,'2025-03-28 10:10:56','2025-03-28 10:11:02','0','123456',0.00,'2025-03-28 10:11:03',2),(12,'2025-03-28 10:11:19','2025-03-28 10:11:31','0','123456',0.00,'2025-03-28 10:11:33',2);

--
-- Table structure for table `familiasdemodificadores`
--

CREATE TABLE `familiasdemodificadores` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `familiademodificadores` varchar(100) DEFAULT NULL,
  `minimo` int DEFAULT '1',
  `maximo` int DEFAULT '0',
  `codabajo` int DEFAULT '0',
  `cc` bigint unsigned NOT NULL DEFAULT '1',
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `alias` varchar(100) DEFAULT NULL,
  `idrappi` varchar(25) DEFAULT NULL,
  `sesubeaifood` int DEFAULT '0',
  `idifood` varchar(100) DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  `saleenlaventa` int DEFAULT '1',
  `sepuedeborrar` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `familiasdemodificadores`
--


--
-- Table structure for table `fechasdescuentos`
--

CREATE TABLE `fechasdescuentos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fecha` date DEFAULT NULL,
  `cc` bigint unsigned NOT NULL,
  `idusuario` bigint unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idusuario` (`idusuario`),
  CONSTRAINT `fechasdescuentos_ibfk_1` FOREIGN KEY (`cc`) REFERENCES `centrosdecostos` (`id`),
  CONSTRAINT `fechasdescuentos_ibfk_2` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `fechasdescuentos`
--


--
-- Table structure for table `festivos`
--

CREATE TABLE `festivos` (
  `fecha` date NOT NULL,
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `festivos`
--

INSERT INTO `festivos` (`fecha`, `id`) VALUES ('2022-07-20',2),('2022-12-08',19),('2022-11-14',18),('2022-11-07',17),('2022-10-17',16),('2022-08-15',14);

--
-- Table structure for table `fichaderegistro`
--

CREATE TABLE `fichaderegistro` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cliente` varchar(100) DEFAULT NULL,
  `cedula` varchar(15) DEFAULT NULL,
  `telefono` varchar(25) DEFAULT NULL,
  `fechaentrada` date DEFAULT NULL,
  `fechasalida` date DEFAULT NULL,
  `nacionalidad` varchar(25) DEFAULT NULL,
  `direccion` varchar(100) DEFAULT NULL,
  `ciudad` varchar(25) DEFAULT NULL,
  `marca` varchar(25) DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `idcliente` bigint unsigned DEFAULT NULL,
  `idusuario` bigint unsigned DEFAULT NULL,
  `fechacreacion` datetime DEFAULT NULL,
  `idmayor` bigint unsigned DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idcliente` (`idcliente`),
  KEY `idusuario` (`idusuario`),
  KEY `idmayor` (`idmayor`),
  CONSTRAINT `fichaderegistro_ibfk_1` FOREIGN KEY (`idmayor`) REFERENCES `mayoresfichaderegistro` (`id`),
  CONSTRAINT `idcliente` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `idusuario` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `fichaderegistro`
--


--
-- Table structure for table `fichaderegistroauxiliar`
--

CREATE TABLE `fichaderegistroauxiliar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cliente` varchar(100) DEFAULT NULL,
  `cedula` varchar(15) DEFAULT NULL,
  `telefono` varchar(25) DEFAULT NULL,
  `fechaentrada` date DEFAULT NULL,
  `fechasalida` date DEFAULT NULL,
  `nacionalidad` varchar(25) DEFAULT NULL,
  `direccion` varchar(100) DEFAULT NULL,
  `ciudad` varchar(25) DEFAULT NULL,
  `marca` varchar(25) DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `idcliente` bigint unsigned DEFAULT NULL,
  `idusuario` bigint unsigned DEFAULT NULL,
  `fechacreacion` datetime DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  `idreserva` int DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `idcliente` (`idcliente`),
  KEY `idclientefichaderegistroauxiliar` (`idcliente`),
  KEY `idusuariofichaderegistroauxiliar` (`idusuario`),
  CONSTRAINT `idclientefichaderegistroauxiliar` FOREIGN KEY (`idcliente`) REFERENCES `clientes` (`id`),
  CONSTRAINT `idusuariofichaderegistroauxiliar` FOREIGN KEY (`idusuario`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `fichaderegistroauxiliar`
--


--
-- Table structure for table `garantiasenespera`
--

CREATE TABLE `garantiasenespera` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `idarticulo` bigint unsigned NOT NULL,
  `descripcion` varchar(120) DEFAULT NULL,
  `cantidad` double NOT NULL DEFAULT '0',
  `fecha` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idcliente` bigint unsigned NOT NULL DEFAULT '0',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `devolucionrevisada` int DEFAULT '0',
  `ABONODE_FO` varchar(2) NOT NULL DEFAULT '-1',
  `NORDERTIQUET` varchar(1) NOT NULL DEFAULT '0',
  `SORDERTIQUET` varchar(1) NOT NULL DEFAULT '',
  `REQ` int NOT NULL DEFAULT '0',
  `COSTEIVA` int NOT NULL DEFAULT '0',
  `DTO` int NOT NULL DEFAULT '0',
  `TIPO` varchar(2) NOT NULL DEFAULT 'V',
  `CODMACRO` int NOT NULL DEFAULT '0',
  `CODFORMATO` int NOT NULL DEFAULT '0',
  `NUMLINEA` int NOT NULL DEFAULT '1',
  `codigociudad` varchar(5) DEFAULT NULL,
  `email` varchar(5) DEFAULT NULL,
  `codigopostal` varchar(5) DEFAULT NULL,
  `codigodepartamento` varchar(5) DEFAULT NULL,
  `departamento` varchar(5) DEFAULT NULL,
  `ciudad` varchar(5) DEFAULT NULL,
  `cufe` varchar(5) DEFAULT NULL,
  `unidaddemedida` varchar(25) DEFAULT NULL,
  `esnota` int DEFAULT '0',
  `domicilioexterno` int DEFAULT '0',
  `pv` varchar(25) DEFAULT 'texasburgers',
  `seccionventas` varchar(25) DEFAULT NULL,
  `integraconfamilia` int DEFAULT '1',
  `codmodifpapa` int DEFAULT '0',
  `TIPOIVA` int DEFAULT '1',
  `sesubearappi` int DEFAULT '0',
  `refventas` varchar(20) DEFAULT NULL,
  `placa` varchar(6) DEFAULT NULL,
  `iddomiciliario` int DEFAULT NULL,
  `horaaceptado` datetime DEFAULT NULL,
  `comandaaceptada` bit(1) DEFAULT b'0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `idarticulo` (`idarticulo`),
  KEY `idcliente` (`idcliente`),
  KEY `idusuario` (`idusuario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `garantiasenespera`
--


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

CREATE TABLE `gastos` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fechacreacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `cc` bigint unsigned NOT NULL,
  `idz` bigint unsigned NOT NULL DEFAULT '1',
  `consecutivo` int NOT NULL DEFAULT '1',
  `idusuario` bigint unsigned NOT NULL DEFAULT '1',
  `idproveedor` bigint unsigned NOT NULL DEFAULT '1',
  `concepto` text,
  `valor` double NOT NULL DEFAULT '0',
  `numero` varchar(7) DEFAULT NULL,
  `tipo` varchar(50) DEFAULT 'SELECCIONE',
  `afectacaja` int DEFAULT '1',
  `mediodepago` varchar(25) DEFAULT NULL,
  `placa` varchar(25) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `pv` varchar(25) DEFAULT 'KALDI',
  `contadocredito` varchar(7) DEFAULT 'CONTADO',
  `retenfuentegasto` double DEFAULT '0',
  `ivagasto` double DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cc` (`cc`),
  KEY `idz` (`idz`),
  KEY `idusuario` (`idusuario`),
  KEY `idproveedor` (`idproveedor`),
  CONSTRAINT `gastos_ibfk_2` FOREIGN KEY (`idproveedor`) REFERENCES `clientes` (`id`),
  CONSTRAINT `gastos_ibfk_3` FOREIGN KEY (`idz`) REFERENCES `z` (`id`),
  CONSTRAINT `gastos_ibfk_4` FOREIGN KEY (`idz`) REFERENCES `z` (`id`),
  CONSTRAINT `gastos_ibfk_5` FOREIGN KEY (`idz`) REFERENCES `z` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3;

--
