project QadFinancials > class BJournalEntry > method GetPostingHeaderByPostingId

Description

Get sum of the Posting Line Amounts based on posting id


Parameters


iiPostingIdinputintegerPosting ID
icPostingRowIDinputcharacterPostingRowid: will only be used in case the posting-ID is not filled
oiPostingYearoutputintegerYear of Posting
oiPostingPeriodoutputintegerPeriod of Posting
otPostingDateoutputdateposting date
ocPostingJournalCodeoutputcharacterPosting Daybook Code
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCInvoice.ApiStdMaintainTTV01
method BCInvoice.CreateCInvoiceMovementsCrossCyJrnl
method BCInvoice.ReplaceCInvoicePosting
method BCInvoice.ReverseCInvoicePosting
method BCInvoice.UpdateCInvoiceVatDelay
method BDInvoice.ApiStdMaintainTT
method BDInvoice.CreateDInvoiceMovementsCrossCyJrnl
method BDInvoice.StdMaintainTT


program code (program4/bjournalentry.p)

    /* replace unknow value */
    if iiPostingId = ? then assign iiPostingId = 0.
    if icPostingRowID = ? then assign icPostingRowID = "":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 do :
        find first tPosting where
                   tPosting.tc_Rowid = icPostingRowID
                   no-error.
        if not available tPosting or
           tPosting.tc_Status = "D":U
        then return.
    end.

    /* initialize */
    assign oiPostingYear        = tPosting.PostingYear
           oiPostingPeriod      = tPosting.PostingPeriod
           otPostingDate        = tPosting.PostingDate
           ocPostingJournalCode = tPosting.tcJournalCode.