project QadFinancials > class BMirroringGL > method GetGLInfo

Description

Remoting method to retrieve analytical information by GL code.


Parameters


icGLCodeinputcharacter
olIsSubAccountoutputlogical
olIsCostCentreoutputlogical
olIsProjectoutputlogical
ocGLTypeoutputcharacter
ocGLSystemTypeoutputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program6/bmirroringgl.p)

/* Get analytical information of GL by specified GL code. */
assign oiReturnStatus = -98.
assign
       olIsSubAccount = false
       olIsCostCentre = false
       olIsProject    = false
       ocGLType       = ''
       ocGLSystemType = ''.

 <Q-3 run GLByCode (all) (Read) (NoCache)
    (input viCompanyId, (CompanyId)
     input icGLCode, (GLCode)
     output dataset tqGLByCode) in BGL >
find first tqGLByCode 
     where tqGLByCode.tcGLCode = icGLCode 
     no-error.
if available tqGLByCode 
then 
    assign olIsSubAccount = tqGLByCode.tlGLIsDivisionAccount
           olIsCostCentre = tqGLByCode.tlGLIsCostCentreAccount
           olIsProject    = tqGLByCode.tlGLIsProjectAccount
           ocGLType       = tqGLByCode.tcGLTypeCode
           ocGLSystemType = tqGLByCode.tcGLSystemTypeCode.

if oiReturnStatus = -98
then assign oiReturnStatus = 0.