CREATE PROCEDURE OnlineAddLog @AReferenceNumber INT, @AGuestNumber INT, @ANote VARCHAR(1000), @APage VARCHAR(32)  AS
SET NOCOUNT ON
/*
  Created by Kent Johansen August 2016.
  Add followup for reservation
*/

DECLARE @FollowupNumber INT

INSERT INTO FollowUp ([Date], Type, Priority, State, Note, CreatedDate, CreatedBy, Tag)
VALUES (GETDATE(), 5, 17, 3, @ANote, GETDATE(), 1, @APage)

SET @FollowupNumber = @@IDENTITY

INSERT INTO ReservationFollowUpXTab VALUES (@AReferenceNumber, @AGuestNumber, @FollowupNumber)