
/*------ ATD 322819 ------*/
IF NOT EXISTS (select 1 from SYSCOLUMNS where name = 'AliqPisImportacao' and SYSCOLUMNS.ID in (select ID from SYSOBJECTS WHERE xtype='U' AND name = 'ItnfentComplemento'))
  alter table ItnfentComplemento add AliqPisImportacao Numeric(4,2) not null default 0

IF NOT EXISTS (select 1 from SYSCOLUMNS where name = 'ValPisImportacao' and SYSCOLUMNS.ID in (select ID from SYSOBJECTS WHERE xtype='U' AND name = 'ItnfentComplemento'))
  alter table ItnfentComplemento add ValPisImportacao Numeric(15,2) not null default 0

IF NOT EXISTS (select 1 from SYSCOLUMNS where name = 'AliqPisImportacao' and SYSCOLUMNS.ID in (select ID from SYSOBJECTS WHERE xtype='U' AND name = 'ClafiscCad'))
  alter table ClafiscCad add AliqPisImportacao Numeric(4,2) not null   default 0
  
IF NOT EXISTS (select 1 from SYSCOLUMNS where name = 'AliqPisImportacao_Lp' and SYSCOLUMNS.ID in (select ID from SYSOBJECTS WHERE xtype='U' AND name = 'ClafiscCad'))
  alter table ClafiscCad add AliqPisImportacao_Lp Numeric(4,2) not null   default 0
go