
-- crear  las  columnas  en  itemDocumento.
-- select * from doc_itemDocumento

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_itemDocumento' and column_name = 'vrbase' )
begin
alter table [doc_itemDocumento] add [vrbase] float default 0
end

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_itemDocumento' and column_name = 'vrenlista' )
begin
alter table [doc_itemDocumento] add [vrenlista] float default 0
end

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_itemDocumento' and column_name = 'porcdescuento' )
begin
alter table [doc_itemDocumento] add [porcdescuento] float default 0
end