project QadFinancials > class BGrossIncomeAccounting > method GetGLAnalysis

Description

Retrieve the analytical information of a GL to decide on UI which fields should be enabled or disabled.


Parameters


iiCompanyIdinputinteger
icGLCodeinputcharacterGL Code
olGLIsDivisionoutputlogicalGL Is defined with division.
olGLIsCostCentreoutputlogicalGL is defined with Cost Center
olGLIsProjectoutputlogicalGL is defined with Project
oiReturnStatusoutputintegerReturn 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.