project QadFinancials > class BPosting > method GetPostingActionsBasedOnPostingID

Description

GetPostingActionsBasedOnPostingID


Parameters


iiPostingIDinputinteger
olPostingIsCreatedChangedDeletedoutputlogicalPostingIsCreatedChangedDeleted: this parameter is true in case any of the class-tables has a ctatus <> empty
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCInvoice.AdditionalUpdatesAll


program code (program6/bposting.p)

/* Exceoption handling */
    assign oiReturnStatus = -98.

    /* Check for any Modification, Creation or Deletion in the Business-instance */
    if can-find (first tPosting where 
                       tPosting.Posting_ID  = iiPostingID and 
                       tPosting.tc_Status  <> "":U)   
    then do :
        assign oiReturnStatus                   = 0
               olPostingIsCreatedChangedDeleted = true.
        Return.
    end. /* if can-find (first tPosting where  */
    for each tPostingLine where 
             tPostingLine.Posting_ID = iiPostingID :
        if tPostingLine.tc_Status <> "":U
        then do :
            assign oiReturnStatus                   = 0
                   olPostingIsCreatedChangedDeleted = true.
            Return.
        end. /* if can-find (first tPosting where  */
        if can-find (first tPostingSaf where
                           tPostingSaf.tc_ParentRowid = tPostingLine.tc_Rowid and 
                           tPostingSaf.tc_Status <> "":U)   or 
           can-find (first tPostingVat where 
                           tPostingVat.tc_ParentRowid = tPostingLine.tc_Rowid and
                           tPostingVat.tc_Status <> "":U)   or 
           can-find (first tPostingVatDelay where 
                           tPostingVatDelay.tc_ParentRowid = tPostingLine.tc_Rowid and
                           tPostingVatDelay.tc_Status <> "":U) 
        then do :
            assign oiReturnStatus                   = 0
                   olPostingIsCreatedChangedDeleted = true.
            Return.
        end. /* if can-find */
    end. /* for each */

    /* Exceoption handling */
    if oiReturnStatus = -98 
    then assign oiReturnStatus = 0.