
/*------ ATD 237680 ------*/
IF not EXISTS (SELECT 1 FROM DADOADICIONAL WHERE OID = 37137) insert into dadoadicional (RCLASSECONCRETA,RAPLICATIVO,RDOMINIO,RLISTA,RTIPO,RITEM,RESTRICAO,VISIVEL,MASCARA,PADRAO,MAXIMO,MINIMO,VALOR,OID) values (7,7 ,7,7,1014,2123,0,0,'','',1,0,'Percentual de COFINS a ser aplicado na garantia',37137)
IF not EXISTS (SELECT 1 FROM DADOADICIONAL WHERE OID = 37136) insert into dadoadicional (RCLASSECONCRETA,RAPLICATIVO,RDOMINIO,RLISTA,RTIPO,RITEM,RESTRICAO,VISIVEL,MASCARA,PADRAO,MAXIMO,MINIMO,VALOR,OID) values (7,7 ,7,7,1014,2123,0,0,'','',1,0,'Percentual de PIS a ser aplicado na garantia',37136)
go

-- Adicionando coluna TIPOSERVICO na tabela PRODUTOTEXTO
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'TIPOSERVICO' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='PRODUTOTEXTO')) 
ALTER TABLE PRODUTOTEXTO ADD TIPOSERVICO NUMERIC(1,0) not null default 0
go

-- Adicionando coluna VALORESTIPULANTE, PERCESTIPULANTE na tabela SERVICO
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'VALORESTIPULANTE' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='SERVICO')) 
ALTER TABLE SERVICO ADD VALORESTIPULANTE NUMERIC(18,5) not null default 0
go
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'PERCESTIPULANTE' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='SERVICO')) 
ALTER TABLE SERVICO ADD PERCESTIPULANTE NUMERIC(6,2) not null default 0
go