USP_DATAFORMTEMPLATE_EDIT_RECEIVABLEPAYMENTAPPLICATIONS

The save procedure used by the edit dataform template "Receivable Payment Applications Edit Data Form".

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.
@APPLICATIONS xml IN Applications

Definition

Copy


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

                        declare @RECEIVABLEPAYMENTLINEITEMID uniqueidentifier;
                        select top 1 @RECEIVABLEPAYMENTLINEITEMID = FINANCIALTRANSACTIONLINEITEM.ID
                        from FINANCIALTRANSACTION
                            inner join FINANCIALTRANSACTIONLINEITEM
                                on FINANCIALTRANSACTION.ID = FINANCIALTRANSACTIONLINEITEM.FINANCIALTRANSACTIONID
                        where (FINANCIALTRANSACTION.ID = @ID) and
                                (FINANCIALTRANSACTIONLINEITEM.DELETED = 0) and
                                (FINANCIALTRANSACTIONLINEITEM.TYPECODE = 0);

                        begin try
                            exec dbo.USP_FINANCIALTRANSACTION_LINEITEMAPPLICATIONS_EDIT @RECEIVABLEPAYMENTLINEITEMID, null, @CHANGEAGENTID, @APPLICATIONS
                        end try
                        begin catch
                            exec dbo.USP_RAISE_ERROR
                            return 1
                        end catch

                    return 0;