project QadFinancials > class BBillReport > method GetDInvoicePostingInfo

Description

Return the posting information of current bill such as posting_ID, posting text...


Parameters


iiDInvoice_IDinputinteger
ocGLTransactionoutputcharacter
ocPostingTxtoutputcharacter
ocPaymentTypeoutputcharacter
oiPosting_IDoutputinteger
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBillReport.GetBillReportPayment


program code (program1/bbillreport.p)

/* Get the initial posting info */
<Q-50 run GetDInvoiceMovementByDInvID (first) (Read) (NoCache)
   (input ?, (CompanyId)
    input iiDInvoice_ID, (DInvoice_ID)
    output dataset tqGetDInvoiceMovementByDInvID) in BBillReport>

find first tqGetDInvoiceMovementByDInvID no-lock no-error.
if available tqGetDInvoiceMovementByDInvID then
assign ocGLTransaction = string(tqGetDInvoiceMovementByDInvID.tiPostingYear)                    + "/":U +
                         tqGetDInvoiceMovementByDInvID.tcJournalCode                            + "/":U +
                         string(tqGetDInvoiceMovementByDInvID.tiPostingVoucher, "999999999":U)
       ocPostingTxt    = tqGetDInvoiceMovementByDInvID.tcPostingText
       ocPaymentType   = if tqGetDInvoiceMovementByDInvID.tcDInvoiceType = {&INVOICETYPE-PREPAYMENT}
                         then {&INVOICETYPE-PREPAYMENT-TR}
                         else if tqGetDInvoiceMovementByDInvID.tcDInvoiceType = {&INVOICETYPE-ADJUSTMENT}
                         then {&INVOICETYPE-ADJUSTMENT-TR}
                         else '':U
       oiPosting_ID    = tqGetDInvoiceMovementByDInvID.tiPosting_ID.