project QadFinancials > class BDInvoice > method GetPostingInfoOfInstance

Description

GetPostingInfoOfInstance


Parameters


ocPostingIDsoutputcharacterPostingIDs; List with the IDs of the postings linked to all new cinvoices
ocPostingLineIDsoutputcharacterPostingLineIDs; List with the IDs of the posting-lines linked to all new cinvoicemovements
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBankEntry.StopExternalInstances
method BOpenItemAdjustment.StopExternalInstancesExceptBJE


program code (program9/bdinvoice.p)

/* ==================================================================== */
    /* Return a list containing all posting-ID and posting-line-ID linked   */
    /* to the newly created cinvoice and cinvoicemovement records           */
    /* ==================================================================== */
    for each tDInvoicePosting where 
             tDInvoicePosting.tc_Status = "N":U,
        each tDInvoice where 
             tDInvoice.tc_Rowid      =  tDInvoicePosting.tc_ParentRowId and 
             tDInvoice.DInvoiceType <> {&INVOICETYPE-PREPAYMENT} and
             tDInvoice.DInvoiceType <> {&INVOICETYPE-ADJUSTMENT} and
             tDInvoice.tc_status    <> "D":U 
             no-lock :
        assign ocPostingIDs = ocPostingIDs + ",":U + string(tDInvoicePosting.Posting_ID).
    end. /* for each tDInvoicePosting where */
    
    for each tDInvoiceMovement where 
             tDInvoiceMovement.tc_Status = "N":U
             no-lock :
        assign ocPostingLineIDs = ocPostingLineIDs + ",":U + string(tDInvoiceMovement.PostingLine_ID).
    end. /* for each tDInvoicePosting where */
    if ocPostingIDs <> "":U and length(ocPostingIDs,"CHARACTER":U) > 1 
    then assign ocPostingIDs = substring(ocPostingIDs,2,-1,"CHARACTER":U).
    if ocPostingLineIDs <> "":U and length(ocPostingLineIDs,"CHARACTER":U) > 1 
    then assign ocPostingLineIDs = substring(ocPostingLineIDs,2,-1,"CHARACTER":U).