IF NOT EXISTS (
		SELECT 1
		FROM sys.objects
		WHERE object_id = OBJECT_ID(N'[dbo].[EST_NF_ENT_CREDITO_ICMS_ST_PIS_COFINS]')
			AND type IN (N'U')
		)
BEGIN
		CREATE TABLE EST_NF_ENT_CREDITO_ICMS_ST_PIS_COFINS (
		CD_EMP INT NOT NULL,
		CD_FILIAL INT NOT NULL,
		CD_NF INT NOT NULL,
		CD_PROD INT,
		QT_IT INT NULL,
		VLR_ICMS_ST_DARE MONEY NULL DEFAULT 0,
		VLR_ICMS_EFETIVO MONEY NULL DEFAULT 0,
		VLR_ICMS_SUBS MONEY NULL DEFAULT 0,
		VLR_ICMS_RET MONEY NULL DEFAULT 0,
		VLR_FECOP MONEY NULL DEFAULT 0,
		VLR_FECOP_RET MONEY NULL DEFAULT 0,
		VLR_FECOP_ST MONEY NULL DEFAULT 0,
		SALDO_ZERADO INT DEFAULT 0,
		PRIMARY KEY (CD_EMP, CD_FILIAL, CD_NF, CD_PROD)
		);
END
