USP_RECORDOPERATION_RECEIPTINGPROCESSMARKFORRERECEIPT

Executes the "Receipting Process: Mark Receipts For Re-Receipt" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being updated.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the update.

Definition

Copy


                    CREATE procedure dbo.USP_RECORDOPERATION_RECEIPTINGPROCESSMARKFORRERECEIPT
                    (
                        @ID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier = null
                    )
                    as
                        set nocount on;

                        declare @CURRENTDATE datetime;

                        set @CURRENTDATE = getdate();


                        update 
                            R
                        set 
                            NEEDSRERECEIPT = 1,
                            CHANGEDBYID = @CHANGEAGENTID,
                            DATECHANGED = @CURRENTDATE
                        from 
                            dbo.REVENUE_EXT R
                        join dbo.REVENUERECEIPT RR on RR.REVENUEID = R.ID
                        where
                            RR.RECEIPTINGPROCESSSTATUSID = @ID --and R.RECEIPTTYPECODE=0--payment;


                            --may need to figure out what to do for consolidated receipting,


                        return 0;