-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 25-08-2022 a las 14:07:50
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30




--
-- Base de datos: `erp_comercial_sistema`
--

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

--
-- Estructura de tabla para la tabla `almacenes`
--

CREATE TABLE `almacenes` (
  `id` int(11) NOT NULL,
  `cant_producto` int(11) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `codigo_producto` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `almacenes` (`id`, `cant_producto`, `id_producto`, `codigo_producto`, `id_centro_costo`) VALUES
(1, 0, 1, 'codigo', 1),
(2, 0, 1, 'codigo', 2),
(3, 0, 1, 'codigo', 3),
(4, 17, 2, 'P001', 1),
(5, 0, 2, 'P001', 2),
(6, 0, 2, 'P001', 3),
(7, 0, 3, 'P002', 1),
(8, 0, 3, 'P002', 2),
(9, 0, 3, 'P002', 3),
(10, 26, 4, 'P003', 1),
(11, 0, 4, 'P003', 2),
(12, 0, 4, 'P003', 3),
(13, 0, 5, 'P004', 1),
(14, 0, 5, 'P004', 2),
(15, 0, 5, 'P004', 3),
(16, 0, 6, 'P005', 1),
(17, 0, 6, 'P005', 2),
(18, 0, 6, 'P005', 3),
(19, 0, 7, 'P006', 1),
(20, 0, 7, 'P006', 2),
(21, 0, 7, 'P006', 3),
(22, 0, 8, 'P007', 1),
(23, 0, 8, 'P007', 2),
(24, 0, 8, 'P007', 3),
(25, 0, 9, 'P008', 1),
(26, 0, 9, 'P008', 2),
(27, 0, 9, 'P008', 3),
(28, 0, 10, '', 1),
(29, 0, 10, '', 2),
(30, 0, 10, '', 3),
(31, 0, 11, 'P009', 1),
(32, 0, 11, 'P009', 2),
(33, 0, 11, 'P009', 3);

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

--
-- Estructura de tabla para la tabla `almacenes_transito`
--

CREATE TABLE `almacenes_transito` (
  `id` int(11) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `codigo_producto` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `cantidad` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `id_centro_costo_origen` int(11) NOT NULL,
  `id_centro_costo_destino` int(11) NOT NULL,
  `id_transferencia` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(50) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `almacenes_transito` (`id`, `id_producto`, `codigo_producto`, `cantidad`, `costo_unitario`, `id_centro_costo_origen`, `id_centro_costo_destino`, `id_transferencia`, `nro_orden`, `estado`) VALUES
(1, 2, 'P001', 3, '4.00', 1, 2, 1, 'NT000001', 'En Transito'),
(2, 4, 'P003', 4, '5.00', 1, 2, 1, 'NT000001', 'En Transito');

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

--
-- Estructura de tabla para la tabla `asientos`
--

CREATE TABLE `asientos` (
  `id` int(11) NOT NULL,
  `nro_asiento` int(11) NOT NULL,
  `importe_debe` decimal(10,2) NOT NULL,
  `importe_haber` decimal(10,2) NOT NULL,
  `id_usuario` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `asientos` (`id`, `nro_asiento`, `importe_debe`, `importe_haber`, `id_usuario`) VALUES
(1, 23, '3605.80', '3605.80', 1),
(2, 24, '8500.00', '8500.00', 1),
(3, 25, '9800.00', '9800.00', 1),
(4, 26, '5800.00', '5800.00', 1),
(5, 27, '90.00', '90.00', 1);

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

--
-- Estructura de tabla para la tabla `cambio`
--

CREATE TABLE `cambio` (
  `id` int(11) NOT NULL,
  `cambio` decimal(10,2) NOT NULL,
  `estado` varchar(15) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cambio` (`id`, `cambio`, `estado`) VALUES
(1, '6.96', 'Activo');

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

--
-- Estructura de tabla para la tabla `categorias`
--

CREATE TABLE `categorias` (
  `id` int(11) NOT NULL,
  `categoria` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(50) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `categorias` (`id`, `categoria`, `estado`) VALUES
(1, 'COMPUTADORAS', 'Activo'),
(2, 'ACCESORIOS', 'Activo'),
(3, 'HERRAMIENTAS', 'Activo');

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

--
-- Estructura de tabla para la tabla `centros_costo`
--

CREATE TABLE `centros_costo` (
  `id` int(11) NOT NULL,
  `direccion` varchar(250) COLLATE latin1_spanish_ci NOT NULL,
  `ciudad` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `telefono` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(15) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `centros_costo` (`id`, `direccion`, `ciudad`, `telefono`, `estado`) VALUES
(1, 'CENTRAL', 'Cochabamba', '60799000', 'Activo'),
(2, 'AV. AYACUCHO', 'Cochabamba', '4456231', 'Activo'),
(3, 'SHOPPING AC', 'Oruro', '4444', 'Activo');

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

--
-- Estructura de tabla para la tabla `clientes`
--

CREATE TABLE `clientes` (
  `id` int(11) NOT NULL,
  `codigo` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `empresa` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `razon_social` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `nit` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `telefono` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `email` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `web` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `direccion` varchar(250) COLLATE latin1_spanish_ci NOT NULL,
  `ciudad` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `contacto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `telefono_contacto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `email_contacto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `suspendido` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `linea_credito` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `limite` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `clientes` (`id`, `codigo`, `empresa`, `razon_social`, `nit`, `telefono`, `email`, `web`, `direccion`, `ciudad`, `contacto`, `estado`, `telefono_contacto`, `email_contacto`, `suspendido`, `linea_credito`, `limite`) VALUES
(1, 'CL1', 'Juan Alvarez 333', 'Alvarez', '123456', '4455223', 'juanalv@gmail.com', '', 'Av General Achá', 'Cochabamba', 'Juan Alvarez', 'Activo', '', '', '', '', '0.00'),
(2, 'CL2', 'Erick Arenas', 'Arenas 3333', '789456', '44488552', 'ericka@hotmail.com', 'www.importadoraarenas.com', 'Av. Central Ramirez nro 862', 'Cochabamba', 'Erick Arenas', 'Activo', '', '', '', '', '0.00'),
(4, 'CL4', 'PEREDO', 'PEREDO', '123', '', '', '', '', 'Cochabamba', '', 'Activo', '', '', '', '', '0.00'),
(6, '', 'zfsdaf', '', '', '', '', '', '', 'Beni', '', 'Activo', '', '', '', '', '0.00'),
(7, 'CL7', 'JUAN PEREZ', 'PEREZ', '1234654', '', '', '', '', 'Cochabamba', '', 'Activo', '', '', '', '', '0.00'),
(8, '', 'aaa', '', '', '', '', '', '', 'Beni', '', 'Activo', '', '', '', '', '0.00'),
(9, '', 'aaa', 'bbb', '', '', '', '', '', 'Beni', '', 'Activo', '', '', '', '', '0.00'),
(10, '', 'aaa', 'bbb', '', '', '', '', '', 'Beni', '', 'Activo', '', '', '', '', '0.00'),
(11, '', 'aaa', 'bbb', '', '', '', '', '', 'Beni', '', 'Inactivo', '', '', '', '', '0.00'),
(12, '', '', '', '', '', '', '', '', '', '', 'Activo', '', '', '', '', '0.00');

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

--
-- Estructura de tabla para la tabla `cobranzas`
--

CREATE TABLE `cobranzas` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `observaciones` varchar(200) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `id_encargado` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cobranzas` (`id`, `nro_orden`, `gestion`, `fecha`, `hora`, `total`, `observaciones`, `estado`, `id_encargado`, `id_centro_costo`) VALUES
(1, 'IC000001', '2021', '2021-08-27', '10:47:28', '2900.00', '', 'Anulado', 1, 1),
(2, 'IC000002', '2021', '2021-09-03', '21:09:30', '520.00', '', 'Cancelado', 1, 1),
(3, 'IC000003', '2021', '2021-09-03', '23:35:43', '10.00', '', 'Cancelado', 1, 1),
(4, 'IC000004', '2021', '2021-09-03', '23:36:28', '140.00', 'aa bb cc', 'Cancelado', 1, 1),
(5, 'IC000005', '2021', '2021-09-09', '21:05:24', '644.00', '', 'Cancelado', 1, 1),
(6, 'IC000006', '2021', '2021-09-09', '21:45:57', '819.00', '', 'Cancelado', 1, 1),
(7, 'IC000007', '2021', '2021-09-15', '10:44:15', '483.00', '', 'Cancelado', 1, 1),
(8, 'IC000008', '2021', '2021-10-01', '09:49:42', '50.00', '', 'Cancelado', 1, 1),
(9, 'IC000009', '2021', '2021-10-01', '10:56:16', '110.00', '', 'Cancelado', 1, 1),
(10, 'IC0000010', '2021', '2021-10-01', '11:01:08', '20.00', '', 'Cancelado', 1, 1),
(11, 'IC000011', '2021', '2021-10-01', '11:06:28', '400.00', 'PAGO CREDITO', 'Anulado', 1, 1),
(12, 'IC000012', '2021', '2021-10-01', '11:07:18', '20.00', '', 'Cancelado', 1, 1),
(13, 'IC000013', '2021', '2021-10-28', '14:50:35', '180.00', '', 'Cancelado', 1, 1),
(14, 'IC000014', '2021', '2021-10-28', '14:51:20', '80.00', '', 'Cancelado', 1, 1),
(15, 'IC000015', '2021', '2021-11-06', '19:16:07', '110.00', '', 'Cancelado', 1, 1),
(16, 'IC000016', '2021', '2021-11-09', '14:42:46', '120.00', '', 'Anulado', 1, 1),
(17, 'IC000001', '2022', '2022-01-20', '07:29:01', '150.00', '', 'Cancelado', 1, 1),
(18, 'IC000002', '2022', '2022-01-20', '08:31:07', '110.00', '', 'Cancelado', 1, 1),
(19, 'IC000003', '2022', '2022-01-20', '08:41:44', '30.00', '', 'Cancelado', 1, 1),
(20, 'IC000004', '2022', '2022-01-20', '08:42:11', '90.00', '', 'Cancelado', 1, 1),
(21, 'IC000005', '2022', '2022-01-20', '08:43:01', '30.00', '', 'Cancelado', 1, 1),
(22, 'IC000006', '2022', '2022-01-20', '08:44:00', '60.00', '', 'Cancelado', 1, 1),
(23, 'IC000007', '2022', '2022-01-20', '08:44:18', '60.00', '', 'Cancelado', 1, 1),
(24, 'IC000008', '2022', '2022-01-20', '08:46:30', '30.00', '', 'Cancelado', 1, 1),
(25, 'IC000009', '2022', '2022-01-20', '08:47:03', '100.00', '', 'Cancelado', 1, 1),
(26, 'IC0000010', '2022', '2022-01-20', '08:48:40', '60.00', '', 'Cancelado', 1, 1),
(27, 'IC000011', '2022', '2022-01-20', '08:53:30', '60.00', '', 'Cancelado', 1, 1),
(28, 'IC000012', '2022', '2022-01-20', '09:06:29', '60.00', '', 'Cancelado', 1, 1),
(29, 'IC000013', '2022', '2022-01-20', '09:17:59', '200.00', '', 'Cancelado', 1, 1),
(30, 'IC000014', '2022', '2022-01-20', '09:49:18', '100.00', '', 'Cancelado', 1, 1),
(31, 'IC000015', '2022', '2022-01-20', '09:56:00', '60.00', '', 'Cancelado', 1, 1),
(32, 'IC000016', '2022', '2022-01-20', '09:57:20', '100.00', '', 'Cancelado', 1, 1),
(33, 'IC000017', '2022', '2022-01-20', '10:05:20', '100.00', '', 'Cancelado', 1, 1),
(34, 'IC000018', '2022', '2022-01-20', '10:06:00', '100.00', '', 'Cancelado', 1, 1),
(35, 'IC000019', '2022', '2022-01-20', '10:16:21', '30.00', '', 'Cancelado', 1, 1),
(36, 'IC000020', '2022', '2022-01-20', '10:21:13', '30.00', '', 'Cancelado', 1, 1),
(37, 'IC000021', '2022', '2022-01-22', '23:48:34', '1988.00', '', 'Cancelado', 1, 1),
(38, 'IC000022', '2022', '2022-01-22', '23:53:23', '690.00', '', 'Cancelado', 1, 1),
(39, 'IC000023', '2022', '2022-01-22', '00:02:26', '651.00', '', 'Cancelado', 1, 1),
(40, 'IC000024', '2022', '2022-01-22', '10:02:08', '483.00', '', 'Cancelado', 1, 1),
(41, 'IC000025', '2022', '2022-01-22', '10:05:27', '180.00', '', 'Cancelado', 1, 1),
(42, 'IC000026', '2022', '2022-01-22', '10:07:22', '165.00', '', 'Cancelado', 1, 1),
(43, 'IC000027', '2022', '2022-01-22', '10:13:02', '224.00', '', 'Cancelado', 1, 1),
(44, 'IC000028', '2022', '2022-01-22', '10:15:04', '308.00', '', 'Cancelado', 1, 1),
(45, 'IC000029', '2022', '2022-01-22', '10:16:21', '330.00', '', 'Cancelado', 1, 1),
(46, 'IC000030', '2022', '2022-01-22', '10:18:48', '252.00', '', 'Cancelado', 1, 1),
(47, 'IC000031', '2022', '2022-01-22', '10:19:40', '330.00', '', 'Cancelado', 1, 1),
(48, 'IC000032', '2022', '2022-01-22', '10:20:11', '330.00', '', 'Cancelado', 1, 1),
(49, 'IC000033', '2022', '2022-01-22', '10:22:10', '165.00', '', 'Cancelado', 1, 1),
(50, 'IC000034', '2022', '2022-01-22', '10:24:34', '224.00', '', 'Cancelado', 1, 1),
(51, 'IC000035', '2022', '2022-01-22', '10:25:54', '90.00', '', 'Cancelado', 1, 1),
(52, 'IC000036', '2022', '2022-01-22', '10:30:28', '154.00', '', 'Cancelado', 1, 1),
(53, 'IC000037', '2022', '2022-01-22', '10:31:23', '1078.00', '', 'Cancelado', 1, 1),
(54, 'IC000038', '2022', '2022-01-22', '10:35:02', '896.00', '', 'Cancelado', 1, 1),
(55, 'IC000039', '2022', '2022-02-11', '15:35:12', '500.00', '', 'Cancelado', 1, 1),
(56, 'IC000040', '2022', '2022-04-05', '16:09:57', '28.00', '', 'Cancelado', 1, 1),
(57, 'IC000041', '2022', '2022-04-11', '17:58:26', '3203.00', '', 'Anulado', 1, 1),
(58, 'IC000042', '2022', '2022-04-18', '11:22:07', '3.00', '', 'Cancelado', 1, 1),
(59, 'IC000001', '2022', '2022-04-25', '13:55:21', '3.00', '', 'Cancelado', 5, 2),
(60, 'IC000043', '2022', '2022-07-04', '10:41:00', '322.00', '', 'Cancelado', 1, 1);

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

--
-- Estructura de tabla para la tabla `cod_asientos`
--

CREATE TABLE `cod_asientos` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_asientos` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2018', 0),
(2, 2, '2018', 0),
(3, 3, '2018', 0),
(4, 4, '2018', 0),
(5, 5, '2018', 0),
(6, 6, '2018', 0),
(7, 7, '2018', 0),
(8, 8, '2018', 0),
(9, 9, '2018', 0),
(10, 10, '2018', 0),
(11, 11, '2018', 0),
(12, 12, '2018', 0),
(13, 13, '2018', 0),
(14, 14, '2018', 0),
(15, 15, '2018', 0),
(16, 16, '2018', 0),
(17, 17, '2018', 0),
(18, 18, '2018', 0),
(19, 19, '2018', 0),
(20, 20, '2018', 0),
(21, 21, '2018', 0),
(22, 22, '2018', 0),
(23, 23, '2018', 0),
(24, 24, '2018', 0),
(25, 25, '2018', 0),
(26, 26, '2018', 0),
(27, 27, '2018', 0);

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

--
-- Estructura de tabla para la tabla `cod_cobranza`
--

CREATE TABLE `cod_cobranza` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_cobranza` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1),
(3, 3, '2021', 1),
(4, 4, '2021', 1),
(5, 5, '2021', 1),
(6, 6, '2021', 1),
(7, 7, '2021', 1),
(8, 8, '2021', 1),
(9, 9, '2021', 1),
(10, 10, '2021', 1),
(11, 11, '2021', 1),
(12, 12, '2021', 1),
(13, 13, '2021', 1),
(14, 14, '2021', 1),
(15, 15, '2021', 1),
(16, 16, '2021', 1),
(17, 1, '2022', 1),
(18, 2, '2022', 1),
(19, 3, '2022', 1),
(20, 4, '2022', 1),
(21, 5, '2022', 1),
(22, 6, '2022', 1),
(23, 7, '2022', 1),
(24, 8, '2022', 1),
(25, 9, '2022', 1),
(26, 10, '2022', 1),
(27, 11, '2022', 1),
(28, 12, '2022', 1),
(29, 13, '2022', 1),
(30, 14, '2022', 1),
(31, 15, '2022', 1),
(32, 16, '2022', 1),
(33, 17, '2022', 1),
(34, 18, '2022', 1),
(35, 19, '2022', 1),
(36, 20, '2022', 1),
(37, 21, '2022', 1),
(38, 22, '2022', 1),
(39, 23, '2022', 1),
(40, 24, '2022', 1),
(41, 25, '2022', 1),
(42, 26, '2022', 1),
(43, 27, '2022', 1),
(44, 28, '2022', 1),
(45, 29, '2022', 1),
(46, 30, '2022', 1),
(47, 31, '2022', 1),
(48, 32, '2022', 1),
(49, 33, '2022', 1),
(50, 34, '2022', 1),
(51, 35, '2022', 1),
(52, 36, '2022', 1),
(53, 37, '2022', 1),
(54, 38, '2022', 1),
(55, 39, '2022', 1),
(56, 40, '2022', 1),
(57, 41, '2022', 1),
(58, 42, '2022', 1),
(59, 1, '2022', 2),
(60, 43, '2022', 1);

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

--
-- Estructura de tabla para la tabla `cod_compras`
--

CREATE TABLE `cod_compras` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_compras` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1),
(3, 3, '2021', 1),
(4, 3, '2021', 1),
(5, 4, '2021', 1),
(6, 5, '2021', 1),
(7, 6, '2021', 1),
(8, 7, '2021', 1),
(9, 8, '2021', 1),
(10, 9, '2021', 1),
(11, 10, '2021', 1),
(12, 11, '2021', 1),
(13, 12, '2021', 1),
(14, 1, '2022', 1),
(15, 2, '2022', 1),
(16, 42, '2022', 1),
(17, 43, '2022', 1),
(18, 44, '2022', 1),
(19, 44, '2022', 1),
(20, 45, '2022', 1),
(21, 46, '2022', 1);

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

--
-- Estructura de tabla para la tabla `cod_comprobante`
--

CREATE TABLE `cod_comprobante` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

--
-- Estructura de tabla para la tabla `cod_cotizaciones`
--

CREATE TABLE `cod_cotizaciones` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `cod_cotizaciones` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1);

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

--
-- Estructura de tabla para la tabla `cod_gastos`
--

CREATE TABLE `cod_gastos` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

--
-- Estructura de tabla para la tabla `cod_ingreso`
--

CREATE TABLE `cod_ingreso` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_ingreso` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1),
(3, 3, '2021', 1),
(4, 4, '2021', 1),
(5, 5, '2021', 1),
(6, 6, '2021', 1),
(7, 7, '2021', 1),
(8, 8, '2021', 1),
(9, 9, '2021', 1),
(10, 10, '2021', 1),
(11, 11, '2021', 1),
(12, 12, '2021', 1),
(13, 13, '2021', 1),
(14, 14, '2021', 1),
(15, 1, '2021', 2),
(16, 15, '2021', 1),
(17, 16, '2021', 1),
(18, 17, '2021', 1),
(19, 18, '2021', 1),
(20, 19, '2021', 1),
(21, 20, '2021', 1),
(22, 21, '2021', 1),
(23, 22, '2021', 1),
(24, 23, '2021', 1),
(25, 1, '2022', 1),
(26, 2, '2022', 1),
(27, 3, '2022', 1),
(28, 4, '2022', 1),
(29, 5, '2022', 1),
(30, 6, '2022', 1),
(31, 7, '2022', 1),
(32, 8, '2022', 1),
(33, 9, '2022', 1),
(34, 10, '2022', 1);

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

--
-- Estructura de tabla para la tabla `cod_pago`
--

CREATE TABLE `cod_pago` (
  `id` int(11) NOT NULL,
  `cod` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_pago` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, '1', '2022', 1),
(2, '2', '2022', 1);

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

--
-- Estructura de tabla para la tabla `cod_salida`
--

CREATE TABLE `cod_salida` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_salida` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1),
(3, 3, '2021', 1),
(4, 4, '2021', 1),
(5, 5, '2021', 1),
(6, 6, '2021', 1),
(7, 7, '2021', 1),
(8, 8, '2021', 1),
(9, 1, '2022', 1),
(10, 2, '2022', 1),
(11, 3, '2022', 1),
(12, 4, '2022', 1),
(13, 5, '2022', 1),
(14, 6, '2022', 1),
(15, 7, '2022', 1),
(16, 8, '2022', 1),
(17, 9, '2022', 1),
(18, 10, '2022', 1),
(19, 11, '2022', 1),
(20, 12, '2022', 1),
(21, 13, '2022', 1),
(22, 14, '2022', 1),
(23, 15, '2022', 1),
(24, 16, '2022', 1),
(25, 17, '2022', 1),
(26, 18, '2022', 1),
(27, 19, '2022', 1),
(28, 20, '2022', 1),
(29, 21, '2022', 1),
(30, 22, '2022', 1),
(31, 23, '2022', 1),
(32, 24, '2022', 1),
(33, 25, '2022', 1),
(34, 26, '2022', 1),
(35, 27, '2022', 1),
(36, 28, '2022', 1),
(37, 29, '2022', 1),
(38, 30, '2022', 1),
(39, 31, '2022', 1),
(40, 32, '2022', 1),
(41, 33, '2022', 1),
(42, 34, '2022', 1),
(43, 35, '2022', 1),
(44, 36, '2022', 1),
(45, 37, '2022', 1),
(46, 38, '2022', 1),
(47, 39, '2022', 1),
(48, 40, '2022', 1),
(49, 41, '2022', 1),
(50, 42, '2022', 1);

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

--
-- Estructura de tabla para la tabla `cod_transferencia`
--

CREATE TABLE `cod_transferencia` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_transferencia` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1),
(3, 1, '2021', 2),
(4, 1, '2022', 1);

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

