 
 
if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'VLR_BASE_PIS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD VLR_BASE_PIS MONEY NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_VLR_BASE_PIS DEFAULT 0 FOR VLR_BASE_PIS
END
GO

if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'VLR_PIS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD VLR_PIS MONEY NULL 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_VLR_PIS DEFAULT 0 FOR VLR_PIS
END
GO

if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'PERC_ALIQ_PIS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD PERC_ALIQ_PIS MONEY NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_PERC_ALIQ_PIS DEFAULT 0 FOR PERC_ALIQ_PIS
END
GO

if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'VLR_BASE_COFINS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD VLR_BASE_COFINS MONEY NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_VLR_BASE_COFINS DEFAULT 0 FOR VLR_BASE_COFINS

END
GO

if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'VLR_COFINS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD VLR_COFINS MONEY NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_VLR_COFINS DEFAULT 0 FOR VLR_COFINS
END
GO

if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'PERC_ALIQ_COFINS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD PERC_ALIQ_COFINS MONEY NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_PERC_ALIQ_COFINS DEFAULT 0 FOR PERC_ALIQ_COFINS
END
GO
 

if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'CST_PIS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CST_PIS INT NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_CST_PIS DEFAULT 0 FOR CST_PIS
END

GO 
if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'CST_COFINS')
begin 
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CST_COFINS INT NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
		DF_PDV_VD_DEV_EST_PROD_IMP_CST_COFINS DEFAULT 0 FOR CST_COFINS
END

GO 
if not exists(select 1 from syscolumns where id = object_id('PDV_VD_DEV_EST_PROD_IMP') and name = 'PIS_COFINS_RECALCULADO')
begin 
	
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD PIS_COFINS_RECALCULADO INT  NULL
	ALTER TABLE PDV_VD_DEV_EST_PROD_IMP ADD CONSTRAINT
			DF_PDV_VD_DEV_EST_PROD_IMP_PIS_COFINS_RECALCULADO DEFAULT 0 FOR PIS_COFINS_RECALCULADO
END

GO 