/****** 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 VARCHAR(60)
  , @ApprovalCode VARCHAR(255)
  , @AuthKey VARCHAR(255) AS
SET NOCOUNT ON
/*
    Created by SL May  2013
    
    Changes: 
    SG 2018-12-19: @DibsTicket changet to varchar(60)
	SG 2018-04-17: Change CardNumber from Dibs Ticket to Dibs_Ticket
	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()
)
