Mantenedor de compras!
This commit is contained in:
@@ -183,31 +183,25 @@ create table compras
|
||||
|
||||
create table facturas
|
||||
(
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
numero text not null,
|
||||
monto_bruto bigint not null,
|
||||
iva bigint not null default 0,
|
||||
ila bigint not null default 0,
|
||||
monto_neto bigint not null,
|
||||
fecha_emision date not null,
|
||||
fecha_vencimiento date not null,
|
||||
compra_id uuid references compras,
|
||||
created_at timestamptz not null default current_timestamp,
|
||||
updated_at timestamptz not null default current_timestamp,
|
||||
deleted_at timestamptz
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
numero text not null,
|
||||
monto_bruto bigint not null,
|
||||
compra_id uuid references compras,
|
||||
created_at timestamptz not null default current_timestamp,
|
||||
updated_at timestamptz not null default current_timestamp,
|
||||
deleted_at timestamptz
|
||||
);
|
||||
|
||||
create table compra_ingredientes
|
||||
(
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
unidades numeric not null,
|
||||
monto_unitario_bruto bigint not null,
|
||||
monto_unitario_neto bigint not null,
|
||||
compra_id uuid references compras,
|
||||
ingrediente_id uuid references ingredientes,
|
||||
created_at timestamptz not null default current_timestamp,
|
||||
updated_at timestamptz not null default current_timestamp,
|
||||
deleted_at timestamptz
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
unidades numeric not null,
|
||||
monto_unitario bigint not null,
|
||||
compra_id uuid references compras,
|
||||
ingrediente_id uuid references ingredientes,
|
||||
created_at timestamptz not null default current_timestamp,
|
||||
updated_at timestamptz not null default current_timestamp,
|
||||
deleted_at timestamptz
|
||||
);
|
||||
|
||||
create table sectores
|
||||
|
||||
Reference in New Issue
Block a user