project QadFinancials > class BJournalEntry > method GetPostingInfoByPostingId

Description

look in the instance to give the right date of this posting


Parameters


iiPostingIdinputintegerPosting ID
icGLCodeinputcharacterGL Code from which you want to know if there is a posting line for it
oiPostingPeriodYearoutputintegerPeriod Year
ocPostingJournalCodeoutputcharacterDaybook Code
oiPostingVoucheroutputintegerVoucher
oiPostingPeriodPeriodoutputintegerGL Period
oiPostingLineIdoutputintegerPosting Line ID for the gl you give
odPostingLineDebitTCoutputdecimalDebit Posting Line amount for the given gl code
odPostingLineCreditTCoutputdecimalCredit Posting Line amount for the given gl code
odPostingLineDebitLCoutputdecimalDebit Posting Line amount for the given gl code in LC
odPostingLineCreditLCoutputdecimalCredit Posting Line amount for the given gl code in LC
odPostingLineDebitCCoutputdecimalDebit Posting Line amount for the given gl code in CC
odPostingLineCreditCCoutputdecimalCredit Posting Line amount for the given gl code in CC
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBankEntry.AdditionalUpdatesInv
method BCInvoice.ApiStdMaintainTTWithExtPost
method BDInvoice.ApiStdMaintainTTWithExtPost
method BDInvoice.ApiStdMaintainTTWithExtPostDetail
method BDInvoice.StdMaintainTTWithExtPost


program code (program7/bjournalentry.p)

/* replace unknown values */
    if iiPostingId = ? then assign iiPostingId = 0.
    if icGLCode = ? then assign icGLCode = "":U.

    /* =============== */
    /* get the posting */
    /* =============== */
    find first tPosting where
               tPosting.Posting_ID = iiPostingId
               no-error.
    if not available tPosting or
       tPosting.tc_Status = "D":U
    then return.

    /* ============================ */
    /* assign the output parameters */
    /* ============================ */
    assign oiPostingPeriodYear   = tPosting.PostingYear
           ocPostingJournalCode  = tPosting.tcJournalCode
           oiPostingVoucher      = tPosting.PostingVoucher
           oiPostingPeriodPeriod = tPosting.PostingPeriod.

    if icGLCode <> "":U
    then do:
        find first tPostingLine where
                   tPostingLine.tc_ParentRowid = tPosting.tc_Rowid and
                   tPostingLine.tcGLCode       = icGLCode and
                   tPostingLine.tc_Status      <> "D":U
                   no-error.
        if available tPostingLine
        then assign oiPostingLineId       = tPostingLine.PostingLine_ID
                    odPostingLineDebitTC  = tPostingLine.PostingLineDebitTC
                    odPostingLineCreditTC = tPostingLine.PostingLineCreditTC
                    odPostingLineDebitLC  = tPostingLine.PostingLineDebitLC
                    odPostingLineCreditLC = tPostingLine.PostingLineCreditLC
                    odPostingLineDebitCC  = tPostingLine.PostingLineDebitCC
                    odPostingLineCreditCC = tPostingLine.PostingLineCreditCC.
    end.