<< Click to Display Table of Contents >> Navigation: Appendix > Stored Procedures |
The following are database stored procedures which are pieces of code to extract information from the database and return a value. Stored procedures are included in report, letter or Query Editor queries..
SP: dbo.v50GetGLAccountBalance
Purpose: Retrieves balance of a GL Account Code
Example: SELECT Company.CompanyKey, Company.c_Name, GLAccount.GLAccountKey, GLAccount.ga_Code, GLAccount.ga_Name, dbo.v50GetGLAccountBalance(GLAccount.GLAccountKey, 0, '1/1/1950', '12/31/2099 23:59') AS Total FROM Company INNER JOIN GLAccount ON Company.CompanyKey = GLAccount.CompanyKey WHERE Company.c_Active=1 ORDER BY Company.c_Name, Company.CompanyKey
Parameter |
Type |
Format |
Value |
inGLAccountKey |
Integer |
GLAccountKey from GLAccount table |
|
inUseReconciledBalance |
Boolean |
0: False / 1: True |
Include only reconciled balance |
inBeginPostedDate |
Date as string |
'1/1/1950' |
Beginning date |
inEndPostedDate |
Date as string |
'12/31/2999' |
Ending date |
SP: dbo.v50GetGLAccountBalanceByType
Purpose: Retrieves balance of a GL Account Type (see Record Column Values GLAccount)
Example: SELECT Company.CompanyKey, Company.c_Name, dbo.v50GetGLAccountBalanceByType(Company.CompanyKey, 13, '1/1/1950', '12/31/2099 23:59') AS IncomeTotal FROM Company WHERE Company.c_Active=1 ORDER BY Company.c_Name, Company.CompanyKey
Parameter |
Type |
Format |
Value |
inCompanyKey |
Integer |
Company.CompanyKey |
|
inga_GLType |
Integer |
GL type code |
|
inBeginPostedDate |
Date as string |
'1/1/1950' |
Beginning date |
inEndPostedDate |
Date as string |
'12/31/2999' |
Ending date |