--
-- Estructura de tabla para la tabla `cod_ventas`
--

CREATE TABLE `cod_ventas` (
  `id` int(11) NOT NULL,
  `cod` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cod_ventas` (`id`, `cod`, `gestion`, `id_centro_costo`) VALUES
(1, 1, '2021', 1),
(2, 2, '2021', 1),
(3, 3, '2021', 1),
(4, 4, '2021', 1),
(5, 5, '2021', 1),
(6, 6, '2021', 1),
(7, 1, '2022', 1),
(8, 2, '2022', 1),
(9, 3, '2022', 1),
(10, 4, '2022', 1),
(11, 5, '2022', 1),
(12, 6, '2022', 1),
(13, 7, '2022', 1),
(14, 8, '2022', 1),
(15, 9, '2022', 1),
(16, 10, '2022', 1),
(17, 11, '2022', 1),
(18, 12, '2022', 1),
(19, 13, '2022', 1),
(20, 14, '2022', 1),
(21, 15, '2022', 1),
(22, 16, '2022', 1),
(23, 17, '2022', 1),
(24, 18, '2022', 1),
(25, 19, '2022', 1),
(26, 20, '2022', 1),
(27, 21, '2022', 1),
(28, 22, '2022', 1),
(29, 23, '2022', 1),
(30, 24, '2022', 1),
(31, 25, '2022', 1),
(32, 26, '2022', 1),
(33, 27, '2022', 1),
(34, 28, '2022', 1),
(35, 29, '2022', 1),
(36, 30, '2022', 1),
(37, 31, '2022', 1),
(38, 32, '2022', 1),
(39, 33, '2022', 1),
(40, 34, '2022', 1),
(41, 35, '2022', 1),
(42, 36, '2022', 1),
(43, 37, '2022', 1),
(44, 38, '2022', 1),
(45, 39, '2022', 1),
(46, 40, '2022', 1),
(47, 41, '2022', 1),
(48, 42, '2022', 1);

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

--
-- Estructura de tabla para la tabla `compras`
--

CREATE TABLE `compras` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `fecha_vencimiento` date NOT NULL,
  `forma_pago` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_doc` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `nro_doc` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `a_cuenta` decimal(10,2) NOT NULL,
  `saldo` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `observaciones` varchar(200) COLLATE latin1_spanish_ci NOT NULL,
  `estado_pago` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_compra` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `id_personal` int(11) NOT NULL,
  `id_proveedor` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `compras` (`id`, `nro_orden`, `gestion`, `fecha`, `hora`, `fecha_vencimiento`, `forma_pago`, `tipo_doc`, `nro_doc`, `a_cuenta`, `saldo`, `total`, `observaciones`, `estado_pago`, `estado`, `tipo_compra`, `id_personal`, `id_proveedor`, `id_centro_costo`) VALUES
(1, 'NC000001', '2021', '2021-08-27', '18:29:04', '0000-00-00', 'Contado', 'Factura', '151515', '0.00', '0.00', '2020.00', 'primera compra', 'Completado', 'Pendiente', '', 1, 1, 1),
(2, 'NC000002', '2021', '2021-08-27', '07:15:32', '0000-00-00', 'Contado', 'Factura', '345353', '0.00', '0.00', '935.00', 'TEST 2222', 'Anulado', 'Anulado', '', 1, 1, 1),
(3, 'NC000003', '2021', '2021-08-27', '07:19:31', '0000-00-00', 'Credito', 'Factura', '5554444', '0.00', '14610.00', '14610.00', 'TEST', 'Anulado', 'Anulado', '', 1, 8, 1),
(4, 'NC000003', '2021', '2021-08-27', '07:20:24', '0000-00-00', 'Credito', 'Factura', '5554444', '0.00', '14610.00', '14610.00', 'TEST', 'S. Pendiente', 'Pendiente', '', 1, 8, 1),
(5, 'NC000004', '2021', '2021-08-27', '09:12:28', '0000-00-00', 'Contado', 'Factura', '456456', '0.00', '0.00', '5750.00', 'compra tablets', 'Completado', 'Pendiente', '', 1, 10, 1),
(6, 'NC000005', '2021', '2021-08-27', '10:42:30', '0000-00-00', 'Contado', 'Factura', '554433', '0.00', '0.00', '4036.00', 'test', 'Completado', 'Pendiente', '', 1, 4, 1),
(7, 'NC000006', '2021', '2021-09-01', '10:29:01', '0000-00-00', 'Contado', '', '', '0.00', '0.00', '406.00', 'TEST', 'Completado', 'Pendiente', '', 1, 4, 1),
(8, 'NC000007', '2021', '2021-09-03', '21:08:34', '0000-00-00', 'Contado', 'Factura', '7979', '0.00', '0.00', '998.00', 'test', 'Completado', 'Pendiente', '', 1, 1, 1),
(9, 'NC000008', '2021', '2021-09-08', '17:09:23', '0000-00-00', 'Contado', 'Factura', '70807807', '0.00', '0.00', '670.00', 'tset 333', 'Completado', 'Pendiente', '', 1, 1, 1),
(10, 'NC000009', '2021', '2021-10-28', '14:46:26', '0000-00-00', 'Contado', 'Factura', '435354', '0.00', '0.00', '36.00', 'OBS', 'Anulado', 'Anulado', '', 1, 1, 1),
(11, 'NC0000010', '2021', '2021-11-05', '00:11:41', '0000-00-00', 'Contado', 'Factura', '43535', '0.00', '0.00', '279.00', '', 'Completado', 'Pendiente', '', 1, 1, 1),
(12, 'NC000011', '2021', '2021-11-09', '14:47:29', '0000-00-00', 'Contado', 'Factura', '231321', '0.00', '0.00', '78.00', '', 'Completado', 'Pendiente', '', 1, 1, 1),
(13, 'NC000012', '2021', '2021-11-10', '20:18:51', '0000-00-00', 'Contado', 'Factura', '123123', '0.00', '0.00', '1050.00', '', 'Completado', 'Pendiente', '', 1, 38, 1),
(14, 'NC000001', '2022', '2022-01-22', '23:15:56', '0000-00-00', 'Contado', 'Factura', '24234234', '0.00', '0.00', '1434.90', 'compra productos importacion', 'Completado', 'Pendiente', '', 1, 1, 1),
(15, 'NC000002', '2022', '2022-04-05', '16:05:31', '0000-00-00', 'Contado', 'Factura', '456456', '0.00', '0.00', '28.00', '', 'Completado', 'Pendiente', '', 1, 2, 1),
(16, 'NC000003', '2022', '2022-04-18', '11:27:39', '0000-00-00', 'Contado', '', '', '0.00', '0.00', '6.00', '', 'Completado', 'Pendiente', '', 1, 1, 1),
(17, 'NC000043', '2022', '2022-04-18', '13:52:36', '0000-00-00', 'Credito', 'Factura', '4353', '1.00', '39.00', '40.00', '', 'S. Pendiente', 'Pendiente', '', 1, 1, 1),
(18, 'NC000044', '2022', '2022-04-25', '11:13:57', '0000-00-00', 'Contado', '', '', '0.00', '0.00', '60.00', '', 'Completado', 'Pendiente', '', 1, 1, 1),
(19, 'NC000044', '2022', '2022-04-25', '11:15:10', '0000-00-00', 'Contado', '', '', '0.00', '0.00', '60.00', '', 'Completado', 'Pendiente', '', 1, 1, 1),
(20, 'NC000045', '2022', '2022-04-25', '11:30:11', '0000-00-00', 'Contado', '', '', '0.00', '0.00', '230.00', '', 'Completado', 'Pendiente', '', 1, 1, 1),
(21, 'NC000046', '2022', '2022-07-04', '10:54:59', '0000-00-00', 'Contado', '', '', '0.00', '0.00', '6.00', '', 'Completado', 'Pendiente', '', 1, 1, 1);

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

--
-- Estructura de tabla para la tabla `configuracion_accesos`
--

CREATE TABLE `configuracion_accesos` (
  `id` int(11) NOT NULL,
  `m_ventas` varchar(3) NOT NULL,
  `m_compras` varchar(3) NOT NULL,
  `m_almacen` varchar(3) NOT NULL,
  `m_configuracion` varchar(3) NOT NULL,
  `v_nv` varchar(3) NOT NULL,
  `v_res` varchar(3) NOT NULL,
  `v_rep` varchar(3) NOT NULL,
  `v_cl` varchar(3) NOT NULL,
  `v_cb` varchar(3) NOT NULL,
  `c_nc` varchar(3) NOT NULL,
  `c_res` varchar(3) NOT NULL,
  `c_rep` varchar(3) NOT NULL,
  `c_pv` varchar(3) NOT NULL,
  `a_pr` varchar(3) NOT NULL,
  `a_st` varchar(3) NOT NULL,
  `a_in` varchar(3) NOT NULL,
  `a_sa` varchar(3) NOT NULL,
  `a_ti` varchar(3) NOT NULL,
  `a_ts` varchar(3) NOT NULL,
  `a_cp` varchar(3) NOT NULL,
  `cf_us` varchar(3) NOT NULL,
  `cf_cc` varchar(3) NOT NULL,
  `cf_na` varchar(3) NOT NULL,
  `cf_de` varchar(3) NOT NULL,
  `cf_ge` varchar(3) NOT NULL,
  `id_nivel` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `configuracion_accesos` (`id`, `m_ventas`, `m_compras`, `m_almacen`, `m_configuracion`, `v_nv`, `v_res`, `v_rep`, `v_cl`, `v_cb`, `c_nc`, `c_res`, `c_rep`, `c_pv`, `a_pr`, `a_st`, `a_in`, `a_sa`, `a_ti`, `a_ts`, `a_cp`, `cf_us`, `cf_cc`, `cf_na`, `cf_de`, `cf_ge`, `id_nivel`) VALUES
(1, '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', 1),
(2, '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', 2),
(3, '1', '0', '0', '0', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 3),
(4, '0', '1', '1', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '', 5),
(5, '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '1', '', 4);

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

--
-- Estructura de tabla para la tabla `configuracion_niveles`
--

CREATE TABLE `configuracion_niveles` (
  `id` mediumint(15) NOT NULL,
  `categoria` varchar(5) CHARACTER SET latin1 NOT NULL,
  `sub_categoria` varchar(5) CHARACTER SET latin1 NOT NULL,
  `sub_sub_categoria` varchar(5) CHARACTER SET latin1 NOT NULL,
  `producto` varchar(5) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci ROW_FORMAT=DYNAMIC;

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

INSERT INTO `configuracion_niveles` (`id`, `categoria`, `sub_categoria`, `sub_sub_categoria`, `producto`) VALUES
(1, '1', '1', '0', '1');

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

--
-- Estructura de tabla para la tabla `configuracion_unidades`
--

CREATE TABLE `configuracion_unidades` (
  `id` mediumint(15) NOT NULL,
  `m` varchar(5) CHARACTER SET latin1 NOT NULL,
  `cm` varchar(5) CHARACTER SET latin1 NOT NULL,
  `inch` varchar(5) CHARACTER SET latin1 NOT NULL,
  `ft` varchar(5) CHARACTER SET latin1 NOT NULL,
  `kg` varchar(5) CHARACTER SET latin1 NOT NULL,
  `g` varchar(5) CHARACTER SET latin1 NOT NULL,
  `a` varchar(5) CHARACTER SET latin1 NOT NULL,
  `mg` varchar(5) CHARACTER SET latin1 NOT NULL,
  `oz` varchar(5) CHARACTER SET latin1 NOT NULL,
  `bolsa50kg` varchar(5) CHARACTER SET latin1 NOT NULL,
  `lb` varchar(5) CHARACTER SET latin1 NOT NULL,
  `t` varchar(5) CHARACTER SET latin1 NOT NULL,
  `bolsa23kg` varchar(5) CHARACTER SET latin1 NOT NULL,
  `q` varchar(5) CHARACTER SET latin1 NOT NULL,
  `l` varchar(5) CHARACTER SET latin1 NOT NULL,
  `ml` varchar(5) CHARACTER SET latin1 NOT NULL,
  `m3` varchar(5) CHARACTER SET latin1 NOT NULL,
  `ft3` varchar(5) CHARACTER SET latin1 NOT NULL,
  `m2` varchar(5) CHARACTER SET latin1 NOT NULL,
  `ft2` varchar(5) CHARACTER SET latin1 NOT NULL,
  `unidad` varchar(5) CHARACTER SET latin1 NOT NULL,
  `caja` varchar(5) CHARACTER SET latin1 NOT NULL,
  `bolsa` varchar(5) CHARACTER SET latin1 NOT NULL,
  `paquete` varchar(5) CHARACTER SET latin1 NOT NULL,
  `paquete20u` varchar(5) CHARACTER SET latin1 NOT NULL,
  `paquete24u` varchar(5) CHARACTER SET latin1 NOT NULL,
  `tar` varchar(5) CHARACTER SET latin1 NOT NULL,
  `pza` varchar(5) CHARACTER SET latin1 NOT NULL,
  `pmo` varchar(5) CHARACTER SET latin1 NOT NULL,
  `bde` varchar(5) CHARACTER SET latin1 NOT NULL,
  `tb` varchar(5) CHARACTER SET latin1 NOT NULL,
  `par` varchar(5) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci ROW_FORMAT=COMPACT;

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

INSERT INTO `configuracion_unidades` (`id`, `m`, `cm`, `inch`, `ft`, `kg`, `g`, `a`, `mg`, `oz`, `bolsa50kg`, `lb`, `t`, `bolsa23kg`, `q`, `l`, `ml`, `m3`, `ft3`, `m2`, `ft2`, `unidad`, `caja`, `bolsa`, `paquete`, `paquete20u`, `paquete24u`, `tar`, `pza`, `pmo`, `bde`, `tb`, `par`) VALUES
(1, '1', '1', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '1', '0', '1', '0', '1', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0');

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

--
-- Estructura de tabla para la tabla `cotizaciones`
--

CREATE TABLE `cotizaciones` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) NOT NULL,
  `gestion` varchar(15) NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `observaciones` varchar(200) NOT NULL,
  `estado` varchar(30) NOT NULL,
  `id_personal` int(11) NOT NULL,
  `id_cliente` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `cotizaciones` (`id`, `nro_orden`, `gestion`, `fecha`, `hora`, `total`, `observaciones`, `estado`, `id_personal`, `id_cliente`, `id_centro_costo`) VALUES
(1, 'CT000001', '2021', '2021-10-25', '10:37:12', '150.00', 'test1', 'Pendiente', 1, 1, 1),
(2, 'CT000002', '2021', '2021-11-11', '08:24:25', '115.00', 'cotizacion ejemplo', 'Pendiente', 1, 35, 1);

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

--
-- Estructura de tabla para la tabla `cotizacion_moneda`
--

CREATE TABLE `cotizacion_moneda` (
  `id` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `tc_usd` decimal(10,2) NOT NULL,
  `tc_ufv` decimal(10,5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cotizacion_moneda` (`id`, `fecha`, `tc_usd`, `tc_ufv`) VALUES
(98, '2021-11-11', '2.00', '3.00000'),
(99, '2021-11-15', '6.96', '2.27921'),
(100, '2021-11-16', '6.96', '2.27936'),
(101, '2021-11-20', '6.96', '2.45647');

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

--
-- Estructura de tabla para la tabla `cuentas_bancarias`
--

CREATE TABLE `cuentas_bancarias` (
  `id` int(11) NOT NULL,
  `titular` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_cuenta` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `banco` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `moneda` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_cuenta` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `cta_contable` varchar(50) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `cuentas_bancarias` (`id`, `titular`, `nro_cuenta`, `banco`, `moneda`, `tipo_cuenta`, `cta_contable`) VALUES
(1, 'Juan Perez', '1231654874', 'Banco Mercantil Santa Cruz', 'Bs', 'Cuenta Corriente', '123');

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

--
-- Estructura de tabla para la tabla `datos_empresa`
--

CREATE TABLE `datos_empresa` (
  `id` int(11) NOT NULL,
  `empresa` varchar(100) NOT NULL,
  `web` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `telefono` varchar(100) NOT NULL,
  `celular` varchar(100) NOT NULL,
  `logo_empresa` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `datos_empresa` (`id`, `empresa`, `web`, `email`, `telefono`, `celular`, `logo_empresa`) VALUES
(1, '11', '22', '33', '444', '555', '');

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

--
-- Estructura de tabla para la tabla `ingresos_almacen`
--

CREATE TABLE `ingresos_almacen` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `concepto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_doc` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `nro_doc` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_movimiento` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `observaciones` varchar(300) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `id_personal` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `ingresos_almacen` (`id`, `nro_orden`, `fecha`, `hora`, `gestion`, `concepto`, `tipo_doc`, `nro_doc`, `tipo_movimiento`, `observaciones`, `estado`, `id_personal`, `id_centro_costo`) VALUES
(1, 'NI000001', '2021-08-27', '18:29:04', '2021', 'Compra', 'Factura', '151515', 'COMPRAS', 'primera compra', 'Pendiente', 1, 1),
(2, 'NI000002', '2021-08-27', '07:15:32', '2021', 'Compra', 'Factura', '345353', 'COMPRAS', 'TEST 2222', 'Anulado', 1, 1),
(3, 'NI000003', '2021-08-27', '07:19:31', '2021', 'Compra', 'Factura', '5554444', 'COMPRAS', 'TEST', 'Anulado', 1, 1),
(4, 'NI000004', '2021-08-27', '07:20:24', '2021', 'Compra', 'Factura', '5554444', 'COMPRAS', 'TEST', 'Anulado', 1, 1),
(5, 'NI000005', '2021-08-27', '07:38:57', '2021', 'Factura', 'Factura', '80808', 'AJUSTE POR DIFERENCIA', 'test 4444', 'Anulado', 1, 1),
(6, 'NI000006', '2021-08-27', '07:56:22', '2021', 'Factura', 'Recibo', '7070', '', 'rwar', 'Anulado', 1, 1),
(7, 'NI000007', '2021-08-27', '07:56:51', '2021', 'Recibo', 'Factura', '444443', 'COMPRAS NACIONALES', 'test', 'Anulado', 1, 1),
(8, 'NI000008', '2021-08-27', '09:08:02', '2021', 'Recibo', '', '', 'OTRO', 'INGRESO ITEMS EXISTENTES', 'Recibido', 1, 1),
(9, 'NI000009', '2021-08-27', '09:12:28', '2021', 'Compra', 'Factura', '456456', 'COMPRAS', 'compra tablets', 'Pendiente', 1, 1),
(10, '0000010', '2021-08-27', '00:00:00', '2021', 'Otros', 'Factura', '353534', 'DEVOLUCION', '', 'Anulado', 1, 1),
(11, '000011', '2021-08-27', '00:00:00', '2021', 'Otros', 'Factura', '435353', 'DEVOLUCION', '', '', 1, 1),
(12, 'NI000012', '2021-08-27', '10:42:30', '2021', 'Compra', 'Factura', '554433', 'COMPRAS', 'test', 'Pendiente', 1, 1),
(13, '000013', '2021-08-27', '00:00:00', '2021', 'Otros', 'Factura', '0', 'DEVOLUCION', '', '', 1, 1),
(14, 'NI000014', '2021-08-27', '00:00:00', '2021', 'Otros', '0', '0', 'DEVOLUCION', '', 'Pendiente', 1, 1),
(15, 'NI000001', '2021-08-30', '17:04:21', '2021', 'Factura', 'Factura', '332211', 'AJUSTE POR DIFERENCIA', 'test 222', 'Recibido', 5, 2),
(16, 'NI000015', '2021-09-01', '10:29:01', '2021', 'Compra', '', '', 'COMPRAS', 'TEST', 'Anulado', 1, 1),
(17, 'NI000016', '2021-09-03', '21:08:34', '2021', 'Compra', 'Factura', '7979', 'COMPRAS', 'test', 'Pendiente', 1, 1),
(18, 'NI000017', '2021-09-08', '17:09:23', '2021', 'Compra', 'Factura', '70807807', 'COMPRAS', 'tset 333', 'Pendiente', 1, 1),
(19, 'NI000018', '2021-10-01', '00:00:00', '2021', 'Otros', '0', '0', 'DEVOLUCION', '', 'Pendiente', 1, 1),
(20, 'NI000019', '2021-10-28', '14:46:26', '2021', 'Compra', 'Factura', '435354', 'COMPRAS', 'OBS', 'Anulado', 1, 1),
(21, 'NI000020', '2021-11-05', '00:11:41', '2021', 'Compra', 'Factura', '43535', 'COMPRAS', '', 'Pendiente', 1, 1),
(22, 'NI000021', '2021-11-09', '00:00:00', '2021', 'Otros', '0', '0', 'DEVOLUCION', '', 'Pendiente', 1, 1),
(23, 'NI000022', '2021-11-09', '14:47:29', '2021', 'Compra', 'Factura', '231321', 'COMPRAS', '', 'Pendiente', 1, 1),
(24, 'NI000023', '2021-11-10', '20:18:51', '2021', 'Compra', 'Factura', '123123', 'COMPRAS', '', 'Pendiente', 1, 1),
(25, 'NI000001', '2022-01-22', '23:15:56', '2022', 'Compra', 'Factura', '24234234', 'COMPRAS', 'compra productos importacion', 'Pendiente', 1, 1),
(26, 'NI000002', '2022-04-05', '16:05:31', '2022', 'Compra', 'Factura', '456456', 'COMPRAS', '', 'Pendiente', 1, 1),
(27, 'NI000003', '2022-04-18', '11:27:39', '2022', 'Compra', '', '', 'COMPRAS', '', 'Pendiente', 1, 1),
(28, 'NI000004', '2022-04-18', '11:31:03', '2022', 'Factura', 'Factura', '453', 'AJUSTE POR DIFERENCIA', '', 'Recibido', 1, 1),
(29, 'NI000005', '2022-04-18', '13:52:36', '2022', 'Compra', 'Factura', '4353', 'COMPRAS', '', 'Pendiente', 1, 1),
(30, 'NI000006', '2022-04-21', '00:00:00', '2022', 'Otros', '0', '0', 'DEVOLUCION', '', 'Pendiente', 1, 1),
(31, 'NI000007', '2022-04-25', '11:13:57', '2022', 'Compra', '', '', 'COMPRAS', '', 'Pendiente', 1, 1),
(32, 'NI000008', '2022-04-25', '11:15:10', '2022', 'Compra', '', '', 'COMPRAS', '', 'Pendiente', 1, 1),
(33, 'NI000009', '2022-04-25', '11:30:11', '2022', 'Compra', '', '', 'COMPRAS', '', 'Pendiente', 1, 1),
(34, 'NI0000010', '2022-07-04', '10:54:59', '2022', 'Compra', '', '', 'COMPRAS', '', 'Pendiente', 1, 1);

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

--
-- Estructura de tabla para la tabla `ingresos_brutos`
--

CREATE TABLE `ingresos_brutos` (
  `id` mediumint(15) NOT NULL,
  `gestion` varchar(20) NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `codigo_producto` varchar(80) NOT NULL,
  `producto` varchar(150) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `costo_total` decimal(10,2) NOT NULL,
  `precio_unitario` decimal(10,2) NOT NULL,
  `precio_total` decimal(10,2) NOT NULL,
  `ganancia` decimal(10,2) NOT NULL,
  `precio_u_asignado` decimal(10,2) NOT NULL,
  `precio_u_diferencia` decimal(10,2) NOT NULL,
  `forma_pago` varchar(30) NOT NULL,
  `estado_pago` varchar(30) NOT NULL,
  `estado` varchar(15) NOT NULL,
  `id_producto` int(15) NOT NULL,
  `id_personal` mediumint(9) NOT NULL,
  `id_cliente` mediumint(15) NOT NULL,
  `id_venta_documento` mediumint(15) NOT NULL,
  `id_centro_costo` mediumint(15) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

INSERT INTO `ingresos_brutos` (`id`, `gestion`, `fecha`, `hora`, `codigo_producto`, `producto`, `cantidad`, `costo_unitario`, `costo_total`, `precio_unitario`, `precio_total`, `ganancia`, `precio_u_asignado`, `precio_u_diferencia`, `forma_pago`, `estado_pago`, `estado`, `id_producto`, `id_personal`, `id_cliente`, `id_venta_documento`, `id_centro_costo`) VALUES
(1, '2021', '2021-10-01', '10:56:16', '100006', 'BARBIJO WILSTERMANN AZUL MARINO CON FRANJAS ROJAS S', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Pendiente', 7, 1, 17, 1, 1),
(2, '2021', '2021-10-01', '10:56:16', '100002', 'ALMOHADA SOMOS AVIADORES', 1, '0.00', '0.00', '50.00', '50.00', '50.00', '0.00', '0.00', '', '', 'Pendiente', 3, 1, 17, 1, 1),
(3, '2021', '2021-10-01', '11:01:08', '100255', 'POLERA PASEO AVIADORA AZUL S', 1, '0.00', '0.00', '90.00', '90.00', '90.00', '0.00', '0.00', '', '', 'Pendiente', 256, 1, 1, 2, 1),
(4, '2021', '2021-10-01', '11:01:08', '100005', 'BARBIJO WILSTERMANN AZUL M', 1, '0.00', '0.00', '30.00', '30.00', '30.00', '0.00', '0.00', '', '', 'Pendiente', 6, 1, 1, 2, 1),
(5, '2021', '2021-10-01', '11:05:08', '100500', 'CHAMARRAS DE INVIERNO FORTE GUINDO CON AZUL MARINO L', 1, '0.00', '0.00', '260.00', '260.00', '260.00', '0.00', '0.00', '', '', 'Anulado', 501, 1, 18, 3, 1),
(6, '2021', '2021-10-01', '11:05:08', '100045', 'BUSO WILSTERMANN AZUL MARINO COSTADO ROJO 2', 2, '0.00', '0.00', '80.00', '160.00', '160.00', '0.00', '0.00', '', '', 'Anulado', 46, 1, 18, 3, 1),
(7, '2021', '2021-10-28', '14:49:47', '100002', 'ALMOHADA SOMOS AVIADORES', 2, '3.00', '6.00', '55.00', '110.00', '104.00', '0.00', '0.00', '', '', 'Pendiente', 3, 1, 1, 4, 1),
(8, '2021', '2021-10-28', '14:49:47', '100007', 'BARBIJO WILSTERMANN AZUL MARINO CON FRANJAS ROJAS M', 5, '0.00', '0.00', '30.00', '150.00', '150.00', '0.00', '0.00', '', '', 'Pendiente', 8, 1, 1, 4, 1),
(9, '2021', '2021-11-06', '19:16:07', '100002', 'ALMOHADA SOMOS AVIADORES', 2, '4.20', '8.40', '55.00', '110.00', '101.60', '0.00', '0.00', '', '', 'Pendiente', 3, 1, 35, 5, 1),
(10, '2021', '2021-11-09', '14:42:46', '100006', 'BARBIJO WILSTERMANN AZUL MARINO CON FRANJAS ROJAS S', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Anulado', 7, 1, 41, 6, 1),
(11, '2021', '2021-11-09', '14:42:46', '100009', 'BARBIJO WILSTERMANN NEGRO M', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Anulado', 10, 1, 41, 6, 1),
(12, '2022', '2022-01-20', '07:29:01', '100005', 'BARBIJO WILSTERMANN AZUL M', 3, '39.00', '117.00', '30.00', '90.00', '-27.00', '0.00', '0.00', '', '', 'Pendiente', 6, 1, 35, 7, 1),
(13, '2022', '2022-01-20', '07:29:01', '100006', 'BARBIJO WILSTERMANN AZUL MARINO CON FRANJAS ROJAS S', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Pendiente', 7, 1, 35, 7, 1),
(14, '2022', '2022-01-20', '08:31:07', '100002', 'ALMOHADA SOMOS AVIADORES', 1, '15.00', '15.00', '80.00', '80.00', '65.00', '0.00', '0.00', '', '', 'Pendiente', 3, 1, 35, 8, 1),
(15, '2022', '2022-01-20', '08:31:07', '100012', 'BARBIJO WILSTERMANN ROJO CON FRANJAS ROJOS L', 1, '0.00', '0.00', '30.00', '30.00', '30.00', '0.00', '0.00', '', '', 'Pendiente', 13, 1, 35, 8, 1),
(16, '2022', '2022-01-20', '08:41:44', '100003', 'BARBIJO WILSTERMANN AZUL CON FRANJAS ROJAS S', 1, '0.00', '0.00', '30.00', '30.00', '30.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 35, 9, 1),
(17, '2022', '2022-01-20', '08:42:11', '100005', 'BARBIJO WILSTERMANN AZUL M', 3, '39.00', '117.00', '30.00', '90.00', '-27.00', '0.00', '0.00', '', '', 'Pendiente', 6, 1, 35, 10, 1),
(18, '2022', '2022-01-20', '08:43:01', '100005', 'BARBIJO WILSTERMANN AZUL M', 1, '39.00', '39.00', '30.00', '30.00', '-9.00', '0.00', '0.00', '', '', 'Pendiente', 6, 1, 35, 11, 1),
(19, '2022', '2022-01-20', '08:44:00', '100009', 'BARBIJO WILSTERMANN NEGRO M', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Pendiente', 10, 1, 35, 12, 1),
(20, '2022', '2022-01-20', '08:44:18', '100009', 'BARBIJO WILSTERMANN NEGRO M', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Pendiente', 10, 1, 43, 13, 1),
(21, '2022', '2022-01-20', '08:46:30', '100008', 'BARBIJO WILSTERMANN AZUL MARINO CON FRANJAS ROJAS L', 1, '0.00', '0.00', '30.00', '30.00', '30.00', '0.00', '0.00', '', '', 'Pendiente', 9, 1, 35, 14, 1),
(22, '2022', '2022-01-20', '08:47:03', '100019', 'BERMUDA WILSTERMANN AZUL CURVAS ROJAS XL', 1, '0.00', '0.00', '100.00', '100.00', '100.00', '0.00', '0.00', '', '', 'Pendiente', 20, 1, 41, 15, 1),
(23, '2022', '2022-01-20', '08:48:40', '100006', 'BARBIJO WILSTERMANN AZUL MARINO CON FRANJAS ROJAS S', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Pendiente', 7, 1, 36, 16, 1),
(24, '2022', '2022-01-20', '08:53:30', '100010', 'BARBIJO WILSTERMANN PLOMO CON FRANJAS NEGRAS M', 2, '3.00', '6.00', '30.00', '60.00', '54.00', '0.00', '0.00', '', '', 'Pendiente', 11, 1, 35, 17, 1),
(25, '2022', '2022-01-20', '09:06:29', '100010', 'BARBIJO WILSTERMANN PLOMO CON FRANJAS NEGRAS M', 2, '3.00', '6.00', '30.00', '60.00', '54.00', '0.00', '0.00', '', '', 'Pendiente', 11, 1, 37, 18, 1),
(26, '2022', '2022-01-20', '09:17:59', '100015', 'BERMUDA WILSTERMANN AZUL ACERO LATERAL ROJO M', 2, '0.00', '0.00', '100.00', '200.00', '200.00', '0.00', '0.00', '', '', 'Pendiente', 16, 1, 38, 19, 1),
(27, '2022', '2022-01-20', '09:49:18', '100017', 'BERMUDA WILSTERMANN AZUL CURVAS ROJAS M', 1, '0.00', '0.00', '100.00', '100.00', '100.00', '0.00', '0.00', '', '', 'Pendiente', 18, 1, 35, 20, 1),
(28, '2022', '2022-01-20', '09:56:00', '100009', 'BARBIJO WILSTERMANN NEGRO M', 2, '0.00', '0.00', '30.00', '60.00', '60.00', '0.00', '0.00', '', '', 'Pendiente', 10, 1, 36, 21, 1),
(29, '2022', '2022-01-20', '09:57:20', '100022', 'BERMUDA WILSTERMANN AZUL MARINO DEGRADE 8', 1, '0.00', '0.00', '100.00', '100.00', '100.00', '0.00', '0.00', '', '', 'Pendiente', 23, 1, 42, 22, 1),
(30, '2022', '2022-01-20', '10:05:20', '100022', 'BERMUDA WILSTERMANN AZUL MARINO DEGRADE 8', 1, '0.00', '0.00', '100.00', '100.00', '100.00', '0.00', '0.00', '', '', 'Pendiente', 23, 1, 37, 23, 1),
(31, '2022', '2022-01-20', '10:06:00', '100016', 'BERMUDA WILSTERMANN AZUL ACERO LATERAL ROJO L', 1, '0.00', '0.00', '100.00', '100.00', '100.00', '0.00', '0.00', '', '', 'Pendiente', 17, 1, 36, 24, 1),
(32, '2022', '2022-01-20', '10:16:21', '100012', 'BARBIJO WILSTERMANN ROJO CON FRANJAS ROJOS L', 1, '0.00', '0.00', '30.00', '30.00', '30.00', '0.00', '0.00', '', '', 'Pendiente', 13, 1, 37, 25, 1),
(33, '2022', '2022-01-20', '10:21:13', '100010', 'BARBIJO WILSTERMANN PLOMO CON FRANJAS NEGRAS M', 1, '3.00', '3.00', '30.00', '30.00', '27.00', '0.00', '0.00', '', '', 'Pendiente', 11, 1, 37, 26, 1),
(34, '2022', '2022-01-22', '23:48:34', 'P001', 'M720 Triathlon', 4, '6.00', '24.00', '161.00', '644.00', '620.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 2, 27, 1),
(35, '2022', '2022-01-22', '23:48:34', 'P006', 'Teclado G413', 3, '7.50', '22.50', '448.00', '1344.00', '1321.50', '0.00', '0.00', '', '', 'Pendiente', 7, 1, 2, 27, 1),
(36, '2022', '2022-01-22', '23:53:23', 'P001', 'M720 Triathlon', 2, '6.00', '12.00', '165.00', '330.00', '318.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 2, 28, 1),
(37, '2022', '2022-01-22', '23:53:23', 'P003', 'Mouse inalámbrico M170', 4, '8.00', '32.00', '90.00', '360.00', '328.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 2, 28, 1),
(38, '2022', '2022-01-22', '00:02:26', 'P001', 'M720 Triathlon', 3, '6.00', '18.00', '161.00', '483.00', '465.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 29, 1),
(39, '2022', '2022-01-22', '00:02:26', 'P003', 'Mouse inalámbrico M170', 2, '8.00', '16.00', '84.00', '168.00', '152.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 1, 29, 1),
(40, '2022', '2022-01-22', '10:02:08', 'P001', 'M720 Triathlon', 3, '6.00', '18.00', '161.00', '483.00', '465.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 30, 1),
(41, '2022', '2022-01-22', '10:05:27', 'P003', 'Mouse inalámbrico M170', 2, '8.00', '16.00', '90.00', '180.00', '164.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 1, 31, 1),
(42, '2022', '2022-01-22', '10:07:22', 'P001', 'M720 Triathlon', 1, '6.00', '6.00', '165.00', '165.00', '159.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 32, 1),
(43, '2022', '2022-01-22', '10:13:02', 'P008', 'Camara web USB 1080P', 1, '4.20', '4.20', '224.00', '224.00', '219.80', '0.00', '0.00', '', '', 'Pendiente', 9, 1, 3, 33, 1),
(44, '2022', '2022-01-22', '10:15:04', 'P005', 'Teclado G213 Prodigy', 2, '7.85', '15.70', '154.00', '308.00', '292.30', '0.00', '0.00', '', '', 'Pendiente', 6, 1, 2, 34, 1),
(45, '2022', '2022-01-22', '10:16:21', 'P001', 'M720 Triathlon', 2, '6.00', '12.00', '165.00', '330.00', '318.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 35, 1),
(46, '2022', '2022-01-22', '10:18:48', 'P003', 'Mouse inalámbrico M170', 3, '8.00', '24.00', '84.00', '252.00', '228.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 2, 36, 1),
(47, '2022', '2022-01-22', '10:19:40', 'P001', 'M720 Triathlon', 2, '6.00', '12.00', '165.00', '330.00', '318.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 37, 1),
(48, '2022', '2022-01-22', '10:20:11', 'P001', 'M720 Triathlon', 2, '6.00', '12.00', '165.00', '330.00', '318.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 38, 1),
(49, '2022', '2022-01-22', '10:22:10', 'P001', 'M720 Triathlon', 1, '6.00', '6.00', '165.00', '165.00', '159.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 39, 1),
(50, '2022', '2022-01-22', '10:24:34', 'P008', 'Camara web USB 1080P', 1, '4.20', '4.20', '224.00', '224.00', '219.80', '0.00', '0.00', '', '', 'Pendiente', 9, 1, 1, 40, 1),
(51, '2022', '2022-01-22', '10:25:54', 'P003', 'Mouse inalámbrico M170', 1, '8.00', '8.00', '90.00', '90.00', '82.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 2, 41, 1),
(52, '2022', '2022-01-22', '10:30:28', 'P005', 'Teclado G213 Prodigy', 1, '7.85', '7.85', '154.00', '154.00', '146.15', '0.00', '0.00', '', '', 'Pendiente', 6, 1, 1, 42, 1),
(53, '2022', '2022-01-22', '10:31:23', 'P001', 'M720 Triathlon', 2, '6.00', '12.00', '161.00', '322.00', '310.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 43, 1),
(54, '2022', '2022-01-22', '10:31:23', 'P003', 'Mouse inalámbrico M170', 1, '8.00', '8.00', '84.00', '84.00', '76.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 1, 43, 1),
(55, '2022', '2022-01-22', '10:31:23', 'P008', 'Camara web USB 1080P', 3, '4.20', '12.60', '224.00', '672.00', '659.40', '0.00', '0.00', '', '', 'Pendiente', 9, 1, 1, 43, 1),
(56, '2022', '2022-01-22', '10:35:02', 'P006', 'Teclado G413', 2, '7.50', '15.00', '448.00', '896.00', '881.00', '0.00', '0.00', '', '', 'Pendiente', 7, 1, 1, 44, 1),
(57, '2022', '2022-02-11', '15:35:12', 'P003', 'Mouse inalámbrico M170', 4, '8.00', '32.00', '84.00', '336.00', '304.00', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 4, 45, 1),
(58, '2022', '2022-02-11', '15:35:12', 'P007', 'Auricular ASTRO Gaming A20', 3, '3.40', '10.20', '385.00', '1155.00', '1144.80', '0.00', '0.00', '', '', 'Pendiente', 8, 1, 4, 45, 1),
(59, '2022', '2022-04-05', '16:09:57', 'P004', 'Teclado G915 TKL', 2, '8.85', '17.70', '680.00', '1360.00', '1342.30', '0.00', '0.00', '', '', 'Pendiente', 5, 1, 1, 46, 1),
(60, '2022', '2022-04-05', '16:09:57', 'P003', 'Mouse inalámbrico M170', 2, '7.85', '15.70', '84.00', '168.00', '152.30', '0.00', '0.00', '', '', 'Pendiente', 4, 1, 1, 46, 1),
(61, '2022', '2022-04-11', '17:58:26', 'P001', 'M720 Triathlon', 3, '6.00', '18.00', '161.00', '483.00', '465.00', '0.00', '0.00', '', '', 'Anulado', 2, 1, 7, 47, 1),
(62, '2022', '2022-04-11', '17:58:26', 'P004', 'Teclado G915 TKL', 4, '8.85', '35.40', '680.00', '2720.00', '2684.60', '0.00', '0.00', '', '', 'Anulado', 5, 1, 7, 47, 1),
(63, '2022', '2022-07-04', '10:41:00', 'P001', 'M720 Triathlon', 2, '4.00', '8.00', '161.00', '322.00', '314.00', '0.00', '0.00', '', '', 'Pendiente', 2, 1, 1, 48, 1);

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

--
-- Estructura de tabla para la tabla `inventario_inicial`
--

CREATE TABLE `inventario_inicial` (
  `id` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `inventario_inicial` (`id`, `gestion`, `fecha`, `id_centro_costo`) VALUES
(1, '2018', '0000-00-00', 1),
(2, '2019', '1970-01-01', 1);

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

--
-- Estructura de tabla para la tabla `kardex_producto`
--

CREATE TABLE `kardex_producto` (
  `id` int(11) NOT NULL,
  `gestion` varchar(20) COLLATE latin1_spanish_ci NOT NULL,
  `mes` varchar(20) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `concepto` varchar(150) COLLATE latin1_spanish_ci NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `cant_entrada` int(11) NOT NULL,
  `cant_salida` int(11) NOT NULL,
  `cant_saldo` int(11) NOT NULL,
  `costo_u_ingreso` decimal(10,2) NOT NULL,
  `costo_total_ingreso` decimal(10,2) NOT NULL,
  `costo_u_salida` decimal(10,2) NOT NULL,
  `costo_total_salida` decimal(10,2) NOT NULL,
  `costo_ponderado` decimal(10,2) NOT NULL,
  `costo_total` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `codigo_producto` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo_origen` int(11) NOT NULL,
  `id_centro_costo_destino` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL,
  `id_tipo_operacion` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `kardex_producto` (`id`, `gestion`, `mes`, `fecha`, `concepto`, `nro_orden`, `cant_entrada`, `cant_salida`, `cant_saldo`, `costo_u_ingreso`, `costo_total_ingreso`, `costo_u_salida`, `costo_total_salida`, `costo_ponderado`, `costo_total`, `id_producto`, `codigo_producto`, `id_centro_costo_origen`, `id_centro_costo_destino`, `id_centro_costo`, `id_tipo_operacion`) VALUES
(1, '2022', '04', '2022-04-25', 'Compra', 'NI000009', 20, 0, 20, '4.00', '80.00', '0.00', '0.00', '4.00', '80.00', 2, '', 0, 0, 1, 2),
(2, '2022', '04', '2022-04-25', 'Compra', 'NI000009', 30, 0, 30, '5.00', '150.00', '0.00', '0.00', '5.00', '150.00', 4, '', 0, 0, 1, 2),
(3, '2022', '04', '2022-04-25', 'Transferencia - Egreso', 'NT000001', 0, 3, 17, '0.00', '0.00', '4.00', '12.00', '4.00', '68.00', 2, '', 1, 2, 1, 1),
(4, '2022', '04', '2022-04-25', 'Transferencia - Egreso', 'NT000001', 0, 4, 26, '0.00', '0.00', '5.00', '20.00', '5.00', '130.00', 4, '', 1, 2, 1, 1),
(5, '2022', '07', '2022-07-04', 'Venta', 'NV000042', 0, 2, 15, '0.00', '0.00', '4.00', '8.00', '4.00', '60.00', 2, '', 0, 0, 1, 1),
(6, '2022', '07', '2022-07-04', 'Compra', 'NI0000010', 2, 0, 17, '3.00', '6.00', '0.00', '0.00', '3.88', '66.00', 2, '', 0, 0, 1, 2);

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

--
-- Estructura de tabla para la tabla `libro_cobranzas`
--

CREATE TABLE `libro_cobranzas` (
  `id` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha_cobro` date NOT NULL,
  `tipo_doc` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_doc` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `forma_pago` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `banco` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_documento` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_cheque` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `importe` decimal(10,2) NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `id_cobranza` int(11) NOT NULL,
  `id_venta` int(11) NOT NULL,
  `id_cliente` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_cobranzas` (`id`, `gestion`, `fecha_cobro`, `tipo_doc`, `nro_doc`, `forma_pago`, `banco`, `nro_documento`, `nro_cheque`, `importe`, `estado`, `id_cobranza`, `id_venta`, `id_cliente`, `id_centro_costo`) VALUES
(1, '2021', '2021-10-01', 'Nota de Venta', 'NV000001', 'Contado', '', '', '', '110.00', 'Cancelado', 9, 1, 17, 1),
(2, '2021', '2021-10-01', '', '', 'Credito', '', '', '', '0.00', 'Cancelado', 10, 2, 1, 1),
(3, '2021', '2021-10-01', 'Nota de Venta', 'NV000003', 'Efectivo', '', '', '', '400.00', 'Cancelado', 11, 3, 18, 1),
(4, '2021', '2021-10-01', 'Nota de Venta', 'NV000003', 'Deposito', 'BANCO UNION', '1321312', '', '20.00', 'Cancelado', 12, 3, 18, 1),
(5, '2021', '2021-10-28', 'Nota de Venta', 'NV000004', 'Efectivo', '', '', '', '180.00', 'Cancelado', 13, 4, 1, 1),
(6, '2021', '2021-10-28', 'Nota de Venta', 'NV000004', 'Deposito', 'BCP', '1234564', '', '80.00', 'Cancelado', 14, 4, 1, 1),
(7, '2021', '2021-11-06', 'Nota de Venta', 'NV000005', 'Contado', '', '', '', '110.00', 'Cancelado', 15, 5, 35, 1),
(8, '2021', '2021-11-09', 'Nota de Venta', 'NV000006', 'Contado', '', '', '', '120.00', 'Cancelado', 16, 6, 41, 1),
(9, '2022', '2022-01-20', 'Nota de Venta', 'NV000001', 'Contado', '', '', '', '150.00', 'Cancelado', 17, 7, 35, 1),
(10, '2022', '2022-01-20', 'Nota de Venta', 'NV000002', 'Contado', '', '', '', '110.00', 'Cancelado', 18, 8, 35, 1),
(11, '2022', '2022-01-20', 'Nota de Venta', 'NV000003', 'Contado', '', '', '', '30.00', 'Cancelado', 19, 9, 35, 1),
(12, '2022', '2022-01-20', 'Nota de Venta', 'NV000004', 'Contado', '', '', '', '90.00', 'Cancelado', 20, 10, 35, 1),
(13, '2022', '2022-01-20', 'Nota de Venta', 'NV000005', 'Contado', '', '', '', '30.00', 'Cancelado', 21, 11, 35, 1),
(14, '2022', '2022-01-20', 'Nota de Venta', 'NV000006', 'Contado', '', '', '', '60.00', 'Cancelado', 22, 12, 35, 1),
(15, '2022', '2022-01-20', 'Nota de Venta', 'NV000007', 'Contado', '', '', '', '60.00', 'Cancelado', 23, 13, 43, 1),
(16, '2022', '2022-01-20', 'Nota de Venta', 'NV000008', 'Contado', '', '', '', '30.00', 'Cancelado', 24, 14, 35, 1),
(17, '2022', '2022-01-20', 'Nota de Venta', 'NV000009', 'Contado', '', '', '', '100.00', 'Cancelado', 25, 15, 41, 1),
(18, '2022', '2022-01-20', 'Nota de Venta', 'NV0000010', 'Contado', '', '', '', '60.00', 'Cancelado', 26, 16, 36, 1),
(19, '2022', '2022-01-20', 'Nota de Venta', 'NV000011', 'Contado', '', '', '', '60.00', 'Cancelado', 27, 17, 35, 1),
(20, '2022', '2022-01-20', 'Nota de Venta', 'NV000012', 'Contado', '', '', '', '60.00', 'Cancelado', 28, 18, 37, 1),
(21, '2022', '2022-01-20', 'Nota de Venta', 'NV000013', 'Contado', '', '', '', '200.00', 'Cancelado', 29, 19, 38, 1),
(22, '2022', '2022-01-20', 'Nota de Venta', 'NV000014', 'Contado', '', '', '', '100.00', 'Cancelado', 30, 20, 35, 1),
(23, '2022', '2022-01-20', 'Nota de Venta', 'NV000015', 'Contado', '', '', '', '60.00', 'Cancelado', 31, 21, 36, 1),
(24, '2022', '2022-01-20', 'Nota de Venta', 'NV000016', 'Contado', '', '', '', '100.00', 'Cancelado', 32, 22, 42, 1),
(25, '2022', '2022-01-20', 'Nota de Venta', 'NV000017', 'Contado', '', '', '', '100.00', 'Cancelado', 33, 23, 37, 1),
(26, '2022', '2022-01-20', 'Nota de Venta', 'NV000018', 'Contado', '', '', '', '100.00', 'Cancelado', 34, 24, 36, 1),
(27, '2022', '2022-01-20', 'Nota de Venta', 'NV000019', 'Contado', '', '', '', '30.00', 'Cancelado', 35, 25, 37, 1),
(28, '2022', '2022-01-20', 'Nota de Venta', 'NV000020', 'Contado', '', '', '', '30.00', 'Cancelado', 36, 26, 37, 1),
(29, '2022', '2022-01-22', 'Nota de Venta', 'NV000021', 'Contado', '', '', '', '1988.00', 'Cancelado', 37, 27, 2, 1),
(30, '2022', '2022-01-22', 'Nota de Venta', 'NV000022', 'Contado', '', '', '', '690.00', 'Cancelado', 38, 28, 2, 1),
(31, '2022', '2022-01-22', 'Nota de Venta', 'NV000023', 'Contado', '', '', '', '651.00', 'Cancelado', 39, 29, 1, 1),
(32, '2022', '2022-01-22', 'Nota de Venta', 'NV000024', 'Contado', '', '', '', '483.00', 'Cancelado', 40, 30, 1, 1),
(33, '2022', '2022-01-22', 'Nota de Venta', 'NV000025', 'Contado', '', '', '', '180.00', 'Cancelado', 41, 31, 1, 1),
(34, '2022', '2022-01-22', 'Nota de Venta', 'NV000026', 'Contado', '', '', '', '165.00', 'Cancelado', 42, 32, 1, 1),
(35, '2022', '2022-01-22', 'Nota de Venta', 'NV000027', 'Contado', '', '', '', '224.00', 'Cancelado', 43, 33, 3, 1),
(36, '2022', '2022-01-22', 'Nota de Venta', 'NV000028', 'Contado', '', '', '', '308.00', 'Cancelado', 44, 34, 2, 1),
(37, '2022', '2022-01-22', 'Nota de Venta', 'NV000029', 'Contado', '', '', '', '330.00', 'Cancelado', 45, 35, 1, 1),
(38, '2022', '2022-01-22', 'Nota de Venta', 'NV000030', 'Contado', '', '', '', '252.00', 'Cancelado', 46, 36, 2, 1),
(39, '2022', '2022-01-22', 'Nota de Venta', 'NV000031', 'Contado', '', '', '', '330.00', 'Cancelado', 47, 37, 1, 1),
(40, '2022', '2022-01-22', 'Nota de Venta', 'NV000032', 'Contado', '', '', '', '330.00', 'Cancelado', 48, 38, 1, 1),
(41, '2022', '2022-01-22', 'Nota de Venta', 'NV000033', 'Contado', '', '', '', '165.00', 'Cancelado', 49, 39, 1, 1),
(42, '2022', '2022-01-22', 'Nota de Venta', 'NV000034', 'Contado', '', '', '', '224.00', 'Cancelado', 50, 40, 1, 1),
(43, '2022', '2022-01-22', 'Nota de Venta', 'NV000035', 'Contado', '', '', '', '90.00', 'Cancelado', 51, 41, 2, 1),
(44, '2022', '2022-01-22', 'Nota de Venta', 'NV000036', 'Contado', '', '', '', '154.00', 'Cancelado', 52, 42, 1, 1),
(45, '2022', '2022-01-22', 'Nota de Venta', 'NV000037', 'Contado', '', '', '', '1078.00', 'Cancelado', 53, 43, 1, 1),
(46, '2022', '2022-01-22', 'Nota de Venta', 'NV000038', 'Contado', '', '', '', '896.00', 'Cancelado', 54, 44, 1, 1),
(47, '2022', '2022-02-11', '', '', 'Credito', '', '', '', '0.00', 'Cancelado', 55, 45, 4, 1),
(48, '2022', '2022-04-05', '', '', 'Credito', '', '', '', '0.00', 'Cancelado', 56, 46, 1, 1),
(49, '2022', '2022-04-11', 'Nota de Venta', 'NV000041', 'Contado', '', '', '', '3203.00', 'Cancelado', 57, 47, 7, 1),
(50, '2022', '2022-04-18', 'Nota de Venta', 'NV000040', 'Transferencia', '', '', '', '3.00', 'Cancelado', 58, 46, 1, 1),
(51, '2022', '2022-04-25', 'Nota de Venta', 'NV000002', '0', '', '', '', '3.00', 'Cancelado', 59, 2, 1, 2),
(52, '2022', '2022-07-04', 'Nota de Venta', 'NV000042', 'Contado', '', '', '', '322.00', 'Cancelado', 60, 48, 1, 1);

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

--
-- Estructura de tabla para la tabla `libro_cotizaciones`
--

CREATE TABLE `libro_cotizaciones` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `precio_unitario` decimal(10,2) NOT NULL,
  `precio_subtotal` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `id_cotizacion` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `libro_cotizaciones` (`id`, `cantidad`, `precio_unitario`, `precio_subtotal`, `id_producto`, `id_cotizacion`, `id_centro_costo`) VALUES
(1, 3, '50.00', '150.00', 2, 1, 1),
(2, 1, '55.00', '55.00', 3, 2, 1),
(3, 2, '30.00', '60.00', 6, 2, 1);

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

--
-- Estructura de tabla para la tabla `libro_diario`
--

CREATE TABLE `libro_diario` (
  `id` int(11) NOT NULL,
  `nro_asiento` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `glosa` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `total_debe` decimal(10,2) NOT NULL,
  `total_haber` decimal(10,2) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_diario` (`id`, `nro_asiento`, `fecha`, `glosa`, `total_debe`, `total_haber`, `id_usuario`, `id_centro_costo`) VALUES
(1, 1, '2018-08-23', 'COMPRA EQUIPOS INDUSTRIALES', '3605.80', '3605.80', 1, 1),
(2, 2, '2018-08-24', 'COMPRA DE MOVILIDAD', '8500.00', '8500.00', 1, 1),
(3, 3, '2018-08-24', 'COMPRA DE CONMUTADORAS DE OFICINA', '9800.00', '9800.00', 1, 1),
(4, 4, '2018-08-24', 'COMPRA DE IMPRESORA', '5800.00', '5800.00', 1, 1),
(5, 5, '2018-08-29', 'VENTA DE EQUIPOS DE OFICINA', '90.00', '90.00', 1, 1);

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

--
-- Estructura de tabla para la tabla `libro_gastos_servicios`
--

CREATE TABLE `libro_gastos_servicios` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `costo_subtotal` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `id_compra` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_gastos_servicios` (`id`, `cantidad`, `costo_unitario`, `costo_subtotal`, `id_producto`, `id_compra`, `id_centro_costo`) VALUES
(1, 1, '100.00', '100.00', 10, 3, 1),
(2, 1, '344.00', '344.00', 8, 5, 1),
(3, 1, '43.00', '43.00', 10, 5, 1);

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

--
-- Estructura de tabla para la tabla `libro_ingresos_almacen`
--

CREATE TABLE `libro_ingresos_almacen` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `costo_subtotal` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `id_ingreso_almacen` int(11) NOT NULL,
  `id_compra` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_ingresos_almacen` (`id`, `cantidad`, `costo_unitario`, `costo_subtotal`, `id_producto`, `id_ingreso_almacen`, `id_compra`, `id_centro_costo`) VALUES
(1, 1, '0.00', '0.00', 501, 19, 0, 1),
(2, 2, '0.00', '0.00', 46, 19, 0, 1),
(3, 3, '4.00', '12.00', 3, 20, 10, 1),
(4, 4, '6.00', '24.00', 5, 20, 10, 1),
(5, 3, '5.00', '15.00', 3, 21, 11, 1),
(6, 4, '66.00', '264.00', 6, 21, 11, 1),
(7, 2, '0.00', '0.00', 7, 22, 0, 1),
(8, 2, '0.00', '0.00', 10, 22, 0, 1),
(9, 2, '15.00', '30.00', 3, 23, 12, 1),
(10, 4, '12.00', '48.00', 6, 23, 12, 1),
(11, 100, '3.00', '300.00', 11, 24, 13, 1),
(12, 150, '5.00', '750.00', 21, 24, 13, 1),
(13, 45, '6.00', '270.00', 2, 25, 14, 1),
(14, 54, '8.00', '432.00', 4, 25, 14, 1),
(15, 32, '8.90', '284.80', 5, 25, 14, 1),
(16, 12, '4.60', '55.20', 6, 25, 14, 1),
(17, 41, '7.50', '307.50', 7, 25, 14, 1),
(18, 14, '3.40', '47.60', 8, 25, 14, 1),
(19, 9, '4.20', '37.80', 9, 25, 14, 1),
(20, 2, '5.00', '10.00', 5, 26, 15, 1),
(21, 3, '6.00', '18.00', 4, 26, 15, 1),
(22, 2, '3.00', '6.00', 2, 27, 16, 1),
(23, 2, '3.00', '6.00', 2, 28, 0, 1),
(24, 2, '3.00', '6.00', 7, 28, 0, 1),
(25, 20, '2.00', '40.00', 2, 29, 17, 1),
(26, 3, '0.00', '0.00', 2, 30, 0, 1),
(27, 4, '0.00', '0.00', 5, 30, 0, 1),
(28, 20, '3.00', '60.00', 2, 31, 18, 1),
(29, 20, '3.00', '60.00', 2, 32, 19, 1),
(30, 20, '4.00', '80.00', 2, 33, 20, 1),
(31, 30, '5.00', '150.00', 4, 33, 20, 1),
(32, 2, '3.00', '6.00', 2, 34, 21, 1);

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

--
-- Estructura de tabla para la tabla `libro_inventario_inicial`
--

CREATE TABLE `libro_inventario_inicial` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `id_inventario` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

--
-- Estructura de tabla para la tabla `libro_mayor`
--

CREATE TABLE `libro_mayor` (
  `id` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `nro_asiento` int(11) NOT NULL,
  `glosa` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `id_usuario` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_mayor` (`id`, `fecha`, `nro_asiento`, `glosa`, `id_usuario`) VALUES
(1, '2018-08-23', 1, 'COMPRA EQUIPOS INDUSTRIALES', 1),
(2, '2018-08-24', 2, 'COMPRA DE MOVILIDAD', 1),
(3, '2018-08-24', 3, 'COMPRA DE CONMUTADORAS DE OFICINA', 1),
(4, '2018-08-24', 4, 'COMPRA DE IMPRESORA', 1),
(5, '2018-08-29', 5, 'VENTA DE EQUIPOS DE OFICINA', 1);

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

--
-- Estructura de tabla para la tabla `libro_pagos`
--

CREATE TABLE `libro_pagos` (
  `id` int(11) NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha_pago` date NOT NULL,
  `tipo_doc` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_doc` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `forma_pago` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `banco` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_documento` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_cheque` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `importe` decimal(10,2) NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `id_pago` int(11) NOT NULL,
  `id_compra` int(11) NOT NULL,
  `id_proveedor` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_pagos` (`id`, `gestion`, `fecha_pago`, `tipo_doc`, `nro_doc`, `forma_pago`, `banco`, `nro_documento`, `nro_cheque`, `importe`, `estado`, `id_pago`, `id_compra`, `id_proveedor`, `id_centro_costo`) VALUES
(1, '2022', '2022-04-18', 'Nota de Compra', 'NC000043', 'Deposito', '', '', '', '10.00', 'Cancelado', 1, 17, 1, 1),
(2, '2022', '2022-07-04', 'Nota de Compra', 'NC000043', 'Efectivo', '', '', '', '1.00', 'Cancelado', 5, 17, 1, 1);

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

--
-- Estructura de tabla para la tabla `libro_partidas`
--

CREATE TABLE `libro_partidas` (
  `id` int(11) NOT NULL,
  `nro_cuenta` int(11) NOT NULL,
  `nombre_cuenta` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `debe` decimal(10,2) NOT NULL,
  `haber` decimal(10,2) NOT NULL,
  `id_libro_diario` int(11) NOT NULL,
  `id_libro_mayor` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_partidas` (`id`, `nro_cuenta`, `nombre_cuenta`, `debe`, `haber`, `id_libro_diario`, `id_libro_mayor`, `id_centro_costo`) VALUES
(1, 1010101, 'CAJA', '3500.00', '0.00', 1, 1, 1),
(2, 101010101, 'CAJA M/N', '105.80', '0.00', 1, 1, 1),
(3, 1010301, 'INVENTARIO DE SUMINISTROS', '0.00', '3045.00', 1, 1, 1),
(4, 2010102, 'OBLIGACIONES IMPOSITIVAS', '0.00', '455.00', 1, 1, 1),
(5, 201010101, 'CUENTAS POR PAGAR', '0.00', '105.80', 1, 1, 1),
(6, 101010202, 'BANCO UNION SA', '8500.00', '0.00', 2, 2, 1),
(7, 101020202, 'CUENTAS POR RENDIR', '0.00', '5000.00', 2, 2, 1),
(8, 2010101, 'OBLIGACIONES COMERCIALES', '0.00', '3500.00', 2, 2, 1),
(9, 101010101, 'CAJA M/N', '9800.00', '0.00', 3, 3, 1),
(10, 101010201, 'BANCO BISA', '0.00', '9800.00', 3, 3, 1),
(11, 101010101, 'CAJA M/N', '5800.00', '0.00', 4, 4, 1),
(12, 101020201, 'ANTICIPOS', '0.00', '2000.00', 4, 4, 1),
(13, 101010103, 'CAJA CHICA', '0.00', '3000.00', 4, 4, 1),
(14, 10103, 'REALIZABLE', '0.00', '800.00', 4, 4, 1),
(15, 10101, 'DISPONIBLE', '80.00', '0.00', 5, 5, 1),
(16, 101010101, 'CAJA M/N', '0.00', '90.00', 5, 5, 1),
(17, 1010202, 'EMPLEADOS', '10.00', '0.00', 5, 5, 1);

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

--
-- Estructura de tabla para la tabla `libro_salidas_almacen`
--

CREATE TABLE `libro_salidas_almacen` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `costo_subtotal` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `id_salida_almacen` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_salidas_almacen` (`id`, `cantidad`, `costo_unitario`, `costo_subtotal`, `id_producto`, `id_salida_almacen`, `id_centro_costo`) VALUES
(1, 2, '0.00', '0.00', 7, 19, 1),
(2, 1, '0.00', '0.00', 3, 19, 1),
(3, 1, '0.00', '0.00', 256, 20, 1),
(4, 1, '0.00', '0.00', 6, 20, 1),
(5, 1, '0.00', '0.00', 501, 21, 1),
(6, 2, '0.00', '0.00', 46, 21, 1),
(7, 2, '0.00', '0.00', 3, 22, 1),
(8, 5, '0.00', '0.00', 8, 22, 1),
(9, 3, '0.00', '0.00', 3, 23, 1),
(10, 4, '0.00', '0.00', 5, 23, 1),
(11, 2, '0.00', '0.00', 3, 24, 1),
(12, 2, '0.00', '0.00', 7, 25, 1),
(13, 2, '0.00', '0.00', 10, 25, 1),
(14, 1, '15.00', '15.00', 3, 26, 1),
(15, 3, '0.00', '0.00', 6, 27, 1),
(16, 2, '0.00', '0.00', 7, 27, 1),
(17, 1, '0.00', '0.00', 3, 28, 1),
(18, 1, '0.00', '0.00', 13, 28, 1),
(19, 1, '0.00', '0.00', 4, 29, 1),
(20, 3, '0.00', '0.00', 6, 30, 1),
(21, 1, '0.00', '0.00', 6, 31, 1),
(22, 2, '0.00', '0.00', 10, 32, 1),
(23, 2, '0.00', '0.00', 10, 33, 1),
(24, 1, '0.00', '0.00', 9, 34, 1),
(25, 1, '0.00', '0.00', 20, 35, 1),
(26, 2, '0.00', '0.00', 7, 36, 1),
(27, 2, '3.00', '6.00', 11, 37, 1),
(28, 2, '3.00', '6.00', 11, 38, 1),
(29, 2, '0.00', '0.00', 16, 39, 1),
(30, 1, '0.00', '0.00', 18, 40, 1),
(31, 2, '0.00', '0.00', 10, 41, 1),
(32, 1, '0.00', '0.00', 23, 42, 1),
(33, 1, '0.00', '0.00', 23, 43, 1),
(34, 1, '0.00', '0.00', 17, 44, 1),
(35, 1, '0.00', '0.00', 13, 45, 1),
(36, 1, '3.00', '3.00', 11, 46, 1),
(37, 4, '0.00', '0.00', 2, 47, 1),
(38, 3, '0.00', '0.00', 7, 47, 1),
(39, 2, '0.00', '0.00', 2, 48, 1),
(40, 4, '0.00', '0.00', 4, 48, 1),
(41, 3, '0.00', '0.00', 2, 49, 1),
(42, 2, '0.00', '0.00', 4, 49, 1),
(43, 3, '0.00', '0.00', 2, 50, 1),
(44, 2, '0.00', '0.00', 4, 51, 1),
(45, 1, '0.00', '0.00', 2, 52, 1),
(46, 1, '0.00', '0.00', 9, 53, 1),
(47, 2, '0.00', '0.00', 6, 54, 1),
(48, 2, '0.00', '0.00', 2, 55, 1),
(49, 3, '0.00', '0.00', 4, 56, 1),
(50, 2, '0.00', '0.00', 2, 57, 1),
(51, 2, '0.00', '0.00', 2, 58, 1),
(52, 1, '0.00', '0.00', 2, 59, 1),
(53, 1, '0.00', '0.00', 9, 60, 1),
(54, 1, '0.00', '0.00', 4, 61, 1),
(55, 1, '0.00', '0.00', 6, 62, 1),
(56, 2, '0.00', '0.00', 2, 63, 1),
(57, 1, '0.00', '0.00', 4, 63, 1),
(58, 3, '0.00', '0.00', 9, 63, 1),
(59, 2, '0.00', '0.00', 7, 64, 1),
(60, 4, '0.00', '0.00', 4, 65, 1),
(61, 3, '0.00', '0.00', 8, 65, 1),
(62, 2, '6.00', '12.00', 5, 66, 1),
(63, 2, '0.00', '0.00', 4, 66, 1),
(64, 3, '0.00', '0.00', 2, 67, 1),
(65, 4, '6.00', '24.00', 5, 67, 1),
(66, 2, '4.00', '8.00', 2, 68, 1);

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

--
-- Estructura de tabla para la tabla `libro_transferencias_almacen`
--

CREATE TABLE `libro_transferencias_almacen` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `costo_unitario` decimal(10,2) NOT NULL,
  `costo_subtotal` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `id_transferencia_almacen` int(11) NOT NULL,
  `id_centro_costo_origen` int(11) NOT NULL,
  `id_centro_costo_destino` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_transferencias_almacen` (`id`, `cantidad`, `costo_unitario`, `costo_subtotal`, `id_producto`, `id_transferencia_almacen`, `id_centro_costo_origen`, `id_centro_costo_destino`) VALUES
(1, 3, '4.00', '12.00', 2, 1, 1, 2),
(2, 4, '5.00', '20.00', 4, 1, 1, 2);

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

--
-- Estructura de tabla para la tabla `libro_ventas`
--

CREATE TABLE `libro_ventas` (
  `id` int(11) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `precio_unitario` decimal(10,2) NOT NULL,
  `precio_subtotal` decimal(10,2) NOT NULL,
  `id_producto` int(11) NOT NULL,
  `id_salida_almacen` int(11) NOT NULL,
  `id_venta` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `libro_ventas` (`id`, `cantidad`, `precio_unitario`, `precio_subtotal`, `id_producto`, `id_salida_almacen`, `id_venta`, `id_centro_costo`) VALUES
(1, 2, '30.00', '60.00', 7, 19, 1, 1),
(2, 1, '50.00', '50.00', 3, 19, 1, 1),
(3, 1, '90.00', '90.00', 256, 20, 2, 1),
(4, 1, '30.00', '30.00', 6, 20, 2, 1),
(5, 1, '260.00', '260.00', 501, 21, 3, 1),
(6, 2, '80.00', '160.00', 46, 21, 3, 1),
(7, 2, '55.00', '110.00', 3, 22, 4, 1),
(8, 5, '30.00', '150.00', 8, 22, 4, 1),
(9, 2, '55.00', '110.00', 3, 24, 5, 1),
(10, 2, '30.00', '60.00', 7, 25, 6, 1),
(11, 2, '30.00', '60.00', 10, 25, 6, 1),
(12, 3, '30.00', '90.00', 6, 27, 7, 1),
(13, 2, '30.00', '60.00', 7, 27, 7, 1),
(14, 1, '80.00', '80.00', 3, 28, 8, 1),
(15, 1, '30.00', '30.00', 13, 28, 8, 1),
(16, 1, '30.00', '30.00', 4, 29, 9, 1),
(17, 3, '30.00', '90.00', 6, 30, 10, 1),
(18, 1, '30.00', '30.00', 6, 31, 11, 1),
(19, 2, '30.00', '60.00', 10, 32, 12, 1),
(20, 2, '30.00', '60.00', 10, 33, 13, 1),
(21, 1, '30.00', '30.00', 9, 34, 14, 1),
(22, 1, '100.00', '100.00', 20, 35, 15, 1),
(23, 2, '30.00', '60.00', 7, 36, 16, 1),
(24, 2, '30.00', '60.00', 11, 37, 17, 1),
(25, 2, '30.00', '60.00', 11, 38, 18, 1),
(26, 2, '100.00', '200.00', 16, 39, 19, 1),
(27, 1, '100.00', '100.00', 18, 40, 20, 1),
(28, 2, '30.00', '60.00', 10, 41, 21, 1),
(29, 1, '100.00', '100.00', 23, 42, 22, 1),
(30, 1, '100.00', '100.00', 23, 43, 23, 1),
(31, 1, '100.00', '100.00', 17, 44, 24, 1),
(32, 1, '30.00', '30.00', 13, 45, 25, 1),
(33, 1, '30.00', '30.00', 11, 46, 26, 1),
(34, 4, '161.00', '644.00', 2, 47, 27, 1),
(35, 3, '448.00', '1344.00', 7, 47, 27, 1),
(36, 2, '165.00', '330.00', 2, 48, 28, 1),
(37, 4, '90.00', '360.00', 4, 48, 28, 1),
(38, 3, '161.00', '483.00', 2, 49, 29, 1),
(39, 2, '84.00', '168.00', 4, 49, 29, 1),
(40, 3, '161.00', '483.00', 2, 50, 30, 1),
(41, 2, '90.00', '180.00', 4, 51, 31, 1),
(42, 1, '165.00', '165.00', 2, 52, 32, 1),
(43, 1, '224.00', '224.00', 9, 53, 33, 1),
(44, 2, '154.00', '308.00', 6, 54, 34, 1),
(45, 2, '165.00', '330.00', 2, 55, 35, 1),
(46, 3, '84.00', '252.00', 4, 56, 36, 1),
(47, 2, '165.00', '330.00', 2, 57, 37, 1),
(48, 2, '165.00', '330.00', 2, 58, 38, 1),
(49, 1, '165.00', '165.00', 2, 59, 39, 1),
(50, 1, '224.00', '224.00', 9, 60, 40, 1),
(51, 1, '90.00', '90.00', 4, 61, 41, 1),
(52, 1, '154.00', '154.00', 6, 62, 42, 1),
(53, 2, '161.00', '322.00', 2, 63, 43, 1),
(54, 1, '84.00', '84.00', 4, 63, 43, 1),
(55, 3, '224.00', '672.00', 9, 63, 43, 1),
(56, 2, '448.00', '896.00', 7, 64, 44, 1),
(57, 4, '84.00', '336.00', 4, 65, 45, 1),
(58, 3, '385.00', '1155.00', 8, 65, 45, 1),
(59, 2, '680.00', '1360.00', 5, 66, 46, 1),
(60, 2, '84.00', '168.00', 4, 66, 46, 1),
(61, 3, '161.00', '483.00', 2, 67, 47, 1),
(62, 4, '680.00', '2720.00', 5, 67, 47, 1),
(63, 2, '161.00', '322.00', 2, 68, 48, 1);

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

--
-- Estructura de tabla para la tabla `libro_ventas_iva`
--

CREATE TABLE `libro_ventas_iva` (
  `id` int(11) NOT NULL,
  `especificacion` int(11) NOT NULL,
  `nro` int(11) NOT NULL,
  `fecha_factura` date NOT NULL,
  `nro_factura` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_autorizacion` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(10) COLLATE latin1_spanish_ci NOT NULL,
  `nit` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `razon_social` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `importe_total` decimal(10,2) NOT NULL,
  `importe_ice` decimal(10,2) NOT NULL,
  `exp_op_excentas` decimal(10,2) NOT NULL,
  `tasa_cero` decimal(10,2) NOT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `descuentos` decimal(10,2) NOT NULL,
  `importe_base_df` decimal(10,2) NOT NULL,
  `debito_fiscal` decimal(10,2) NOT NULL,
  `codigo_control` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

--
-- Estructura de tabla para la tabla `libro_ventas_iva_aux`
--

CREATE TABLE `libro_ventas_iva_aux` (
  `id` int(11) NOT NULL,
  `especificacion` int(11) NOT NULL,
  `nro` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `nro_factura` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_autorizacion` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(10) COLLATE latin1_spanish_ci NOT NULL,
  `nit` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `razon_social` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `importe_total` decimal(10,2) NOT NULL,
  `ice` decimal(10,2) NOT NULL,
  `importe_exento` decimal(10,2) NOT NULL,
  `tasa_cero` decimal(10,2) NOT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `descuentos` decimal(10,2) NOT NULL,
  `importe_base` decimal(10,2) NOT NULL,
  `debito_fiscal` decimal(10,2) NOT NULL,
  `codigo_control` varchar(50) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

--
-- Estructura de tabla para la tabla `marcas`
--

CREATE TABLE `marcas` (
  `id` int(11) NOT NULL,
  `marca` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(20) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `marcas` (`id`, `marca`, `estado`) VALUES
(1, 'LOGITECH', 'Activo'),
(2, 'ASTRO', 'Activo'),
(3, 'SKU', 'Activo');

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

--
-- Estructura de tabla para la tabla `movimientos_productos_mes`
--

CREATE TABLE `movimientos_productos_mes` (
  `id` int(11) NOT NULL,
  `mes` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `id_producto` int(11) NOT NULL,
  `codigo_producto` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `cant_movimientos` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `movimientos_productos_mes` (`id`, `mes`, `gestion`, `id_producto`, `codigo_producto`, `cant_movimientos`, `id_centro_costo`) VALUES
(1, '10', '2021', 7, '', 1, 1),
(2, '10', '2021', 3, '', 3, 1),
(3, '10', '2021', 256, '', 1, 1),
(4, '10', '2021', 6, '', 1, 1),
(5, '10', '2021', 501, '', 2, 1),
(6, '10', '2021', 46, '', 2, 1),
(7, '10', '2021', 5, '', 1, 1),
(8, '10', '2021', 8, '', 1, 1),
(9, '11', '2021', 3, '', 5, 1),
(10, '11', '2021', 6, '', 2, 1),
(11, '11', '2021', 5, '', 1, 1),
(12, '11', '2021', 7, '', 2, 1),
(13, '11', '2021', 10, '', 2, 1),
(14, '11', '2021', 11, '', 1, 1),
(15, '11', '2021', 21, '', 1, 1),
(16, '01', '2022', 6, '', 6, 1),
(17, '01', '2022', 7, '', 5, 1),
(18, '01', '2022', 3, '', 1, 1),
(19, '01', '2022', 13, '', 2, 1),
(20, '01', '2022', 4, '', 8, 1),
(21, '01', '2022', 10, '', 3, 1),
(22, '01', '2022', 9, '', 5, 1),
(23, '01', '2022', 20, '', 1, 1),
(24, '01', '2022', 11, '', 3, 1),
(25, '01', '2022', 16, '', 1, 1),
(26, '01', '2022', 18, '', 1, 1),
(27, '01', '2022', 23, '', 2, 1),
(28, '01', '2022', 17, '', 1, 1),
(29, '01', '2022', 2, '', 11, 1),
(30, '01', '2022', 5, '', 1, 1),
(31, '01', '2022', 8, '', 1, 1),
(32, '02', '2022', 4, '', 1, 1),
(33, '02', '2022', 8, '', 1, 1),
(34, '04', '2022', 5, '', 4, 1),
(35, '04', '2022', 4, '', 4, 1),
(36, '04', '2022', 2, '', 9, 1),
(37, '04', '2022', 7, 'P006', 1, 1),
(38, '07', '2022', 2, '', 2, 1);

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

--
-- Estructura de tabla para la tabla `pagos`
--

CREATE TABLE `pagos` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `observaciones` varchar(200) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `id_encargado` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `pagos` (`id`, `nro_orden`, `gestion`, `fecha`, `hora`, `total`, `observaciones`, `estado`, `id_encargado`, `id_centro_costo`) VALUES
(1, 'IP000001', '2022', '2022-04-18', '14:02:28', '10.00', '', 'Cancelado', 1, 1),
(2, '000002', '2022', '2022-04-25', '11:15:10', '60.00', '', 'Cancelado', 1, 1),
(3, '000002', '2022', '2022-04-25', '11:30:11', '230.00', '', 'Cancelado', 1, 1),
(4, '000002', '2022', '2022-07-04', '10:54:59', '6.00', '', 'Cancelado', 1, 1),
(5, 'IP000002', '2022', '2022-07-04', '11:08:27', '1.00', 'test', 'Cancelado', 1, 1);

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

--
-- Estructura de tabla para la tabla `personal`
--

CREATE TABLE `personal` (
  `id` int(11) NOT NULL,
  `codigo` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `nombres` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `telefono` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `celular` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `email` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `direccion` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `area` varchar(50) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `personal` (`id`, `codigo`, `nombres`, `telefono`, `celular`, `email`, `direccion`, `area`) VALUES
(1, '555', 'Sebastian Ospina', '1', '60799000', 'rildo.castellon@gmail.com', 'cucardas sud nro 46', 'ADMINISTRACION'),
(5, 'USR-5', 'juan perez', '', '', 'test', '', 'ADMINISTRACION'),
(6, 'USR6', '', '', '', '333', '', 'NO DEFINIDO'),
(7, 'USR6', '', '', '', '333', '', 'NO DEFINIDO'),
(8, 'USR6', '', '', '', '333', '', 'NO DEFINIDO'),
(9, 'USR6', '', '', '', '333', '', 'NO DEFINIDO'),
(10, 'USR6', '', '', '', '333', '', 'NO DEFINIDO'),
(11, 'USR11', '', '', '', 'asfasdfd', '', 'NO DEFINIDO'),
(12, 'USR12', '', '', '', '44', '', 'NO DEFINIDO'),
(13, 'USR12', 'Carlos Ramirez', '', '', '44', '', 'NO DEFINIDO'),
(15, 'USR15', 'maria peredo', '', '', 'maria@hotmail.com', '', 'ADMINISTRACION'),
(16, 'USR16', '', '', '', '', '', 'Seleccionar..'),
(17, 'USR17', 'carlos ', '', '', '', '', 'NO DEFINIDO'),
(18, 'USR18', 'maria hernandez', '', '', '', '', 'ADMINISTRACION'),
(19, 'USR19', 'sdgdsf', '', '', '', '', 'Seleccionar..');

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

--
-- Estructura de tabla para la tabla `plan_cuentas`
--

CREATE TABLE `plan_cuentas` (
  `id` int(11) NOT NULL,
  `cod` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `nro_cuenta` int(11) NOT NULL,
  `nombre_cuenta` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `tipo` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nivel` int(11) NOT NULL,
  `cuenta_mayor` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `plan_cuentas` (`id`, `cod`, `nro_cuenta`, `nombre_cuenta`, `tipo`, `nivel`, `cuenta_mayor`) VALUES
(1, '', 1, 'ACTIVO', 'ACTIVO', 1, 0),
(2, '01', 101, 'ACTIVO CORRIENTE', 'ACTIVO', 2, 1),
(3, '01', 10101, 'DISPONIBLE', 'ACTIVO', 3, 101),
(4, '01', 1010101, 'CAJA', 'ACTIVO', 4, 10101),
(5, '01', 101010101, 'CAJA M/N', 'ACTIVO', 5, 1010101),
(6, '02', 101010102, 'CAJA M/E', 'ACTIVO', 5, 1010101),
(7, '03', 101010103, 'CAJA CHICA', 'ACTIVO', 5, 1010101),
(8, '02', 1010102, 'BANCOS', 'ACTIVO', 4, 10101),
(9, '01', 101010201, 'BANCO BISA', 'ACTIVO', 5, 1010102),
(10, '02', 101010202, 'BANCO UNION SA', 'ACTIVO', 5, 1010102),
(11, '02', 10102, 'EXIGIBLE', 'ACTIVO', 3, 101),
(12, '01', 1010201, 'CLIENTES', 'ACTIVO', 4, 10102),
(13, '01', 101020101, 'DOCUMENTOS POR COBRAR', 'ACTIVO', 5, 1010201),
(14, '02', 1010202, 'EMPLEADOS', 'ACTIVO', 4, 10102),
(15, '01', 101020201, 'ANTICIPOS', 'ACTIVO', 5, 1010202),
(16, '02', 101020202, 'CUENTAS POR RENDIR', 'ACTIVO', 5, 1010202),
(17, '03', 10103, 'REALIZABLE', 'ACTIVO', 3, 101),
(18, '01', 1010301, 'INVENTARIO DE SUMINISTROS', 'ACTIVO', 4, 10103),
(19, '', 2, 'PASIVO', 'ACTIVO', 1, 0),
(20, '01', 201, 'PASIVO CORRIENTE', 'ACTIVO', 2, 2),
(21, '01', 20101, 'PASIVO CORRIENTE', 'ACTIVO', 3, 201),
(22, '01', 2010101, 'OBLIGACIONES COMERCIALES', 'ACTIVO', 4, 20101),
(23, '01', 201010101, 'CUENTAS POR PAGAR', 'ACTIVO', 5, 2010101),
(24, '02', 2010102, 'OBLIGACIONES IMPOSITIVAS', 'ACTIVO', 4, 20101),
(25, '03', 101010203, 'BANCO ECONOMICO', 'ACTIVO', 5, 1010102),
(26, '04', 101010204, 'BANCO SOL', 'ACTIVO', 5, 1010102),
(27, '04', 101010104, 'caja ejemplo', 'ACTIVO', 5, 1010101),
(28, '', 1010102003, 'BANCO COMARAPA', 'ACTIVO', 5, 1010102);

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

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

CREATE TABLE `productos` (
  `id` int(11) NOT NULL,
  `codigo` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `descripcion` varchar(250) COLLATE latin1_spanish_ci NOT NULL,
  `categoria` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `sub_categoria` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `marca` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `imagen` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `unidad_medida` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `precio_a` decimal(10,2) NOT NULL,
  `precio_b` decimal(10,2) NOT NULL,
  `precio_c` decimal(10,2) NOT NULL,
  `estado` varchar(20) COLLATE latin1_spanish_ci NOT NULL,
  `gasto_servicio` varchar(5) COLLATE latin1_spanish_ci NOT NULL,
  `control_stock` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `stock_minimo` int(11) NOT NULL,
  `stock_maximo` int(11) NOT NULL,
  `id_categoria` int(11) NOT NULL,
  `id_subcategoria` int(11) NOT NULL,
  `id_marca` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `productos` (`id`, `codigo`, `descripcion`, `categoria`, `sub_categoria`, `marca`, `imagen`, `unidad_medida`, `precio_a`, `precio_b`, `precio_c`, `estado`, `gasto_servicio`, `control_stock`, `stock_minimo`, `stock_maximo`, `id_categoria`, `id_subcategoria`, `id_marca`) VALUES
(2, 'P001', 'M720 Triathlon', 'COMPUTADORAS', 'MOUSE', 'LOGITECH', '', 'PZA', '161.00', '165.00', '0.00', 'Activo', '', '', 0, 0, 1, 1, 1),
(3, 'P002', 'M585 Multidispositivo', 'COMPUTADORAS', 'MOUSE', 'LOGITECH', '', 'PZA', '203.00', '210.00', '0.00', 'Activo', '', '', 0, 0, 1, 1, 1),
(4, 'P003', 'Mouse inalámbrico M170', 'COMPUTADORAS', 'MOUSE', 'LOGITECH', '', 'PZA', '84.00', '90.00', '0.00', 'Activo', '', '', 0, 0, 1, 1, 1),
(5, 'P004', 'Teclado G915 TKL', 'COMPUTADORAS', 'TECLADOS', 'LOGITECH', '', 'PZA', '680.00', '700.00', '0.00', 'Activo', '', '', 0, 0, 1, 2, 1),
(6, 'P005', 'Teclado G213 Prodigy', 'COMPUTADORAS', 'TECLADOS', 'LOGITECH', '', 'PZA', '154.00', '160.00', '0.00', 'Activo', '', '', 0, 0, 1, 2, 1),
(7, 'P006', 'Teclado G413', 'COMPUTADORAS', 'TECLADOS', 'LOGITECH', '', 'PZA', '448.00', '450.00', '0.00', 'Activo', '', '', 0, 0, 1, 2, 1),
(8, 'P007', 'Auricular ASTRO Gaming A20', 'ACCESORIOS', 'AUDIFONOS', 'ASTRO', '', 'PZA', '385.00', '390.00', '0.00', 'Activo', '', '', 0, 0, 2, 3, 2),
(9, 'P008', 'Camara web USB 1080P', 'ACCESORIOS', 'CAMARA WEB', 'SKU', '', 'PZA', '224.00', '230.00', '0.00', 'Activo', '', '', 0, 0, 2, 4, 3);

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

--
-- Estructura de tabla para la tabla `proveedores`
--

CREATE TABLE `proveedores` (
  `id` int(11) NOT NULL,
  `codigo` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `empresa` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `razon_social` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `nit` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `contacto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `telefono` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `celular` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `email` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `web` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `pais` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `ciudad` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `direccion` varchar(200) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_proveedor` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `proveedores` (`id`, `codigo`, `empresa`, `razon_social`, `nit`, `contacto`, `telefono`, `celular`, `email`, `web`, `pais`, `ciudad`, `direccion`, `tipo_proveedor`, `estado`) VALUES
(1, 'PV1', 'Distribuidora Tecnobol', 'Techno SRL', '65465431', 'Jose Romero', '4445312', '70744455', 'info@tecnobol.com', 'www.tecnobol.com', 'USA ', 'Florida', 'Main Street ', 'Compra Importacion', 'Activo'),
(2, 'PV2', 'Logitech China', '', '', 'Whu liang', '', '', '', '', 'China', 'Shangai', '', 'Compra Importacion', 'Activo');

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

--
-- Estructura de tabla para la tabla `salidas_almacen`
--

CREATE TABLE `salidas_almacen` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `concepto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_doc` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `nro_doc` int(30) NOT NULL,
  `observaciones` varchar(255) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `id_personal` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `salidas_almacen` (`id`, `nro_orden`, `fecha`, `hora`, `gestion`, `concepto`, `tipo_doc`, `nro_doc`, `observaciones`, `estado`, `id_personal`, `id_centro_costo`) VALUES
(1, 'NS000001', '2021-08-27', '00:00:00', '2021', 'DEVOLUCION', 'Factura', 5554444, '', 'Pendiente', 1, 1),
(2, '000002', '2021-08-27', '00:00:00', '2021', 'DEVOLUCION', 'Factura', 5554444, '', '', 1, 1),
(3, '000003', '2021-08-27', '00:00:00', '2021', 'DEVOLUCION', 'Factura', 345353, '', '', 1, 1),
(4, 'NS000004', '2021-08-27', '00:00:00', '2021', 'DEVOLUCION', 'Factura', 80808, '', 'Pendiente', 1, 1),
(5, 'NS000005', '2021-08-27', '00:00:00', '2021', 'DEVOLUCION', 'Factura', 2147483647, '', 'Pendiente', 1, 1),
(6, 'NS000006', '2021-08-27', '00:00:00', '2021', 'DEVOLUCION', 'Recibo', 7070, '', 'Pendiente', 1, 1),
(7, 'NS000007', '2021-08-27', '09:34:54', '2021', 'MUESTRAS', 'Factura', 353534, 'test', 'Anulado', 1, 1),
(8, 'NS000008', '2021-08-27', '10:19:33', '2021', 'MUESTRAS', 'Factura', 435353, 'test 6767', 'Anulado', 1, 1),
(9, 'NS000009', '2021-08-27', '10:45:12', '2021', 'SALIDA / VENTAS', 'Factura', 0, 'aaa', 'Anulado', 1, 1),
(10, 'NS0000010', '2021-08-27', '10:47:28', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(11, 'NS000011', '2021-09-02', '00:00:00', '2021', 'DEVOLUCION', '', 0, '', 'Anulado', 1, 1),
(12, 'NS000012', '2021-09-03', '21:09:30', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(13, 'NS000013', '2021-09-03', '23:24:47', '2021', '', '', 0, '5', 'Anulado', 1, 1),
(14, 'NS000014', '2021-09-03', '23:35:43', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(15, 'NS000015', '2021-09-09', '21:05:24', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(16, 'NS000016', '2021-09-09', '21:45:57', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(17, 'NS000017', '2021-09-15', '10:44:15', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(18, 'NS000018', '2021-10-01', '09:49:42', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(19, 'NS000001', '2021-10-01', '10:56:16', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(20, 'NS000002', '2021-10-01', '11:01:08', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(21, 'NS000003', '2021-10-01', '11:05:08', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(22, 'NS000004', '2021-10-28', '14:49:47', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(23, '000005', '2021-11-05', '00:00:00', '2021', 'DEVOLUCION', 'Factura', 435354, '', '', 1, 1),
(24, 'NS000006', '2021-11-06', '19:16:07', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(25, 'NS000007', '2021-11-09', '14:42:46', '2021', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(26, 'NS000008', '2021-11-11', '08:30:53', '2021', 'DEVOLUCION', 'Factura', 4561321, 'EQUIPO FALLADO', 'Pendiente', 1, 1),
(27, 'NS000001', '2022-01-20', '07:29:01', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(28, 'NS000002', '2022-01-20', '08:31:07', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(29, 'NS000003', '2022-01-20', '08:41:44', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(30, 'NS000004', '2022-01-20', '08:42:11', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(31, 'NS000005', '2022-01-20', '08:43:01', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(32, 'NS000006', '2022-01-20', '08:44:00', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(33, 'NS000007', '2022-01-20', '08:44:18', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(34, 'NS000008', '2022-01-20', '08:46:30', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(35, 'NS000009', '2022-01-20', '08:47:03', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(36, 'NS0000010', '2022-01-20', '08:48:40', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(37, 'NS000011', '2022-01-20', '08:53:30', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(38, 'NS000012', '2022-01-20', '09:06:29', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(39, 'NS000013', '2022-01-20', '09:17:59', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(40, 'NS000014', '2022-01-20', '09:49:18', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(41, 'NS000015', '2022-01-20', '09:56:00', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(42, 'NS000016', '2022-01-20', '09:57:20', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(43, 'NS000017', '2022-01-20', '10:05:20', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(44, 'NS000018', '2022-01-20', '10:06:00', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(45, 'NS000019', '2022-01-20', '10:16:21', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(46, 'NS000020', '2022-01-20', '10:21:13', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(47, 'NS000021', '2022-01-22', '23:48:34', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(48, 'NS000022', '2022-01-22', '23:53:23', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(49, 'NS000023', '2022-01-22', '00:02:26', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(50, 'NS000024', '2022-01-22', '10:02:08', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(51, 'NS000025', '2022-01-22', '10:05:27', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(52, 'NS000026', '2022-01-22', '10:07:22', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(53, 'NS000027', '2022-01-22', '10:13:02', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(54, 'NS000028', '2022-01-22', '10:15:04', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(55, 'NS000029', '2022-01-22', '10:16:21', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(56, 'NS000030', '2022-01-22', '10:18:48', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(57, 'NS000031', '2022-01-22', '10:19:40', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(58, 'NS000032', '2022-01-22', '10:20:11', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(59, 'NS000033', '2022-01-22', '10:22:10', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(60, 'NS000034', '2022-01-22', '10:24:34', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(61, 'NS000035', '2022-01-22', '10:25:54', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(62, 'NS000036', '2022-01-22', '10:30:28', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(63, 'NS000037', '2022-01-22', '10:31:23', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(64, 'NS000038', '2022-01-22', '10:35:02', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(65, 'NS000039', '2022-02-11', '15:35:12', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(66, 'NS000040', '2022-04-05', '16:09:57', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(67, 'NS000041', '2022-04-11', '17:58:26', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Anulado', 1, 1),
(68, 'NS000042', '2022-07-04', '10:41:00', '2022', 'SALIDA / VENTAS', '0', 0, '', 'Pendiente', 1, 1);

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

--
-- Estructura de tabla para la tabla `sub_categorias`
--

CREATE TABLE `sub_categorias` (
  `id` int(11) NOT NULL,
  `sub_categoria` varchar(100) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `id_categoria` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `sub_categorias` (`id`, `sub_categoria`, `estado`, `id_categoria`) VALUES
(1, 'MOUSE', 'Activo', 1),
(2, 'TECLADOS', 'Activo', 1),
(3, 'AUDIFONOS', 'Activo', 2),
(4, 'CAMARA WEB', 'Activo', 2);

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

--
-- Estructura de tabla para la tabla `transferencias_almacen`
--

CREATE TABLE `transferencias_almacen` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `concepto` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
  `cant_transferencia` int(11) NOT NULL,
  `observaciones` varchar(300) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `actualizacion_estado` datetime NOT NULL,
  `id_personal` int(11) NOT NULL,
  `id_personal_act_estado` int(11) NOT NULL,
  `id_tienda_origen` int(11) NOT NULL,
  `id_tienda_destino` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `transferencias_almacen` (`id`, `nro_orden`, `fecha`, `hora`, `gestion`, `concepto`, `cant_transferencia`, `observaciones`, `estado`, `actualizacion_estado`, `id_personal`, `id_personal_act_estado`, `id_tienda_origen`, `id_tienda_destino`) VALUES
(1, 'NT000001', '2022-04-25', '11:30:37', '2022', 'SALIDA / VENTAS', 7, '', 'En Transito', '0000-00-00 00:00:00', 1, 0, 1, 2);

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

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

CREATE TABLE `ventas` (
  `id` int(11) NOT NULL,
  `nro_orden` varchar(80) COLLATE latin1_spanish_ci NOT NULL,
  `gestion` varchar(15) COLLATE latin1_spanish_ci NOT NULL,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `fecha_vencimiento` date NOT NULL,
  `forma_pago` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `tipo_doc` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `nro_doc` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `a_cuenta` decimal(10,2) NOT NULL,
  `saldo` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `recibido` decimal(10,2) NOT NULL,
  `cambio` decimal(10,2) NOT NULL,
  `observaciones` varchar(200) COLLATE latin1_spanish_ci NOT NULL,
  `estado_pago` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `estado` varchar(30) COLLATE latin1_spanish_ci NOT NULL,
  `id_personal` int(11) NOT NULL,
  `id_cliente` int(11) NOT NULL,
  `id_centro_costo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

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

INSERT INTO `ventas` (`id`, `nro_orden`, `gestion`, `fecha`, `hora`, `fecha_vencimiento`, `forma_pago`, `tipo_doc`, `nro_doc`, `a_cuenta`, `saldo`, `total`, `recibido`, `cambio`, `observaciones`, `estado_pago`, `estado`, `id_personal`, `id_cliente`, `id_centro_costo`) VALUES
(1, 'NV000001', '2021', '2021-10-01', '10:56:16', '0000-00-00', 'Contado', '0', '0', '110.00', '0.00', '110.00', '150.00', '40.00', 'OBS', 'Completado', 'Pendiente', 1, 17, 1),
(2, 'NV000002', '2021', '2021-10-01', '11:01:08', '1969-12-31', 'Credito', '0', '0', '23.00', '97.00', '120.00', '20.00', '0.00', '', 'S. Pendiente', 'Pendiente', 1, 1, 1),
(3, 'NV000003', '2021', '2021-10-01', '11:05:08', '1969-12-31', 'Credito', '0', '0', '420.00', '0.00', '420.00', '0.00', '0.00', 'VENTA A CREDITO', 'Anulado', 'Anulado', 1, 18, 1),
(4, 'NV000004', '2021', '2021-10-28', '14:49:47', '1969-12-31', 'Credito', '0', '0', '260.00', '0.00', '260.00', '0.00', '0.00', 'TEST', 'Completado', 'Pendiente', 1, 1, 1),
(5, 'NV000005', '2021', '2021-11-06', '19:16:07', '0000-00-00', 'Contado', '0', '0', '110.00', '0.00', '110.00', '150.00', '40.00', 'test', 'Completado', 'Pendiente', 1, 35, 1),
(6, 'NV000006', '2021', '2021-11-09', '14:42:46', '0000-00-00', 'Contado', '0', '0', '120.00', '0.00', '120.00', '150.00', '30.00', 'OBSERVACIONES ', 'Anulado', 'Anulado', 1, 41, 1),
(7, 'NV000001', '2022', '2022-01-20', '07:29:01', '0000-00-00', 'Contado', '0', '0', '150.00', '0.00', '150.00', '180.00', '30.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(8, 'NV000002', '2022', '2022-01-20', '08:31:07', '0000-00-00', 'Contado', '0', '0', '110.00', '0.00', '110.00', '150.00', '40.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(9, 'NV000003', '2022', '2022-01-20', '08:41:44', '0000-00-00', 'Contado', '0', '0', '30.00', '0.00', '30.00', '50.00', '20.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(10, 'NV000004', '2022', '2022-01-20', '08:42:11', '0000-00-00', 'Contado', '0', '0', '90.00', '0.00', '90.00', '150.00', '60.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(11, 'NV000005', '2022', '2022-01-20', '08:43:01', '0000-00-00', 'Contado', '0', '0', '30.00', '0.00', '30.00', '50.00', '20.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(12, 'NV000006', '2022', '2022-01-20', '08:44:00', '0000-00-00', 'Contado', '0', '0', '60.00', '0.00', '60.00', '100.00', '40.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(13, 'NV000007', '2022', '2022-01-20', '08:44:18', '0000-00-00', 'Contado', '0', '0', '60.00', '0.00', '60.00', '80.00', '20.00', '', 'Completado', 'Pendiente', 1, 43, 1),
(14, 'NV000008', '2022', '2022-01-20', '08:46:30', '0000-00-00', 'Contado', '0', '0', '30.00', '0.00', '30.00', '50.00', '20.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(15, 'NV000009', '2022', '2022-01-20', '08:47:03', '0000-00-00', 'Contado', '0', '0', '100.00', '0.00', '100.00', '100.00', '0.00', '', 'Completado', 'Pendiente', 1, 41, 1),
(16, 'NV0000010', '2022', '2022-01-20', '08:48:40', '0000-00-00', 'Contado', '0', '0', '60.00', '0.00', '60.00', '100.00', '40.00', '', 'Completado', 'Pendiente', 1, 36, 1),
(17, 'NV000011', '2022', '2022-01-20', '08:53:30', '0000-00-00', 'Contado', '0', '0', '60.00', '0.00', '60.00', '70.00', '10.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(18, 'NV000012', '2022', '2022-01-20', '09:06:29', '0000-00-00', 'Contado', '0', '0', '60.00', '0.00', '60.00', '60.00', '0.00', '', 'Completado', 'Pendiente', 1, 37, 1),
(19, 'NV000013', '2022', '2022-01-20', '09:17:59', '0000-00-00', 'Contado', '0', '0', '200.00', '0.00', '200.00', '200.00', '0.00', '', 'Completado', 'Pendiente', 1, 38, 1),
(20, 'NV000014', '2022', '2022-01-20', '09:49:18', '0000-00-00', 'Contado', '0', '0', '100.00', '0.00', '100.00', '100.00', '0.00', '', 'Completado', 'Pendiente', 1, 35, 1),
(21, 'NV000015', '2022', '2022-01-20', '09:56:00', '0000-00-00', 'Contado', '0', '0', '60.00', '0.00', '60.00', '70.00', '10.00', '', 'Completado', 'Pendiente', 1, 36, 1),
(22, 'NV000016', '2022', '2022-01-20', '09:57:20', '0000-00-00', 'Contado', '0', '0', '100.00', '0.00', '100.00', '100.00', '0.00', '', 'Completado', 'Pendiente', 1, 42, 1),
(23, 'NV000017', '2022', '2022-01-20', '10:05:20', '0000-00-00', 'Contado', '0', '0', '100.00', '0.00', '100.00', '100.00', '0.00', '', 'Completado', 'Pendiente', 1, 37, 1),
(24, 'NV000018', '2022', '2022-01-20', '10:06:00', '0000-00-00', 'Contado', '0', '0', '100.00', '0.00', '100.00', '100.00', '0.00', '', 'Completado', 'Pendiente', 1, 36, 1),
(25, 'NV000019', '2022', '2022-01-20', '10:16:21', '0000-00-00', 'Contado', '0', '0', '30.00', '0.00', '30.00', '50.00', '20.00', '', 'Completado', 'Pendiente', 1, 37, 1),
(26, 'NV000020', '2022', '2022-01-20', '10:21:13', '0000-00-00', 'Contado', '0', '0', '30.00', '0.00', '30.00', '50.00', '20.00', '', 'Completado', 'Pendiente', 1, 37, 1),
(27, 'NV000021', '2022', '2022-01-22', '23:48:34', '0000-00-00', 'Contado', '0', '0', '1988.00', '0.00', '1988.00', '2000.00', '12.00', '', 'Completado', 'Pendiente', 1, 2, 1),
(28, 'NV000022', '2022', '2022-01-22', '23:53:23', '0000-00-00', 'Contado', '0', '0', '690.00', '0.00', '690.00', '700.00', '10.00', '', 'Completado', 'Pendiente', 1, 2, 1),
(29, 'NV000023', '2022', '2022-01-22', '00:02:26', '0000-00-00', 'Contado', '0', '0', '651.00', '0.00', '651.00', '700.00', '49.00', 'prueba venta', 'Completado', 'Pendiente', 1, 1, 1),
(30, 'NV000024', '2022', '2022-01-22', '10:02:08', '0000-00-00', 'Contado', '0', '0', '483.00', '0.00', '483.00', '500.00', '17.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(31, 'NV000025', '2022', '2022-01-22', '10:05:27', '0000-00-00', 'Contado', '0', '0', '180.00', '0.00', '180.00', '200.00', '20.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(32, 'NV000026', '2022', '2022-01-22', '10:07:22', '0000-00-00', 'Contado', '0', '0', '165.00', '0.00', '165.00', '170.00', '5.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(33, 'NV000027', '2022', '2022-01-22', '10:13:02', '0000-00-00', 'Contado', '0', '0', '224.00', '0.00', '224.00', '250.00', '26.00', '', 'Completado', 'Pendiente', 1, 3, 1),
(34, 'NV000028', '2022', '2022-01-22', '10:15:04', '0000-00-00', 'Contado', '0', '0', '308.00', '0.00', '308.00', '350.00', '42.00', '', 'Completado', 'Pendiente', 1, 2, 1),
(35, 'NV000029', '2022', '2022-01-22', '10:16:21', '0000-00-00', 'Contado', '0', '0', '330.00', '0.00', '330.00', '350.00', '20.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(36, 'NV000030', '2022', '2022-01-22', '10:18:48', '0000-00-00', 'Contado', '0', '0', '252.00', '0.00', '252.00', '260.00', '8.00', '', 'Completado', 'Pendiente', 1, 2, 1),
(37, 'NV000031', '2022', '2022-01-22', '10:19:40', '0000-00-00', 'Contado', '0', '0', '330.00', '0.00', '330.00', '350.00', '20.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(38, 'NV000032', '2022', '2022-01-22', '10:20:11', '0000-00-00', 'Contado', '0', '0', '330.00', '0.00', '330.00', '350.00', '20.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(39, 'NV000033', '2022', '2022-01-22', '10:22:10', '0000-00-00', 'Contado', '0', '0', '165.00', '0.00', '165.00', '200.00', '35.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(40, 'NV000034', '2022', '2022-01-22', '10:24:34', '0000-00-00', 'Contado', '0', '0', '224.00', '0.00', '224.00', '250.00', '26.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(41, 'NV000035', '2022', '2022-01-22', '10:25:54', '0000-00-00', 'Contado', '0', '0', '90.00', '0.00', '90.00', '100.00', '10.00', '', 'Completado', 'Pendiente', 1, 2, 1),
(42, 'NV000036', '2022', '2022-01-22', '10:30:28', '0000-00-00', 'Contado', '0', '0', '154.00', '0.00', '154.00', '160.00', '6.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(43, 'NV000037', '2022', '2022-01-22', '10:31:23', '0000-00-00', 'Contado', '0', '0', '1078.00', '0.00', '1078.00', '1100.00', '22.00', 'venta 2', 'Completado', 'Pendiente', 1, 1, 1),
(44, 'NV000038', '2022', '2022-01-22', '10:35:02', '0000-00-00', 'Contado', '0', '0', '896.00', '0.00', '896.00', '1000.00', '104.00', '', 'Completado', 'Pendiente', 1, 1, 1),
(45, 'NV000039', '2022', '2022-02-11', '15:35:12', '1969-12-31', 'Credito', '0', '0', '500.00', '991.00', '1491.00', '500.00', '0.00', '', 'S. Pendiente', 'Pendiente', 1, 4, 1),
(46, 'NV000040', '2022', '2022-04-05', '16:09:57', '1969-12-31', 'Credito', '0', '0', '31.00', '1497.00', '1528.00', '28.00', '0.00', 'obs', 'S. Pendiente', 'Pendiente', 1, 1, 1),
(47, 'NV000041', '2022', '2022-04-11', '17:58:26', '0000-00-00', 'Contado', '0', '0', '3203.00', '0.00', '3203.00', '4000.00', '797.00', '', 'Anulado', 'Anulado', 1, 7, 1),
(48, 'NV000042', '2022', '2022-07-04', '10:41:00', '0000-00-00', 'Contado', '0', '0', '322.00', '0.00', '322.00', '350.00', '28.00', 'test', 'Completado', 'Pendiente', 1, 1, 1);

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `almacenes`
--
ALTER TABLE `almacenes`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `almacenes_transito`
--
ALTER TABLE `almacenes_transito`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `asientos`
--
ALTER TABLE `asientos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cambio`
--
ALTER TABLE `cambio`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `categorias`
--
ALTER TABLE `categorias`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `centros_costo`
--
ALTER TABLE `centros_costo`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `clientes`
--
ALTER TABLE `clientes`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cobranzas`
--
ALTER TABLE `cobranzas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_asientos`
--
ALTER TABLE `cod_asientos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_cobranza`
--
ALTER TABLE `cod_cobranza`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_compras`
--
ALTER TABLE `cod_compras`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_comprobante`
--
ALTER TABLE `cod_comprobante`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_cotizaciones`
--
ALTER TABLE `cod_cotizaciones`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_gastos`
--
ALTER TABLE `cod_gastos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_ingreso`
--
ALTER TABLE `cod_ingreso`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_pago`
--
ALTER TABLE `cod_pago`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_salida`
--
ALTER TABLE `cod_salida`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_transferencia`
--
ALTER TABLE `cod_transferencia`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cod_ventas`
--
ALTER TABLE `cod_ventas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `compras`
--
ALTER TABLE `compras`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `configuracion_accesos`
--
ALTER TABLE `configuracion_accesos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `configuracion_niveles`
--
ALTER TABLE `configuracion_niveles`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `configuracion_unidades`
--
ALTER TABLE `configuracion_unidades`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cotizaciones`
--
ALTER TABLE `cotizaciones`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cotizacion_moneda`
--
ALTER TABLE `cotizacion_moneda`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cuentas_bancarias`
--
ALTER TABLE `cuentas_bancarias`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `datos_empresa`
--
ALTER TABLE `datos_empresa`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `ingresos_almacen`
--
ALTER TABLE `ingresos_almacen`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `ingresos_brutos`
--
ALTER TABLE `ingresos_brutos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `inventario_inicial`
--
ALTER TABLE `inventario_inicial`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `kardex_producto`
--
ALTER TABLE `kardex_producto`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_cobranzas`
--
ALTER TABLE `libro_cobranzas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_cotizaciones`
--
ALTER TABLE `libro_cotizaciones`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_diario`
--
ALTER TABLE `libro_diario`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_gastos_servicios`
--
ALTER TABLE `libro_gastos_servicios`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_ingresos_almacen`
--
ALTER TABLE `libro_ingresos_almacen`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_inventario_inicial`
--
ALTER TABLE `libro_inventario_inicial`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_mayor`
--
ALTER TABLE `libro_mayor`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_pagos`
--
ALTER TABLE `libro_pagos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_partidas`
--
ALTER TABLE `libro_partidas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_salidas_almacen`
--
ALTER TABLE `libro_salidas_almacen`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_transferencias_almacen`
--
ALTER TABLE `libro_transferencias_almacen`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_ventas`
--
ALTER TABLE `libro_ventas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_ventas_iva`
--
ALTER TABLE `libro_ventas_iva`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `libro_ventas_iva_aux`
--
ALTER TABLE `libro_ventas_iva_aux`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `marcas`
--
ALTER TABLE `marcas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `movimientos_productos_mes`
--
ALTER TABLE `movimientos_productos_mes`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `pagos`
--
ALTER TABLE `pagos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `personal`
--
ALTER TABLE `personal`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `plan_cuentas`
--
ALTER TABLE `plan_cuentas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `productos`
--
ALTER TABLE `productos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `proveedores`
--
ALTER TABLE `proveedores`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `salidas_almacen`
--
ALTER TABLE `salidas_almacen`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `sub_categorias`
--
ALTER TABLE `sub_categorias`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `transferencias_almacen`
--
ALTER TABLE `transferencias_almacen`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `ventas`
--
ALTER TABLE `ventas`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `almacenes`
--
ALTER TABLE `almacenes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
--
-- AUTO_INCREMENT de la tabla `almacenes_transito`
--
ALTER TABLE `almacenes_transito`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `asientos`
--
ALTER TABLE `asientos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `cambio`
--
ALTER TABLE `cambio`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `categorias`
--
ALTER TABLE `categorias`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `centros_costo`
--
ALTER TABLE `centros_costo`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `clientes`
--
ALTER TABLE `clientes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT de la tabla `cobranzas`
--
ALTER TABLE `cobranzas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;
--
-- AUTO_INCREMENT de la tabla `cod_asientos`
--
ALTER TABLE `cod_asientos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
--
-- AUTO_INCREMENT de la tabla `cod_cobranza`
--
ALTER TABLE `cod_cobranza`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;
--
-- AUTO_INCREMENT de la tabla `cod_compras`
--
ALTER TABLE `cod_compras`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT de la tabla `cod_comprobante`
--
ALTER TABLE `cod_comprobante`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `cod_cotizaciones`
--
ALTER TABLE `cod_cotizaciones`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `cod_gastos`
--
ALTER TABLE `cod_gastos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `cod_ingreso`
--
ALTER TABLE `cod_ingreso`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;
--
-- AUTO_INCREMENT de la tabla `cod_pago`
--
ALTER TABLE `cod_pago`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `cod_salida`
--
ALTER TABLE `cod_salida`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;
--
-- AUTO_INCREMENT de la tabla `cod_transferencia`
--
ALTER TABLE `cod_transferencia`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de la tabla `cod_ventas`
--
ALTER TABLE `cod_ventas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;
--
-- AUTO_INCREMENT de la tabla `compras`
--
ALTER TABLE `compras`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT de la tabla `configuracion_accesos`
--
ALTER TABLE `configuracion_accesos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `configuracion_niveles`
--
ALTER TABLE `configuracion_niveles`
  MODIFY `id` mediumint(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `configuracion_unidades`
--
ALTER TABLE `configuracion_unidades`
  MODIFY `id` mediumint(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `cotizaciones`
--
ALTER TABLE `cotizaciones`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `cotizacion_moneda`
--
ALTER TABLE `cotizacion_moneda`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=102;
--
-- AUTO_INCREMENT de la tabla `cuentas_bancarias`
--
ALTER TABLE `cuentas_bancarias`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `datos_empresa`
--
ALTER TABLE `datos_empresa`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `ingresos_almacen`
--
ALTER TABLE `ingresos_almacen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;
--
-- AUTO_INCREMENT de la tabla `ingresos_brutos`
--
ALTER TABLE `ingresos_brutos`
  MODIFY `id` mediumint(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64;
--
-- AUTO_INCREMENT de la tabla `inventario_inicial`
--
ALTER TABLE `inventario_inicial`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `kardex_producto`
--
ALTER TABLE `kardex_producto`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `libro_cobranzas`
--
ALTER TABLE `libro_cobranzas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;
--
-- AUTO_INCREMENT de la tabla `libro_cotizaciones`
--
ALTER TABLE `libro_cotizaciones`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `libro_diario`
--
ALTER TABLE `libro_diario`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `libro_gastos_servicios`
--
ALTER TABLE `libro_gastos_servicios`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `libro_ingresos_almacen`
--
ALTER TABLE `libro_ingresos_almacen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT de la tabla `libro_inventario_inicial`
--
ALTER TABLE `libro_inventario_inicial`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `libro_mayor`
--
ALTER TABLE `libro_mayor`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `libro_pagos`
--
ALTER TABLE `libro_pagos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `libro_partidas`
--
ALTER TABLE `libro_partidas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT de la tabla `libro_salidas_almacen`
--
ALTER TABLE `libro_salidas_almacen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;
--
-- AUTO_INCREMENT de la tabla `libro_transferencias_almacen`
--
ALTER TABLE `libro_transferencias_almacen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `libro_ventas`
--
ALTER TABLE `libro_ventas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64;
--
-- AUTO_INCREMENT de la tabla `libro_ventas_iva`
--
ALTER TABLE `libro_ventas_iva`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `libro_ventas_iva_aux`
--
ALTER TABLE `libro_ventas_iva_aux`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `marcas`
--
ALTER TABLE `marcas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `movimientos_productos_mes`
--
ALTER TABLE `movimientos_productos_mes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;
--
-- AUTO_INCREMENT de la tabla `pagos`
--
ALTER TABLE `pagos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `personal`
--
ALTER TABLE `personal`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT de la tabla `plan_cuentas`
--
ALTER TABLE `plan_cuentas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;
--
-- AUTO_INCREMENT de la tabla `productos`
--
ALTER TABLE `productos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT de la tabla `proveedores`
--
ALTER TABLE `proveedores`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `salidas_almacen`
--
ALTER TABLE `salidas_almacen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=69;
--
-- AUTO_INCREMENT de la tabla `sub_categorias`
--
ALTER TABLE `sub_categorias`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de la tabla `transferencias_almacen`
--
ALTER TABLE `transferencias_almacen`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `ventas`
--
ALTER TABLE `ventas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;
