-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 22-02-2024 a las 05:39:50
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.0.33

START TRANSACTION;



--
-- Base de datos: `bdreyesdelnorte`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `caja`
--

CREATE TABLE `caja` (
  `idCaja` int(11) NOT NULL,
  `CAJfechaM` date NOT NULL,
  `CAJhoraM` time NOT NULL,
  `CAJtipMov` varchar(5) COLLATE utf8_spanish2_ci NOT NULL,
  `CAJmonto` decimal(10,2) NOT NULL,
  `CAJdetalle` varchar(50) COLLATE utf8_spanish2_ci NOT NULL,
  `CAJautori` varchar(50) COLLATE utf8_spanish2_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `caja`
--

INSERT INTO `caja` (`idCaja`, `CAJfechaM`, `CAJhoraM`, `CAJtipMov`, `CAJmonto`, `CAJdetalle`, `CAJautori`) VALUES
(1, '2024-02-07', '06:21:26', 'ABONO', '200.00', 'CUOTA INICIAL DE VENTA DE PRODUCTO', 'RESPONSABLE DE CAJA'),
(2, '2024-02-07', '06:23:21', 'ABONO', '229.17', 'POR COBRO DE CUOTA', 'RESPONSABLE DE CAJA');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `caja_chica`
--

CREATE TABLE `caja_chica` (
  `idCaja_Chica` int(11) NOT NULL,
  `CJCfechaM` date NOT NULL,
  `CJChoraM` time NOT NULL,
  `CJCtipMov` varchar(5) COLLATE utf8_spanish2_ci NOT NULL,
  `CJCmonto` decimal(10,2) NOT NULL,
  `CJCdescri` varchar(50) COLLATE utf8_spanish2_ci NOT NULL,
  `CJCdetalle` varchar(50) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `comprobantes`
--

CREATE TABLE `comprobantes` (
  `idComprobante` int(11) NOT NULL,
  `COMtipDoc` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `COMultSer` varchar(3) COLLATE utf8_spanish2_ci NOT NULL,
  `COMultNum` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `comprobantes`
--

INSERT INTO `comprobantes` (`idComprobante`, `COMtipDoc`, `COMultSer`, `COMultNum`) VALUES
(1, 'BOLETA', '001', 29),
(2, 'FACTURA', '002', 245);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `configuracion`
--

CREATE TABLE `configuracion` (
  `idConfiguracion` int(11) NOT NULL,
  `CONFrubro` varchar(30) COLLATE utf8_spanish2_ci NOT NULL,
  `CONFrazSoc` varchar(50) COLLATE utf8_spanish2_ci NOT NULL,
  `CONFruc` varchar(11) COLLATE utf8_spanish2_ci NOT NULL,
  `CONFdireccion` varchar(80) COLLATE utf8_spanish2_ci NOT NULL,
  `CONFigv` int(11) NOT NULL,
  `CONFlogo` varchar(80) COLLATE utf8_spanish2_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `configuracion`
--

INSERT INTO `configuracion` (`idConfiguracion`, `CONFrubro`, `CONFrazSoc`, `CONFruc`, `CONFdireccion`, `CONFigv`, `CONFlogo`) VALUES
(1, 'INMOBILIARIA', 'ABACO INGENIEROS Y ASOCIADOS S.A.C', '20172455735', 'TARAPOTO - SAN MARTIN', 18, 'abaco.jpg');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `cuotas_pago`
--

CREATE TABLE `cuotas_pago` (
  `idCuotaPago` int(11) NOT NULL,
  `idVenta` int(11) NOT NULL,
  `CUOnumCuo` int(11) NOT NULL,
  `CUOmonto` decimal(10,2) NOT NULL,
  `CUOfchVnc` date NOT NULL,
  `CUOmora` decimal(10,2) DEFAULT NULL,
  `CUOfechaP` datetime DEFAULT NULL,
  `CUOusuario` int(11) DEFAULT NULL,
  `CUOestado` char(1) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `cuotas_pago`
--

INSERT INTO `cuotas_pago` (`idCuotaPago`, `idVenta`, `CUOnumCuo`, `CUOmonto`, `CUOfchVnc`, `CUOmora`, `CUOfechaP`, `CUOusuario`, `CUOestado`) VALUES
(1, 1, 0, '200.00', '2024-02-07', '0.00', '2024-02-07 06:21:26', 1, 'P'),
(2, 1, 1, '229.17', '2024-02-07', '0.00', '2024-02-07 06:23:21', 1, 'P'),
(3, 1, 2, '229.17', '2024-03-07', '0.00', NULL, 1, 'D'),
(4, 1, 3, '229.17', '2024-04-07', '0.00', NULL, 1, 'D'),
(5, 1, 4, '229.17', '2024-05-07', '0.00', NULL, 1, 'D'),
(6, 1, 5, '229.17', '2024-06-07', '0.00', NULL, 1, 'D'),
(7, 1, 6, '229.17', '2024-07-07', '0.00', NULL, 1, 'D'),
(8, 1, 7, '229.17', '2024-08-07', '0.00', NULL, 1, 'D'),
(9, 1, 8, '229.17', '2024-09-07', '0.00', NULL, 1, 'D'),
(10, 1, 9, '229.17', '2024-10-07', '0.00', NULL, 1, 'D'),
(11, 1, 10, '229.17', '2024-11-07', '0.00', NULL, 1, 'D'),
(12, 1, 11, '229.17', '2024-12-07', '0.00', NULL, 1, 'D'),
(13, 1, 12, '229.17', '2025-01-07', '0.00', NULL, 1, 'D'),
(14, 1, 13, '229.17', '2025-02-07', '0.00', NULL, 1, 'D'),
(15, 1, 14, '229.17', '2025-03-07', '0.00', NULL, 1, 'D'),
(16, 1, 15, '229.17', '2025-04-07', '0.00', NULL, 1, 'D'),
(17, 1, 16, '229.17', '2025-05-07', '0.00', NULL, 1, 'D'),
(18, 1, 17, '229.17', '2025-06-07', '0.00', NULL, 1, 'D'),
(19, 1, 18, '229.17', '2025-07-07', '0.00', NULL, 1, 'D'),
(20, 1, 19, '229.17', '2025-08-07', '0.00', NULL, 1, 'D'),
(21, 1, 20, '229.17', '2025-09-07', '0.00', NULL, 1, 'D'),
(22, 1, 21, '229.17', '2025-10-07', '0.00', NULL, 1, 'D'),
(23, 1, 22, '229.17', '2025-11-07', '0.00', NULL, 1, 'D'),
(24, 1, 23, '229.17', '2025-12-07', '0.00', NULL, 1, 'D'),
(25, 1, 24, '229.17', '2026-01-07', '0.00', NULL, 1, 'D'),
(26, 1, 25, '229.17', '2026-02-07', '0.00', NULL, 1, 'D'),
(27, 1, 26, '229.17', '2026-03-07', '0.00', NULL, 1, 'D'),
(28, 1, 27, '229.17', '2026-04-07', '0.00', NULL, 1, 'D'),
(29, 1, 28, '229.17', '2026-05-07', '0.00', NULL, 1, 'D'),
(30, 1, 29, '229.17', '2026-06-07', '0.00', NULL, 1, 'D'),
(31, 1, 30, '229.17', '2026-07-07', '0.00', NULL, 1, 'D'),
(32, 1, 31, '229.17', '2026-08-07', '0.00', NULL, 1, 'D'),
(33, 1, 32, '229.17', '2026-09-07', '0.00', NULL, 1, 'D'),
(34, 1, 33, '229.17', '2026-10-07', '0.00', NULL, 1, 'D'),
(35, 1, 34, '229.17', '2026-11-07', '0.00', NULL, 1, 'D'),
(36, 1, 35, '229.17', '2026-12-07', '0.00', NULL, 1, 'D'),
(37, 1, 36, '229.17', '2027-01-07', '0.00', NULL, 1, 'D'),
(38, 1, 37, '229.17', '2027-02-07', '0.00', NULL, 1, 'D'),
(39, 1, 38, '229.17', '2027-03-07', '0.00', NULL, 1, 'D'),
(40, 1, 39, '229.17', '2027-04-07', '0.00', NULL, 1, 'D'),
(41, 1, 40, '229.17', '2027-05-07', '0.00', NULL, 1, 'D'),
(42, 1, 41, '229.17', '2027-06-07', '0.00', NULL, 1, 'D'),
(43, 1, 42, '229.17', '2027-07-07', '0.00', NULL, 1, 'D'),
(44, 1, 43, '229.17', '2027-08-07', '0.00', NULL, 1, 'D'),
(45, 1, 44, '229.17', '2027-09-07', '0.00', NULL, 1, 'D'),
(46, 1, 45, '229.17', '2027-10-07', '0.00', NULL, 1, 'D'),
(47, 1, 46, '229.17', '2027-11-07', '0.00', NULL, 1, 'D'),
(48, 1, 47, '229.17', '2027-12-07', '0.00', NULL, 1, 'D'),
(49, 1, 48, '229.17', '2028-01-07', '0.00', NULL, 1, 'D');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `empleados`
--

CREATE TABLE `empleados` (
  `idEmpleado` int(11) NOT NULL,
  `EMPdni` varchar(8) COLLATE utf8_spanish2_ci NOT NULL,
  `EMPnombre` varchar(45) COLLATE utf8_spanish2_ci NOT NULL,
  `EMPapelli` varchar(45) COLLATE utf8_spanish2_ci NOT NULL,
  `EMPsexo` char(1) COLLATE utf8_spanish2_ci NOT NULL,
  `EMPfchNac` date NOT NULL,
  `EMPdirec` varchar(80) COLLATE utf8_spanish2_ci NOT NULL,
  `EMPcelfon` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
  `EMPestado` char(1) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `empleados`
--

INSERT INTO `empleados` (`idEmpleado`, `EMPdni`, `EMPnombre`, `EMPapelli`, `EMPsexo`, `EMPfchNac`, `EMPdirec`, `EMPcelfon`, `EMPestado`) VALUES
(1, '17440523', 'JUAN CARLOS', 'CHAVEZ PEREZ', 'M', '1990-01-27', 'AV. TACNA 209', '979856613', 'A'),
(2, '17407791', 'MERLY GIANELLA', 'MALCA TORRES', 'F', '1994-03-06', 'JUAN FANING 457', '976723119', 'A'),
(3, '48425844', 'MARYORIE', 'BELLODAS SUCLUPE', 'F', '1996-04-22', 'NICANOR 678', '989711323', 'A');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `interesados`
--

CREATE TABLE `interesados` (
  `idInteresado` int(11) NOT NULL,
  `INTtipDoc` varchar(3) COLLATE utf8_spanish2_ci NOT NULL,
  `INTnumDoc` varchar(11) COLLATE utf8_spanish2_ci NOT NULL,
  `INTdatos` varchar(80) COLLATE utf8_spanish2_ci NOT NULL,
  `INTrepres` varchar(80) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `INTcelfon` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
  `INTubicac` varchar(45) COLLATE utf8_spanish2_ci NOT NULL,
  `INTdirec` varchar(80) COLLATE utf8_spanish2_ci NOT NULL,
  `INTestado` char(1) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `interesados`
--

INSERT INTO `interesados` (`idInteresado`, `INTtipDoc`, `INTnumDoc`, `INTdatos`, `INTrepres`, `INTcelfon`, `INTubicac`, `INTdirec`, `INTestado`) VALUES
(1, 'DNI', '40289012', 'JORGE LUIS BAILA MANAYAY', NULL, '949030086', 'TARAPOTO', 'TUPAC AMARU 102', 'A'),
(2, 'RUC', '20358921147', 'FERRETERIA \"DE TODO METAL\"', 'JOSE SUAREZ', '979811825', 'CHICLAYO', 'AV. SAENS PEÑA 1105', 'A');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `productos`
--

CREATE TABLE `productos` (
  `idProducto` int(11) NOT NULL,
  `idProyecto` int(11) NOT NULL,
  `PDTtipPro` char(1) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTnombre` varchar(30) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTlargo` decimal(6,2) NOT NULL,
  `PDTancho` decimal(6,2) NOT NULL,
  `PDTperime` varchar(20) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `PDTmanzan` char(1) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTlindFt` varchar(40) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTlindDe` varchar(40) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTlindIz` varchar(40) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTlindFd` varchar(40) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTparReg` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
  `PDTprecio` decimal(10,2) NOT NULL,
  `PDTimagen` varchar(80) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `PDTestado` char(1) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `productos`
--

INSERT INTO `productos` (`idProducto`, `idProyecto`, `PDTtipPro`, `PDTnombre`, `PDTlargo`, `PDTancho`, `PDTperime`, `PDTmanzan`, `PDTlindFt`, `PDTlindDe`, `PDTlindIz`, `PDTlindFd`, `PDTparReg`, `PDTprecio`, `PDTimagen`, `PDTestado`) VALUES
(1, 1, 'L', 'LOTE 1', '20.00', '6.00', '6m/ 20m/ 6m/ 20m', 'A', 'AV. SANTA ROSA', 'LOTE 2', 'CALLE SAN JOSE', 'LOTE 10', 'U786967838', '11000.00', 'foto1.jpg', 'D'),
(2, 1, 'L', 'LOTE 2', '20.00', '6.00', '6m/ 20m/ 6m/ 20m', 'A', 'AV. SANTA ROSA', 'LOTE 3', 'LOTE 1', 'LOTE 9', 'J837828748', '11000.00', 'foto2.jpg', 'D'),
(3, 1, 'L', 'LOTE 3', '20.00', '6.00', '6m/ 20m/ 6m/ 20m', 'A', 'AV. SANTA ROSA', 'LOTE 4', 'LOTE 2', 'LOTE 8', 'Y893728470', '11000.00', 'foto3.jpg', 'D'),
(4, 1, 'L', 'LOTE 4', '20.00', '6.00', '6m/ 20m/ 6m/ 20m', 'A', 'AV. SANTA ROSA', 'LOTE 5', 'LOTE 3', 'LOTE 7', 'W98746720', '11000.00', 'foto4.jpg', 'D'),
(5, 1, 'L', 'LOTE 5', '20.00', '6.00', '6m/ 20m/ 6m/ 20m', 'A', 'AV.SANTA ROSA', 'PASAJE INGENIEROS', 'LOTE 4', 'LOTE 6', 'F928378478', '11000.00', 'foto5.jpg', 'V'),
(6, 1, 'L', 'LOTE 6', '15.00', '6.00', '6m/ 15m/ 6m/ 15m', 'A', 'CALLE COLON', 'LOTE 7', 'PASAJE INGENIEROS', 'LOTE 5', 'P834682145', '9890.00', 'foto6.jpg', 'D'),
(7, 1, 'L', 'LOTE 7', '15.00', '6.00', '6m/ 15m/ 6m/ 15m', 'A', 'CALLE COLON', 'LOTE 8', 'LOTE 6', 'LOTE 4', 'T394782747', '9890.00', 'foto7.jpg', 'D'),
(8, 1, 'L', 'LOTE 8', '15.00', '6.00', '6m/ 15m/ 6m/ 15m', 'A', 'CALLE COLON', 'LOTE 9', 'LOTE 7', 'LOTE 3', 'Q846950232', '9890.00', 'foto2.jpg', 'D'),
(9, 1, 'L', 'LOTE 9', '15.00', '6.00', '6m/ 15m/ 6m/ 15m', 'A', 'CALLE COLON', 'LOTE 10', 'LOTE 8', 'LOTE 2', 'M731100254', '9890.00', 'foto4.jpg', 'D'),
(10, 1, 'L', 'LOTE 10', '15.00', '6.00', '6m/ 15m/ 6m/ 15m', 'A', 'CALLE COLON', 'CALLE SAN JOSE', 'LOTE 9', 'LOTE 1', 'X830020211', '9890.00', 'foto3.jpg', 'D');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `proyectos`
--

CREATE TABLE `proyectos` (
  `idProyecto` int(11) NOT NULL,
  `PYTnombre` varchar(50) COLLATE utf8_spanish2_ci NOT NULL,
  `PYTtipo` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `PYTcosto` decimal(10,2) NOT NULL,
  `PYTnumLot` int(11) NOT NULL,
  `PYTlocali` varchar(80) COLLATE utf8_spanish2_ci NOT NULL,
  `PYTfono` varchar(10) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `PYTfchIni` date NOT NULL,
  `PYTfchFin` date DEFAULT NULL,
  `PYTobserv` varchar(80) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `PYTestado` char(1) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `proyectos`
--

INSERT INTO `proyectos` (`idProyecto`, `PYTnombre`, `PYTtipo`, `PYTcosto`, `PYTnumLot`, `PYTlocali`, `PYTfono`, `PYTfchIni`, `PYTfchFin`, `PYTobserv`, `PYTestado`) VALUES
(1, 'URBANIZACIÓN BUENA VISTA I ETAPA', 'LOTE', '2800589.00', 15, 'BAGUA GRANDE - AMAZONAS', '041-286520', '2023-06-05', NULL, 'Ninguna', 'V'),
(2, 'URBANIZACIÓN BUENA VISTA II ETAPA', 'LOTE', '5398200.00', 20, 'BAGUA GRANDE - AMAZONAS', '041-324977', '2023-06-12', NULL, 'Ninguna', 'V');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `ventas`
--

CREATE TABLE `ventas` (
  `idVenta` int(11) NOT NULL,
  `idUsuario` int(11) NOT NULL,
  `idInteresado` int(11) NOT NULL,
  `idProducto` int(11) NOT NULL,
  `VTAtipDoc` varchar(3) COLLATE utf8_spanish2_ci NOT NULL,
  `VTAnumSer` varchar(5) COLLATE utf8_spanish2_ci NOT NULL,
  `VTAnumDoc` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
  `VTAfechaV` datetime NOT NULL,
  `VTAtipPag` varchar(3) COLLATE utf8_spanish2_ci NOT NULL,
  `VTAnumCuo` int(11) NOT NULL,
  `VTAperiod` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
  `VTAfchPag` date DEFAULT NULL,
  `VTAmonTot` decimal(10,2) NOT NULL,
  `VTAigv` decimal(10,2) NOT NULL,
  `VTAestado` char(1) COLLATE utf8_spanish2_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Volcado de datos para la tabla `ventas`
--

INSERT INTO `ventas` (`idVenta`, `idUsuario`, `idInteresado`, `idProducto`, `VTAtipDoc`, `VTAnumSer`, `VTAnumDoc`, `VTAfechaV`, `VTAtipPag`, `VTAnumCuo`, `VTAperiod`, `VTAfchPag`, `VTAmonTot`, `VTAigv`, `VTAestado`) VALUES
(1, 1, 2, 5, 'BOL', '001', '00000028', '2024-02-07 06:21:26', 'CRE', 48, 'MENSUAL', '2024-02-07', '12100.00', '1845.76', 'A');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `caja`
--
ALTER TABLE `caja`
  ADD PRIMARY KEY (`idCaja`);

--
-- Indices de la tabla `caja_chica`
--
ALTER TABLE `caja_chica`
  ADD PRIMARY KEY (`idCaja_Chica`);

--
-- Indices de la tabla `comprobantes`
--
ALTER TABLE `comprobantes`
  ADD PRIMARY KEY (`idComprobante`);

--
-- Indices de la tabla `configuracion`
--
ALTER TABLE `configuracion`
  ADD PRIMARY KEY (`idConfiguracion`);

--
-- Indices de la tabla `cuotas_pago`
--
ALTER TABLE `cuotas_pago`
  ADD PRIMARY KEY (`idCuotaPago`),
  ADD KEY `fk_Cuotas_Ventas_idx` (`idVenta`);

--
-- Indices de la tabla `empleados`
--
ALTER TABLE `empleados`
  ADD PRIMARY KEY (`idEmpleado`);

--
-- Indices de la tabla `interesados`
--
ALTER TABLE `interesados`
  ADD PRIMARY KEY (`idInteresado`);

--
-- Indices de la tabla `productos`
--
ALTER TABLE `productos`
  ADD PRIMARY KEY (`idProducto`),
  ADD KEY `fk_productos_proyectos_idx` (`idProyecto`);

--
-- Indices de la tabla `proyectos`
--
ALTER TABLE `proyectos`
  ADD PRIMARY KEY (`idProyecto`);

--
-- Indices de la tabla `ventas`
--
ALTER TABLE `ventas`
  ADD PRIMARY KEY (`idVenta`),
  ADD KEY `fk_Ventas_Interesados_idx` (`idInteresado`),
  ADD KEY `fk_Ventas_Productos_idx` (`idProducto`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `caja`
--
ALTER TABLE `caja`
  MODIFY `idCaja` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `caja_chica`
--
ALTER TABLE `caja_chica`
  MODIFY `idCaja_Chica` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `comprobantes`
--
ALTER TABLE `comprobantes`
  MODIFY `idComprobante` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `configuracion`
--
ALTER TABLE `configuracion`
  MODIFY `idConfiguracion` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `cuotas_pago`
--
ALTER TABLE `cuotas_pago`
  MODIFY `idCuotaPago` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;

--
-- AUTO_INCREMENT de la tabla `empleados`
--
ALTER TABLE `empleados`
  MODIFY `idEmpleado` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `interesados`
--
ALTER TABLE `interesados`
  MODIFY `idInteresado` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `productos`
--
ALTER TABLE `productos`
  MODIFY `idProducto` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT de la tabla `proyectos`
--
ALTER TABLE `proyectos`
  MODIFY `idProyecto` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `ventas`
--
ALTER TABLE `ventas`
  MODIFY `idVenta` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `cuotas_pago`
--
ALTER TABLE `cuotas_pago`
  ADD CONSTRAINT `fk_Cuotas_Ventas` FOREIGN KEY (`idVenta`) REFERENCES `ventas` (`idVenta`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Filtros para la tabla `productos`
--
ALTER TABLE `productos`
  ADD CONSTRAINT `fk_productos_proyectos` FOREIGN KEY (`idProyecto`) REFERENCES `proyectos` (`idProyecto`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Filtros para la tabla `ventas`
--
ALTER TABLE `ventas`
  ADD CONSTRAINT `fk_Ventas_Interesados` FOREIGN KEY (`idInteresado`) REFERENCES `interesados` (`idInteresado`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_Ventas_Productos` FOREIGN KEY (`idProducto`) REFERENCES `productos` (`idProducto`) ON DELETE NO ACTION ON UPDATE NO ACTION;
COMMIT;

