spAddUpdate_ShoppingCartDonation

Parameters

Parameter Parameter Type Mode Description
@PKID int IN
@ShoppingCartID int IN
@TransactionXml ntext IN
@AcknowledgementXml ntext IN
@Amount decimal(30, 6) IN
@AllowsMatchingGifts bit IN
@EReceiptPdfForCreditCard bit IN
@EReceiptPdfForDirectDebit bit IN
@MarkReceiptedForCreditCard bit IN
@MarkReceiptedForDirectDebit bit IN
@ECardsXml ntext IN
@CartSendDonationAcknowledgementAlways bit IN

Definition

Copy


        CREATE procedure [dbo].[spAddUpdate_ShoppingCartDonation] (
                @PKID int,
                @ShoppingCartID int,
                @TransactionXml ntext,
                @AcknowledgementXml ntext,
                @Amount decimal(30,6),
                @AllowsMatchingGifts bit,
                @EReceiptPdfForCreditCard bit,
                @EReceiptPdfForDirectDebit bit,
                @MarkReceiptedForCreditCard bit,
                @MarkReceiptedForDirectDebit bit,
                @ECardsXml ntext,
                @CartSendDonationAcknowledgementAlways bit
            ) as
                if (@PKID <= 0)
                    insert into dbo.ShoppingCartDonation (
                        ShoppingCartID,
                        TransactionXml,
                        AcknowledgementXml,
                        Amount,
                        AllowsMatchingGifts,
                        EReceiptPdfForCreditCard,
                        EReceiptPdfForDirectDebit,
                        MarkReceiptedForCreditCard,
                        MarkReceiptedForDirectDebit,
                        ECardsXml,
                        CartSendDonationAcknowledgementAlways
                    ) values (
                        @ShoppingCartID,
                        @TransactionXml,
                        @AcknowledgementXml,
                        @Amount,
                        @AllowsMatchingGifts,
                        @EReceiptPdfForCreditCard,
                        @EReceiptPdfForDirectDebit,
                        @MarkReceiptedForCreditCard,
                        @MarkReceiptedForDirectDebit,
                        @ECardsXml,
                        @CartSendDonationAcknowledgementAlways
                    )
                else
                    update dbo.ShoppingCartDonation set
                        UpdateDate = getutcdate(),
                        TransactionXml = @TransactionXml,
                        AcknowledgementXml = @AcknowledgementXml,
                        Amount = @Amount,
                        AllowsMatchingGifts = @AllowsMatchingGifts,
                        EReceiptPdfForCreditCard = @EReceiptPdfForCreditCard,
                        EReceiptPdfForDirectDebit = @EReceiptPdfForDirectDebit,
                        MarkReceiptedForCreditCard = @MarkReceiptedForCreditCard,
                        MarkReceiptedForDirectDebit = @MarkReceiptedForDirectDebit,
                        ECardsXml = @ECardsXml,
                        CartSendDonationAcknowledgementAlways = @CartSendDonationAcknowledgementAlways
                    where ShoppingCartID = @ShoppingCartID and ID = @PKID;