
/*------ ATD 446113 ------*/
-- Adicionando coluna GerarNFEntradaCrossDocking na tabela FILANFATACADOVAREJO
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'GerarNFEntradaCrossDocking' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='FILANFATACADOVAREJO')) 
ALTER TABLE FILANFATACADOVAREJO ADD GerarNFEntradaCrossDocking TINYINT
GO

-- Adicionando coluna NumOrdVendaCrossDocking na tabela FILANFATACADOVAREJO
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'NumOrdVendaCrossDocking' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='FILANFATACADOVAREJO')) 
ALTER TABLE FILANFATACADOVAREJO ADD NumOrdVendaCrossDocking INT
GO

-- Adicionando coluna SaidaCrossDocking na tabela COMPLEMENTONFENTRA
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'SaidaCrossDocking' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='COMPLEMENTONFENTRA')) 
ALTER TABLE COMPLEMENTONFENTRA ADD SaidaCrossDocking INT
GO
/*------ ATD 446113 ------*/
-- Adicionando coluna GerarNFEntradaCrossDocking na tabela FILANFATACADOVAREJO
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'GerarNFEntradaCrossDocking' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='FILANFATACADOVAREJO')) 
ALTER TABLE FILANFATACADOVAREJO ADD GerarNFEntradaCrossDocking TINYINT
GO

-- Adicionando coluna NumOrdVendaCrossDocking na tabela FILANFATACADOVAREJO
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'NumOrdVendaCrossDocking' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='FILANFATACADOVAREJO')) 
ALTER TABLE FILANFATACADOVAREJO ADD NumOrdVendaCrossDocking INT
GO

-- Adicionando coluna SaidaCrossDocking na tabela COMPLEMENTONFENTRA
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE name = 'SaidaCrossDocking' and syscolumns.id IN (SELECT ID FROM SYSOBJECTS WHERE xtype='U' AND name='COMPLEMENTONFENTRA')) 
ALTER TABLE COMPLEMENTONFENTRA ADD SaidaCrossDocking INT
GO