-- MySQL dump 10.16  Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: SPYquartup1
-- ------------------------------------------------------
-- Server version	10.1.48-MariaDB-0+deb9u2

/*!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 */;
/*!40101 SET NAMES utf8 */;
/*!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 `rmavalsub`
--

DROP TABLE IF EXISTS `rmavalsub`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rmavalsub` (
  `rmaval_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nº validación RMAs',
  `rmavallin_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nº línea validación',
  `rmavalsub_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nº sublínea validación',
  `id_cocabe_rma` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Id documento RMA',
  `id_coline_rma` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Id linea RMA',
  `id_cocabe_pv` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Id pedido orígen',
  `id_cocabe_fv` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Id factura origen',
  `id_coline_fv` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Id linea factura',
  `rmavalsub_sw_remake_val` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Validar',
  `rmavalsub_status_val` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Estado validación',
  `rmavalsub_error_val` text NOT NULL COMMENT 'Error validación',
  `rmavalsub_sw_remake_vin` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Vincular',
  `rmavalsub_status_vin` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Estado vinculación',
  `id_tenant` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Nº empresa',
  `id_coline_pv` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Id linea pedido',
  `rmavalsub_cant_fv` decimal(18,9) NOT NULL DEFAULT '0.000000000' COMMENT 'Cantidad factura',
  `rmavalsub_cant_rma` decimal(18,9) NOT NULL DEFAULT '0.000000000' COMMENT 'Cantidad RMA',
  `rmavalsub_cant_tot` decimal(18,9) NOT NULL DEFAULT '0.000000000' COMMENT 'Total cantidades RMA',
  `rmavalsub_pre_rma` decimal(18,9) NOT NULL DEFAULT '0.000000000' COMMENT 'Precio RMA',
  `rmavalsub_impo_rma` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Total importes RMA',
  `rmavalsub_sw_autovalid` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Artículo aut-validado',
  `rmavalsub_impo_pv` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Importe pedido',
  `rmavalsub_impo_av_pos` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Albaranado positivo',
  `rmavalsub_impo_av_neg` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Albaranado negativo',
  `rmavalsub_impo_fv_pos` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Facturado positivo',
  `rmavalsub_impo_fv_neg` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Facturado negativo',
  `rmavalsub_sw_vin_error` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Permitir vincular con error',
  `cod_serie_av` char(3) NOT NULL DEFAULT '' COMMENT 'Serie venta',
  `rmavalsub_sw_autovalfac` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Asignar factura auto-validada',
  `rmavalsub_sw_pre0` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Asignar filtro productos precio 0',
  UNIQUE KEY `key0` (`id_tenant`,`rmaval_id`,`rmavallin_id`,`rmavalsub_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `rmavalsub`
--
-- WHERE:  id_tenant='1'

LOCK TABLES `rmavalsub` WRITE;
/*!40000 ALTER TABLE `rmavalsub` DISABLE KEYS */;
/*!40000 ALTER TABLE `rmavalsub` 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-10-30  8:42:02
