Creada seccion de ingresos completa.
This commit is contained in:
@@ -24,20 +24,36 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
|
||||
drop table if exists egresos;
|
||||
drop table if exists tipos_egreso;
|
||||
drop table if exists ingresos;
|
||||
drop table if exists tipos_ingreso;
|
||||
|
||||
create table tipos_egreso(
|
||||
id int(10) unsigned primary key auto_increment,
|
||||
nombre varchar(191) not null
|
||||
);
|
||||
|
||||
create table egresos(
|
||||
id int(10) unsigned primary key auto_increment,
|
||||
nro varchar(191) not null,
|
||||
descripcion varchar(191) not null,
|
||||
valor int(10) not null,
|
||||
tipo_id int(10) not null
|
||||
tipo_egreso_id int(10) unsigned not null,
|
||||
foreign key fk_tipo_id(tipo_egreso_id) references tipos_egreso(id) on update cascade on delete restrict
|
||||
);
|
||||
|
||||
create table tipos_egreso(
|
||||
|
||||
create table tipos_ingreso(
|
||||
id int(10) unsigned primary key auto_increment,
|
||||
nombre varchar(191) not null
|
||||
);
|
||||
|
||||
create table ingresos(
|
||||
id int(10) unsigned primary key auto_increment,
|
||||
valor int(10) not null,
|
||||
tipo_ingreso_id int(10) unsigned not null,
|
||||
foreign key fk_tipo_ingreso(tipo_ingreso_id) references tipos_ingreso(id) on update cascade on delete restrict
|
||||
);
|
||||
|
||||
insert into tipos_egreso (nombre) values
|
||||
('Guia Materia Prima'),
|
||||
('Factura Materia Prima'),
|
||||
@@ -50,3 +66,9 @@ insert into tipos_egreso (nombre) values
|
||||
('Anticipo Personal'),
|
||||
('Retiros Gerencia'),
|
||||
('Otro');
|
||||
|
||||
insert into tipos_ingreso (nombre) values
|
||||
('Boletas Fiscales'),
|
||||
('Boletas Manuales'),
|
||||
('Facturas'),
|
||||
('Guias')
|
||||
|
||||
Reference in New Issue
Block a user