-- 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 `maestiva`
--

DROP TABLE IF EXISTS `maestiva`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maestiva` (
  `cod_tipo_iva` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Tipo de Iva',
  `nombre` text NOT NULL COMMENT 'Nombre',
  `tpc_iva` decimal(4,2) NOT NULL DEFAULT '0.00' COMMENT '% IVA',
  `tpc_rec` decimal(4,2) NOT NULL DEFAULT '0.00' COMMENT '% REC',
  `id_ps_iva` int(11) NOT NULL DEFAULT '0' COMMENT 'Id IVA Prestashop',
  `id_ps_rec` int(11) NOT NULL DEFAULT '0' COMMENT 'Id REC Prestashop',
  `sw_dto` char(1) NOT NULL DEFAULT 'S' COMMENT 'Aplica PPgo.',
  `sw_fin` char(1) NOT NULL DEFAULT 'S' COMMENT 'Aplica Financiación',
  `sw_irpf` char(1) NOT NULL DEFAULT 'S' COMMENT 'Aplica IRPF',
  `sw_iva_incluido` char(1) NOT NULL DEFAULT 'N' COMMENT 'Iva incluido',
  `cod_cuenta_com_bas` char(12) NOT NULL DEFAULT '' COMMENT 'Cta. Base Compras',
  `cod_cuenta_com_abo` char(12) NOT NULL DEFAULT '' COMMENT 'Cta. Abonos Compras',
  `cod_cuenta_com_iva` char(12) NOT NULL DEFAULT '472000000' COMMENT 'Cta. Iva Compras',
  `cod_cuenta_com_rec` char(12) NOT NULL DEFAULT '' COMMENT 'Cta. Rec. Compras',
  `cod_cuenta_vta_bas` char(12) NOT NULL DEFAULT '' COMMENT 'Cta. Base Ventas',
  `cod_cuenta_vta_abo` char(12) NOT NULL DEFAULT '' COMMENT 'Cta. Abonos Ventas',
  `cod_cuenta_vta_iva` char(12) NOT NULL DEFAULT '477000000' COMMENT 'Cta. Iva Ventas',
  `cod_cuenta_vta_rec` char(12) NOT NULL DEFAULT '' COMMENT 'Cta. Rec. Ventas',
  `cta_iva_sop_autofra` char(12) NOT NULL DEFAULT '472000000' COMMENT 'Iva sopor. auto-fra.',
  `cta_iva_rep_autofra` char(12) NOT NULL DEFAULT '477000000' COMMENT 'Iva reper. auto-fra.',
  `id_group_ps_iva` int(11) NOT NULL DEFAULT '0' COMMENT 'Id group IVA Prestashop',
  `sw_tpc_303` tinyint(4) NOT NULL DEFAULT '1' COMMENT '% activos en 303',
  `id_tenant` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Nº empresa',
  `sw_reagyp` tinyint(4) NOT NULL DEFAULT '0' COMMENT '% IVA es REAGYP',
  `cod_nacion` char(4) NOT NULL DEFAULT '' COMMENT 'País ',
  `maestiva_tipiva` tinyint(4) NOT NULL DEFAULT '3' COMMENT 'Tipo de IVA',
  `maestiva_sw_crea_reg` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Crear reglas iva del país',
  `maestiva_sw_done_reg` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Reglas iva creadas',
  UNIQUE KEY `key0` (`id_tenant`,`cod_tipo_iva`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `maestiva` WRITE;
/*!40000 ALTER TABLE `maestiva` DISABLE KEYS */;
INSERT INTO `maestiva` (`cod_tipo_iva`, `nombre`, `tpc_iva`, `tpc_rec`, `id_ps_iva`, `id_ps_rec`, `sw_dto`, `sw_fin`, `sw_irpf`, `sw_iva_incluido`, `cod_cuenta_com_bas`, `cod_cuenta_com_abo`, `cod_cuenta_com_iva`, `cod_cuenta_com_rec`, `cod_cuenta_vta_bas`, `cod_cuenta_vta_abo`, `cod_cuenta_vta_iva`, `cod_cuenta_vta_rec`, `cta_iva_sop_autofra`, `cta_iva_rep_autofra`, `id_group_ps_iva`, `sw_tpc_303`, `id_tenant`, `sw_reagyp`, `cod_nacion`, `maestiva_tipiva`, `maestiva_sw_crea_reg`, `maestiva_sw_done_reg`) VALUES (1,'IVA AL 21 %',21.00,5.20,0,0,'S','S','S','N','600000000','608000000','472000000','472000000','700000000','708000000','477000000','477100000','472000000','477000000',0,1,1,0,'',3,0,0),(2,'IVA EXENTO',0.00,0.00,0,0,'S','S','S','N','600000000','608000000','','','','','','','472000000','477000000',0,1,1,0,'',3,0,0),(3,'IVA AL 10%',10.00,1.40,0,0,'S','S','S','N','600000000','608000000','472000000','','701000000','708000000','477000000','000000000','472000000','477000000',0,1,1,0,'',3,0,0),(4,'IVA AL 4%',4.00,0.50,0,0,'S','S','S','N','','','','','','','','','472000000','477000000',0,1,1,0,'',3,0,0),(5,'IVA AL 16%',16.00,4.00,0,0,'S','S','S','N','600000000','608000000','472000000','472000000','','708000000','477000000','477100000','472000000','477000000',0,0,1,0,'',3,0,0),(6,'IVA AL 7%',7.00,0.00,0,0,'S','S','S','N','600000000','608000000','472000000','472000000','','708000000','477000000','477100000','472000000','477000000',0,0,1,0,'',3,0,0),(7,'IVA AL 18 %',18.00,4.00,0,0,'S','S','S','N','600000000','608000000','472000000','472000000','700000000','708000000','477000000','477100000','472000000','477000000',0,0,1,0,'',3,0,0),(8,'IVA AL 8%',8.00,0.00,0,0,'S','S','S','N','600000000','608000000','472000000','472000000','700000000','708000000','477000000','477100000','472000000','477000000',0,0,1,0,'',3,0,0),(10,'IVA Importaciones',0.00,0.00,0,0,'S','S','S','N','','','472200000','','','','477200000','','472200000','477200000',0,0,1,0,'',3,0,0),(11,'IVA AL 5 %',5.00,0.00,0,0,'S','S','S','N','600000000','608000000','472000000','472000000','700000000','708000000','477000000','477100000','472000000','477000000',0,1,1,0,'',3,0,0);
/*!40000 ALTER TABLE `maestiva` 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:41:21
