Description
Retrieve the analytical information of a GL to decide on UI which fields should be enabled or disabled.
Parameters
| iiCompanyId | input | integer | |
| icGLCode | input | character | GL Code |
| olGLIsDivision | output | logical | GL Is defined with division. |
| olGLIsCostCentre | output | logical | GL is defined with Cost Center |
| olGLIsProject | output | logical | GL is defined with Project |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program6/bgrossincomeaccounting.p)
/* ============================================================================================ */
/* retrieve and return the analysis information of a GL based on the GL code that was received. */
/* ============================================================================================ */
assign olGLIsDivision = ?
olGLIsCostCentre = ?
olGLIsProject = ?.
if icGLCode = '' or icGLCode = ?
then return.
if iiCompanyId = 0 or iiCompanyId = ?
then assign iiCompanyId = viCompanyId.
<Q-4 run GLAnalysisInfoByGLCode (first) (Read) (NoCache)
(input iiCompanyId, (CompanyId)
input icGLCode, (GLCode)
input '', (DomainCode)
output dataset tqGLAnalysisInfoByGLCode) in BGL >
find first tqGLAnalysisInfoByGLCode where
tqGLAnalysisInfoByGLCode.tcGLCode = icGLCode
no-error.
if available tqGLAnalysisInfoByGLCode
then assign olGLIsDivision = tqGLAnalysisInfoByGLCode.tlGLIsDivisionAccount
olGLIsCostCentre = tqGLAnalysisInfoByGLCode.tlGLIsCostCentreAccount
olGLIsProject = tqGLAnalysisInfoByGLCode.tlGLIsProjectAccount.