USP_REVENUE_SPLIT_EDIT_LOAD
Provides a common method to load data for revenue detail split edit forms.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@DATALOADED | bit | INOUT | |
@REVENUEAMOUNT | money | INOUT | |
@SPLITS | xml | INOUT | |
@TSLONG | bigint | INOUT | |
@APPEALID | uniqueidentifier | INOUT |
Definition
Copy
create procedure dbo.USP_REVENUE_SPLIT_EDIT_LOAD
(
@ID uniqueidentifier,
@DATALOADED bit = null output,
@REVENUEAMOUNT money = null output,
@SPLITS xml = null output,
@TSLONG bigint = null output,
@APPEALID as uniqueidentifier = null output
)
as
set nocount on;
declare @TESTID uniqueidentifier;
set @SPLITS = dbo.UFN_REVENUE_GETSPLITS_TOITEMLISTXML(@ID);
select @TESTID = ID,
@REVENUEAMOUNT = AMOUNT,
@APPEALID = APPEALID
from dbo.REVENUE
where ID = @ID;
if @TESTID is not null
set @DATALOADED = 1;
else
set @DATALOADED = 0;
if @SPLITS is not null
select @TSLONG = max(TSLONG) from dbo.REVENUESPLIT where REVENUESPLIT.REVENUEID = @ID;
else
set @TSLONG = 0;
return 0;