project QadFinancials > class BJournalEntry > method GetPostingHeaderByPostingId
Description
Get sum of the Posting Line Amounts based on posting id
Parameters
iiPostingId | input | integer | Posting ID |
icPostingRowID | input | character | PostingRowid: will only be used in case the posting-ID is not filled |
oiPostingYear | output | integer | Year of Posting |
oiPostingPeriod | output | integer | Period of Posting |
otPostingDate | output | date | posting date |
ocPostingJournalCode | output | character | Posting Daybook Code |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
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.