/*
SQLyog Community v13.2.1 (64 bit)
MySQL - 10.4.32-MariaDB : Database - pirapire-app
*********************************************************************
*/



CREATE DATABASE /*!32312 IF NOT EXISTS*/`pirapire-app` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;

USE `pirapire-app`;

/*Table structure for table `auditorias` */


CREATE TABLE `auditorias` (
  `idauditoria` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `usuario` char(1) DEFAULT NULL,
  `proceso` char(1) DEFAULT NULL,
  `formulario` char(1) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `hora` time DEFAULT NULL,
  `referencia` char(1) DEFAULT NULL,
  `equipo` char(1) DEFAULT NULL,
  `ip` char(1) DEFAULT NULL,
  PRIMARY KEY (`idauditoria`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `auditorias` */

/*Table structure for table `cajas` */


CREATE TABLE `cajas` (
  `idcaja` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `usuario` char(20) DEFAULT NULL,
  `fechaapertura` date DEFAULT NULL,
  `horaapertura` time DEFAULT NULL,
  `fechacierre` date DEFAULT NULL,
  `horacierre` time DEFAULT NULL,
  `efectivoapertura` int(11) DEFAULT NULL,
  `personalapertura` int(11) DEFAULT NULL,
  `tigoapertura` int(11) DEFAULT NULL,
  `efectivocierre` int(11) DEFAULT NULL,
  `personalcierre` int(11) DEFAULT NULL,
  `tigocierre` int(11) DEFAULT NULL,
  `estadocaja` char(10) DEFAULT 'ABIERTO',
  PRIMARY KEY (`idcaja`)
) ENGINE=InnoDB AUTO_INCREMENT=371 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `cajas` */

insert  into `cajas`(`idcaja`,`usuario`,`fechaapertura`,`horaapertura`,`fechacierre`,`horacierre`,`efectivoapertura`,`personalapertura`,`tigoapertura`,`efectivocierre`,`personalcierre`,`tigocierre`,`estadocaja`) values 
(365,'EDGAR','2024-01-18','09:57:40','2024-02-17','18:28:14',0,0,0,2145000,0,0,'CERRADO'),
(366,'YENI','2024-01-18','10:00:24','2024-01-27','18:06:38',0,0,0,13526546,0,0,'CERRADO'),
(367,'YENI','2024-01-29','07:23:30','2024-02-17','18:27:29',35000,0,0,5822850,0,0,'CERRADO'),
(368,'YENI','2024-02-19','10:35:09','2024-02-24','19:53:02',30000,0,0,3160606,0,0,'CERRADO'),
(369,'YENI','2024-02-26','08:41:59',NULL,NULL,100000,0,0,3655788,0,0,'ABIERTO'),
(370,'EDGAR','2024-07-14','13:33:47',NULL,NULL,50000,0,0,1107894,0,-5000,'ABIERTO');

/*Table structure for table `categorias` */


CREATE TABLE `categorias` (
  `idcategoria` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `categoria` char(50) DEFAULT NULL,
  PRIMARY KEY (`idcategoria`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `categorias` */

insert  into `categorias`(`idcategoria`,`categoria`) values 
(0,'SIN CATEGORIA'),
(1,'CELULARES'),
(2,'ELECTRODOMESTICOS'),
(3,'MUEBLES'),
(9,'ACCESORIOS'),
(11,'SPEAKER');

/*Table structure for table `ciudades` */


CREATE TABLE `ciudades` (
  `idciudad` int(11) NOT NULL,
  `ciudad` char(80) DEFAULT NULL,
  PRIMARY KEY (`idciudad`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `ciudades` */

insert  into `ciudades`(`idciudad`,`ciudad`) values 
(1,'BELEN'),
(2,'CONCEPCION'),
(3,'HORQUETA'),
(4,'LORETO'),
(5,'SAN CARLOS'),
(6,'SAN LAZARO'),
(7,'YBY YAU'),
(8,'ANTEQUERA'),
(9,'CAPI´IVARY'),
(10,'CHORÉ'),
(11,'GENERAL ELIZARDO AQUINO'),
(12,'GENERAL ISIDORO RESQUÍN'),
(13,'GUAYAIBÍ'),
(14,'ITACURUBÍ DEL ROSARIO'),
(15,'LIMA'),
(16,'NUEVA GERMANIA'),
(17,'SAN ESTANISLAO'),
(18,'SAN PABLO'),
(19,'SAN PEDRO'),
(20,'SANTA ROSA DEL AGUARAY'),
(21,'TACUATÍ'),
(22,'UNIÓN'),
(23,'VEINTICINCO DE DICIEMBRE'),
(24,'VILLA DEL ROSARIO'),
(25,'YATAITY DEL NORTE'),
(26,'YRYBUCUA'),
(27,'LIBERACIÓN'),
(28,'ALTOS'),
(29,'ARROYOS Y ESTEROS'),
(30,'ATYRA'),
(31,'CAACUPÉ'),
(32,'CARAGUATAY'),
(33,'EMBOSCADA'),
(34,'EUSEBIO AYALA'),
(35,'ISLA PUCÚ'),
(36,'ITACURUBÍ DE LA CORDILLERA'),
(37,'JUAN DE MENA'),
(38,'LOMA GRANDE'),
(39,'MBOCAYATY DEL YHAGUY'),
(40,'NUEVA COLOMBIA \n PIRIBEBUY'),
(41,'PRIMERO DE MARZO'),
(42,'SAN BERNARDINO'),
(43,'SAN JOSÉ OBRERO'),
(44,'SANTA ELENA'),
(45,'TOBATÍ'),
(46,'VALENZUELA'),
(47,'BORJA'),
(48,'CAPITÁN MAURICIO JOSÉ TROCHE'),
(49,'CORONEL MARTÍNEZ'),
(50,'DOCTOR BOTRELL'),
(51,'FÉLIX PÉREZ CARDOZO'),
(52,'GENERAL EUGENIO A. GARAY'),
(53,'INDEPENDENCIA'),
(54,'ITAPÉ'),
(55,'ITURBE'),
(56,'JOSÉ A. FASSARDI'),
(57,'MBOCAYATY DEL GUAIRÁ'),
(58,'NATALICIO TALAVERA'),
(59,'ÑUMÍ'),
(60,'PASO YOVAI'),
(61,'SAN SALVADOR'),
(62,'TEBICUARY'),
(63,'VILLARRICA'),
(64,'YATAITY DEL GUAIRÁ'),
(65,'CAAGUAZÚ'),
(66,'CARAYAÓ'),
(67,'CORONEL OVIEDO'),
(68,'DOCTOR CECILIO BÁEZ'),
(69,'DOCTOR J. EULOGIO ESTIGARRIBIA'),
(70,'DOCTOR JUAN MANUEL FRUTOS'),
(71,'JOSÉ DOMINGO OCAMPOS'),
(72,'LA PASTORA'),
(73,'MARISCAL FRANCISCO SOLANO LÓPEZ'),
(74,'NUEVA LONDRES'),
(75,'RAÚL ARSENIO OVIEDO'),
(76,'REPATRIACIÓN'),
(77,'R. I. TRES CORRALES'),
(78,'SAN JOAQUÍN'),
(79,'SAN JOSÉ DE LOS ARROYOS'),
(80,'SANTA ROSA DEL MBUTUY'),
(81,'SIMÓN BOLÍVAR'),
(82,'TRES DE FEBRERO'),
(83,'VAQUERÍA'),
(84,'YHÚ'),
(85,'TEMBIAPORÀ'),
(86,'DR. BLÀS A. GARAY'),
(87,'ABAÍ'),
(88,'BUENA VISTA'),
(89,'CAAZAPÁ'),
(90,'DOCTOR MOISÉS S. BERTONI'),
(91,'FULGENCIO YEGROS'),
(92,'GENERAL HIGINIO MORÍNIGO'),
(93,'MACIEL'),
(94,'SAN JUAN NEPOMUCENO'),
(95,'TAVAÍ'),
(96,'YUTY'),
(97,'ALTO VERÁ'),
(98,'BELLA VISTA'),
(99,'CAMBYRETÁ'),
(100,'CAPITÁN MEZA'),
(101,'CAPITÁN MIRANDA'),
(102,'CARLOS ANTONIO LÓPEZ'),
(103,'CARMEN DEL PARANÁ'),
(104,'CORONEL BOGADO'),
(105,'EDELIRA'),
(106,'ENCARNACIÓN'),
(107,'FRAM'),
(108,'GENERAL ARTIGAS'),
(109,'GENERAL DELGADO'),
(110,'HOHENAU'),
(111,'ITAPÚA POTY'),
(112,'JESÚS'),
(113,'JOSÉ LEANDRO OVIEDO'),
(114,'LA PAZ'),
(115,'MAYOR JULIO D. OTAÑO'),
(116,'NATALIO'),
(117,'NUEVA ALBORADA'),
(118,'OBLIGADO'),
(119,'PIRAPÓ'),
(120,'SAN COSME Y DAMIÁN'),
(121,'SAN JUAN DEL PARANÁ'),
(122,'SAN PEDRO DEL PARANÁ'),
(123,'SAN RAFAEL DEL PARANÁ'),
(124,'TOMÁS ROMERO PEREIRA'),
(125,'TRINIDAD'),
(126,'YATYTAY'),
(127,'AYOLAS'),
(128,'SAN IGNACIO'),
(129,'SAN JUAN BTTA'),
(130,'SAN MIGUEL'),
(131,'SAN PATRICIO'),
(132,'SANTA MARÍA'),
(133,'SANTA ROSA'),
(134,'SANTIAGO'),
(135,'VILLA FLORIDA'),
(136,'YABEBYRY'),
(137,'ACAHAY'),
(138,'CAAPUCÚ'),
(139,'CARAPEGUÁ'),
(140,'ESCOBAR'),
(141,'GENERAL BERNARDINO CABALLERO'),
(142,'LA COLMENA'),
(143,'MBUYAPEY'),
(144,'PARAGUARÍ'),
(145,'PIRAYÚ'),
(146,'QUIINDY'),
(147,'QUYQUYHÓ'),
(148,'SAN ROQUE GONZÁLEZ DE SANTA CRUZ'),
(149,'SAPUCAI'),
(150,'TEBICUARY-MÍ'),
(151,'YAGUARÓN'),
(152,'YBYCUÍ'),
(153,'YBYTYMÍ'),
(154,'LA COLMENA'),
(155,'CIUDAD DEL ESTE'),
(156,'DR. JUAN LEON MALLORQUIN'),
(157,'DOMINGO MARTINEZ DE IRALA'),
(158,'HERNANDARIAS'),
(159,'IRUÑA'),
(160,'ITAYKYRY'),
(161,'JUAN E. O´LEARY'),
(174,'LOS CEDRALES'),
(175,'MBARACAYU'),
(176,'NACUNDAY'),
(177,'NARANJAL'),
(178,'PRESIDENTE FRANCO'),
(179,'SAN ALBERTO'),
(180,'SAN CRISTÓBAL'),
(181,'SANTA ROSA DEL MONDAY'),
(182,'SANTA RITA'),
(183,'YGUAZÚ'),
(184,'MINGA GUAZU'),
(185,'MINGA PORA'),
(186,'SANTA FE DEL PARANÁ\r'),
(187,'LAMBARE'),
(188,'FERNANDO DE LA MORA'),
(189,'ÑEMBY'),
(190,'VILLA ELISA'),
(191,'SAN LORENZO'),
(192,'CAPIATA'),
(193,'LUQUE'),
(194,'AREGUA'),
(195,'LIMPIO'),
(196,'MARIANO ROQUE ALONSO'),
(197,'SAN ANTONIO'),
(198,'YPANE'),
(199,'VILLETA'),
(200,'YPACARAI'),
(201,'ITA'),
(202,'ITAUGUA'),
(203,'GUARAMBARE'),
(204,'NUEVA ITALIA'),
(205,'JUAN AUGUSTO SALDIVAR'),
(206,'ALBERDI'),
(207,'CERRITO'),
(208,'DESMOCHADOS'),
(209,'GENERAL JOSÉ EDUVIGIS DÍAZ'),
(210,'GUAZU CUA'),
(211,'HUMAITÁ'),
(212,'ISLA UMBÚ'),
(213,'LAURELES'),
(214,'MAYOR JOSÉ J. MARTÍNEZ'),
(215,'PASO DE PATRIA'),
(216,'PILAR'),
(217,'SAN JUAN BAUTISTA DEL ÑEEMBUCÚ'),
(218,'TACUARAS'),
(219,'VILLA FRANCA'),
(220,'VILLALBÍN'),
(221,'VILLA OLIVA'),
(222,'BELLA VISTA'),
(223,'CAPITAN BADO'),
(224,'PEDRO JUAN CABALLERO'),
(225,'CORPUS CHRISTI'),
(226,'CURUGUATY'),
(227,'GRAL. ÀLVAREZ DEL PUENTE KYJHÁ'),
(228,'ITANARÁ'),
(229,'KATUETÉ'),
(230,'LA PALOMA'),
(231,'NUEVA ESPERANZA'),
(232,'SALTO DEL GUAIRÁ'),
(233,'VILLA YGATIMÍ'),
(234,'YACY KAÑY'),
(235,'YPEJHÚ'),
(236,'VILLA HAYES'),
(237,'BENJAMÍN ACEVAL'),
(238,'PUERTO PINASCO'),
(239,'NANAWA'),
(240,'DR. JOSÉ FALCÓN'),
(241,'TTE. 1º MANUEL IRALA FERNÁNDEZ'),
(242,'TTE. ESTEBAN MARTÍNEZ'),
(243,'POZO COLORADO'),
(244,'GENERAL J. M. BRUGUÈZ'),
(245,'BAHIA NEGRA'),
(246,'FUERTE OLIMPO'),
(247,'PUERTO CASADO'),
(248,'CAP. CARMELO PERALTA'),
(249,'MAYOR PABLO LAGERENZA'),
(250,'DOCTOR PEDRO P. PEÑA'),
(251,'GENERAL EUGENIO A. GARAY'),
(252,'MARISCAL JOSÉ FELIX ESTIGARRIBIA'),
(253,'FILADELFIA'),
(254,'NEULAND'),
(255,'LOMA PLATA'),
(256,'COLONIA FERNHEIM'),
(257,'FN. POZO HONDO PY');

/*Table structure for table `clientes` */


CREATE TABLE `clientes` (
  `idcliente` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `clienteruc` char(30) DEFAULT NULL,
  `clientedescripcion` char(50) DEFAULT NULL,
  `clientecelular` char(50) DEFAULT NULL,
  `clientetelefono` char(50) DEFAULT NULL,
  `clienteciudad` char(100) DEFAULT NULL,
  `clientedireccion` char(200) DEFAULT NULL,
  `clienteestado` char(30) DEFAULT NULL,
  `clienteultimoacceso` date DEFAULT NULL,
  `clienteultimotransaccion` date DEFAULT NULL,
  `clientepass` char(20) DEFAULT NULL,
  `clientecalificacion` char(15) DEFAULT 'NUEVO',
  `clientecorreo` char(50) DEFAULT NULL,
  `promocion` char(5) DEFAULT 'SI',
  PRIMARY KEY (`idcliente`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `clientes` */

insert  into `clientes`(`idcliente`,`clienteruc`,`clientedescripcion`,`clientecelular`,`clientetelefono`,`clienteciudad`,`clientedireccion`,`clienteestado`,`clienteultimoacceso`,`clienteultimotransaccion`,`clientepass`,`clientecalificacion`,`clientecorreo`,`promocion`) values 
(0,'0','CLIENTE OCASIONAL','X','X','VILLARRICA','X','ACTIVO','2023-02-03','2023-02-03','X','NUEVO','X','SI'),
(1,'5183269-0','DIEGO ARIEL AYALA A.','0993512949','0993512949','VILLARRICA','DR. BLÀS A. GARAY','ACTIVO','2023-02-03','2023-02-03','X','MALO','X','NO'),
(12,'5183772','JONATHAN LUIS BOBADILLA','0982240526','0982240526','MBOCAYATY DEL GUAIRÁ','VIRGEN DE LA ASUNCION','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(13,'3702968','LISSI ZORAIDA AGUERO','0','0','YATAITY DEL GUAIRÁ','SENAVITAT','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(14,'5352001','MARIA RAMONA BORJA','0984804216','0984804216','MBOCAYATY DEL GUAIRÁ','SENAVITAT','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(15,'2515058','MARILINA ROSA FERNANDEZ SANCHEZ','0984399055','0984664440','YATAITY DEL GUAIRÁ','SENAVITAT','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(16,'3253767','ROSANA GIMENEZ','0985290130','0985290130','YATAITY DEL GUAIRÁ','COSMOS','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(17,'7816726','CARLOS ARIEL ALFONZO CARDOZO','0985892446','0985892446','YATAITY DEL GUAIRÁ','CAAGUYCUPE','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(18,'5474591','PABLO DARIO MOSQUEIRA PORTILLO','0991639036','0991639036','YATAITY DEL GUAIRÁ','LOMA BARRETO 2','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(19,'5056590','LUCIA ELIZABEHT LEGAL SANCHEZ','0984424902','0984424902','YATAITY DEL GUAIRÁ','CERCA DE LA CANCHA GRAL ROA','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(20,'1949867','REINERIO LANDAIDA BOGADO','0971314290','0971314290','MBOCAYATY DEL GUAIRÁ','SENAVITAT','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(21,'7147335','MIRTHA ANTONIA BARRETO DE REYES','0984317023','0984317023','YATAITY DEL GUAIRÁ',' BARRIO _ 14 DE SEPTIEMBRE','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(22,'6505136','YENIFER MARICRUZ PORTILLO PORTILLO','0985851887','0985851887','YATAITY DEL GUAIRÁ','LOMA BARRETO 2','ACTIVO',NULL,NULL,NULL,'MALO',NULL,'SI'),
(23,'4811157','LIZ ROSSANA ESCOBAR BORJA','0985418397','0985418397','VILLARRICA','BARRIO SAN MIGUEL','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(24,'1505854','MARIA DOMINICA LOPEZ DE ALDERETE','0985863813','0985863813','YATAITY DEL GUAIRÁ','BARRIO COSMOS','ACTIVO',NULL,NULL,NULL,'MALO',NULL,'SI'),
(25,'4457852','MARIZA DE OLIVEIRA','0984661337','0984661337','MBOCAYATY DEL GUAIRÁ','VIRGEN DEL ROSARIO SENAVITAT','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI'),
(26,'5227304','ILSE GOIRIS','0991494455','0991494455','YATAITY DEL GUAIRÁ','LOMA BARRETO','ACTIVO',NULL,NULL,NULL,'NUEVO',NULL,'SI');

/*Table structure for table `creditos` */


CREATE TABLE `creditos` (
  `idcredito` int(11) NOT NULL AUTO_INCREMENT,
  `cliente` char(20) DEFAULT NULL,
  `fechacredito` date DEFAULT NULL,
  `horacredito` time DEFAULT NULL,
  `descripcion` char(50) DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `fechapago` date DEFAULT NULL,
  `horapago` time DEFAULT NULL,
  `usuariocredito` char(20) DEFAULT NULL,
  `usuariocobro` char(20) DEFAULT NULL,
  `estado` char(20) DEFAULT NULL,
  `iddetallecaja` int(11) DEFAULT NULL,
  PRIMARY KEY (`idcredito`)
) ENGINE=InnoDB AUTO_INCREMENT=525 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `creditos` */

insert  into `creditos`(`idcredito`,`cliente`,`fechacredito`,`horacredito`,`descripcion`,`monto`,`fechapago`,`horapago`,`usuariocredito`,`usuariocobro`,`estado`,`iddetallecaja`) values 
(524,'DIEGO ARIEL AYALA A.','2024-07-18','12:59:01','Envio Giros Tigo',5000,'2024-07-18','13:01:26','EDGAR','EDGAR','PAGADO',8693);

/*Table structure for table `cuotas` */


CREATE TABLE `cuotas` (
  `idcuota` int(11) NOT NULL AUTO_INCREMENT,
  `idventa` int(11) DEFAULT NULL,
  `cuota` int(11) DEFAULT NULL,
  `vencimiento` date DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `montototal` int(11) DEFAULT NULL,
  `estado` char(20) DEFAULT 'PENDIENTE',
  `fechapago` date DEFAULT NULL,
  `codtransaccion` char(20) DEFAULT NULL,
  `usuario` char(20) DEFAULT NULL,
  `diasatraso` int(11) GENERATED ALWAYS AS (if(`estado` = 'PENDIENTE',if(to_days(curdate()) - to_days(`vencimiento`) < 0,'0',to_days(curdate()) - to_days(`vencimiento`)),if(to_days(`fechapago`) - to_days(`vencimiento`) < 0,'0',to_days(`fechapago`) - to_days(`vencimiento`)))) VIRTUAL,
  `interes` int(11) DEFAULT 0,
  PRIMARY KEY (`idcuota`)
) ENGINE=InnoDB AUTO_INCREMENT=244 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `cuotas` */

insert  into `cuotas`(`idcuota`,`idventa`,`cuota`,`vencimiento`,`monto`,`montototal`,`estado`,`fechapago`,`codtransaccion`,`usuario`,`interes`) values 
(202,88,1,'2024-01-30',94500,103289,'PAGADO','2024-03-01','hvr6uljcpb38atw881','YENI',8789),
(203,89,1,'2024-02-05',118800,119156,'PAGADO','2024-02-06','bp0uhsy8ijft7dk891','YENI',356),
(204,89,2,'2024-03-07',118800,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(205,97,1,'2024-02-05',97900,98194,'PAGADO','2024-02-06','rdfgv6n0wmo1j5k971','YENI',294),
(206,97,2,'2024-03-07',97900,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(207,112,1,'2024-02-20',108675,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(208,113,1,'2024-02-20',108675,109979,'PAGADO','2024-02-24','vh01sxaj3kugz9p1131','YENI',1304),
(209,123,1,'2024-01-25',102600,102600,'PAGADO','2024-01-25','lb49me5ir82361h1231','YENI',0),
(210,123,2,'2024-02-25',102600,102600,'PAGADO','2024-02-12','2fdh9y03iegt1zs1232','YENI',0),
(211,128,1,'2024-01-25',741000,745446,'PAGADO','2024-01-27','ucwaj7zef6ld4xv1281','YENI',4446),
(212,128,2,'2024-02-25',741000,741000,'PAGADO','2024-02-05','voqiu0p2z14yrm61282','YENI',0),
(213,145,1,'2024-02-03',114000,114000,'PAGADO','2024-02-03','4qcy2uh0vdtrib51451','YENI',0),
(214,145,2,'2024-03-05',114000,114000,'PAGADO','2024-02-26','yxag9zpi0vwhm3o1452','YENI',0),
(215,153,1,'2024-02-08',1056000,1056000,'PAGADO','2024-02-08','aeh2c8xv4qlzy571531','YENI',0),
(216,153,2,'2024-03-10',1056000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(217,153,3,'2024-04-10',1056000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(218,153,4,'2024-05-11',1056000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(219,162,1,'2024-02-13',96900,96900,'PAGADO','2024-02-13','4rcgn5yj1ql9wvs1621','YENI',0),
(220,162,2,'2024-03-15',96900,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(221,170,1,'2024-02-14',432000,432000,'PAGADO','2024-02-14','ho2fnjszxag8eqk1701','YENI',0),
(222,170,2,'2024-03-16',432000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(223,170,3,'2024-04-16',432000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(224,170,4,'2024-05-17',432000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(225,171,1,'2024-02-14',102850,105627,'PAGADO','2024-02-23','wplvumhfaso5jz11711','YENI',2777),
(226,171,2,'2024-03-16',102850,NULL,'PRODUCTO RETIRADO',NULL,NULL,NULL,0),
(227,171,3,'2024-04-16',102850,NULL,'PRODUCTO RETIRADO',NULL,NULL,NULL,0),
(228,176,1,'2024-02-17',1596000,1596000,'PAGADO','2024-02-17','3lkn207vshabft11761','EDGAR',0),
(229,176,2,'2024-03-19',1596000,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(230,195,1,'2024-02-23',288000,288000,'PAGADO','2024-02-23','5sjy2l936q1i0ft1951','YENI',0),
(231,195,2,'2024-03-25',288000,NULL,'PRODUCTO RETIRADO',NULL,NULL,NULL,0),
(232,195,3,'2024-04-25',288000,NULL,'PRODUCTO RETIRADO',NULL,NULL,NULL,0),
(233,195,4,'2024-05-26',288000,NULL,'PRODUCTO RETIRADO',NULL,NULL,NULL,0),
(234,206,1,'2024-02-26',319500,319500,'PAGADO','2024-02-26','6vhbl7fw5gmyaec2061','YENI',0),
(235,206,2,'2024-03-28',319500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(236,206,3,'2024-04-28',319500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(237,206,4,'2024-05-29',319500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(238,206,5,'2024-06-29',319500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(239,206,6,'2024-07-30',319500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(240,208,1,'2024-02-26',28500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(241,208,2,'2024-03-28',28500,NULL,'PENDIENTE',NULL,NULL,NULL,0),
(242,217,1,'2024-02-28',96900,137017,'PAGADO','2024-07-15','o8tvxgyj45m3z262171','EDGAR',40117),
(243,217,2,'2024-03-30',96900,128877,'PAGADO','2024-07-18','gnr2qvjt95mlo6h2172','EDGAR',31977);

/*Table structure for table `depositosnsa` */


CREATE TABLE `depositosnsa` (
  `iddeposito` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` date DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `usuario` char(50) DEFAULT NULL,
  PRIMARY KEY (`iddeposito`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `depositosnsa` */

/*Table structure for table `detallescaja` */


CREATE TABLE `detallescaja` (
  `idcaja` int(11) DEFAULT NULL,
  `iddetallecaja` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` date DEFAULT NULL,
  `hora` time DEFAULT NULL,
  `tipomovimiento` char(20) DEFAULT NULL,
  `operacion` char(35) DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `descripcion` char(70) DEFAULT NULL,
  `usuario` char(20) DEFAULT NULL,
  `estadopago` char(20) DEFAULT NULL,
  `estado` char(20) DEFAULT 'ACTIVO',
  PRIMARY KEY (`iddetallecaja`)
) ENGINE=InnoDB AUTO_INCREMENT=8700 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `detallescaja` */

insert  into `detallescaja`(`idcaja`,`iddetallecaja`,`fecha`,`hora`,`tipomovimiento`,`operacion`,`monto`,`descripcion`,`usuario`,`estadopago`,`estado`) values 
(366,8500,'2024-01-18','10:04:19','ENTRADA','VENTA CONTADO',2625000,'VENTA N° 86','YENI','PAGADO','ACTIVO'),
(366,8501,'2024-01-18','10:06:20','ENTRADA','VENTA CONTADO',12000,'VENTA N° 87','YENI','PAGADO','ACTIVO'),
(366,8502,'2024-01-18','10:23:16','ENTRADA','ENTREGA VENTA CREDITO',90000,'VENTA N° 88','YENI','PAGADO','ACTIVO'),
(366,8503,'2024-01-18','10:31:06','ENTRADA','ENTREGA VENTA CREDITO',134000,'VENTA N° 89','YENI','PAGADO','ACTIVO'),
(366,8504,'2024-01-18','10:43:56','ENTRADA','VENTA CONTADO',260000,'VENTA N° 90','YENI','PAGADO','ACTIVO'),
(366,8505,'2024-01-18','10:45:42','ENTRADA','VENTA CONTADO',25000,'VENTA N° 91','YENI','PAGADO','ACTIVO'),
(366,8506,'2024-01-18','10:51:06','ENTRADA','VENTA CONTADO',160000,'VENTA N° 92','YENI','PAGADO','ACTIVO'),
(366,8507,'2024-01-18','11:49:40','ENTRADA','VENTA CONTADO',1100000,'VENTA N° 93','YENI','PAGADO','ACTIVO'),
(366,8508,'2024-01-18','15:06:00','ENTRADA','VENTA CONTADO',140000,'VENTA N° 94','YENI','PAGADO','ACTIVO'),
(366,8509,'2024-01-18','15:07:47','ENTRADA','VENTA CONTADO',245000,'VENTA N° 95','YENI','PAGADO','ACTIVO'),
(366,8510,'2024-01-18','15:16:10','ENTRADA','VENTA CONTADO',630000,'VENTA N° 96','YENI','PAGADO','ACTIVO'),
(366,8511,'2024-01-18','15:24:03','ENTRADA','ENTREGA VENTA CREDITO',112000,'VENTA N° 97','YENI','PAGADO','ACTIVO'),
(366,8512,'2024-01-18','15:29:31','ENTRADA','VENTA CONTADO',170000,'VENTA N° 98','YENI','PAGADO','ACTIVO'),
(366,8513,'2024-01-18','15:34:59','ENTRADA','VENTA CONTADO',766000,'VENTA N° 99','YENI','PAGADO','ACTIVO'),
(366,8514,'2024-01-18','16:54:51','ENTRADA','VENTA CONTADO',690000,'VENTA N° 100','YENI','PAGADO','ACTIVO'),
(366,8515,'2024-01-18','17:00:04','ENTRADA','VENTA CONTADO',180000,'VENTA N° 101','YENI','PAGADO','ACTIVO'),
(366,8516,'2024-01-18','17:03:01','ENTRADA','VENTA CONTADO',645000,'VENTA N° 102','YENI','PAGADO','ACTIVO'),
(366,8517,'2024-01-18','17:04:28','ENTRADA','VENTA CONTADO',32000,'VENTA N° 103','YENI','PAGADO','ACTIVO'),
(366,8518,'2024-01-18','17:06:06','ENTRADA','VENTA CONTADO',2600000,'VENTA N° 104','YENI','PAGADO','ACTIVO'),
(366,8519,'2024-01-18','17:09:03','ENTRADA','VENTA CONTADO',150000,'VENTA N° 105','YENI','PAGADO','ACTIVO'),
(366,8520,'2024-01-18','17:13:45','ENTRADA','VENTA CONTADO',25000,'VENTA N° 106','YENI','PAGADO','ACTIVO'),
(366,8521,'2024-01-18','17:55:43','ENTRADA','VENTA CONTADO',120000,'VENTA N° 107','YENI','PAGADO','ACTIVO'),
(366,8522,'2024-01-19','13:50:52','ENTRADA','VENTA CONTADO',35000,'VENTA N° 108','YENI','PAGADO','ACTIVO'),
(366,8523,'2024-01-19','15:21:22','ENTRADA','VENTA CONTADO',180000,'VENTA N° 109','YENI','PAGADO','ACTIVO'),
(366,8524,'2024-01-20','09:15:30','ENTRADA','VENTA CONTADO',180000,'VENTA N° 110','YENI','PAGADO','ACTIVO'),
(366,8525,'2024-01-20','16:38:19','ENTRADA','VENTA CONTADO',54000,'VENTA N° 111','YENI','PAGADO','ACTIVO'),
(366,8527,'2024-01-20','18:01:06','ENTRADA','ENTREGA VENTA CREDITO',126500,'VENTA N° 113','YENI','PAGADO','ACTIVO'),
(366,8528,'2024-01-22','11:35:32','ENTRADA','VENTA CONTADO',60000,'VENTA N° 114','YENI','PAGADO','ACTIVO'),
(366,8529,'2024-01-22','15:43:05','ENTRADA','VENTA CONTADO',60000,'VENTA N° 115','YENI','PAGADO','ACTIVO'),
(366,8530,'2024-01-23','11:17:07','ENTRADA','VENTA CONTADO',50000,'VENTA N° 116','YENI','PAGADO','ACTIVO'),
(366,8531,'2024-01-23','16:01:52','ENTRADA','VENTA CONTADO',25000,'VENTA N° 117','YENI','PAGADO','ACTIVO'),
(366,8532,'2024-01-23','16:32:23','ENTRADA','VENTA CONTADO',25000,'VENTA N° 118','YENI','PAGADO','ACTIVO'),
(366,8533,'2024-01-23','17:10:36','ENTRADA','VENTA CONTADO',22000,'VENTA N° 119','YENI','PAGADO','ACTIVO'),
(366,8534,'2024-01-24','15:43:44','ENTRADA','VENTA CONTADO',20000,'VENTA N° 120','YENI','PAGADO','ACTIVO'),
(366,8535,'2024-01-24','17:43:18','ENTRADA','VENTA CONTADO',20000,'VENTA N° 121','YENI','PAGADO','ACTIVO'),
(366,8536,'2024-01-25','11:48:26','ENTRADA','VENTA CONTADO',25000,'VENTA N° 122','YENI','PAGADO','ACTIVO'),
(366,8537,'2024-01-25','15:55:24','ENTRADA','COBRO CUOTA',102600,'COBRO CUOTA N°: 1 VENTA N°: 123','YENI','PAGADO','ACTIVO'),
(366,8538,'2024-01-25','16:14:00','ENTRADA','VENTA CONTADO',390000,'VENTA N° 124','YENI','PAGADO','ACTIVO'),
(366,8539,'2024-01-25','18:08:25','ENTRADA','VENTA CONTADO',150000,'VENTA N° 125','YENI','PAGADO','ACTIVO'),
(366,8540,'2024-01-26','18:06:58','ENTRADA','VENTA CONTADO',45000,'VENTA N° 126','YENI','PAGADO','ACTIVO'),
(366,8541,'2024-01-27','08:26:44','ENTRADA','VENTA CONTADO',85000,'VENTA N° 127','YENI','PAGADO','ACTIVO'),
(365,8542,'2024-01-27','10:54:21','ENTRADA','VENTA CONTADO',54000,'VENTA N° 129','EDGAR','PAGADO','ACTIVO'),
(365,8543,'2024-01-27','10:58:18','ENTRADA','VENTA CONTADO',30000,'VENTA N° 130','EDGAR','PAGADO','ACTIVO'),
(365,8544,'2024-01-27','12:00:55','ENTRADA','VENTA CONTADO',15000,'VENTA N° 131','EDGAR','PAGADO','ACTIVO'),
(366,8545,'2024-01-27','16:43:03','ENTRADA','VENTA CONTADO',55000,'VENTA N° 132','YENI','PAGADO','ACTIVO'),
(366,8546,'2024-01-27','16:57:19','ENTRADA','COBRO CUOTA',745446,'COBRO CUOTA N°: 1 VENTA N°: 128','YENI','PAGADO','ACTIVO'),
(366,8547,'2024-01-27','17:54:47','ENTRADA','VENTA CONTADO',160000,'VENTA N° 133','YENI','PAGADO','ACTIVO'),
(367,8548,'2024-01-29','08:48:08','ENTRADA','VENTA CONTADO',30000,'VENTA N° 134','YENI','PAGADO','ACTIVO'),
(367,8549,'2024-01-29','10:53:06','ENTRADA','VENTA CONTADO',45000,'VENTA N° 135','YENI','PAGADO','ACTIVO'),
(367,8550,'2024-01-30','08:13:47','ENTRADA','VENTA CONTADO',60000,'VENTA N° 136','YENI','PAGADO','ACTIVO'),
(367,8551,'2024-01-30','13:35:36','ENTRADA','VENTA CONTADO',25000,'VENTA N° 137','YENI','PAGADO','ACTIVO'),
(367,8552,'2024-01-30','15:29:26','ENTRADA','VENTA CONTADO',23000,'VENTA N° 138','YENI','PAGADO','ACTIVO'),
(367,8553,'2024-01-30','17:17:24','ENTRADA','VENTA CONTADO',40000,'VENTA N° 139','YENI','PAGADO','ACTIVO'),
(367,8554,'2024-01-31','18:00:18','ENTRADA','VENTA CONTADO',90000,'VENTA N° 140','YENI','PAGADO','ACTIVO'),
(367,8555,'2024-02-01','13:51:16','ENTRADA','VENTA CONTADO',45000,'VENTA N° 141','YENI','PAGADO','ACTIVO'),
(367,8556,'2024-02-02','07:44:35','ENTRADA','VENTA CONTADO',25000,'VENTA N° 142','YENI','PAGADO','ACTIVO'),
(367,8557,'2024-02-03','11:22:12','ENTRADA','VENTA CONTADO',15000,'VENTA N° 143','YENI','PAGADO','ACTIVO'),
(367,8558,'2024-02-03','11:46:12','ENTRADA','VENTA CONTADO',80000,'VENTA N° 144','YENI','PAGADO','ACTIVO'),
(367,8559,'2024-02-03','14:10:07','ENTRADA','COBRO CUOTA',114000,'COBRO CUOTA N°: 1 VENTA N°: 145','YENI','PAGADO','ACTIVO'),
(367,8560,'2024-02-03','14:33:36','ENTRADA','VENTA CONTADO',200000,'VENTA N° 146','YENI','PAGADO','ACTIVO'),
(367,8561,'2024-02-03','16:01:49','ENTRADA','VENTA CONTADO',140000,'VENTA N° 147','YENI','PAGADO','ACTIVO'),
(367,8562,'2024-02-03','16:18:41','ENTRADA','VENTA CONTADO',40000,'VENTA N° 148','YENI','PAGADO','ACTIVO'),
(367,8563,'2024-02-03','16:41:36','ENTRADA','VENTA CONTADO',15000,'VENTA N° 149','YENI','PAGADO','ACTIVO'),
(367,8564,'2024-02-03','17:55:53','ENTRADA','VENTA CONTADO',30000,'VENTA N° 150','YENI','PAGADO','ACTIVO'),
(367,8565,'2024-02-05','10:31:28','ENTRADA','COBRO CUOTA',741000,'COBRO CUOTA N°: 2 VENTA N°: 128','YENI','PAGADO','ACTIVO'),
(367,8566,'2024-02-05','11:10:33','ENTRADA','VENTA CONTADO',670000,'VENTA N° 151','YENI','PAGADO','ACTIVO'),
(367,8567,'2024-02-06','08:13:27','ENTRADA','COBRO CUOTA',119156,'COBRO CUOTA N°: 1 VENTA N°: 89','YENI','PAGADO','ACTIVO'),
(367,8568,'2024-02-06','09:20:59','ENTRADA','VENTA CONTADO',130000,'VENTA N° 152','YENI','PAGADO','ACTIVO'),
(367,8569,'2024-02-06','13:42:39','ENTRADA','COBRO CUOTA',98194,'COBRO CUOTA N°: 1 VENTA N°: 97','YENI','PAGADO','ACTIVO'),
(367,8570,'2024-02-08','15:28:30','ENTRADA','COBRO CUOTA',1056000,'COBRO CUOTA N°: 1 VENTA N°: 153','YENI','PAGADO','ACTIVO'),
(367,8571,'2024-02-08','17:00:48','ENTRADA','VENTA CONTADO',115000,'VENTA N° 154','YENI','PAGADO','ACTIVO'),
(367,8572,'2024-02-08','18:11:35','ENTRADA','VENTA CONTADO',40000,'VENTA N° 155','YENI','PAGADO','ACTIVO'),
(367,8573,'2024-02-09','14:35:53','ENTRADA','VENTA CONTADO',40000,'VENTA N° 156','YENI','PAGADO','ACTIVO'),
(367,8574,'2024-02-12','08:23:07','ENTRADA','VENTA CONTADO',150000,'VENTA N° 157','YENI','PAGADO','ACTIVO'),
(367,8575,'2024-02-12','08:28:49','ENTRADA','VENTA CONTADO',280000,'VENTA N° 158','YENI','PAGADO','ACTIVO'),
(367,8576,'2024-02-12','08:42:16','ENTRADA','VENTA CONTADO',50000,'VENTA N° 159','YENI','PAGADO','ACTIVO'),
(367,8577,'2024-02-12','16:00:49','ENTRADA','COBRO CUOTA',102600,'COBRO CUOTA N°: 2 VENTA N°: 123','YENI','PAGADO','ACTIVO'),
(367,8578,'2024-02-12','18:27:05','ENTRADA','VENTA CONTADO',150000,'VENTA N° 160','YENI','PAGADO','ACTIVO'),
(367,8579,'2024-02-12','18:27:53','ENTRADA','VENTA CONTADO',50000,'VENTA N° 161','YENI','PAGADO','ACTIVO'),
(367,8580,'2024-02-13','17:03:08','ENTRADA','COBRO CUOTA',96900,'COBRO CUOTA N°: 1 VENTA N°: 162','YENI','PAGADO','ACTIVO'),
(365,8581,'2024-02-13','17:12:03','ENTRADA','VENTA CONTADO',120000,'VENTA N° 163','EDGAR','PAGADO','ACTIVO'),
(365,8582,'2024-02-13','17:19:19','ENTRADA','VENTA CONTADO',50000,'VENTA N° 164','EDGAR','PAGADO','ACTIVO'),
(365,8583,'2024-02-13','17:19:38','ENTRADA','VENTA CONTADO',50000,'VENTA N° 165','EDGAR','PAGADO','ACTIVO'),
(365,8584,'2024-02-13','17:20:30','ENTRADA','VENTA CONTADO',120000,'VENTA N° 166','EDGAR','PAGADO','ACTIVO'),
(365,8585,'2024-02-13','17:33:46','ENTRADA','VENTA CONTADO',90000,'VENTA N° 167','EDGAR','PAGADO','ACTIVO'),
(367,8586,'2024-02-14','15:31:19','ENTRADA','VENTA CONTADO',95000,'VENTA N° 168','YENI','PAGADO','ACTIVO'),
(367,8587,'2024-02-14','15:33:44','ENTRADA','VENTA CONTADO',50000,'VENTA N° 169','YENI','PAGADO','ACTIVO'),
(367,8588,'2024-02-14','16:14:25','ENTRADA','COBRO CUOTA',432000,'COBRO CUOTA N°: 1 VENTA N°: 170','YENI','PAGADO','ACTIVO'),
(367,8589,'2024-02-14','16:29:10','ENTRADA','VENTA CONTADO',50000,'VENTA N° 172','YENI','PAGADO','ACTIVO'),
(367,8590,'2024-02-15','16:39:13','ENTRADA','VENTA CONTADO',180000,'VENTA N° 173','YENI','PAGADO','ACTIVO'),
(367,8591,'2024-02-15','16:39:31','ENTRADA','VENTA CONTADO',15000,'VENTA N° 174','YENI','PAGADO','ACTIVO'),
(367,8592,'2024-02-15','16:47:55','ENTRADA','VENTA CONTADO',60000,'VENTA N° 175','YENI','PAGADO','ACTIVO'),
(365,8593,'2024-02-17','11:37:46','ENTRADA','COBRO CUOTA',1596000,'COBRO CUOTA N°: 1 VENTA N°: 176','EDGAR','PAGADO','ACTIVO'),
(365,8594,'2024-02-17','11:39:09','ENTRADA','VENTA CONTADO',20000,'VENTA N° 177','EDGAR','PAGADO','ACTIVO'),
(368,8595,'2024-02-19','10:43:26','ENTRADA','VENTA CONTADO',25000,'VENTA N° 178','YENI','PAGADO','ACTIVO'),
(368,8596,'2024-02-19','13:41:09','ENTRADA','VENTA CONTADO',45000,'VENTA N° 179','YENI','PAGADO','ACTIVO'),
(368,8597,'2024-02-19','13:51:06','ENTRADA','VENTA CONTADO',15000,'VENTA N° 180','YENI','PAGADO','ACTIVO'),
(368,8598,'2024-02-19','17:28:14','ENTRADA','VENTA CONTADO',40000,'VENTA N° 181','YENI','PAGADO','ACTIVO'),
(368,8599,'2024-02-19','17:44:01','ENTRADA','VENTA CONTADO',120000,'VENTA N° 182','YENI','PAGADO','ACTIVO'),
(368,8600,'2024-02-19','17:44:51','ENTRADA','Ingreso de Efectivo',20000,'VUELTO','YENI','PAGADO','ACTIVO'),
(368,8601,'2024-02-19','17:57:00','ENTRADA','VENTA CONTADO',50000,'VENTA N° 183','YENI','PAGADO','ACTIVO'),
(368,8602,'2024-02-20','08:46:46','ENTRADA','VENTA CONTADO',50000,'VENTA N° 184','YENI','PAGADO','ACTIVO'),
(368,8603,'2024-02-20','08:47:15','ENTRADA','VENTA CONTADO',50000,'VENTA N° 185','YENI','PAGADO','ACTIVO'),
(368,8604,'2024-02-20','10:37:42','ENTRADA','VENTA CONTADO',28000,'VENTA N° 186','YENI','PAGADO','ACTIVO'),
(368,8605,'2024-02-20','10:41:08','ENTRADA','Ingreso de Efectivo',20000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(368,8606,'2024-02-20','10:41:29','ENTRADA','Ingreso de Efectivo',20000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(368,8607,'2024-02-20','10:41:38','ENTRADA','Ingreso de Efectivo',20000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(368,8608,'2024-02-20','10:44:13','SALIDA','Gastos Diarios',123000,'PAGO POR AGUA','YENI','PAGADO','ACTIVO'),
(368,8609,'2024-02-20','15:34:09','ENTRADA','VENTA CONTADO',50000,'VENTA N° 187','YENI','PAGADO','ACTIVO'),
(368,8610,'2024-02-21','10:06:27','ENTRADA','VENTA CONTADO',45000,'VENTA N° 188','YENI','PAGADO','ACTIVO'),
(368,8611,'2024-02-21','10:07:19','ENTRADA','VENTA CONTADO',45000,'VENTA N° 189','YENI','PAGADO','ACTIVO'),
(368,8612,'2024-02-21','17:14:30','ENTRADA','VENTA CONTADO',80000,'VENTA N° 190','YENI','PAGADO','ACTIVO'),
(368,8613,'2024-02-21','17:14:57','ENTRADA','VENTA CONTADO',180000,'VENTA N° 191','YENI','PAGADO','ACTIVO'),
(368,8614,'2024-02-21','17:21:30','ENTRADA','VENTA CONTADO',50000,'VENTA N° 192','YENI','PAGADO','ACTIVO'),
(368,8615,'2024-02-21','17:45:53','SALIDA','Retiro de Dinero',50000,'NO CARGADO','YENI','PAGADO','ACTIVO'),
(368,8616,'2024-02-22','17:11:31','ENTRADA','VENTA CONTADO',54000,'VENTA N° 193','YENI','PAGADO','ACTIVO'),
(368,8617,'2024-02-22','17:20:52','ENTRADA','Ingreso de Efectivo',40000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(368,8618,'2024-02-23','08:19:08','ENTRADA','VENTA CONTADO',75000,'VENTA N° 194','YENI','PAGADO','ACTIVO'),
(368,8619,'2024-02-23','08:33:27','ENTRADA','COBRO CUOTA',288000,'COBRO CUOTA N°: 1 VENTA N°: 195','YENI','PAGADO','ACTIVO'),
(368,8620,'2024-02-23','09:22:06','ENTRADA','COBRO CUOTA',105627,'COBRO CUOTA N°: 1 VENTA N°: 171','YENI','PAGADO','ACTIVO'),
(368,8621,'2024-02-23','09:44:26','ENTRADA','VENTA CONTADO',15000,'VENTA N° 196','YENI','PAGADO','ACTIVO'),
(368,8622,'2024-02-23','09:44:59','ENTRADA','VENTA CONTADO',150000,'VENTA N° 197','YENI','PAGADO','ACTIVO'),
(368,8623,'2024-02-23','09:48:41','ENTRADA','Ingreso de Efectivo',20000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(368,8624,'2024-02-23','15:50:10','ENTRADA','VENTA CONTADO',50000,'VENTA N° 198','YENI','PAGADO','ACTIVO'),
(368,8625,'2024-02-23','17:37:24','ENTRADA','VENTA CONTADO',58000,'VENTA N° 199','YENI','PAGADO','ACTIVO'),
(368,8626,'2024-02-23','17:43:49','ENTRADA','VENTA CONTADO',50000,'VENTA N° 200','YENI','PAGADO','ACTIVO'),
(368,8627,'2024-02-23','17:45:32','ENTRADA','Ingreso de Efectivo',20000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(368,8628,'2024-02-24','10:19:43','ENTRADA','VENTA CONTADO',35000,'VENTA N° 201','YENI','PAGADO','ACTIVO'),
(368,8629,'2024-02-24','11:08:43','ENTRADA','COBRO CUOTA',109979,'COBRO CUOTA N°: 1 VENTA N°: 113','YENI','PAGADO','ACTIVO'),
(368,8630,'2024-02-24','11:31:34','ENTRADA','VENTA CONTADO',980000,'VENTA N° 202','YENI','PAGADO','ACTIVO'),
(368,8631,'2024-02-24','15:10:53','ENTRADA','VENTA CONTADO',90000,'VENTA N° 203','YENI','PAGADO','ACTIVO'),
(368,8632,'2024-02-24','19:48:57','ENTRADA','VENTA CONTADO',90000,'VENTA N° 204','YENI','PAGADO','ACTIVO'),
(368,8633,'2024-02-24','19:49:32','ENTRADA','VENTA CONTADO',45000,'VENTA N° 205','YENI','PAGADO','ACTIVO'),
(368,8634,'2024-02-24','19:50:58','ENTRADA','Ingreso de Efectivo',75000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(369,8635,'2024-02-26','08:42:58','ENTRADA','COBRO CUOTA',114000,'COBRO CUOTA N°: 2 VENTA N°: 145','YENI','PAGADO','ACTIVO'),
(369,8636,'2024-02-26','09:47:33','ENTRADA','COBRO CUOTA',319500,'COBRO CUOTA N°: 1 VENTA N°: 206','YENI','PAGADO','ACTIVO'),
(369,8637,'2024-02-26','10:21:27','ENTRADA','VENTA CONTADO',60000,'VENTA N° 207','YENI','PAGADO','ACTIVO'),
(369,8638,'2024-02-26','10:22:05','ENTRADA','Ingreso de Efectivo',20000,'GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(369,8639,'2024-02-26','15:30:19','ENTRADA','VENTA CONTADO',58000,'VENTA N° 209','YENI','PAGADO','ACTIVO'),
(369,8640,'2024-02-26','15:31:49','SALIDA','Retiro de Dinero',58000,'HOP 001 DE 800ML NO CARGADOE 14/02724','YENI','PAGADO','ACTIVO'),
(369,8641,'2024-02-26','15:52:55','ENTRADA','VENTA CONTADO',90000,'VENTA N° 210','YENI','PAGADO','ACTIVO'),
(369,8642,'2024-02-27','08:36:57','ENTRADA','VENTA CONTADO',15000,'VENTA N° 211','YENI','PAGADO','ACTIVO'),
(369,8643,'2024-02-27','09:53:22','ENTRADA','VENTA CONTADO',120000,'VENTA N° 212','YENI','PAGADO','ACTIVO'),
(369,8644,'2024-02-27','18:36:12','ENTRADA','VENTA CONTADO',20000,'VENTA N° 213','YENI','PAGADO','ACTIVO'),
(369,8645,'2024-02-27','18:37:08','ENTRADA','VENTA CONTADO',390000,'VENTA N° 214','YENI','PAGADO','ACTIVO'),
(369,8646,'2024-02-27','18:38:15','ENTRADA','VENTA CONTADO',90000,'VENTA N° 215','YENI','PAGADO','ACTIVO'),
(369,8647,'2024-02-27','18:40:30','ENTRADA','Ingreso de Efectivo',50000,' 3 GRABADO NOMBRE 27/02/24','YENI','PAGADO','ACTIVO'),
(369,8648,'2024-02-28','11:07:08','ENTRADA','VENTA CONTADO',50000,'VENTA N° 216','YENI','PAGADO','ACTIVO'),
(369,8649,'2024-02-28','18:12:14','ENTRADA','VENTA CONTADO',70000,'VENTA N° 218','YENI','PAGADO','ACTIVO'),
(369,8650,'2024-02-28','18:14:23','ENTRADA','VENTA CONTADO',70000,'VENTA N° 219','YENI','PAGADO','ACTIVO'),
(369,8651,'2024-02-28','18:14:56','ENTRADA','VENTA CONTADO',45000,'VENTA N° 220','YENI','PAGADO','ACTIVO'),
(369,8652,'2024-02-28','18:15:36','ENTRADA','VENTA CONTADO',40000,'VENTA N° 221','YENI','PAGADO','ACTIVO'),
(369,8653,'2024-02-28','18:16:02','ENTRADA','VENTA CONTADO',50000,'VENTA N° 222','YENI','PAGADO','ACTIVO'),
(369,8654,'2024-02-28','18:16:21','ENTRADA','VENTA CONTADO',50000,'VENTA N° 223','YENI','PAGADO','ACTIVO'),
(369,8655,'2024-02-28','18:16:46','ENTRADA','VENTA CONTADO',50000,'VENTA N° 224','YENI','PAGADO','ACTIVO'),
(369,8656,'2024-02-28','18:17:18','ENTRADA','VENTA CONTADO',58000,'VENTA N° 225','YENI','PAGADO','ACTIVO'),
(369,8657,'2024-02-28','18:17:52','ENTRADA','VENTA CONTADO',58000,'VENTA N° 226','YENI','PAGADO','ACTIVO'),
(369,8658,'2024-02-28','18:18:32','ENTRADA','VENTA CONTADO',58000,'VENTA N° 227','YENI','PAGADO','ACTIVO'),
(369,8659,'2024-02-28','18:19:08','ENTRADA','VENTA CONTADO',75000,'VENTA N° 228','YENI','PAGADO','ACTIVO'),
(369,8660,'2024-02-28','18:21:58','ENTRADA','Ingreso de Efectivo',145000,'8 GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(369,8661,'2024-02-29','17:03:19','ENTRADA','VENTA CONTADO',70000,'VENTA N° 229','YENI','PAGADO','ACTIVO'),
(369,8662,'2024-02-29','17:04:41','ENTRADA','VENTA CONTADO',95000,'VENTA N° 230','YENI','PAGADO','ACTIVO'),
(369,8663,'2024-02-29','17:06:00','ENTRADA','Ingreso de Efectivo',40000,'2 GRABADO NOMBRE','YENI','PAGADO','ACTIVO'),
(369,8664,'2024-02-29','17:19:58','SALIDA','Retiro de Dinero',95000,'CARGA INNECESARIA DE KAR 002','YENI','PAGADO','ACTIVO'),
(369,8665,'2024-03-01','09:38:22','ENTRADA','VENTA CONTADO',320000,'VENTA N° 231','YENI','PAGADO','ACTIVO'),
(369,8666,'2024-03-01','09:39:13','ENTRADA','VENTA CONTADO',90000,'VENTA N° 232','YENI','PAGADO','ACTIVO'),
(369,8667,'2024-03-01','13:25:15','ENTRADA','COBRO CUOTA',103289,'COBRO CUOTA N°: 1 VENTA N°: 88','YENI','PAGADO','ACTIVO'),
(369,8668,'2024-03-01','18:35:22','ENTRADA','VENTA CONTADO',825000,'VENTA N° 233','YENI','PAGADO','ACTIVO'),
(370,8669,'2024-07-14','14:01:29','ENTRADA','VENTA CONTADO',70000,'VENTA N° 234','EDGAR','PAGADO','ACTIVO'),
(370,8670,'2024-07-15','15:59:44','ENTRADA','COBRO CUOTA',137017,'COBRO CUOTA N°: 1 VENTA N°: 217','EDGAR','PAGADO','ACTIVO'),
(370,8671,'2024-07-15','16:15:30','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',80000,'ENTREGA VENTA N° 236','EDGAR','PAGADO','ACTIVO'),
(370,8672,'2024-07-15','16:17:11','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',15000,'ENTREGA VENTA N° 237','EDGAR','PAGADO','ACTIVO'),
(370,8673,'2024-07-15','16:18:31','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',12000,'ENTREGA VENTA N° 238','EDGAR','PAGADO','ACTIVO'),
(370,8674,'2024-07-15','16:34:38','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',25000,'ENTREGA VENTA N° 239','EDGAR','PAGADO','ACTIVO'),
(370,8675,'2024-07-15','16:37:36','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',25000,'ENTREGA VENTA N° 240','EDGAR','PAGADO','ACTIVO'),
(370,8676,'2024-07-15','16:48:21','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',15000,'ENTREGA VENTA N° 241','EDGAR','PAGADO','ACTIVO'),
(370,8677,'2024-07-15','17:04:23','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',15000,'ENTREGA VENTA N° 242','EDGAR','PAGADO','ACTIVO'),
(370,8678,'2024-07-15','18:34:22','ENTRADA','PAGO PARCIAL',0,'COBRO PAGO PARCIAL N°:  VENTA N°: 242','EDGAR','PAGADO','ACTIVO'),
(370,8679,'2024-07-15','18:39:18','ENTRADA','PAGO PARCIAL',20000,'COBRO PAGO PARCIAL N°:  VENTA N°: 242','EDGAR','PAGADO','ACTIVO'),
(370,8680,'2024-07-15','18:40:18','ENTRADA','PAGO PARCIAL',15000,'COBRO PAGO PARCIAL N°:  VENTA N°: 242','EDGAR','PAGADO','ACTIVO'),
(370,8681,'2024-07-15','18:45:40','ENTRADA','PAGO PARCIAL',15000,'COBRO PAGO PARCIAL N°:  VENTA N°: 242','EDGAR','PAGADO','ACTIVO'),
(370,8682,'2024-07-15','18:48:40','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',20000,'ENTREGA VENTA N° 243','EDGAR','PAGADO','ACTIVO'),
(370,8683,'2024-07-15','18:50:34','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',10000,'ENTREGA VENTA N° 244','EDGAR','PAGADO','ACTIVO'),
(370,8684,'2024-07-15','18:50:50','ENTRADA','PAGO PARCIAL',10000,'COBRO PAGO PARCIAL N°:  VENTA N°: 244','EDGAR','PAGADO','ACTIVO'),
(370,8685,'2024-07-15','18:52:25','ENTRADA','PAGO PARCIAL',15000,'COBRO PAGO PARCIAL N°:  VENTA N°: 243','EDGAR','PAGADO','ACTIVO'),
(370,8686,'2024-07-15','18:53:05','ENTRADA','PAGO PARCIAL',120000,'COBRO PAGO PARCIAL N°:  VENTA N°: 244','EDGAR','PAGADO','ACTIVO'),
(370,8687,'2024-07-15','18:58:14','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',20000,'ENTREGA VENTA N° 245','EDGAR','PAGADO','ACTIVO'),
(370,8688,'2024-07-15','19:04:38','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',10000,'ENTREGA VENTA N° 246','EDGAR','PAGADO','ACTIVO'),
(370,8689,'2024-07-15','19:24:50','ENTRADA','PAGO PARCIAL',10000,'COBRO PAGO PARCIAL N°:  VENTA N°: 246','EDGAR','PAGADO','ACTIVO'),
(370,8690,'2024-07-16','00:13:03','ENTRADA','PAGO PARCIAL',25000,'COBRO PAGO PARCIAL N°:  VENTA N°: 246','EDGAR','PAGADO','ACTIVO'),
(370,8691,'2024-07-16','14:43:10','ENTRADA','PAGO PARCIAL',20000,'COBRO PAGO PARCIAL N°:  VENTA N°: 247','EDGAR','PAGADO','ACTIVO'),
(370,8692,'2024-07-18','12:58:21','ENTRADA','Ingreso de Efectivo',25000,'SENCILLO','EDGAR','PAGADO','ACTIVO'),
(370,8693,'2024-07-18','12:59:01','ENTRADA','Envio Giros Tigo',5000,'GIROS','EDGAR','A COBRAR','ACTIVO'),
(370,8694,'2024-07-18','13:01:26','ENTRADA','Envio Giros Tigo',5000,'PAGO DE CREDITO DE DIEGO ARIEL AYALA A.','EDGAR','PAGADO','ACTIVO'),
(370,8695,'2024-07-18','16:18:12','ENTRADA','ENTREGA VENTA PAGOS PARCIALES',5000,'ENTREGA VENTA N° 248','EDGAR','PAGADO','ACTIVO'),
(370,8696,'2024-07-18','16:18:50','ENTRADA','PAGO PARCIAL',105000,'COBRO PAGO PARCIAL N°:  VENTA N°: 248','EDGAR','PAGADO','ACTIVO'),
(370,8697,'2024-07-18','16:30:00','ENTRADA','PAGO PARCIAL',80000,'COBRO PAGO PARCIAL N°:  VENTA N°: 247','EDGAR','PAGADO','ACTIVO'),
(370,8698,'2024-07-18','16:31:44','ENTRADA','COBRO CUOTA',128877,'COBRO CUOTA N°: 2 VENTA N°: 217','EDGAR','PAGADO','ACTIVO'),
(370,8699,'2024-07-19','13:49:46','ENTRADA','PAGO PARCIAL',5000,'COBRO PAGO PARCIAL N°:  VENTA N°: 246','EDGAR','PAGADO','ACTIVO');

/*Table structure for table `detallesfacturascliente` */


CREATE TABLE `detallesfacturascliente` (
  `FACTURAS_CLIENTES_idfacturacliente` int(11) NOT NULL,
  `idproducto` int(11) DEFAULT NULL,
  `producto` char(150) DEFAULT NULL,
  `cantidad` float DEFAULT NULL,
  `preciounitario` int(11) DEFAULT NULL,
  `descuento` int(11) DEFAULT 0,
  `aumento` int(11) DEFAULT 0,
  `subtotal` int(11) DEFAULT NULL,
  `costo` int(11) DEFAULT NULL,
  `ganancia` int(11) GENERATED ALWAYS AS (`subtotal` - `costo` * `cantidad`) VIRTUAL,
  KEY `DETALLES_FACTURAS_CLIENTE_FKIndex1` (`FACTURAS_CLIENTES_idfacturacliente`),
  CONSTRAINT `detallesfacturascliente_ibfk_1` FOREIGN KEY (`FACTURAS_CLIENTES_idfacturacliente`) REFERENCES `facturasclientes` (`idfacturacliente`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `detallesfacturascliente` */

insert  into `detallesfacturascliente`(`FACTURAS_CLIENTES_idfacturacliente`,`idproducto`,`producto`,`cantidad`,`preciounitario`,`descuento`,`aumento`,`subtotal`,`costo`) values 
(86,149,'VIDRIO PARA SAMSUNG Y REDMI',3,15000,0,NULL,45000,2000),
(86,146,'ESTUCHE SAMSUNG Y REDMI',2,25000,0,NULL,50000,8701),
(86,144,'CELULAR REMDI 12',1,1200000,0,NULL,1200000,980000),
(86,139,'CELULAR REDMI A2',1,900000,0,NULL,900000,475000),
(86,155,'ESTUCHE IPHONE',1,30000,0,NULL,30000,14187),
(86,168,'VENTILADOR DE PIE TOKYO',1,400000,0,NULL,400000,280000),
(87,132,'CABLE V8 ECOPOWER NORMAL',1,12000,0,NULL,12000,4500),
(88,123,'SILLA PLEGABLE',2,90000,0,NULL,180000,65000),
(89,181,'PISCINA 1500LTS',1,350000,0,NULL,350000,255000),
(90,107,'OLLA ELECTRICA MAX',1,200000,0,NULL,200000,145000),
(90,137,'PENDRIVE 32 GB',1,60000,0,NULL,60000,30000),
(91,130,'CARGADOR TIPO C',1,25000,0,NULL,25000,12000),
(92,167,'TERMO PARA TERERE PALAZZO',1,160000,0,NULL,160000,110000),
(93,137,'PENDRIVE 32 GB',1,60000,0,NULL,60000,30000),
(93,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(93,129,'KARAOKE INOVA MEDIANO',1,160000,0,NULL,160000,110000),
(93,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(93,168,'VENTILADOR DE PIE TOKYO',1,400000,0,NULL,400000,280000),
(93,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(93,119,'PLANCHA BRISA',1,95000,0,NULL,95000,67000),
(94,135,'RADIO CON PEN ECOPOWER',1,110000,0,NULL,110000,70000),
(94,155,'ESTUCHE IPHONE',1,30000,0,NULL,30000,14187),
(95,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(95,137,'PENDRIVE 32 GB',1,60000,0,NULL,60000,30000),
(95,129,'KARAOKE INOVA MEDIANO',1,160000,0,NULL,160000,110000),
(96,120,'LICUADORA MAXON',1,150000,20000,NULL,130000,100000),
(96,98,'HOPPIE 800 ML',1,60000,10000,NULL,50000,35000),
(96,100,'VASO STANLEY',2,50000,20000,NULL,80000,30000),
(96,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,5000,NULL,20000,8701),
(96,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,5000,NULL,10000,2000),
(96,181,'PISCINA 1500LTS',1,350000,30000,NULL,320000,255000),
(96,171,'MATA MOSQUITO ELECTRICO',1,40000,20000,NULL,20000,27000),
(97,180,'PISCINA 1000LTS',1,290000,0,NULL,290000,205000),
(98,123,'SILLA PLEGABLE',1,90000,0,NULL,90000,65000),
(98,155,'ESTUCHE IPHONE',1,30000,0,NULL,30000,14187),
(98,149,'VIDRIO PARA SAMSUNG Y REDMI',2,15000,0,NULL,30000,2000),
(98,131,'CARGADOR V8 ECOPOWER NORMAL',1,22000,2000,NULL,20000,10000),
(99,97,'HOPPIE 750ML',6,50000,72000,NULL,228000,32000),
(99,100,'VASO STANLEY',6,50000,72000,NULL,228000,30000),
(99,137,'PENDRIVE 32 GB',1,60000,0,NULL,60000,30000),
(99,97,'HOPPIE 750ML',1,50000,0,NULL,50000,32000),
(99,112,'PLANCHITA ECOPOWER',1,100000,0,NULL,100000,77000),
(99,135,'RADIO CON PEN ECOPOWER',1,110000,10000,NULL,100000,70000),
(100,122,'VENTILADOR CONSUMER DE TECHO',1,230000,0,NULL,230000,170000),
(100,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(100,135,'RADIO CON PEN ECOPOWER',1,110000,0,NULL,110000,70000),
(100,100,'VASO STANLEY',1,50000,10000,NULL,40000,30000),
(100,120,'LICUADORA MAXON',1,150000,20000,NULL,130000,100000),
(101,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(102,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(102,161,'JUEGO DE COMEDOR 4 SILLAS',1,490000,40000,NULL,450000,370000),
(102,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(103,157,'CARGADOR SOLO CABEZA',1,20000,0,NULL,20000,11000),
(103,132,'CABLE V8 ECOPOWER NORMAL',1,12000,0,NULL,12000,4500),
(104,184,'REDMI 13C',1,1300000,0,NULL,1300000,900000),
(104,182,'CELULAR REDMI12',1,1300000,0,NULL,1300000,990000),
(105,146,'ESTUCHE SAMSUNG Y REDMI',3,25000,0,NULL,75000,8701),
(105,149,'VIDRIO PARA SAMSUNG Y REDMI',4,15000,0,NULL,60000,2000),
(105,133,'CABLE TIPO C ECOPOWER',1,15000,0,NULL,15000,6000),
(106,233,'PILA CR2032',1,10000,0,NULL,10000,2000),
(106,133,'CABLE TIPO C ECOPOWER',1,15000,0,NULL,15000,6000),
(107,267,'CARGADOR CON CABLE TIPO C',1,35000,0,NULL,35000,25000),
(107,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(107,249,'TECLADO PARA COMPU',1,70000,0,NULL,70000,43000),
(108,266,'MOCHICARTERA PARA HOMBRE',1,35000,0,NULL,35000,15000),
(109,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(110,174,'VENTILADOR ALETA METAL',1,200000,20000,NULL,180000,130000),
(111,263,'HOPPIE INFANTIL',1,54000,0,NULL,54000,34000),
(113,122,'VENTILADOR CONSUMER DE TECHO',1,230000,0,NULL,230000,170000),
(114,217,'CARDADOR PORTATIL 3 ENTRADA ECOPOWER',1,60000,0,NULL,60000,40000),
(115,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(115,99,'HOPPIE 500 ML',1,45000,0,NULL,45000,27000),
(116,241,'TIMBRE',1,50000,0,NULL,50000,31000),
(117,124,'POP ULTRA',1,25000,0,NULL,25000,15000),
(118,124,'POP ULTRA',1,25000,0,NULL,25000,15000),
(119,131,'CARGADOR V8 ECOPOWER NORMAL',1,22000,0,NULL,22000,10000),
(120,187,'CABEZAL P/ VEHICULO ECOPOWER',1,20000,0,NULL,20000,13667),
(121,134,'CABLE IPHONE',1,20000,0,NULL,20000,7000),
(122,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(123,268,'SOMBRILLA DE PLAYA',1,180000,0,NULL,180000,100000),
(124,261,'HOPPIE 900ML CON AGARRADERA',6,75000,60000,NULL,390000,52000),
(125,268,'SOMBRILLA DE PLAYA',1,180000,30000,NULL,150000,100000),
(126,269,'GUANPA CON BOMBILLA',1,45000,0,NULL,45000,26000),
(127,119,'PLANCHA BRISA',1,95000,10000,NULL,85000,67000),
(128,182,'CELULAR REDMI12',1,1300000,0,NULL,1300000,990000),
(129,263,'HOPPIE INFANTIL',1,54000,0,NULL,54000,34000),
(130,155,'ESTUCHE IPHONE',1,30000,0,NULL,30000,14187),
(131,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(132,257,'MOCHILA GRUESA',1,55000,0,NULL,55000,35000),
(133,251,'HOPPIE INOVA 1 LITRRO',2,90000,20000,NULL,160000,65000),
(134,266,'MOCHICARTERA PARA HOMBRE',1,35000,5000,NULL,30000,15000),
(135,118,'DISPENSADOR PARA AGUA',1,45000,0,NULL,45000,23000),
(136,98,'HOPPIE 800 ML',1,60000,0,NULL,60000,35000),
(137,124,'POP ULTRA',1,25000,0,NULL,25000,15000),
(138,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,2000,NULL,23000,8701),
(139,118,'DISPENSADOR PARA AGUA',1,45000,5000,NULL,40000,23000),
(140,189,'AURICULAR CON BLUETOOTH',1,90000,0,NULL,90000,55000),
(141,269,'GUANPA CON BOMBILLA',1,45000,0,NULL,45000,26000),
(142,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(143,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(144,172,'MIEL VITAL HONEY',1,90000,10000,NULL,80000,50000),
(145,150,'BOTAS DE CUERO',1,200000,0,NULL,200000,110000),
(146,150,'BOTAS DE CUERO',1,200000,0,NULL,200000,110000),
(147,97,'HOPPIE 750ML',1,50000,0,NULL,50000,32000),
(147,251,'HOPPIE INOVA 1 LITRRO',1,90000,0,NULL,90000,65000),
(148,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(148,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(149,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(150,266,'MOCHICARTERA PARA HOMBRE',1,35000,5000,NULL,30000,15000),
(151,219,'MATA MOSQUITO ECOPOWER',1,85000,5000,NULL,80000,58000),
(151,157,'CARGADOR SOLO CABEZA',1,20000,0,NULL,20000,11000),
(151,127,'KARAOKE 12 PULG ECOPOWER',1,550000,0,NULL,550000,390000),
(151,245,'ENCENDERDOR GRANDE',1,23000,3000,NULL,20000,13900),
(152,203,'LINTERNA DE POLICIA ECOPOWER',1,45000,0,NULL,45000,21000),
(152,101,'HERVIDORA',1,70000,0,NULL,70000,38000),
(152,244,'ENCENDEDOR CHICO',1,15000,0,NULL,15000,6900),
(153,270,'IPHONE 12 NORMAL 128 GB',1,3300000,0,NULL,3300000,2900000),
(154,261,'HOPPIE 900ML CON AGARRADERA',1,75000,5000,NULL,70000,52000),
(154,100,'VASO STANLEY',1,50000,5000,NULL,45000,30000),
(155,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(155,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(156,134,'CABLE IPHONE',1,20000,0,NULL,20000,7000),
(156,157,'CARGADOR SOLO CABEZA',1,20000,0,NULL,20000,11000),
(157,169,'VENTILADOR VEXTAX COMUN',1,180000,30000,NULL,150000,120000),
(158,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(158,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(158,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(158,133,'CABLE TIPO C ECOPOWER',1,15000,0,NULL,15000,6000),
(158,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(158,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(158,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(158,98,'HOPPIE 800 ML',1,60000,0,NULL,60000,46000),
(159,97,'HOPPIE 750ML',1,50000,0,NULL,50000,35000),
(160,97,'HOPPIE 750ML',1,50000,10000,NULL,40000,35000),
(160,100,'VASO STANLEY',1,50000,10000,NULL,40000,28571),
(160,261,'HOPPIE 900ML CON AGARRADERA',1,75000,5000,NULL,70000,52000),
(161,260,'CARTUCHERA CON LAPICES',1,50000,0,NULL,50000,35000),
(162,262,'TERMO STANLEY PARA TERERE',1,170000,0,NULL,170000,110000),
(163,277,'VENTILADOR RAMLUX',1,120000,0,NULL,120000,77400),
(164,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(165,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(166,277,'VENTILADOR RAMLUX',1,120000,0,NULL,120000,77400),
(167,116,'AFEITADOR WAER',1,90000,0,NULL,90000,45000),
(168,201,'SECADOR DE PELO ECOPOWER',1,95000,0,NULL,95000,62000),
(169,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(170,184,'REDMI 13C',1,1350000,0,NULL,1350000,900000),
(171,123,'SILLA PLEGABLE',1,90000,0,NULL,90000,65000),
(171,112,'PLANCHITA ECOPOWER',1,100000,0,NULL,100000,77000),
(171,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(171,156,'AUDIFONO ECOPOWER',1,15000,0,NULL,15000,8000),
(172,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(173,150,'BOTAS DE CUERO',1,200000,20000,NULL,180000,110000),
(174,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(175,137,'PENDRIVE 32 GB',1,60000,0,NULL,60000,30000),
(176,271,'IPHONE 11 NORMAL 128GB',1,2800000,0,NULL,2800000,2500000),
(177,134,'CABLE IPHONE',1,20000,0,NULL,20000,7000),
(178,146,'ESTUCHE SAMSUNG Y REDMI',1,25000,0,NULL,25000,8701),
(179,190,'PENDRIVE 16GB',1,45000,0,NULL,45000,23000),
(180,133,'CABLE TIPO C ECOPOWER',1,15000,0,NULL,15000,6000),
(181,118,'DISPENSADOR PARA AGUA',1,45000,5000,NULL,40000,23000),
(182,277,'VENTILADOR RAMLUX',1,120000,0,NULL,120000,77400),
(183,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(184,97,'HOPPIE 750ML',1,50000,0,NULL,50000,35000),
(185,100,'VASO STANLEY',1,50000,0,NULL,50000,28571),
(186,247,'TAPETE',1,28000,0,NULL,28000,16800),
(187,100,'VASO STANLEY',1,50000,0,NULL,50000,20000),
(188,99,'HOPPIE 500 ML',1,45000,0,NULL,45000,27000),
(189,269,'GUANPA CON BOMBILLA',1,45000,0,NULL,45000,26000),
(190,172,'MIEL VITAL HONEY',1,90000,10000,NULL,80000,50000),
(191,193,'KARAOKE INOVA 6.5\"',1,180000,0,NULL,180000,115000),
(192,100,'VASO STANLEY',1,50000,0,NULL,50000,20000),
(193,263,'HOPPIE INFANTIL',1,54000,0,NULL,54000,34000),
(194,261,'HOPPIE 900ML CON AGARRADERA',1,75000,0,NULL,75000,52000),
(195,139,'CELULAR REDMI A2',1,900000,0,NULL,900000,475000),
(196,149,'VIDRIO PARA SAMSUNG Y REDMI',1,15000,0,NULL,15000,2000),
(197,169,'VENTILADOR VEXTAX COMUN',1,180000,30000,NULL,150000,120000),
(198,97,'HOPPIE 750ML',1,50000,0,NULL,50000,35000),
(199,276,'HOPPI 350 ML',1,58000,0,NULL,58000,38000),
(200,100,'VASO STANLEY',1,50000,0,NULL,50000,20000),
(201,266,'MOCHICARTERA PARA HOMBRE',1,35000,0,NULL,35000,15000),
(202,264,'PLANCHITA ORIGINAL BABYLYSS',1,980000,0,NULL,980000,820000),
(203,173,'CORTA PELO 3 EN 1',1,90000,0,NULL,90000,50000),
(204,201,'SECADOR DE PELO ECOPOWER',1,95000,5000,NULL,90000,62000),
(205,99,'HOPPIE 500 ML',1,45000,0,NULL,45000,27000),
(206,144,'CELULAR REMDI 12',1,1350000,0,NULL,1350000,980000),
(207,98,'HOPPIE 800 ML',1,60000,0,NULL,60000,46000),
(208,100,'VASO STANLEY',1,50000,0,NULL,50000,20000),
(209,98,'HOPPIE 800 ML',1,60000,2000,NULL,58000,46000),
(210,116,'AFEITADOR WAER',1,90000,0,NULL,90000,45000),
(211,156,'AUDIFONO ECOPOWER',1,15000,0,NULL,15000,8000),
(212,277,'VENTILADOR RAMLUX',1,120000,0,NULL,120000,77400),
(213,134,'CABLE IPHONE',1,20000,0,NULL,20000,7000),
(214,159,'ROPERO 2 CUERPO',1,390000,0,NULL,390000,250000),
(215,116,'AFEITADOR WAER',1,90000,0,NULL,90000,45000),
(216,97,'HOPPIE 750ML',1,50000,0,NULL,50000,35000),
(217,125,'TERMO STANLUX',1,170000,0,NULL,170000,110000),
(218,261,'HOPPIE 900ML CON AGARRADERA',1,75000,5000,NULL,70000,13000),
(219,261,'HOPPIE 900ML CON AGARRADERA',1,75000,5000,NULL,70000,13000),
(220,99,'HOPPIE 500 ML',1,45000,0,NULL,45000,27000),
(221,100,'VASO STANLEY',1,50000,10000,NULL,40000,20000),
(222,97,'HOPPIE 750ML',1,50000,0,NULL,50000,35000),
(223,100,'VASO STANLEY',1,50000,0,NULL,50000,20000),
(224,100,'VASO STANLEY',1,50000,0,NULL,50000,20000),
(225,98,'HOPPIE 800 ML',1,60000,2000,NULL,58000,46000),
(226,98,'HOPPIE 800 ML',1,60000,2000,NULL,58000,46000),
(227,98,'HOPPIE 800 ML',1,60000,2000,NULL,58000,46000),
(228,261,'HOPPIE 900ML CON AGARRADERA',1,75000,0,NULL,75000,13000),
(229,261,'HOPPIE 900ML CON AGARRADERA',1,75000,5000,NULL,70000,13000),
(230,128,'KARAOKE INOVA CHICO',1,95000,0,NULL,95000,68000),
(231,175,'JBL ORIGINAL GO3',1,320000,0,NULL,320000,240000),
(232,269,'GUANPA CON BOMBILLA',2,45000,0,NULL,90000,26000),
(233,139,'CELULAR REDMI A2',1,900000,100000,NULL,800000,475000),
(233,149,'VIDRIO PARA SAMSUNG Y REDMI',2,15000,5000,NULL,25000,2000),
(243,289,'PRODUCTO DE LIMPIEZA',1,60000,0,NULL,60000,50000),
(243,289,'PRODUCTO DE LIMPIEZA',1,60000,0,NULL,60000,50000),
(244,288,'AURICULAR BLUETOOTH INALAMBRICO',1,80000,0,NULL,80000,50000),
(244,289,'PRODUCTO DE LIMPIEZA',1,60000,0,NULL,60000,50000),
(245,288,'AURICULAR BLUETOOTH INALAMBRICO',1,80000,0,NULL,100000,50000),
(246,288,'AURICULAR BLUETOOTH INALAMBRICO',1,80000,0,20000,100000,50000),
(247,288,'AURICULAR BLUETOOTH INALAMBRICO',1,80000,0,20000,100000,50000);

/*Table structure for table `detallesfacturasproveedores` */


CREATE TABLE `detallesfacturasproveedores` (
  `FACTURAS_PROVEEDORES_idfacturaproveedor` int(10) unsigned NOT NULL,
  `idproducto` int(11) DEFAULT NULL,
  `producto` char(150) DEFAULT NULL,
  `cantidad` int(11) DEFAULT NULL,
  `preciounitario` int(11) DEFAULT NULL,
  `subtotal` int(11) DEFAULT NULL,
  KEY `DETALLES_FACTURAS_PROVEEDORES_FKIndex1` (`FACTURAS_PROVEEDORES_idfacturaproveedor`),
  CONSTRAINT `detallesfacturasproveedores_ibfk_1` FOREIGN KEY (`FACTURAS_PROVEEDORES_idfacturaproveedor`) REFERENCES `facturasproveedores` (`idfacturaproveedor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `detallesfacturasproveedores` */

insert  into `detallesfacturasproveedores`(`FACTURAS_PROVEEDORES_idfacturaproveedor`,`idproducto`,`producto`,`cantidad`,`preciounitario`,`subtotal`) values 
(18,146,'ESTUCHE SAMSUNG Y REDMI',15,9000,135000),
(18,155,'ESTUCHE IPHONE',3,15000,45000),
(18,137,'PENDRIVE 32 GB',5,25000,125000),
(18,100,'VASO STANLEY',10,30000,300000),
(19,146,'ESTUCHE SAMSUNG Y REDMI',12,10000,120000),
(19,155,'ESTUCHE IPHONE',3,15000,45000),
(20,117,'AFEITADOR HWT9',10,7500,75000),
(21,187,'CABEZAL P/ VEHICULO ECOPOWER',5,17000,85000),
(22,100,'VASO STANLEY',10,28000,280000),
(23,277,'VENTILADOR RAMLUX',1,0,0),
(24,261,'HOPPIE 900ML CON AGARRADERA',15,0,0),
(25,155,'ESTUCHE IPHONE',9,15000,135000),
(25,146,'ESTUCHE SAMSUNG Y REDMI',10,10000,100000),
(26,116,'AFEITADOR WAER',1,45000,45000);

/*Table structure for table `detallespagosparciales` */


CREATE TABLE `detallespagosparciales` (
  `idtransaccion` int(11) NOT NULL AUTO_INCREMENT,
  `idfacturacliente` int(11) DEFAULT NULL,
  `pagonum` int(11) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `total` int(11) DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `saldo` int(11) DEFAULT NULL,
  `usuario` char(30) DEFAULT NULL,
  PRIMARY KEY (`idtransaccion`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `detallespagosparciales` */

insert  into `detallespagosparciales`(`idtransaccion`,`idfacturacliente`,`pagonum`,`fecha`,`total`,`monto`,`saldo`,`usuario`) values 
(8,243,1,'2024-07-15',120000,20000,100000,'EDGAR'),
(10,244,1,'2024-07-15',140000,10000,130000,'EDGAR'),
(11,244,2,'2024-07-15',130000,10000,120000,'EDGAR'),
(12,243,2,'2024-07-15',100000,15000,85000,'EDGAR'),
(13,244,3,'2024-07-15',120000,120000,0,'EDGAR'),
(14,245,1,'2024-07-15',100000,20000,80000,'EDGAR'),
(15,246,1,'2024-07-15',100000,10000,90000,'EDGAR'),
(16,246,2,'2024-07-15',90000,10000,80000,'EDGAR'),
(17,246,3,'2024-07-16',80000,25000,55000,'EDGAR'),
(18,247,1,'2024-07-16',100000,20000,80000,'EDGAR'),
(21,247,2,'2024-07-18',80000,80000,0,'EDGAR'),
(22,246,4,'2024-07-19',55000,5000,50000,'EDGAR');

/*Table structure for table `empresa` */


CREATE TABLE `empresa` (
  `ruc` char(30) NOT NULL,
  `empresa` char(50) NOT NULL,
  `direccion` char(200) NOT NULL,
  `actividades` char(250) DEFAULT NULL,
  `telefono` char(15) DEFAULT NULL,
  `ciudad` char(50) DEFAULT NULL,
  `timbrado` char(10) NOT NULL,
  `iniciovigencia` date DEFAULT NULL,
  `finvigencia` date DEFAULT NULL,
  `rangofactura` char(10) DEFAULT NULL,
  `nrofacturaactual` char(10) DEFAULT NULL,
  `ultbackup` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `empresa` */

insert  into `empresa`(`ruc`,`empresa`,`direccion`,`actividades`,`telefono`,`ciudad`,`timbrado`,`iniciovigencia`,`finvigencia`,`rangofactura`,`nrofacturaactual`,`ultbackup`) values 
('4701715-5','Comercial EP','Francisco Velasquez y 15 de Agosto','Comercio al por Menor de Otros Productosen Comercios no Especializados - Comercio de Motocicletas y de sus Piezas y Accesorios - Comercio al por Menor de Equipos Informáticos y software','(0982) 127 255','YATAITY','','0000-00-00','0000-00-00','001-001','001-0','2023-03-11'),
('','','',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL);

/*Table structure for table `estados` */


CREATE TABLE `estados` (
  `idestado` int(11) NOT NULL AUTO_INCREMENT,
  `estado` char(15) DEFAULT NULL,
  PRIMARY KEY (`idestado`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `estados` */

insert  into `estados`(`idestado`,`estado`) values 
(0,'INACTIVO'),
(1,'ACTIVO');

/*Table structure for table `facturasclientes` */


CREATE TABLE `facturasclientes` (
  `idfacturacliente` int(11) NOT NULL AUTO_INCREMENT,
  `idcliente` int(11) DEFAULT NULL,
  `clienteruc` char(20) DEFAULT NULL,
  `clientedescripcion` char(50) DEFAULT NULL,
  `facturaclientetipo` char(20) DEFAULT NULL,
  `facturaclientenro` char(20) DEFAULT NULL,
  `facturaclientefecha` date DEFAULT NULL,
  `facturaclientetotal` int(11) DEFAULT NULL,
  `facturaclienteestado` char(20) DEFAULT 'ACTIVO',
  `proxvencimiento` date DEFAULT NULL,
  `usuario` char(20) DEFAULT NULL,
  `estadopago` char(20) DEFAULT 'PAGADO',
  `entrega` int(11) DEFAULT NULL,
  `diasatraso` int(11) GENERATED ALWAYS AS (if(`estadopago` = 'PENDIENTE',if(to_days(curdate()) - to_days(`proxvencimiento`) < 0,'0',to_days(curdate()) - to_days(`proxvencimiento`)),0)) VIRTUAL,
  `fechaaviso` date DEFAULT NULL,
  `montopagado` int(11) DEFAULT 0,
  `saldo` int(11) GENERATED ALWAYS AS (`facturaclientetotal` - `montopagado`) VIRTUAL,
  PRIMARY KEY (`idfacturacliente`)
) ENGINE=InnoDB AUTO_INCREMENT=249 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `facturasclientes` */

insert  into `facturasclientes`(`idfacturacliente`,`idcliente`,`clienteruc`,`clientedescripcion`,`facturaclientetipo`,`facturaclientenro`,`facturaclientefecha`,`facturaclientetotal`,`facturaclienteestado`,`proxvencimiento`,`usuario`,`estadopago`,`entrega`,`fechaaviso`,`montopagado`) values 
(86,0,'0','CLIENTE OCASIONAL','CONTADO','','2023-12-23',2625000,'ACTIVO',NULL,'YENI','PAGADO',2625000,NULL,0),
(87,0,'0','CLIENTE OCASIONAL','CONTADO','','2023-12-24',12000,'ACTIVO',NULL,'YENI','PAGADO',12000,NULL,12000),
(88,12,'5183772','JONATHAN LUIS BOBADILLA','CREDITO','','2024-01-18',184500,'ACTIVO','2024-01-30','YENI','PAGADO',90000,'2024-01-18',0),
(89,13,'3702968','LISSI ZORAIDA AGUERO','CREDITO','','2024-01-18',371600,'ACTIVO','2024-03-07','YENI','PENDIENTE',134000,'2024-01-18',0),
(90,0,'0','CLIENTE OCASIONAL','CONTADO','','2023-12-26',260000,'ACTIVO',NULL,'YENI','PAGADO',260000,NULL,0),
(91,0,'0','CLIENTE OCASIONAL','CONTADO','','2023-12-27',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(92,0,'0','CLIENTE OCASIONAL','CONTADO','','2023-12-28',160000,'ACTIVO',NULL,'YENI','PAGADO',160000,NULL,0),
(93,0,'0','CLIENTE OCASIONAL','CONTADO','','2023-12-30',1100000,'ACTIVO',NULL,'YENI','PAGADO',1100000,NULL,0),
(94,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-02',140000,'ACTIVO',NULL,'YENI','PAGADO',140000,NULL,0),
(95,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-04',245000,'ACTIVO',NULL,'YENI','PAGADO',245000,NULL,0),
(96,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-05',630000,'ACTIVO',NULL,'YENI','PAGADO',630000,NULL,0),
(97,14,'5352001','MARIA RAMONA BORJA','CREDITO','','2024-01-18',307800,'ACTIVO','2024-03-07','YENI','PENDIENTE',112000,'2024-01-18',0),
(98,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-06',170000,'ACTIVO',NULL,'YENI','PAGADO',170000,NULL,0),
(99,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-08',766000,'ACTIVO',NULL,'YENI','PAGADO',766000,NULL,0),
(100,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-09',690000,'ACTIVO',NULL,'YENI','PAGADO',690000,NULL,0),
(101,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-10',180000,'ACTIVO',NULL,'YENI','PAGADO',180000,NULL,0),
(102,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-11',645000,'ACTIVO',NULL,'YENI','PAGADO',645000,NULL,0),
(103,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-12',32000,'ACTIVO',NULL,'YENI','PAGADO',32000,NULL,0),
(104,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-13',2600000,'ACTIVO',NULL,'YENI','PAGADO',2600000,NULL,0),
(105,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-15',150000,'ACTIVO',NULL,'YENI','PAGADO',150000,NULL,0),
(106,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-17',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(107,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-18',120000,'ACTIVO',NULL,'YENI','PAGADO',120000,NULL,0),
(108,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-19',35000,'ACTIVO',NULL,'YENI','PAGADO',35000,NULL,0),
(109,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-19',180000,'ACTIVO',NULL,'YENI','PAGADO',180000,NULL,0),
(110,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-20',180000,'ACTIVO',NULL,'YENI','PAGADO',180000,NULL,0),
(111,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-20',54000,'ACTIVO',NULL,'YENI','PAGADO',54000,NULL,0),
(113,15,'2515058','MARILINA ROSA FERNANDEZ SANCHEZ','CREDITO','','2024-01-20',235175,'ACTIVO','2024-02-20','YENI','PAGADO',126500,'2024-01-20',0),
(114,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-22',60000,'ACTIVO',NULL,'YENI','PAGADO',60000,NULL,0),
(115,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-22',60000,'ACTIVO',NULL,'YENI','PAGADO',60000,NULL,0),
(116,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-23',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(117,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-23',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(118,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-23',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(119,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-23',22000,'ACTIVO',NULL,'YENI','PAGADO',22000,NULL,0),
(120,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-24',20000,'ACTIVO',NULL,'YENI','PAGADO',20000,NULL,0),
(121,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-24',20000,'ACTIVO',NULL,'YENI','PAGADO',20000,NULL,0),
(122,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-25',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(123,16,'3253767','ROSANA GIMENEZ','CREDITO','','2024-01-25',205200,'ACTIVO','2024-02-25','YENI','PAGADO',0,'2024-01-25',0),
(124,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-25',390000,'ACTIVO',NULL,'YENI','PAGADO',390000,NULL,0),
(125,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-25',150000,'ACTIVO',NULL,'YENI','PAGADO',150000,NULL,0),
(126,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-26',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(127,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-27',85000,'ACTIVO',NULL,'YENI','PAGADO',85000,NULL,0),
(128,17,'7816726','CARLOS ARIEL ALFONZO CARDOZO','CREDITO','','2024-01-27',1482000,'ACTIVO','2024-02-25','EDGAR','PAGADO',0,'2024-01-27',0),
(129,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-27',54000,'ACTIVO',NULL,'EDGAR','PAGADO',54000,NULL,0),
(130,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-27',30000,'ACTIVO',NULL,'EDGAR','PAGADO',30000,NULL,0),
(131,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-27',15000,'ACTIVO',NULL,'EDGAR','PAGADO',15000,NULL,0),
(132,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-27',55000,'ACTIVO',NULL,'YENI','PAGADO',55000,NULL,0),
(133,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-27',160000,'ACTIVO',NULL,'YENI','PAGADO',160000,NULL,0),
(134,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-29',30000,'ACTIVO',NULL,'YENI','PAGADO',30000,NULL,0),
(135,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-29',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(136,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-30',60000,'ACTIVO',NULL,'YENI','PAGADO',60000,NULL,0),
(137,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-30',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(138,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-30',23000,'ACTIVO',NULL,'YENI','PAGADO',23000,NULL,0),
(139,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-30',40000,'ACTIVO',NULL,'YENI','PAGADO',40000,NULL,0),
(140,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-01-31',90000,'ACTIVO',NULL,'YENI','PAGADO',90000,NULL,0),
(141,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-01',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(142,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-02',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(143,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',15000,'ACTIVO',NULL,'YENI','PAGADO',15000,NULL,0),
(144,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',80000,'ACTIVO',NULL,'YENI','PAGADO',80000,NULL,0),
(145,18,'5474591','PABLO DARIO MOSQUEIRA PORTILLO','CREDITO','','2024-02-03',228000,'ACTIVO','2024-03-05','YENI','PAGADO',0,'2024-02-03',0),
(146,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',200000,'ACTIVO',NULL,'YENI','PAGADO',200000,NULL,0),
(147,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',140000,'ACTIVO',NULL,'YENI','PAGADO',140000,NULL,0),
(148,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',40000,'ACTIVO',NULL,'YENI','PAGADO',40000,NULL,0),
(149,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',15000,'ACTIVO',NULL,'YENI','PAGADO',15000,NULL,0),
(150,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-03',30000,'ACTIVO',NULL,'YENI','PAGADO',30000,NULL,0),
(151,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-05',670000,'ACTIVO',NULL,'YENI','PAGADO',670000,NULL,0),
(152,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-06',130000,'ACTIVO',NULL,'YENI','PAGADO',130000,NULL,0),
(153,19,'5056590','LUCIA ELIZABEHT LEGAL SANCHEZ','CREDITO','','2024-02-08',4224000,'ACTIVO','2024-03-10','YENI','PENDIENTE',0,'2024-02-08',0),
(154,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-08',115000,'ACTIVO',NULL,'YENI','PAGADO',115000,NULL,0),
(155,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-08',40000,'ACTIVO',NULL,'YENI','PAGADO',40000,NULL,0),
(156,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-09',40000,'ACTIVO',NULL,'YENI','PAGADO',40000,NULL,0),
(157,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-09',150000,'ACTIVO',NULL,'YENI','PAGADO',150000,NULL,0),
(158,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-10',280000,'ACTIVO',NULL,'YENI','PAGADO',280000,NULL,0),
(159,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-12',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(160,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-12',150000,'ACTIVO',NULL,'YENI','PAGADO',150000,NULL,0),
(161,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-12',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(162,20,'1949867','REINERIO LANDAIDA BOGADO','CREDITO','','2024-02-13',193800,'ACTIVO','2024-03-15','YENI','PENDIENTE',0,'2024-02-13',0),
(163,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-13',120000,'ACTIVO',NULL,'EDGAR','PAGADO',120000,NULL,0),
(164,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-13',50000,'ACTIVO',NULL,'EDGAR','PAGADO',50000,NULL,0),
(165,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-13',50000,'ACTIVO',NULL,'EDGAR','PAGADO',50000,NULL,0),
(166,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-13',120000,'ACTIVO',NULL,'EDGAR','PAGADO',120000,NULL,0),
(167,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-13',90000,'ACTIVO',NULL,'EDGAR','PAGADO',90000,NULL,0),
(168,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-14',95000,'ACTIVO',NULL,'YENI','PAGADO',95000,NULL,0),
(169,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-14',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(170,21,'7147335','MIRTHA ANTONIA BARRETO DE REYES','CREDITO','','2024-02-14',1728000,'ACTIVO','2024-03-16','YENI','PENDIENTE',0,'2024-02-14',0),
(171,22,'6505136','YENIFER MARICRUZ PORTILLO PORTILLO','CREDITO','','2024-02-14',308550,'ACTIVO','2024-03-16','YENI','PRODUCTO RETIRADO',0,'2024-02-14',0),
(172,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-14',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(173,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-15',180000,'ACTIVO',NULL,'YENI','PAGADO',180000,NULL,0),
(174,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-15',15000,'ACTIVO',NULL,'YENI','PAGADO',15000,NULL,0),
(175,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-15',60000,'ACTIVO',NULL,'YENI','PAGADO',60000,NULL,0),
(176,23,'4811157','LIZ ROSSANA ESCOBAR BORJA','CREDITO','','2024-02-17',3192000,'ACTIVO','2024-03-19','EDGAR','PENDIENTE',0,'2024-02-17',0),
(177,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-17',20000,'ACTIVO',NULL,'EDGAR','PAGADO',20000,NULL,0),
(178,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-19',25000,'ACTIVO',NULL,'YENI','PAGADO',25000,NULL,0),
(179,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-19',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(180,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-19',15000,'ACTIVO',NULL,'YENI','PAGADO',15000,NULL,0),
(181,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-19',40000,'ACTIVO',NULL,'YENI','PAGADO',40000,NULL,0),
(182,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-19',120000,'ACTIVO',NULL,'YENI','PAGADO',120000,NULL,0),
(183,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-19',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(184,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-20',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(185,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-20',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(186,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-20',28000,'ACTIVO',NULL,'YENI','PAGADO',28000,NULL,0),
(187,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-20',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(188,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-21',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(189,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-21',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(190,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-21',80000,'ACTIVO',NULL,'YENI','PAGADO',80000,NULL,0),
(191,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-21',180000,'ACTIVO',NULL,'YENI','PAGADO',180000,NULL,0),
(192,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-21',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(193,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-22',54000,'ACTIVO',NULL,'YENI','PAGADO',54000,NULL,0),
(194,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-23',75000,'ACTIVO',NULL,'YENI','PAGADO',75000,NULL,0),
(195,24,'1505854','MARIA DOMINICA LOPEZ DE ALDERETE','CREDITO','','2024-02-23',1152000,'ACTIVO','2024-03-25','YENI','PRODUCTO RETIRADO',0,'2024-02-23',0),
(196,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-23',15000,'ACTIVO',NULL,'YENI','PAGADO',15000,NULL,0),
(197,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-23',150000,'ACTIVO',NULL,'YENI','PAGADO',150000,NULL,0),
(198,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-23',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(199,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-23',58000,'ACTIVO',NULL,'YENI','PAGADO',58000,NULL,0),
(200,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-23',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(201,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-24',35000,'ACTIVO',NULL,'YENI','PAGADO',35000,NULL,0),
(202,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-24',980000,'ACTIVO',NULL,'YENI','PAGADO',980000,NULL,0),
(203,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-24',90000,'ACTIVO',NULL,'YENI','PAGADO',90000,NULL,0),
(204,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-24',90000,'ACTIVO',NULL,'YENI','PAGADO',90000,NULL,0),
(205,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-24',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(206,25,'4457852','MARIZA DE OLIVEIRA','CREDITO','','2024-02-26',1917000,'ACTIVO','2024-03-28','YENI','PENDIENTE',0,'2024-02-26',0),
(207,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-26',60000,'ACTIVO',NULL,'YENI','PAGADO',60000,NULL,0),
(208,22,'6505136','YENIFER MARICRUZ PORTILLO PORTILLO','CREDITO','','2024-02-26',57000,'ACTIVO','2024-02-26','YENI','PENDIENTE',0,'2024-02-26',0),
(209,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-26',58000,'ACTIVO',NULL,'YENI','PAGADO',58000,NULL,0),
(210,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-26',90000,'ACTIVO',NULL,'YENI','PAGADO',90000,NULL,0),
(211,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-27',15000,'ACTIVO',NULL,'YENI','PAGADO',15000,NULL,0),
(212,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-27',120000,'ACTIVO',NULL,'YENI','PAGADO',120000,NULL,0),
(213,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-27',20000,'ACTIVO',NULL,'YENI','PAGADO',20000,NULL,0),
(214,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-27',390000,'ACTIVO',NULL,'YENI','PAGADO',390000,NULL,0),
(215,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-27',90000,'ACTIVO',NULL,'YENI','PAGADO',90000,NULL,0),
(216,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(217,26,'5227304','ILSE GOIRIS','CREDITO','','2024-02-28',193800,'ACTIVO','2024-03-30','YENI','PAGADO',0,'2024-02-28',193800),
(218,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',70000,'ACTIVO',NULL,'YENI','PAGADO',70000,NULL,0),
(219,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',70000,'ACTIVO',NULL,'YENI','PAGADO',70000,NULL,0),
(220,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',45000,'ACTIVO',NULL,'YENI','PAGADO',45000,NULL,0),
(221,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',40000,'ACTIVO',NULL,'YENI','PAGADO',40000,NULL,0),
(222,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(223,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(224,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',50000,'ACTIVO',NULL,'YENI','PAGADO',50000,NULL,0),
(225,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',58000,'ACTIVO',NULL,'YENI','PAGADO',58000,NULL,0),
(226,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',58000,'ACTIVO',NULL,'YENI','PAGADO',58000,NULL,0),
(227,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',58000,'ACTIVO',NULL,'YENI','PAGADO',58000,NULL,0),
(228,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-28',75000,'ACTIVO',NULL,'YENI','PAGADO',75000,NULL,0),
(229,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-29',70000,'ACTIVO',NULL,'YENI','PAGADO',70000,NULL,0),
(230,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-02-29',95000,'ACTIVO',NULL,'YENI','PAGADO',95000,NULL,0),
(231,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-03-01',320000,'ACTIVO',NULL,'YENI','PAGADO',320000,NULL,0),
(232,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-03-01',90000,'ACTIVO',NULL,'YENI','PAGADO',90000,NULL,0),
(233,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-03-01',825000,'ACTIVO',NULL,'YENI','PAGADO',825000,NULL,0),
(234,0,'0','CLIENTE OCASIONAL','CONTADO','','2024-07-14',70000,'ACTIVO',NULL,'EDGAR','PAGADO',70000,NULL,0),
(243,1,'5183269-0','DIEGO ARIEL AYALA A.','PAGOS PARCIALES','','2024-07-15',120000,'ACTIVO','2024-09-15','EDGAR','PRODUCTO RETIRADO',20000,NULL,35000),
(244,26,'5227304','ILSE GOIRIS','PAGOS PARCIALES','','2024-07-15',140000,'ACTIVO','2024-09-15','EDGAR','PAGADO',10000,NULL,140000),
(245,17,'7816726','CARLOS ARIEL ALFONZO CARDOZO','PAGOS PARCIALES','','2024-07-15',100000,'ACTIVO','2024-08-15','EDGAR','PENDIENTE',20000,NULL,20000),
(246,26,'5227304','ILSE GOIRIS','PAGOS PARCIALES','','2024-07-15',100000,'ACTIVO','2024-11-16','EDGAR','PENDIENTE',10000,NULL,50000),
(247,17,'7816726','CARLOS ARIEL ALFONZO CARDOZO','PAGOS PARCIALES','','2024-07-16',100000,'ACTIVO','2024-09-16','EDGAR','PAGADO',0,NULL,100000);

/*Table structure for table `facturasproveedores` */


CREATE TABLE `facturasproveedores` (
  `idfacturaproveedor` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `idproveedor` int(11) DEFAULT NULL,
  `proveedorruc` char(20) DEFAULT NULL,
  `proveedordescripcion` char(70) DEFAULT NULL,
  `facturaproveedortipo` char(20) DEFAULT NULL,
  `facturaproveedornro` char(20) DEFAULT NULL,
  `facturaproveedorfecha` date DEFAULT NULL,
  `facturaproveedortotal` int(11) DEFAULT NULL,
  `facturaproveedorestado` char(20) DEFAULT 'ACTIVO',
  `usuario` char(20) DEFAULT NULL,
  PRIMARY KEY (`idfacturaproveedor`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `facturasproveedores` */

insert  into `facturasproveedores`(`idfacturaproveedor`,`idproveedor`,`proveedorruc`,`proveedordescripcion`,`facturaproveedortipo`,`facturaproveedornro`,`facturaproveedorfecha`,`facturaproveedortotal`,`facturaproveedorestado`,`usuario`) values 
(18,0,'0','SIN PROVEEDOR','CONTADO','','2024-01-15',605000,'ACTIVO','MABEL'),
(19,1,'5183269-0','DA EMPRENDIMIENTOS','CONTADO','','2024-01-15',165000,'ACTIVO','MABEL'),
(20,0,'0','SIN PROVEEDOR','CONTADO','','2024-01-16',75000,'ACTIVO','EDGAR'),
(21,0,'0','SIN PROVEEDOR','CONTADO','','2024-01-16',85000,'ACTIVO','EDGAR'),
(22,0,'0','SIN PROVEEDOR','CONTADO','','2024-02-10',280000,'ACTIVO','MABEL'),
(23,0,'0','SIN PROVEEDOR','CONTADO','','2024-02-13',0,'ACTIVO','EDGAR'),
(24,0,'0','SIN PROVEEDOR','CONTADO','','2024-02-27',0,'ACTIVO','MABEL'),
(25,0,'0','SIN PROVEEDOR','CONTADO','','2024-02-29',235000,'ACTIVO','MABEL'),
(26,0,'0','SIN PROVEEDOR','CONTADO','','2024-03-02',45000,'ACTIVO','EDGAR');

/*Table structure for table `marcas` */


CREATE TABLE `marcas` (
  `idmarca` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `marca` char(40) DEFAULT NULL,
  PRIMARY KEY (`idmarca`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `marcas` */

insert  into `marcas`(`idmarca`,`marca`) values 
(0,'SIN MARCA'),
(1,'SAMSUNG'),
(2,'IPHONE'),
(3,'TOKYO'),
(5,'CONSUL'),
(7,'ECOPOWER'),
(8,'LUO'),
(9,'INOVA'),
(10,'GECKO'),
(11,'CAFINI'),
(12,'SANDISK'),
(13,'MAXON'),
(14,'GO-LINE'),
(15,'JIEXIN'),
(16,'WEIBO'),
(17,'SATE'),
(18,'HAVIT'),
(19,'RECRSI'),
(20,'TUKANA'),
(21,'QUANTA'),
(22,'STANLEY'),
(23,'JBL'),
(24,'TP-LINK'),
(25,'GOLDENULTRA'),
(26,'VCP');

/*Table structure for table `pagos` */


CREATE TABLE `pagos` (
  `idpago` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `FACTURAS_CLIENTES_idfacturacliente` int(11) NOT NULL,
  `codtransaccion` char(20) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `hora` time DEFAULT NULL,
  `usuario` char(20) DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `cuotanro` int(11) DEFAULT NULL,
  `observacion` char(30) DEFAULT NULL,
  PRIMARY KEY (`idpago`),
  KEY `PAGOS_FKIndex1` (`FACTURAS_CLIENTES_idfacturacliente`),
  CONSTRAINT `pagos_ibfk_1` FOREIGN KEY (`FACTURAS_CLIENTES_idfacturacliente`) REFERENCES `facturasclientes` (`idfacturacliente`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `pagos` */

/*Table structure for table `productos` */


CREATE TABLE `productos` (
  `idproducto` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `productocodigo` char(50) DEFAULT NULL,
  `productodescripcion` char(100) DEFAULT NULL,
  `productomarca` char(40) DEFAULT NULL,
  `productocategoria` char(40) DEFAULT NULL,
  `productopreciocompra` int(11) DEFAULT NULL,
  `productoprecioventa` int(11) DEFAULT NULL,
  `productostock` int(11) DEFAULT NULL,
  `productominimo` int(11) DEFAULT NULL,
  `productoestado` char(20) DEFAULT 'ACTIVO',
  `productofoto` longblob DEFAULT NULL,
  `ganancia` int(11) GENERATED ALWAYS AS ((`productoprecioventa` - `productopreciocompra`) * 100 / `productopreciocompra`) VIRTUAL,
  `productoventasemanal` char(2) DEFAULT 'NO',
  PRIMARY KEY (`idproducto`)
) ENGINE=InnoDB AUTO_INCREMENT=290 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `productos` */

insert  into `productos`(`idproducto`,`productocodigo`,`productodescripcion`,`productomarca`,`productocategoria`,`productopreciocompra`,`productoprecioventa`,`productostock`,`productominimo`,`productoestado`,`productofoto`,`productoventasemanal`) values 
(97,'HOP002','HOPPIE 750ML','SIN MARCA','SIN CATEGORIA',35000,50000,6,1,'ACTIVO',NULL,'NO'),
(98,'HOP001','HOPPIE 800 ML','SIN MARCA','SIN CATEGORIA',46000,60000,7,1,'ACTIVO',NULL,'NO'),
(99,'HOP003','HOPPIE 500 ML','SIN MARCA','SIN CATEGORIA',27000,45000,6,1,'ACTIVO',NULL,'NO'),
(100,'STAN001','VASO STANLEY','SIN MARCA','SIN CATEGORIA',20000,50000,57,1,'ACTIVO',NULL,'NO'),
(101,'HER001','HERVIDORA','SIN MARCA','SIN CATEGORIA',38000,70000,9,1,'ACTIVO',NULL,'NO'),
(102,'CON001','CONSERVADORA 4LTS','SIN MARCA','SIN CATEGORIA',45000,70000,3,1,'ACTIVO',NULL,'NO'),
(103,'PIP001','PIPOKERA MACHINE','SIN MARCA','SIN CATEGORIA',77000,110000,3,1,'ACTIVO',NULL,'NO'),
(104,'MIX001','MIXTERA BRISA','SIN MARCA','SIN CATEGORIA',67000,95000,5,1,'ACTIVO',NULL,'NO'),
(105,'BAT001','BATIDORA MAX','SIN MARCA','SIN CATEGORIA',55000,85000,3,1,'ACTIVO',NULL,'NO'),
(106,'EXP001','EXPRIMIDOR NOVEL','SIN MARCA','SIN CATEGORIA',55000,80000,1,1,'ACTIVO',NULL,'NO'),
(107,'OLL001','OLLA ELECTRICA MAX','SIN MARCA','SIN CATEGORIA',145000,200000,0,1,'ACTIVO',NULL,'NO'),
(108,'OLL002','OLLA ELECTRICA UTILITY','SIN MARCA','SIN CATEGORIA',145000,200000,1,1,'ACTIVO',NULL,'NO'),
(109,'PLA001','PLACA ELECTRICA MAX','SIN MARCA','SIN CATEGORIA',140000,195000,10,1,'ACTIVO',NULL,'NO'),
(110,'HOR001','HORNO ELECTRICO NAPPO 36LTS','SIN MARCA','SIN CATEGORIA',410000,510000,1,1,'ACTIVO',NULL,'NO'),
(111,'PLAN001','PLANCHITA BABYLISS','SIN MARCA','SIN CATEGORIA',55000,80000,3,1,'ACTIVO',NULL,'NO'),
(112,'PLAN002','PLANCHITA ECOPOWER','SIN MARCA','SIN CATEGORIA',77000,100000,1,1,'ACTIVO',NULL,'NO'),
(113,'MAS001','MASAJEADOR MAX','SIN MARCA','SIN CATEGORIA',85000,120000,1,1,'ACTIVO',NULL,'NO'),
(114,'NEB001','NEBULIZADOR LUO','SIN MARCA','SIN CATEGORIA',145000,200000,3,1,'ACTIVO',NULL,'NO'),
(115,'LINT001','LINTERNA CHICO','SIN MARCA','SIN CATEGORIA',22000,47000,5,1,'ACTIVO',NULL,'NO'),
(116,'AFEI001','AFEITADOR WAER','SIN MARCA','SIN CATEGORIA',45000,90000,8,1,'ACTIVO',NULL,'NO'),
(117,'AFEI002','AFEITADOR HWT9','SIN MARCA','SIN CATEGORIA',18750,70000,19,1,'ACTIVO',NULL,'NO'),
(118,'DIS001','DISPENSADOR PARA AGUA','SIN MARCA','SIN CATEGORIA',23000,45000,2,1,'ACTIVO',NULL,'NO'),
(119,'PLANCHA001','PLANCHA BRISA','SIN MARCA','SIN CATEGORIA',67000,95000,3,1,'ACTIVO',NULL,'NO'),
(120,'LIC001','LICUADORA MAXON','SIN MARCA','SIN CATEGORIA',100000,150000,3,1,'ACTIVO',NULL,'NO'),
(121,'AP001','APARATO DE PRESION BRASO','SIN MARCA','SIN CATEGORIA',80000,110000,2,1,'ACTIVO',NULL,'NO'),
(122,'VEN001','VENTILADOR CONSUMER DE TECHO','SIN MARCA','SIN CATEGORIA',170000,230000,1,1,'ACTIVO',NULL,'NO'),
(123,'SILL001','SILLA PLEGABLE','SIN MARCA','SIN CATEGORIA',65000,90000,3,1,'ACTIVO',NULL,'NO'),
(124,'POP001','POP ULTRA','SIN MARCA','SIN CATEGORIA',15000,25000,7,1,'ACTIVO',NULL,'NO'),
(125,'TER001','TERMO STANLUX','SIN MARCA','SIN CATEGORIA',110000,170000,0,1,'ACTIVO',NULL,'NO'),
(126,'TER002','TERMO STANLEY','SIN MARCA','SIN CATEGORIA',100000,130000,1,1,'ACTIVO',NULL,'NO'),
(127,'KAR001','KARAOKE 12 PULG ECOPOWER','SIN MARCA','SIN CATEGORIA',390000,550000,0,1,'ACTIVO',NULL,'NO'),
(128,'KAR002','KARAOKE INOVA CHICO','SIN MARCA','SIN CATEGORIA',68000,95000,2,1,'ACTIVO',NULL,'NO'),
(129,'KAR003','KARAOKE INOVA MEDIANO','SIN MARCA','SIN CATEGORIA',110000,160000,1,1,'ACTIVO',NULL,'NO'),
(130,'CARG001','CARGADOR TIPO C','SIN MARCA','SIN CATEGORIA',12000,25000,19,1,'ACTIVO',NULL,'NO'),
(131,'CARG002','CARGADOR V8 ECOPOWER NORMAL','SIN MARCA','SIN CATEGORIA',10000,22000,18,1,'ACTIVO',NULL,'NO'),
(132,'CAB001','CABLE V8 ECOPOWER NORMAL','SIN MARCA','SIN CATEGORIA',4500,12000,18,1,'ACTIVO',NULL,'NO'),
(133,'CAB002','CABLE TIPO C ECOPOWER','SIN MARCA','SIN CATEGORIA',6000,15000,16,1,'ACTIVO',NULL,'NO'),
(134,'CAB003','CABLE IPHONE','SIN MARCA','SIN CATEGORIA',7000,20000,16,1,'ACTIVO',NULL,'NO'),
(135,'RAD001','RADIO CON PEN ECOPOWER','SIN MARCA','SIN CATEGORIA',70000,110000,2,1,'ACTIVO',NULL,'NO'),
(136,'TER003','TERMO GRANDE KIT MATE','SIN MARCA','SIN CATEGORIA',100000,150000,5,1,'ACTIVO',NULL,'NO'),
(137,'PEN001','PENDRIVE 32 GB','SIN MARCA','SIN CATEGORIA',30000,60000,5,1,'ACTIVO',NULL,'NO'),
(138,'CEL001','CELULAR SAMSUNG A14','SIN MARCA','SIN CATEGORIA',90000,1300000,2,1,'ACTIVO',NULL,'NO'),
(139,'CEL002','CELULAR REDMI A2','SIN MARCA','SIN CATEGORIA',475000,900000,1,1,'ACTIVO',NULL,'NO'),
(140,'CEL003','SAMNSUNG A24','SIN MARCA','SIN CATEGORIA',1140000,1450000,1,1,'ACTIVO',NULL,'NO'),
(141,'CEL004','CELULAR SAMSUNG GALAXI AO4E','SIN MARCA','SIN CATEGORIA',600000,990000,3,1,'ACTIVO',NULL,'NO'),
(142,'CEL005','CELULAR IPHONE 8 PLUS','SIN MARCA','SIN CATEGORIA',1350000,1650000,1,1,'ACTIVO',NULL,'NO'),
(143,'CEL006','CELULAR CAT S62','SIN MARCA','SIN CATEGORIA',1100000,1500000,1,1,'ACTIVO',NULL,'NO'),
(144,'CEL007','CELULAR REMDI 12','SIN MARCA','SIN CATEGORIA',980000,1350000,0,1,'ACTIVO',NULL,'NO'),
(145,'CEL008','CELULAR NOKIA106','SIN MARCA','SIN CATEGORIA',100000,150000,3,1,'ACTIVO',NULL,'NO'),
(146,'EST001','ESTUCHE SAMSUNG Y REDMI','SIN MARCA','SIN CATEGORIA',8807,25000,122,10,'ACTIVO',NULL,'NO'),
(147,'VI001','VIDRIOS HD','SIN MARCA','SIN CATEGORIA',4500,20000,10,1,'ACTIVO',NULL,'NO'),
(148,'VI002','VIDRIO IPHONE NORMAL','SIN MARCA','SIN CATEGORIA',2000,15000,50,1,'ACTIVO',NULL,'NO'),
(149,'VI003','VIDRIO PARA SAMSUNG Y REDMI','SIN MARCA','SIN CATEGORIA',2000,15000,476,100,'ACTIVO',NULL,'NO'),
(150,'BOT001','BOTAS DE CUERO','SIN MARCA','SIN CATEGORIA',110000,200000,22,1,'ACTIVO',NULL,'NO'),
(151,'CHA001','CHATITAS','SIN MARCA','SIN CATEGORIA',90000,180000,4,1,'ACTIVO',NULL,'NO'),
(152,'TERMO001','TERMOMETRO','SIN MARCA','SIN CATEGORIA',9000,16000,5,1,'ACTIVO',NULL,'NO'),
(153,'OX001','OXIMETER PULSE','SIN MARCA','SIN CATEGORIA',40000,60000,1,1,'ACTIVO',NULL,'NO'),
(154,'CARD001','CARGADOR UNIVERSAL','SIN MARCA','SIN CATEGORIA',60000,90000,1,1,'ACTIVO',NULL,'NO'),
(155,'ESTU001','ESTUCHE IPHONE','SIN MARCA','SIN CATEGORIA',14385,30000,37,1,'ACTIVO',NULL,'NO'),
(156,'AUDE001','AUDIFONO ECOPOWER','SIN MARCA','SIN CATEGORIA',8000,15000,8,1,'ACTIVO',NULL,'NO'),
(157,'CAR003','CARGADOR SOLO CABEZA','SIN MARCA','SIN CATEGORIA',11000,20000,7,1,'ACTIVO',NULL,'NO'),
(158,'ROP001','ROPERO 3 CUERPO CON BALIJERA','SIN MARCA','SIN CATEGORIA',55000,700000,1,1,'ACTIVO',NULL,'NO'),
(159,'RO002','ROPERO 2 CUERPO','SIN MARCA','SIN CATEGORIA',250000,390000,0,1,'ACTIVO',NULL,'NO'),
(160,'FIA001','FIAMBRERA 2 CUERPO','SIN MARCA','SIN CATEGORIA',270000,360000,1,1,'ACTIVO',NULL,'NO'),
(161,'CO001','JUEGO DE COMEDOR 4 SILLAS','SIN MARCA','SIN CATEGORIA',370000,490000,0,1,'ACTIVO',NULL,'NO'),
(162,'CO003','JUEGO DE COMEDOR 6 SILLAS','SIN MARCA','SIN CATEGORIA',55000,750000,1,1,'ACTIVO',NULL,'NO'),
(163,'PLA002','PLACA RAMLUX','SIN MARCA','SIN CATEGORIA',140000,200000,3,1,'ACTIVO',NULL,'NO'),
(164,'MIX002','MIXTERA VEXTAX','SIN MARCA','SIN CATEGORIA',90000,130000,2,1,'ACTIVO',NULL,'NO'),
(165,'LED001','LED SPEED 32 PULGADA','SIN MARCA','SIN CATEGORIA',820000,950000,1,1,'ACTIVO',NULL,'NO'),
(166,'HER002','HERVIDORA VEXTAX','SIN MARCA','SIN CATEGORIA',75000,95000,3,1,'ACTIVO',NULL,'NO'),
(167,'TER004','TERMO PARA TERERE PALAZZO','SIN MARCA','SIN CATEGORIA',110000,160000,1,1,'ACTIVO',NULL,'NO'),
(168,'VEN002','VENTILADOR DE PIE TOKYO','SIN MARCA','SIN CATEGORIA',280000,400000,0,1,'ACTIVO',NULL,'NO'),
(169,'VEN003','VENTILADOR VEXTAX COMUN','SIN MARCA','SIN CATEGORIA',120000,180000,1,1,'ACTIVO',NULL,'NO'),
(170,'AIRE001','AIRE TOKYO 12MIL BTU','SIN MARCA','SIN CATEGORIA',2000000,2290000,1,1,'ACTIVO',NULL,'NO'),
(171,'MOS001','MATA MOSQUITO ELECTRICO','SIN MARCA','SIN CATEGORIA',27000,40000,1,1,'ACTIVO',NULL,'NO'),
(172,'MIEL001','MIEL VITAL HONEY','SIN MARCA','SIN CATEGORIA',50000,90000,2,1,'ACTIVO',NULL,'NO'),
(173,'CORTA001','CORTA PELO 3 EN 1','SIN MARCA','SIN CATEGORIA',50000,90000,0,1,'ACTIVO',NULL,'NO'),
(174,'VEN004','VENTILADOR ALETA METAL','SIN MARCA','SIN CATEGORIA',130000,200000,5,1,'ACTIVO',NULL,'NO'),
(175,'JOTA001','JBL ORIGINAL GO3','SIN MARCA','SIN CATEGORIA',240000,320000,0,1,'ACTIVO',NULL,'NO'),
(176,'SECA001','SECADOR DE PELO REDMITON','SIN MARCA','SIN CATEGORIA',250000,300000,1,1,'ACTIVO',NULL,'NO'),
(177,'KAR004','KARAOKE CHICO LUO CUDRADO','SIN MARCA','SIN CATEGORIA',38000,90000,2,1,'ACTIVO',NULL,'NO'),
(178,'CAR004','CARGADOR PORTATIL ECOPOWER','SIN MARCA','SIN CATEGORIA',30000,50000,1,1,'ACTIVO',NULL,'NO'),
(179,'PISCI001','PISCINA 400LTS','SIN MARCA','SIN CATEGORIA',120000,190000,2,1,'ACTIVO',NULL,'NO'),
(180,'PISCI002','PISCINA 1000LTS','SIN MARCA','SIN CATEGORIA',205000,290000,1,1,'ACTIVO',NULL,'NO'),
(181,'PISCI003','PISCINA 1500LTS','SIN MARCA','SIN CATEGORIA',255000,350000,0,1,'ACTIVO',NULL,'NO'),
(182,'CEL0010','CELULAR REDMI12','SIN MARCA','SIN CATEGORIA',990000,1300000,0,1,'ACTIVO',NULL,'NO'),
(183,'CEL0012','CELULAR NOT12','SIN MARCA','SIN CATEGORIA',1050000,1450000,1,1,'ACTIVO',NULL,'NO'),
(184,'CEL0013','REDMI 13C','SIN MARCA','SIN CATEGORIA',900000,1350000,0,1,'ACTIVO',NULL,'NO'),
(185,'CEL0014','CELULAR SAMUNG GALAXY A24','SIN MARCA','SIN CATEGORIA',1150000,1550000,1,1,'ACTIVO',NULL,'NO'),
(186,'CEL0015','CELULAR SAMSUNG A04E','SIN MARCA','SIN CATEGORIA',600000,900000,1,1,'ACTIVO',NULL,'NO'),
(187,'CABE001','CABEZAL P/ VEHICULO ECOPOWER','ECOPOWER','SIN CATEGORIA',13667,20000,14,1,'ACTIVO',NULL,'NO'),
(188,'CAR005','CARGADOR SOLO CABEZA SAMSUNG','SAMSUNG','SIN CATEGORIA',22000,40000,10,1,'ACTIVO',NULL,'NO'),
(189,'AURI001','AURICULAR CON BLUETOOTH','SIN MARCA','SIN CATEGORIA',55000,90000,2,1,'ACTIVO',NULL,'NO'),
(190,'PEN002','PENDRIVE 16GB','SIN MARCA','SIN CATEGORIA',23000,45000,8,1,'ACTIVO',NULL,'NO'),
(191,'LAM001','LAMPARA P/ CAMPING LUO','LUO','SIN CATEGORIA',45000,70000,3,1,'ACTIVO',NULL,'NO'),
(192,'LUZ001','LUZ EMERGENCIA','LUO','SIN CATEGORIA',33000,50000,3,1,'ACTIVO',NULL,'NO'),
(193,'KAR005','KARAOKE INOVA 6.5\"','INOVA','SIN CATEGORIA',115000,180000,1,1,'ACTIVO',NULL,'NO'),
(194,'CORTA002','CORTADOR DE PELO KEMEI','SIN MARCA','SIN CATEGORIA',85000,130000,2,1,'ACTIVO',NULL,'NO'),
(195,'RAD002','RADIO ECOPOWER SOLAR EF23','SIN MARCA','SIN CATEGORIA',47500,100000,3,1,'ACTIVO',NULL,'NO'),
(196,'RAD003','RADIO ECOPOWER RELOJ','SIN MARCA','SIN CATEGORIA',62500,110000,6,1,'ACTIVO',NULL,'NO'),
(197,'RAD004','RADIO ECOPOWER EF235','SIN MARCA','SIN CATEGORIA',65000,120000,4,1,'ACTIVO',NULL,'NO'),
(198,'RAD005','RADIO ECOPOWER SOLAR LED EF239','SIN MARCA','SIN CATEGORIA',65000,120000,10,1,'ACTIVO',NULL,'NO'),
(199,'SPE001','SPEACKER ECOPOWER EC113','SIN MARCA','SIN CATEGORIA',146000,220000,2,1,'ACTIVO',NULL,'NO'),
(200,'SPE002','SPEACKER CON LAMPARA ECOPOWER','SIN MARCA','SIN CATEGORIA',65000,95000,2,1,'ACTIVO',NULL,'NO'),
(201,'SECA002','SECADOR DE PELO ECOPOWER','SIN MARCA','SIN CATEGORIA',62000,95000,3,1,'ACTIVO',NULL,'NO'),
(202,'SECA003','SECADOR CON PLANCHITA ECOPOWER','SIN MARCA','SIN CATEGORIA',131000,200000,2,1,'ACTIVO',NULL,'NO'),
(203,'LIT002','LINTERNA DE POLICIA ECOPOWER','SIN MARCA','SIN CATEGORIA',21000,45000,11,1,'ACTIVO',NULL,'NO'),
(204,'LIT003','LINTERNA ECOPOWER E8215','SIN MARCA','SIN CATEGORIA',25000,45000,6,1,'ACTIVO',NULL,'NO'),
(205,'LIT004','LINTERNA ECOPOWER E8238','SIN MARCA','SIN CATEGORIA',36000,60000,5,1,'ACTIVO',NULL,'NO'),
(206,'LIT005','LINTERNA ECOPOWER E8358','SIN MARCA','SIN CATEGORIA',47000,80000,3,1,'ACTIVO',NULL,'NO'),
(207,'PILA001','PILA ECOPOWER ECR2032','SIN MARCA','SIN CATEGORIA',2100,5000,25,1,'ACTIVO',NULL,'NO'),
(208,'PILA002','PILA ECOPOWER ECR2016','SIN MARCA','SIN CATEGORIA',2500,5000,25,1,'ACTIVO',NULL,'NO'),
(209,'PILA003','PILA ECOPOWER ECR2025','SIN MARCA','SIN CATEGORIA',2500,5000,25,1,'ACTIVO',NULL,'NO'),
(210,'VASO001','VASO ECOPOWER','SIN MARCA','SIN CATEGORIA',32000,55000,9,1,'ACTIVO',NULL,'NO'),
(211,'CONT001','CONTROL UNIVERSAL PARA SMART','SIN MARCA','SIN CATEGORIA',18000,25000,10,1,'ACTIVO',NULL,'NO'),
(212,'CONT002','CONTROL UNIVERSAL LET','SIN MARCA','SIN CATEGORIA',18000,25000,10,1,'ACTIVO',NULL,'NO'),
(213,'CABLE001','CABLE HDMI 1METRO','SIN MARCA','SIN CATEGORIA',18300,30000,3,1,'ACTIVO',NULL,'NO'),
(214,'CABLE002','CABLE HDMI 3METRO','SIN MARCA','SIN CATEGORIA',21000,40000,3,1,'ACTIVO',NULL,'NO'),
(215,'CABLE003','CABLE HDMI 5METRO','SIN MARCA','SIN CATEGORIA',32000,60000,3,1,'ACTIVO',NULL,'NO'),
(216,'PORTA001','CARDADOR PORTATIL EC819 ECOPOWER','SIN MARCA','SIN CATEGORIA',32000,55000,6,1,'ACTIVO',NULL,'NO'),
(217,'PORTA002','CARDADOR PORTATIL 3 ENTRADA ECOPOWER','SIN MARCA','SIN CATEGORIA',40000,60000,2,1,'ACTIVO',NULL,'NO'),
(218,'LED005','LED CON SMART ECOPOWER 32 PULG','SIN MARCA','SIN CATEGORIA',695000,930000,1,1,'ACTIVO',NULL,'NO'),
(219,'MOS002','MATA MOSQUITO ECOPOWER','SIN MARCA','SIN CATEGORIA',58000,85000,2,1,'ACTIVO',NULL,'NO'),
(220,'AJO001','CORTADOR DE AJO ECOPOWER','SIN MARCA','SIN CATEGORIA',62000,100000,1,1,'ACTIVO',NULL,'NO'),
(221,'CAFE001','BATIDOR DE CAFE ECOPOWER','SIN MARCA','SIN CATEGORIA',14600,25000,3,1,'ACTIVO',NULL,'NO'),
(222,'PROCE001','PROCESADOR DE CARNE ECOPOWER','SIN MARCA','SIN CATEGORIA',110000,180000,2,1,'ACTIVO',NULL,'NO'),
(223,'ROBO001','SPEACKER ROBO ECOPOWER','SIN MARCA','SIN CATEGORIA',102000,150000,2,1,'ACTIVO',NULL,'NO'),
(224,'FREI001','FREIDORA ECOPOWER','SIN MARCA','SIN CATEGORIA',310000,490000,1,1,'ACTIVO',NULL,'NO'),
(225,'PILA004','PILA PANASONIC PALITO','SIN MARCA','SIN CATEGORIA',1600,4000,40,1,'ACTIVO',NULL,'NO'),
(226,'PILA005','PILA PANASONIC NORMAL','SIN MARCA','SIN CATEGORIA',1300,3000,52,10,'ACTIVO',NULL,'NO'),
(227,'PILA006','PILA 23A','SIN MARCA','SIN CATEGORIA',1800,10000,135,10,'ACTIVO',NULL,'NO'),
(228,'PILA007','PILA 27A','SIN MARCA','SIN CATEGORIA',1800,10000,80,1,'ACTIVO',NULL,'NO'),
(229,'PILA008','PILA AG10','SIN MARCA','SIN CATEGORIA',300,5000,100,10,'ACTIVO',NULL,'NO'),
(230,'PILA009','PILA LITHIUN','SIN MARCA','SIN CATEGORIA',500,3000,5,1,'ACTIVO',NULL,'NO'),
(231,'PILA0010','PILA T Y E CR 1220','SIN MARCA','SIN CATEGORIA',1500,10000,55,1,'ACTIVO',NULL,'NO'),
(232,'PILA0011','PILA CR1620','SIN MARCA','SIN CATEGORIA',1500,10000,25,1,'ACTIVO',NULL,'NO'),
(233,'PILA 0012','PILA CR2032','SIN MARCA','SIN CATEGORIA',2000,10000,49,1,'ACTIVO',NULL,'NO'),
(234,'PILA0013','PILA CR2025','SIN MARCA','SIN CATEGORIA',1500,10000,45,1,'ACTIVO',NULL,'NO'),
(235,'PILA0014','PILA CR2016','SIN MARCA','SIN CATEGORIA',1500,10000,50,1,'ACTIVO',NULL,'NO'),
(236,'PILA0015','PILA AG13','SIN MARCA','SIN CATEGORIA',1500,10000,100,10,'ACTIVO',NULL,'NO'),
(237,'BO001','BOMBILLA ALPACA GRANDE','SIN MARCA','SIN CATEGORIA',7000,15000,10,1,'ACTIVO',NULL,'NO'),
(238,'BO002','BOMBILLA ALPACA CHICO','SIN MARCA','SIN CATEGORIA',7000,12000,5,1,'ACTIVO',NULL,'NO'),
(239,'CARGA001','CARGADOR PARA PILA','SIN MARCA','SIN CATEGORIA',30000,50000,2,1,'ACTIVO',NULL,'NO'),
(240,'MOU001','MOUSE ECOPOWER','SIN MARCA','SIN CATEGORIA',18000,28000,2,1,'ACTIVO',NULL,'NO'),
(241,'TIM001','TIMBRE','SIN MARCA','SIN CATEGORIA',31000,50000,2,1,'ACTIVO',NULL,'NO'),
(242,'RELO001','RELOJ QUARTZ VERDE','SIN MARCA','SIN CATEGORIA',38000,70000,1,1,'ACTIVO',NULL,'NO'),
(243,'RELO002','RELOJ ROSA QUARTZ','SIN MARCA','SIN CATEGORIA',48000,90000,1,1,'ACTIVO',NULL,'NO'),
(244,'ENCE001','ENCENDEDOR CHICO','SIN MARCA','SIN CATEGORIA',6900,15000,4,1,'ACTIVO',NULL,'NO'),
(245,'ENCE002','ENCENDERDOR GRANDE','SIN MARCA','SIN CATEGORIA',13900,23000,4,1,'ACTIVO',NULL,'NO'),
(246,'CONTROL001','CONTROL PARA AIRE','SIN MARCA','SIN CATEGORIA',25000,45000,1,1,'ACTIVO',NULL,'NO'),
(247,'TAPE001','TAPETE','SIN MARCA','SIN CATEGORIA',16800,28000,2,1,'ACTIVO',NULL,'NO'),
(248,'DET001','DETECTOR DE BILLETE','SIN MARCA','SIN CATEGORIA',36000,55000,1,1,'ACTIVO',NULL,'NO'),
(249,'TECLA001','TECLADO PARA COMPU','SIN MARCA','SIN CATEGORIA',43000,70000,0,1,'ACTIVO',NULL,'NO'),
(250,'PILA0016','PILA  ULTRA HERO MEDIANO','SIN MARCA','SIN CATEGORIA',1500,4000,120,10,'ACTIVO',NULL,'NO'),
(251,'HOP007','HOPPIE INOVA 1 LITRRO','SIN MARCA','SIN CATEGORIA',65000,90000,0,1,'ACTIVO',NULL,'NO'),
(252,'MOCHI001','MOCHILA GRANDE','SIN MARCA','SIN CATEGORIA',50000,75000,10,1,'ACTIVO',NULL,'NO'),
(253,'MOCHI002','MOCHILA MEDIANA','SIN MARCA','SIN CATEGORIA',45000,65000,6,1,'ACTIVO',NULL,'NO'),
(254,'MOCHI003','MOCHILA PARA NENA','SIN MARCA','SIN CATEGORIA',20000,35000,2,1,'ACTIVO',NULL,'NO'),
(255,'MOCHI004','MOCHILA PARA NENE BEN 10','SIN MARCA','SIN CATEGORIA',25000,35000,2,1,'ACTIVO',NULL,'NO'),
(256,'MOCHI005','MOCHILA ECONOMICA','SIN MARCA','SIN CATEGORIA',15000,30000,5,1,'ACTIVO',NULL,'NO'),
(257,'MOCHI006','MOCHILA GRUESA','SIN MARCA','SIN CATEGORIA',35000,55000,2,1,'ACTIVO',NULL,'NO'),
(258,'MOCHI007','MOCHILA GRANDE PARA NENA','SIN MARCA','SIN CATEGORIA',75000,110000,1,1,'ACTIVO',NULL,'NO'),
(259,'SOM001','SOMBRILLAS COLORES','SIN MARCA','SIN CATEGORIA',13000,25000,3,1,'ACTIVO',NULL,'NO'),
(260,'CARTU001','CARTUCHERA CON LAPICES','SIN MARCA','SIN CATEGORIA',35000,50000,2,1,'ACTIVO',NULL,'NO'),
(261,'HOP0010','HOPPIE 900ML CON AGARRADERA','SIN MARCA','SIN CATEGORIA',13000,75000,16,1,'ACTIVO',NULL,'NO'),
(262,'TER009','TERMO STANLEY PARA TERERE','SIN MARCA','SIN CATEGORIA',110000,170000,2,1,'ACTIVO',NULL,'NO'),
(263,'HOP0011','HOPPIE INFANTIL','SIN MARCA','SIN CATEGORIA',34000,54000,12,1,'ACTIVO',NULL,'NO'),
(264,'PLAN006','PLANCHITA ORIGINAL BABYLYSS','SIN MARCA','SIN CATEGORIA',820000,980000,0,1,'ACTIVO',NULL,'NO'),
(265,'MOCHI009','MOCHILA CON BUHO','SIN MARCA','SIN CATEGORIA',20000,35000,2,1,'ACTIVO',NULL,'NO'),
(266,'MOCHI008','MOCHICARTERA PARA HOMBRE','SIN MARCA','SIN CATEGORIA',15000,35000,7,1,'ACTIVO',NULL,'NO'),
(267,'CAR0011','CARGADOR CON CABLE TIPO C','SIN MARCA','SIN CATEGORIA',25000,35000,0,1,'ACTIVO',NULL,'NO'),
(268,'SOMBRI001','SOMBRILLA DE PLAYA','SIN MARCA','SIN CATEGORIA',100000,180000,0,1,'ACTIVO',NULL,'NO'),
(269,'GUANPA001','GUANPA CON BOMBILLA','SIN MARCA','SIN CATEGORIA',26000,45000,0,1,'ACTIVO',NULL,'NO'),
(270,'CEL 0015','IPHONE 12 NORMAL 128 GB','SIN MARCA','SIN CATEGORIA',2900000,3300000,0,1,'ACTIVO',NULL,'NO'),
(271,'CEL0016','IPHONE 11 NORMAL 128GB','SIN MARCA','SIN CATEGORIA',2500000,2800000,0,1,'ACTIVO',NULL,'NO'),
(272,'HOP0015','HOPPI 1300ML','SIN MARCA','SIN CATEGORIA',55000,80000,2,1,'ACTIVO',NULL,'NO'),
(273,'CAMARA002','CAMARA CON WIFI','SIN MARCA','SIN CATEGORIA',95000,130000,2,1,'ACTIVO',NULL,'NO'),
(274,'REPART001','REPARTIDOR DE INTERNET','SIN MARCA','SIN CATEGORIA',105000,140000,4,1,'ACTIVO',NULL,'NO'),
(275,'HOP0017','HOPPI SULIMADO','SIN MARCA','SIN CATEGORIA',65000,90000,5,1,'ACTIVO',NULL,'NO'),
(276,'HOP0016','HOPPI 350 ML','SIN MARCA','SIN CATEGORIA',38000,58000,2,1,'ACTIVO',NULL,'NO'),
(277,'VENTI0015','VENTILADOR RAMLUX','SIN MARCA','SIN CATEGORIA',77400,120000,6,1,'ACTIVO',NULL,'NO'),
(278,'HOPOO20','HOPPIE INFANTIL DE CALIDAD','SIN MARCA','SIN CATEGORIA',45000,65000,18,1,'ACTIVO',NULL,'NO'),
(279,'CABLE031','CABLE 220V SOLO CABLE','SIN MARCA','SIN CATEGORIA',5000,15000,20,1,'ACTIVO',NULL,'NO'),
(280,'AUDICU0006','AURICULAR IPHONE','SIN MARCA','SIN CATEGORIA',20000,35000,10,1,'ACTIVO',NULL,'NO'),
(281,'BALANZA0006','BALANZA HUMANO','SIN MARCA','SIN CATEGORIA',50000,80000,2,1,'ACTIVO',NULL,'NO'),
(282,'SOPORTE001','SOPORTE TELE','SIN MARCA','SIN CATEGORIA',20000,30000,2,1,'ACTIVO',NULL,'NO'),
(283,'APLIQUE0001','APLIQUE DE LUZ','SIN MARCA','SIN CATEGORIA',28000,48000,3,1,'ACTIVO',NULL,'NO'),
(284,'HUMI001','HUMIDIFICADOR','SIN MARCA','SIN CATEGORIA',25000,45000,2,1,'ACTIVO',NULL,'NO'),
(285,'JARRA005','KIT JARRA STANLEY','SIN MARCA','SIN CATEGORIA',120000,150000,1,1,'ACTIVO',NULL,'NO'),
(286,'TV0006','TV BOY','SIN MARCA','SIN CATEGORIA',170000,220000,1,1,'ACTIVO',NULL,'NO'),
(287,'HOP0021','HOPPIE 1000 ML INOVA','SIN MARCA','SIN CATEGORIA',60000,90000,3,1,'ACTIVO',NULL,'NO'),
(288,'AUDI007','AURICULAR BLUETOOTH INALAMBRICO','SIN MARCA','SIN CATEGORIA',50000,80000,2,1,'ACTIVO',NULL,'SI'),
(289,'0000544','PRODUCTO DE LIMPIEZA','SIN MARCA','SIN CATEGORIA',50000,60000,6,3,'ACTIVO',NULL,'SI');

/*Table structure for table `proveedores` */


CREATE TABLE `proveedores` (
  `idproveedor` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `proveedorruc` char(30) DEFAULT NULL,
  `proveedordescripcion` char(100) DEFAULT NULL,
  `proveedortelefono` char(30) DEFAULT NULL,
  `proveedorcelular` char(30) DEFAULT NULL,
  `proveedorciudad` char(60) DEFAULT NULL,
  `proveedordireccion` char(200) DEFAULT NULL,
  `proveedorestado` char(30) DEFAULT NULL,
  PRIMARY KEY (`idproveedor`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `proveedores` */

insert  into `proveedores`(`idproveedor`,`proveedorruc`,`proveedordescripcion`,`proveedortelefono`,`proveedorcelular`,`proveedorciudad`,`proveedordireccion`,`proveedorestado`) values 
(0,'0','SIN PROVEEDOR','X','X','X','X','ACTIVO'),
(1,'5183269-0','DA EMPRENDIMIENTOS','0993512949','0993512949','VILLARRICA','Cerca de la parada de la guaireña','ACTIVO');

/*Table structure for table `tiposfacturas` */


CREATE TABLE `tiposfacturas` (
  `idtipofactura` int(11) NOT NULL,
  `tipofactura` char(15) DEFAULT NULL,
  PRIMARY KEY (`idtipofactura`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `tiposfacturas` */

insert  into `tiposfacturas`(`idtipofactura`,`tipofactura`) values 
(1,'CONTADO'),
(2,'CREDITO');

/*Table structure for table `tiposusuarios` */


CREATE TABLE `tiposusuarios` (
  `idtipousuario` int(11) NOT NULL AUTO_INCREMENT,
  `tipousuario` char(20) DEFAULT NULL,
  PRIMARY KEY (`idtipousuario`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `tiposusuarios` */

insert  into `tiposusuarios`(`idtipousuario`,`tipousuario`) values 
(0,'ADMINISTRADOR'),
(1,'COBRADOR'),
(2,'VENDEDOR');

/*Table structure for table `tmpcredito` */


CREATE TABLE `tmpcredito` (
  `entrega` int(11) DEFAULT NULL,
  `total` int(11) DEFAULT NULL,
  `usuario` char(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `tmpcredito` */

insert  into `tmpcredito`(`entrega`,`total`,`usuario`) values 
(0,0,NULL);

/*Table structure for table `tmpcuotas` */


CREATE TABLE `tmpcuotas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cuota` int(5) DEFAULT NULL,
  `vencimiento` date DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `usuario` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=611 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `tmpcuotas` */

/*Table structure for table `tmpdetallecompra` */


CREATE TABLE `tmpdetallecompra` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cantidad` int(11) DEFAULT NULL,
  `idproducto` int(11) DEFAULT NULL,
  `producto` char(70) DEFAULT NULL,
  `unitario` int(11) DEFAULT NULL,
  `subtotal` int(11) DEFAULT NULL,
  `usuario` char(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `tmpdetallecompra` */

/*Table structure for table `tmpdetalleventa` */


CREATE TABLE `tmpdetalleventa` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cantidad` int(11) DEFAULT NULL,
  `costo` int(11) DEFAULT NULL,
  `idproducto` int(11) DEFAULT NULL,
  `producto` char(70) DEFAULT NULL,
  `unitario` int(11) DEFAULT NULL,
  `descuento` int(11) DEFAULT 0,
  `subtotal` int(11) DEFAULT NULL,
  `usuario` char(20) DEFAULT NULL,
  `aumento` int(11) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=455 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Table structure for table `tmpventas` */


CREATE TABLE `tmpventas` (
  `idclientecontado` int(11) DEFAULT NULL,
  `idclientecredito` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

/*Data for the table `tmpventas` */

insert  into `tmpventas`(`idclientecontado`,`idclientecredito`) values 
(0,0);

/*Table structure for table `usuarios` */


CREATE TABLE `usuarios` (
  `idusuario` int(11) NOT NULL AUTO_INCREMENT,
  `usuarionombre` char(100) DEFAULT NULL,
  `usuario` char(30) DEFAULT NULL,
  `usuariopass` char(30) DEFAULT NULL,
  `usuarioultimoacceso` date DEFAULT NULL,
  `tipousuario` char(20) DEFAULT NULL,
  `usuarioestado` char(20) DEFAULT NULL,
  PRIMARY KEY (`idusuario`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*Data for the table `usuarios` */

insert  into `usuarios`(`idusuario`,`usuarionombre`,`usuario`,`usuariopass`,`usuarioultimoacceso`,`tipousuario`,`usuarioestado`) values 
(1,'EDGAR PORTILLO','EDGAR','127255','2024-07-19','ADMINISTRADOR','ACTIVO'),
(2,'YENI','YENI','YENI2024','2024-03-01','VENDEDOR','ACTIVO'),
(7,'MABEL','MABEL','2307','2024-03-01','ADMINISTRADOR','ACTIVO');

