USP_DATAFORMTEMPLATE_VIEW_DEPOSITCORRECTIONGLDISTRIBUTIONINFO
The load procedure used by the view dataform template "Deposit Correction GL Distribution Information"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@ACCOUNTSYSTEM | nvarchar(50) | INOUT | Account system |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_VIEW_DEPOSITCORRECTIONGLDISTRIBUTIONINFO
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@ACCOUNTSYSTEM nvarchar(50) = null output
)
as
set nocount on;
set @DATALOADED = 0;
select @DATALOADED = 1,
@ACCOUNTSYSTEM = s.NAME
from PDACCOUNTSYSTEM as s
inner join BANKACCOUNT as ba on ba.PDACCOUNTSYSTEMID = s.ID
inner join BANKACCOUNTTRANSACTION as t on t.BANKACCOUNTID = ba.ID
inner join BANKACCOUNTDEPOSITCORRECTION as c on t.ID = c.DEPOSITID
where c.ID = @ID
-- If no account system linked, use default system.
if @ACCOUNTSYSTEM is null
select @DATALOADED = 1,
@ACCOUNTSYSTEM = NAME
from PDACCOUNTSYSTEM where ID = '4B121C2C-CCE6-440D-894C-EA0DEF80D50B'
return 0;