USP_DATAFORMTEMPLATE_EDIT_SPONSORSHIPBATCH

USP_DATAFORMTEMPLATE_EDIT_SPONSORSHIPBATCH

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter indicating the ID of the record being edited.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@SEQUENCE int IN Sequence
@CONSTITUENTID uniqueidentifier IN Corresponding sponsor
@DONORID uniqueidentifier IN Financial Sponsor
@PLANNEDENDDATE datetime IN Expiration date
@SPONSORSHIPPROGRAMID uniqueidentifier IN Sponsorship program
@SPONSORSHIPLOCATIONID uniqueidentifier IN Location
@GENDERCODE int IN Gender
@SPROPPAGERANGEID uniqueidentifier IN Age range
@ISHIVPOSITIVECODE int IN HIV positive
@HASCONDITIONCODE int IN Disability/Illness
@ISORPHANEDCODE int IN Orphaned
@SPROPPPROJECTCATEGORYCODEID uniqueidentifier IN Category
@SPONSORSHIPOPPORTUNITYIDCHILD uniqueidentifier IN Child
@SPONSORSHIPOPPORTUNITYIDPROJECT uniqueidentifier IN Project
@SPONSORSHIPOPPORTUNITYTYPECODE tinyint IN Sponsorship Opportunity Type
@ISSOLESPONSORSHIP bit IN Sole sponsorship
@STARTDATE datetime IN Start Date
@ENDDATE datetime IN End Date
@AMOUNT money IN Amount
@PAYMENTMETHODCODE tinyint IN Payment method
@FREQUENCYCODE tinyint IN Frequency
@AUTOPAY bit IN Pay installments automatically
@REFERENCEDATE UDT_FUZZYDATE IN Reference date
@REFERENCENUMBER nvarchar(20) IN Reference no.
@CARDHOLDERNAME nvarchar(255) IN Name on card
@CREDITCARDNUMBER nvarchar(20) IN Card number
@CREDITTYPECODEID uniqueidentifier IN Card type
@EXPIRESON UDT_FUZZYDATE IN Expires on
@CONSTITUENTACCOUNTID uniqueidentifier IN Account
@REVENUESCHEDULEENDDATE datetime IN Payment end date
@REVENUESCHEDULESTARTDATE datetime IN Payment start date
@CREDITCARDTOKEN uniqueidentifier IN Credit card token
@ISTRANSIENTCARD bit IN Is transient credit card
@RESERVATIONKEYID uniqueidentifier IN Reservation key
@RESERVEDOPPORTUNITYID uniqueidentifier IN Reserved child
@SENDREMINDER bit IN Send reminders
@FINDERNUMBER bigint IN Finder number
@SOURCECODE nvarchar(50) IN Source code
@APPEALID uniqueidentifier IN Appeal
@MAILINGID uniqueidentifier IN Effort
@CHANNELCODEID uniqueidentifier IN Inbound channel
@REFERENCE nvarchar(255) IN Reference
@REVENUECATEGORYCODEID uniqueidentifier IN Revenue category
@ISGIFTSPONSORSHIP bit IN Is gift sponsorship
@EXPIRATIONREASONID uniqueidentifier IN Expiration reason
@BID uniqueidentifier IN Batch helper id
@FINANCIALSPONSORLOOKUPID uniqueidentifier IN Financial sponsor ID
@CORRESPONDINGSPONSORLOOKUPID uniqueidentifier IN Corresponding sponsor ID
@PARTIALCREDITCARDNUMBER nvarchar(4) IN Partial card number

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_SPONSORSHIPBATCH
(
    @ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier = null,
    @SEQUENCE int,
    @CONSTITUENTID uniqueidentifier,
    @DONORID uniqueidentifier,
    @PLANNEDENDDATE datetime,
    @SPONSORSHIPPROGRAMID uniqueidentifier,
    @SPONSORSHIPLOCATIONID uniqueidentifier,
    @GENDERCODE int,
    @SPROPPAGERANGEID uniqueidentifier,
    @ISHIVPOSITIVECODE int,
    @HASCONDITIONCODE int,
    @ISORPHANEDCODE int,
    @SPROPPPROJECTCATEGORYCODEID uniqueidentifier,
    @SPONSORSHIPOPPORTUNITYIDCHILD uniqueidentifier,
    @SPONSORSHIPOPPORTUNITYIDPROJECT uniqueidentifier,
    @SPONSORSHIPOPPORTUNITYTYPECODE tinyint,
    @ISSOLESPONSORSHIP bit ,
    @STARTDATE datetime,
    @ENDDATE datetime,
    @AMOUNT money,
    @PAYMENTMETHODCODE tinyint,
    @FREQUENCYCODE tinyint,
    @AUTOPAY bit,
    @REFERENCEDATE dbo.UDT_FUZZYDATE,
    @REFERENCENUMBER nvarchar(20),
    @CARDHOLDERNAME nvarchar(255),
    @CREDITCARDNUMBER nvarchar(20),
    @CREDITTYPECODEID uniqueidentifier,
    @EXPIRESON dbo.UDT_FUZZYDATE,
    @CONSTITUENTACCOUNTID uniqueidentifier,
    @REVENUESCHEDULEENDDATE datetime,
    @REVENUESCHEDULESTARTDATE datetime
    @CREDITCARDTOKEN uniqueidentifier,
    @ISTRANSIENTCARD bit,
    @RESERVATIONKEYID uniqueidentifier,
    @RESERVEDOPPORTUNITYID uniqueidentifier,
    @SENDREMINDER bit,
    @FINDERNUMBER bigint,
    @SOURCECODE nvarchar(50),
    @APPEALID uniqueidentifier,
    @MAILINGID uniqueidentifier,
    @CHANNELCODEID uniqueidentifier,
    @REFERENCE nvarchar(255),
    @REVENUECATEGORYCODEID uniqueidentifier,
    @ISGIFTSPONSORSHIP bit,
    @EXPIRATIONREASONID uniqueidentifier,
    @BID uniqueidentifier,
    @FINANCIALSPONSORLOOKUPID uniqueidentifier,
    @CORRESPONDINGSPONSORLOOKUPID  uniqueidentifier,
    @PARTIALCREDITCARDNUMBER nvarchar(4)
)
as
begin
    declare @NEWCONSTITUENT as xml
    declare @NEWDONORCONSTITUENT as xml

    exec USP_DATAFORMTEMPLATE_EDITLOAD_SPONSORSHIPBATCH
        @ID = @ID,
        @NEWCONSTITUENT = @NEWCONSTITUENT output,
        @NEWDONORCONSTITUENT = @NEWDONORCONSTITUENT output

    exec USP_DATAFORMTEMPLATE_EDIT_SPONSORSHIPBATCH_2
        @ID,
        @CHANGEAGENTID,
        @SEQUENCE,
        @CONSTITUENTID,
        @DONORID,
        @PLANNEDENDDATE,
        @SPONSORSHIPPROGRAMID,
        @SPONSORSHIPLOCATIONID,
        @GENDERCODE,
        @SPROPPAGERANGEID,
        @ISHIVPOSITIVECODE,
        @HASCONDITIONCODE,
        @ISORPHANEDCODE,
        @SPROPPPROJECTCATEGORYCODEID,
        @SPONSORSHIPOPPORTUNITYIDCHILD,
        @SPONSORSHIPOPPORTUNITYIDPROJECT,
        @SPONSORSHIPOPPORTUNITYTYPECODE,
        @ISSOLESPONSORSHIP ,
        @STARTDATE,
        @ENDDATE,
        @AMOUNT,
        @PAYMENTMETHODCODE,
        @FREQUENCYCODE,
        @AUTOPAY,
        @REFERENCEDATE,
        @REFERENCENUMBER,
        @CARDHOLDERNAME,
        @CREDITCARDNUMBER,
        @CREDITTYPECODEID,
        @EXPIRESON,
        @CONSTITUENTACCOUNTID,
        @REVENUESCHEDULEENDDATE,
        @REVENUESCHEDULESTARTDATE
        @CREDITCARDTOKEN,
        @ISTRANSIENTCARD,
        @RESERVATIONKEYID,
        @RESERVEDOPPORTUNITYID,
        @SENDREMINDER,
        @FINDERNUMBER,
        @SOURCECODE,
        @APPEALID,
        @MAILINGID,
        @CHANNELCODEID,
        @REFERENCE,
        @REVENUECATEGORYCODEID,
        @ISGIFTSPONSORSHIP,
        @EXPIRATIONREASONID,
        @BID,
        @FINANCIALSPONSORLOOKUPID,
        @CORRESPONDINGSPONSORLOOKUPID ,
        @PARTIALCREDITCARDNUMBER,
        @NEWCONSTITUENT,
        @NEWDONORCONSTITUENT

end