/****** Object:  StoredProcedure [dbo].[OnlineAddDibsTicket]    Script Date: 05/30/2013 15:28:53 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER OFF
GO


CREATE PROCEDURE [dbo].[OnlineAddDibsTicket] @RefNo VARCHAR(255)
  , @GuestNo VARCHAR(255)
  , @DibsTicket INT
  , @ApprovalCode VARCHAR(255)
  , @AuthKey VARCHAR(255) AS
SET NOCOUNT ON
/*
    Created by SL May  2013
    
    Changes: 
    LJE20130530: Add default parameters.
    SL20130527: Initial.
    NOTES: 	- 
*/

INSERT INTO IntCreditCardsOnReservations (HotReservationIdentifier
  ,OpenTransactionNumber
  ,AuthorizationControlNumber
  ,Token
  ,CardNumber
  ,CardExpiryDate
  --,OTReceivedTimeStamp
  ,opentransaction
  ,validated
  ,validatedtimestamp  
  )
VALUES (@RefNo + '/' + @GuestNo
  ,@DibsTicket
  ,@ApprovalCode
  ,@AuthKey
  ,'Dibs Ticket'
  ,'-'
  --,GETDATE()
  ,1
  ,1
  ,GETDATE()
)
