project QadFinancials > class BPosting > method GetCIRECPostingLineID

Description

Get CIREC PostingLineID


Parameters


iiPostingIdinputintegerPostingID
oiCIRECPostingLineIdoutputintegerCIREC Posting Line ID
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCInvoice.ReplaceCInvoicePosting
method BCInvoice.ReverseCInvoicePosting
method BCInvoiceJournalEntry.ApiStdMaintainTTSub


program code (program6/bposting.p)

assign oiCIRECPostingLineId = 0.

find tPosting where
     tPosting.Posting_ID = iiPostingID
     no-lock no-error.
if not available tPosting
then return.

<Q-2 run GLByGLSystemType (all) (Read) (NoCache)
   (input tPosting.Company_ID, (CompanyId)
    input {&GLSYSTEMTYPE-CIREC}, (GLSystemTypeCode)
    input {&GLTYPECODE-SYST}, (GlTypeCode)
    input ?, (GlIsDivisionAccount)
    output dataset tqGLByGLSystemType) in BGL >

find first tqGLByGLSystemType no-error.
if not available tqGLByGLSystemType
then return.

find first tPostingLine where
           tPostingLine.tc_ParentRowid = tPosting.tc_Rowid and
           tPostingLine.tcGLCode       = tqGLByGLSystemType.tcGLCode
           no-lock no-error.
if available tPostingLine
then assign oiCIRECPostingLineId = tPostingLine.PostingLine_ID.