USP_DATAFORMTEMPLATE_EDITLOAD_CONTROLACCOUNTDISCOUNT
The load procedure used by the edit dataform template "Subsidiary Ledger Discount Account 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. |
@SUBSIDIARYID | uniqueidentifier | INOUT | |
@SUBSIDIARYNAME | nvarchar(60) | INOUT | |
@DATAELEMENTS | xml | INOUT | Data elements |
@ALLOWEDIT | bit | INOUT | Allow accounts to be edited on transactions. |
@ALLOWOTHERSUBSIDIARY | bit | INOUT | Allow accounts to be used as the control accounts on other subsidiary ledgers. |
@ALLOWJOURNALENTRY | bit | INOUT | Allow accounts to be used in Journal Entry. |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONTROLACCOUNTDISCOUNT(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@SUBSIDIARYID uniqueidentifier = null output,
@SUBSIDIARYNAME nvarchar(60) = null output,
@DATAELEMENTS xml = null output,
@ALLOWEDIT bit = null output,
@ALLOWOTHERSUBSIDIARY bit = null output,
@ALLOWJOURNALENTRY bit = null output
)
as
set nocount on;
set @DATALOADED = 1
set @TSLONG = 0
select
@DATALOADED = 1,
@DATAELEMENTS = dbo.UFN_CONTROLACCOUNT_GETDATAELEMENTS_TOITEMLISTXML(CONTROLACCOUNT.ID),
@ALLOWEDIT = ALLOWEDIT,
@ALLOWOTHERSUBSIDIARY = ALLOWOTHERSUBSIDIARY,
@ALLOWJOURNALENTRY = ALLOWJOURNALENTRY,
@SUBSIDIARYID = SYSTEMID,
@SUBSIDIARYNAME = FINANCIALSYSTEM.NAME
from dbo.CONTROLACCOUNT
left join dbo.FINANCIALSYSTEM on CONTROLACCOUNT.SYSTEMID = FINANCIALSYSTEM.ID
where
CONTROLACCOUNT.ID = @ID
return 0;