-- MySQL dump 10.13  Distrib 8.0.41, for Linux (x86_64)
--
-- Host: localhost    Database: coralmecapinew
-- ------------------------------------------------------
-- Server version	8.0.41-0ubuntu0.22.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `opermv`
--

DROP TABLE IF EXISTS `opermv`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `opermv` (
  `id_empresa` varchar(6) NOT NULL,
  `agencia` varchar(3) DEFAULT ' ',
  `tipodoc` varchar(3) NOT NULL,
  `documento` varchar(100) DEFAULT NULL,
  `grupo` varchar(6) DEFAULT ' ',
  `subgrupo` varchar(6) DEFAULT ' ',
  `origen` double(2,0) NOT NULL DEFAULT '0',
  `codigo` varchar(25) NOT NULL,
  `codhijo` varchar(25) DEFAULT ' ',
  `pid` varchar(12) NOT NULL,
  `nombre` varchar(150) DEFAULT ' ',
  `costounit` double(20,7) NOT NULL DEFAULT '0.0000000',
  `preciounit` double(20,7) NOT NULL DEFAULT '0.0000000',
  `diferencia` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctounit` double(20,7) NOT NULL DEFAULT '0.0000000',
  `coddescuento` varchar(6) DEFAULT ' ',
  `dsctoprc` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctoendm` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctomtolinea` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctoendp` double(20,7) NOT NULL DEFAULT '0.0000000',
  `preciofin` double(20,7) NOT NULL DEFAULT '0.0000000',
  `prcrecargo` double(20,7) NOT NULL DEFAULT '0.0000000',
  `recargounit` double(20,7) NOT NULL DEFAULT '0.0000000',
  `preciooriginal` double(20,7) NOT NULL DEFAULT '0.0000000',
  `cantidad` double(20,7) NOT NULL DEFAULT '0.0000000',
  `cntdevuelt` double(20,7) NOT NULL DEFAULT '0.0000000',
  `unidevuelt` double(20,7) NOT NULL DEFAULT '0.0000000',
  `cntentrega` double(20,7) NOT NULL DEFAULT '0.0000000',
  `tallas` varchar(3) DEFAULT ' ',
  `colores` varchar(3) DEFAULT ' ',
  `montoneto` double(20,7) NOT NULL DEFAULT '0.0000000',
  `montototal` double(20,7) NOT NULL DEFAULT '0.0000000',
  `almacen` varchar(2) NOT NULL DEFAULT '01',
  `proveedor` varchar(20) DEFAULT ' ',
  `fechadoc` date DEFAULT NULL,
  `impuesto1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto2` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto3` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto4` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto5` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto6` double(20,7) NOT NULL DEFAULT '0.0000000',
  `timpueprc` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impu_mto` double(20,7) NOT NULL DEFAULT '0.0000000',
  `comision` double(20,7) NOT NULL DEFAULT '0.0000000',
  `comisprc` double(20,7) NOT NULL DEFAULT '0.0000000',
  `vendedor` varchar(8) DEFAULT ' ',
  `emisor` varchar(8) DEFAULT ' ',
  `usaserial` double(2,0) NOT NULL DEFAULT '0',
  `tipoprecio` double(2,0) NOT NULL DEFAULT '0',
  `unidad` varchar(25) DEFAULT ' ',
  `agrupado` double(2,0) NOT NULL DEFAULT '0',
  `cntagrupada` double(20,7) NOT NULL DEFAULT '0.0000000',
  `seimporto` double(4,0) NOT NULL DEFAULT '0',
  `desdeimpor` varchar(11) DEFAULT ' ',
  `notas` longtext,
  `oferta` double(4,0) NOT NULL DEFAULT '0',
  `compuesto` double(2,0) NOT NULL DEFAULT '0',
  `usaexist` double(2,0) NOT NULL DEFAULT '0',
  `marca` double(4,0) NOT NULL DEFAULT '0',
  `aux1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `estacion` varchar(3) DEFAULT ' ',
  `estacionfac` varchar(3) DEFAULT ' ',
  `clasifica` double(2,0) NOT NULL DEFAULT '0',
  `cuentacont` varchar(40) DEFAULT ' ',
  `placa` varchar(20) DEFAULT ' ',
  `placaod` varchar(20) DEFAULT ' ',
  `udinamica` double(2,0) NOT NULL DEFAULT '0',
  `cantref` double(20,7) NOT NULL DEFAULT '0.0000000',
  `unidadref` varchar(15) DEFAULT ' ',
  `baseimpo1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `baseimpo2` double(20,7) NOT NULL DEFAULT '0.0000000',
  `baseimpo3` double(20,7) NOT NULL DEFAULT '0.0000000',
  `lote` varchar(30) DEFAULT ' ',
  `imp_nacional` double(20,7) NOT NULL DEFAULT '0.0000000',
  `imp_producc` double(20,7) NOT NULL DEFAULT '0.0000000',
  `se_imprimio` double(4,0) NOT NULL DEFAULT '0',
  `ofertaconvenio` double(20,7) NOT NULL DEFAULT '0.0000000',
  `cod_servidor` varchar(8) DEFAULT ' ',
  `prc_comi_servidor` double(20,7) DEFAULT '0.0000000',
  `mto_comi_servidor` double(20,7) DEFAULT '0.0000000',
  `checkin` varchar(12) DEFAULT ' ',
  `habi_nro` varchar(12) DEFAULT ' ',
  `idvalidacion` varchar(12) DEFAULT ' ',
  `idoferta` varchar(8) DEFAULT ' ',
  `agenciant` varchar(3) NOT NULL DEFAULT ' ',
  `tipodocant` varchar(3) NOT NULL DEFAULT ' ',
  `documant` varchar(8) NOT NULL DEFAULT ' ',
  `uemisorant` varchar(30) DEFAULT ' ',
  `estacioant` varchar(3) DEFAULT ' ',
  `fechadocant` date DEFAULT NULL,
  `fechayhora` datetime DEFAULT NULL,
  `frog` double(4,0) NOT NULL DEFAULT '0',
  `documentolocal` varchar(20) NOT NULL DEFAULT ' ',
  `linbloq` tinyint NOT NULL DEFAULT '0',
  `enviado_kmonitor` tinyint NOT NULL DEFAULT '1',
  `xuuid` varchar(100) DEFAULT NULL,
  KEY `tipodoc` (`tipodoc`,`documento`,`codigo`,`codhijo`,`pid`),
  KEY `opermv_documento_idx` (`documento`,`tipodoc`),
  KEY `codigoart` (`codigo`),
  KEY `cliente` (`proveedor`),
  KEY `id_empresa` (`id_empresa`,`agencia`,`tipodoc`,`documento`,`grupo`,`codigo`,`codhijo`,`pid`),
  KEY `litanidxmv` (`tipodoc`,`usaexist`,`codigo`,`compuesto`,`codhijo`),
  KEY `consulta_comprometido` (`codhijo`,`codigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opermv`
--

LOCK TABLES `opermv` WRITE;
/*!40000 ALTER TABLE `opermv` DISABLE KEYS */;
/*!40000 ALTER TABLE `opermv` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `operti`
--

DROP TABLE IF EXISTS `operti`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operti` (
  `id_empresa` varchar(6) NOT NULL DEFAULT '',
  `agencia` varchar(3) NOT NULL DEFAULT ' ',
  `tipodoc` varchar(3) NOT NULL DEFAULT ' ',
  `moneda` varchar(3) DEFAULT ' ',
  `documento` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT ' ',
  `emision` date DEFAULT NULL,
  `recepcion` date DEFAULT NULL,
  `vence` date DEFAULT NULL,
  `codcliente` varchar(20) NOT NULL DEFAULT ' ',
  `nombrecli` varchar(100) DEFAULT ' ',
  `contacto` varchar(50) DEFAULT ' ',
  `comprador` varchar(20) DEFAULT ' ',
  `rif` varchar(25) DEFAULT NULL,
  `nit` varchar(25) DEFAULT NULL,
  `direccion` varchar(200) DEFAULT ' ',
  `telefonos` varchar(50) DEFAULT ' ',
  `tipoprecio` double(2,0) NOT NULL DEFAULT '0',
  `orden` varchar(15) DEFAULT ' ',
  `totcosto` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totcomi` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totbruto` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totneto` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totpagos` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totalfinal` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totimpuest` double(20,7) NOT NULL DEFAULT '0.0000000',
  `totdescuen` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto2` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto3` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto4` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto5` double(20,7) NOT NULL DEFAULT '0.0000000',
  `impuesto6` double(20,7) NOT NULL DEFAULT '0.0000000',
  `recargos` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctoend1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctoend2` double(20,7) NOT NULL DEFAULT '0.0000000',
  `dsctolinea` double(20,7) NOT NULL DEFAULT '0.0000000',
  `notas` longtext,
  `estatusdoc` varchar(1) DEFAULT '0',
  `diascred` double(5,0) NOT NULL DEFAULT '0',
  `vendedor` varchar(8) DEFAULT ' ',
  `factorcamb` double(20,7) NOT NULL DEFAULT '0.0000000',
  `multi_div` double(2,0) NOT NULL DEFAULT '0',
  `factorreferencial` double(20,7) NOT NULL DEFAULT '0.0000000',
  `uanulador` varchar(30) DEFAULT ' ',
  `uemisor` varchar(30) DEFAULT ' ',
  `estacion` varchar(3) DEFAULT ' ',
  `sinimpuest` double(20,7) NOT NULL DEFAULT '0.0000000',
  `almacen` varchar(2) DEFAULT ' ',
  `sector` varchar(6) DEFAULT ' ',
  `formafis` double(2,0) NOT NULL DEFAULT '0',
  `al_libro` double(2,0) NOT NULL DEFAULT '0',
  `codigoret` varchar(3) DEFAULT ' ',
  `retencion` double(20,7) NOT NULL DEFAULT '0.0000000',
  `aux1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `aux2` double(20,7) NOT NULL DEFAULT '0.0000000',
  `aplicadoa` varchar(11) DEFAULT ' ',
  `referencia` varchar(20) DEFAULT ' ',
  `refmanual` varchar(20) DEFAULT ' ',
  `operac` varchar(8) DEFAULT ' ',
  `motanul` longtext,
  `seimporto` double(4,0) NOT NULL DEFAULT '0',
  `dbcr` double(2,0) NOT NULL DEFAULT '0',
  `horadocum` varchar(5) DEFAULT ' ',
  `ampm` double(2,0) NOT NULL DEFAULT '0',
  `tranferido` double(4,0) NOT NULL DEFAULT '0',
  `procedecre` double(4,0) NOT NULL DEFAULT '0',
  `entregado` double(2,0) NOT NULL DEFAULT '0',
  `vuelto` double(20,7) NOT NULL DEFAULT '0.0000000',
  `integrado` double(4,0) NOT NULL DEFAULT '0',
  `escredito` double(4,0) NOT NULL DEFAULT '0',
  `seq_nodo` varchar(10) DEFAULT ' ',
  `tipo_nc` varchar(3) DEFAULT ' ',
  `porbackord` double(4,0) NOT NULL DEFAULT '0',
  `chequedev` double(4,0) NOT NULL DEFAULT '0',
  `ordentrab` varchar(8) DEFAULT ' ',
  `compcont` varchar(20) DEFAULT ' ',
  `planillacob` varchar(8) DEFAULT ' ',
  `nodoremoto` varchar(3) DEFAULT ' ',
  `turno` varchar(2) DEFAULT ' ',
  `codvend_a` varchar(8) DEFAULT ' ',
  `codvend_b` varchar(8) DEFAULT ' ',
  `codvend_c` varchar(8) DEFAULT ' ',
  `codvend_d` varchar(8) DEFAULT ' ',
  `baseimpo1` double(20,7) NOT NULL DEFAULT '0.0000000',
  `baseimpo2` double(20,7) NOT NULL DEFAULT '0.0000000',
  `baseimpo3` double(20,7) NOT NULL DEFAULT '0.0000000',
  `iddocumento` varchar(8) DEFAULT ' ',
  `imp_nacional` double(20,7) NOT NULL DEFAULT '0.0000000',
  `imp_producc` double(20,7) NOT NULL DEFAULT '0.0000000',
  `retencioniva` double(20,7) NOT NULL DEFAULT '0.0000000',
  `tipopersona` double(4,0) NOT NULL DEFAULT '0',
  `idvalidacion` varchar(12) DEFAULT NULL,
  `nosujeto` double(4,0) NOT NULL DEFAULT '0',
  `serialprintf` varchar(25) DEFAULT ' ',
  `documentofiscal` varchar(12) DEFAULT ' ',
  `ubica` varchar(30) DEFAULT ' ',
  `usa_despacho` double(4,0) NOT NULL DEFAULT '0',
  `despachador` varchar(15) DEFAULT ' ',
  `despacho_nro` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT ' ',
  `checkin` varchar(12) DEFAULT ' ',
  `nureserva` varchar(12) DEFAULT ' ',
  `grandocnum` varchar(8) NOT NULL DEFAULT ' ',
  `agenciant` varchar(3) NOT NULL DEFAULT ' ',
  `tipodocant` varchar(3) NOT NULL DEFAULT ' ',
  `documant` varchar(8) NOT NULL DEFAULT ' ',
  `uemisorant` varchar(30) DEFAULT ' ',
  `estacioant` varchar(3) DEFAULT ' ',
  `frog` double(4,0) NOT NULL DEFAULT '0',
  `doc_class_id` varchar(30) DEFAULT ' ',
  `numeroz` varchar(8) NOT NULL DEFAULT ' ',
  `documentolocal` varchar(20) NOT NULL DEFAULT ' ',
  `apa_nc` double(4,0) NOT NULL DEFAULT '0',
  `subtipodoc` varchar(2) NOT NULL DEFAULT ' ',
  `comanda_movil` tinyint NOT NULL DEFAULT '1',
  `comanda_kmonitor` tinyint NOT NULL DEFAULT '1',
  `para_llevar` tinyint NOT NULL DEFAULT '0',
  `antipo` varchar(3) NOT NULL DEFAULT ' ',
  `antdoc` varchar(8) NOT NULL DEFAULT ' ',
  `xrequest` longtext,
  `xresponse` longtext,
  `parcialidad` double(4,0) NOT NULL DEFAULT '0',
  `xuuid` varchar(100) DEFAULT NULL,
  `fechacrea` date DEFAULT NULL,
  `fechayhora` datetime DEFAULT NULL,
  `fechasync` datetime DEFAULT NULL,
  `fechalocal` date DEFAULT NULL,
  PRIMARY KEY (`id_empresa`,`agencia`,`tipodoc`,`documento`),
  KEY `operti_tipodoc_idx` (`tipodoc`,`documento`),
  KEY `codcliente` (`codcliente`),
  KEY `tipodoc` (`tipodoc`,`documento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `operti`
--

LOCK TABLES `operti` WRITE;
/*!40000 ALTER TABLE `operti` DISABLE KEYS */;
/*!40000 ALTER TABLE `operti` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2025-06-19  2:18:02
