USP_DATAFORMTEMPLATE_EDITLOAD_FINANCIALTRANSACTION1099DISTRIBUTIONS
The load procedure used by the edit dataform template "Financial Transaction 1099 Distribution Edit Form"
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. |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
@FINANCIALTRANSACTION1099DISTRIBUTIONS | xml | INOUT | 1099 distributions |
@ORIGINALAMOUNT | money | INOUT | Original Amount |
@PAID | bit | INOUT | |
@PAYMENTPOSTED | bit | INOUT | |
@POSTSTATUSCODE | tinyint | INOUT | Post status |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_FINANCIALTRANSACTION1099DISTRIBUTIONS(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@FINANCIALTRANSACTION1099DISTRIBUTIONS xml = null output,
@ORIGINALAMOUNT money = null output
,@PAID bit = null output
,@PAYMENTPOSTED bit = null output
,@POSTSTATUSCODE tinyint = null output
)
as
set nocount on;
-- be sure to set these, in case the select returns no rows
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@TSLONG = FT.TSLONG,
@FINANCIALTRANSACTION1099DISTRIBUTIONS = dbo.UFN_FINANCIALTRANSACTION_1099DISTRIBUTION_TOITEMLISTXML(@ID),
@ORIGINALAMOUNT = FT.TRANSACTIONAMOUNT
,@PAID = dbo.UFN_FINANCIALTRANSACTION_PAID(@ID)
,@PAYMENTPOSTED = dbo.UFN_FINANCIALTRANSACTION_PAYMENTPOSTED(@ID)
,@POSTSTATUSCODE = FTLI.POSTSTATUSCODE
from dbo.FINANCIALTRANSACTION FT
inner join dbo.FINANCIALTRANSACTIONLINEITEM FTLI on ((FT.ID = FTLI.FINANCIALTRANSACTIONID) and (FTLI.TYPECODE = 0) and (FTLI.DELETEDON is null))
where FT.ID = @ID
return 0;