﻿USE [FabApprovalSystem]
GO
	/****** Object:  StoredProcedure [dbo].[PartsRequestInsert]    Script Date: 11/21/2024 11:29:05 AM ******/
SET
	ANSI_NULLS ON
GO
SET
	QUOTED_IDENTIFIER ON
GO
	CREATE PROCEDURE [dbo].[PartsRequestInsert] @OriginatorID INT,
	@PRNumber INT OUTPUT AS BEGIN
SET
	NOCOUNT ON;

INSERT INTO
	PartsRequest(
		[Title],
		[CreateDate],
		[OriginatorID],
		[RequestorID],
		[TechLeadID],
		[Description]
	)
SELECT
	'',
	GETDATE(),
	@OriginatorID,
	-1,
	-1,
	'';

SET
	@PRNumber = CAST(SCOPE_IDENTITY() AS INT)
END
GO