USP_DATAFORMTEMPLATE_EDITLOAD_GROUPSALESPAYMENTDEFAULTFINALPAYMENT
The load procedure used by the edit dataform template "Group Sales Payment Default Final Payment Edit Data 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. |
@FINALTIMEVALUE | smallint | INOUT | Balance due |
@FINALTIMECODE | tinyint | INOUT | |
@FINALTIMEWITHDEPOSITCODE | tinyint | INOUT | |
@FINALTIMEWITHOUTDEPOSITCODE | tinyint | INOUT | |
@DEPOSITREQUIRED | bit | INOUT | Deposit required |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_GROUPSALESPAYMENTDEFAULTFINALPAYMENT(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@FINALTIMEVALUE smallint = null output,
@FINALTIMECODE tinyint = null output,
@FINALTIMEWITHDEPOSITCODE tinyint = null output,
@FINALTIMEWITHOUTDEPOSITCODE tinyint = null output,
@DEPOSITREQUIRED bit = null output
)
as
set nocount on;
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@DEPOSITREQUIRED = DEPOSITREQUIRED,
@FINALTIMEVALUE = FINALTIMEVALUE,
@FINALTIMECODE = FINALTIMECODE
from dbo.GROUPSALESDEFAULT
where ID = @ID
if @DATALOADED = 1
begin
set @FINALTIMEWITHDEPOSITCODE = 0
set @FINALTIMEWITHOUTDEPOSITCODE = 0
if @DEPOSITREQUIRED = 1
set @FINALTIMEWITHDEPOSITCODE = @FINALTIMECODE
else
set @FINALTIMEWITHOUTDEPOSITCODE = @FINALTIMECODE
end
return 0;