﻿USE [FabApprovalSystem]
GO
	/****** Object:  StoredProcedure [dbo].[_8DAddFollowUpApproval]    Script Date: 11/21/2024 11:29:03 AM ******/
SET
	ANSI_NULLS ON
GO
SET
	QUOTED_IDENTIFIER ON
GO
	-- =============================================
	-- Author:		<Author,,Name>
	-- Create date: <Create Date,,>
	-- Description:	<Description,,>
	-- =============================================
	CREATE PROCEDURE [dbo].[_8DAddFollowUpApproval] -- Add the parameters for the stored procedure here
	@CANo INT,
	@QAUserID INT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
SET
	NOCOUNT ON;

-- Insert statements for procedure here
DECLARE @ApprovalType INT
SET
	@ApprovalType = 1
INSERT INTO
	Approval (
		IssueID,
		RoleName,
		SubRole,
		UserID,
		SubRoleID,
		ItemStatus,
		Step,
		AssignedDate,
		NotifyDate,
		RoleAssignedDate,
		ApprovalType,
		DocumentTypeID
	)
VALUES
	(
		@CANo,
		'8DQAFollowUp',
		'8DQAFollowUp',
		@QAUserID,
		335,
		0,
		2,
		GETDATE(),
		GETDATE(),
		GETDATE(),
		@ApprovalType,
		9
	)
END
GO