« Anterior -
Versión 14/17
(diferencias) -
Siguiente » -
Versión actual
Guillermo Zdanowicz, 29/03/2016 20:07
Tabla Mysql¶
TABLA: proveedores /h2¶
CREATE TABLE `proveedores` ( `id` int(11) NOT NULL AUTO_INCREMENT, `identificacion` varchar(100) NOT NULL, `nombre` varchar(100) NULL, `direccion` varchar(50) NULL, `telefono` varchar(50) NULL, `cuil` varchar(50) NOT NULL, `codigo_banco` varchar(50) NULL, `cbu` varchar(50) NULL, `idposicioniva` int(11) NOT NULL default 0, `email` varchar(80) NULL, `actividad` varchar(80) NULL, `observaciones` varchar(200) NULL, PRIMARY KEY (`id`), UNIQUE KEY `identificacion` (`identificacion`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
TABLA: posiciones_iva /h2¶
Esta tabla puede ser un arreglo de valores fijos
CREATE TABLE `posiciones_iva` ( `id` int(11) NOT NULL AUTO_INCREMENT, `descripcion` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
TABLA: compras /h2¶
CREATE TABLE `compras` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idproveedor` int(11) NOT NULL, `descripcion` varchar(200) NOT NULL, `fecha_factura` date NULL, `importe` float NOT NULL DEFAULT '0.0', `fecha_recepcion` date NULL, `comprobante` varchar(80) NULL, `pagado` int(1) NOT NULL DEFAULT '0', `observaciones` varchar(200) NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
TABLA: imputaciones /h2¶
CREATE TABLE `imputaciones` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idcompra` int(11) NOT NULL, `idcuenta` int(11) NOT NULL, `importe` float unsigned NOT NULL DEFAULT '0', `observaciones` varchar(200) NULL, PRIMARY KEY (`id`), FOREIGN KEY (idcompra) REFERENCES compras(id) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
TABLA: cuentas /h2¶
CREATE TABLE `cuentas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `codigo` varchar(8) NOT NULL, `descripcion` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
TABLA: pagos /h2¶
CREATE TABLE `pagos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idcompra` int(11) NOT NULL, `descripcion` varchar(200) NOT NULL, `fecha_pago` date NULL, `importe` float unsigned NOT NULL DEFAULT '0', `comprobante` varchar(80) NULL, `pagado` int(1) NOT NULL DEFAULT '0', `modo_pago` varchar(200) NULL, `observaciones` varchar(200) NULL, PRIMARY KEY (`id`), FOREIGN KEY (idcompra) REFERENCES compras(id) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1