USP_RECORDOPERATION_RECEIPTINGPROCESS_DELETEPROMPT

Provides the prompt for the "Receipting Process: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Represents information to be displayed in the record operation prompt.
@MESSAGE nvarchar(150) INOUT

Definition

Copy


                            CREATE procedure dbo.USP_RECORDOPERATION_RECEIPTINGPROCESS_DELETEPROMPT
                            (
                                @ID uniqueidentifier,
                                @MESSAGE nvarchar(150) output
                            )
                            as
                                set nocount on;

                                if exists (select RR.ID from dbo.REVENUERECEIPT RR
                                           inner join dbo.RECEIPTINGPROCESSSTATUS STATUS on RR.RECEIPTINGPROCESSSTATUSID = STATUS.ID
                                           where STATUS.PARAMETERSETID = @ID and RR.RECEIPTDATE is null)
                                    select @MESSAGE = 'Revenue in this receipt process has not been marked ''Receipted'' and results will be cleared.'
                                else
                                    select @MESSAGE = null;

                                return 0;