Description
Get PostingLine key for error output
Parameters
iiPostingId | input | integer | |
biErrorNumbers | input-output | integer | |
ocJournalCode | output | character | |
ocPostingVoucher | output | character | |
iiPostingLineId | input | integer | |
olBothFound | output | logical | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
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 */