| iiPostingId | input | integer | Posting ID |
| icGLCode | input | character | GL Code from which you want to know if there is a posting line for it |
| oiPostingPeriodYear | output | integer | Period Year |
| ocPostingJournalCode | output | character | Daybook Code |
| oiPostingVoucher | output | integer | Voucher |
| oiPostingPeriodPeriod | output | integer | GL Period |
| oiPostingLineId | output | integer | Posting Line ID for the gl you give |
| odPostingLineDebitTC | output | decimal | Debit Posting Line amount for the given gl code |
| odPostingLineCreditTC | output | decimal | Credit Posting Line amount for the given gl code |
| odPostingLineDebitLC | output | decimal | Debit Posting Line amount for the given gl code in LC |
| odPostingLineCreditLC | output | decimal | Credit Posting Line amount for the given gl code in LC |
| odPostingLineDebitCC | output | decimal | Debit Posting Line amount for the given gl code in CC |
| odPostingLineCreditCC | output | decimal | Credit Posting Line amount for the given gl code in CC |
| oiReturnStatus | output | integer | Return status of the method. |
QadFinancials
/* 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.