project QadFinancials > class TConCheck > method GetPostingLineKey

Description

Get PostingLine key for error output


Parameters


iiPostingIdinputinteger
biErrorNumbersinput-outputinteger
ocJournalCodeoutputcharacter
ocPostingVoucheroutputcharacter
iiPostingLineIdinputinteger
olBothFoundoutputlogical
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method TConCheck.CPaymentControlGLBalance
method TConCheck.DPaymentControlGLBalance
method TConCheck.GLOpenItemControl


program code (program1/tconcheck.p)

Main_BLock:
do on error undo, throw:
    
    assign ocPostingVoucher = "":U
           ocJournalCode    = "":U
           olBothFound      = no.
    find posting where posting.posting_ID = iiPostingId no-lock no-error.
    if not available posting then do:
    	create tqReport.
    	assign tqReport.tcReportText = "Integrity issue: Posting with invalid parent posting ID! " + 
    									"PostingLine_ID: " + string(iiPostingLineId) + 
    									" Posting_ID: " + string(iiPostingId).
    	assign biErrorNumbers = biErrorNumbers + 1.
    	return.
    end. /* if not available posting then do: */
    find journal where journal.journal_ID = posting.Journal_ID no-lock no-error.
    if not available journal then do:
    	create tqReport.
    	assign tqReport.tcReportText = "Integrity issue: Posting with invalid Daybook ID! " + 
    									" Posting_ID: " + string(posting.posting_ID) + 
    									" Journal_ID: " + string(posting.Journal_ID).
    	assign biErrorNumbers = biErrorNumbers + 1.
    	return.
    end. /* if not available journal then do: */
    assign ocPostingVoucher = string(Posting.PostingVoucher,"999999999")
           ocJournalCode    = trim(Journal.JournalCode)
           olBothFound      = yes.   
             
end. /* Main_Block */