project QadFinancials > class BPosting > method AdditionalUpdates

Description

This empty method allows to do additional updates on class temp-tables after records were received (and validated) from outside, using method SetPublicTables.
You can start instances of other business classes to do those updates.


Parameters


oiReturnStatusoutputinteger


Internal usage


QadFinancials
method BPosting.ApiMassDeletePeriodicCostingPostings
method BPosting.ApiMassDeletePeriodicCostingPostingsByDomain
method BPosting.ApiMassReversePeriodicCostingPostings
method BPosting.ApiMassReversePeriodicCostingPostingsByDomain
method BPosting.ApiStdMaintainMultiTT
method BPosting.ApiStdMaintainTT
method BJournalEntry.ApiUpdateJournal
method BJournalEntry.CreateRecEntryPosting
method BJournalEntry.ValidateBCAddUpdDataSave
method BJournalEntry.ValidateBCAndAdditionalUpdates


program code (program/bposting.p)

    
    /* ============================= */
    /* Read once the system settings */
    /* ============================= */
    <Q-35 run SystemPropertyByAll (all) (Read) (NoCache)  (output dataset tqSystemPropertyByAll) in BSystemProperty >
    find first tqSystemPropertyByAll
               no-lock no-error.
    if not available tqSystemPropertyByAll
    then do :
        assign vcMessage      = trim(#T-36'The system cannot find the system setting and has stopped processing.':255(69260)t-36#)
               oiReturnStatus = -3.
        <M-37 run SetMessage
           (input  vcMessage (icMessage), 
            input  '':U (icArguments), 
            input  '':U (icFieldName), 
            input  '':U (icFieldValue), 
            input  'E':U (icType), 
            input  3 (iiSeverity), 
            input  '':U (icRowid), 
            input  'QadFin-8002':U (icFcMsgNumber), 
            input  '':U (icFcExplanation), 
            input  '':U (icFcIdentification), 
            input  '':U (icFcContext), 
            output viFcReturnSuper (oiReturnStatus)) in BPosting>
        Return.
    end. /* if not available tqSystemPropertyByAll */
    
    /* ======================== */
    /* Additional Updates Pre   */
    /* ======================== */
    <M-34 run AdditionalUpdatesPre  (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper <> 0
    then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0
    then return.
    
    /* ======================== */
    /* Create/Update Open Items */
    /* ======================== */
    <M-2 run AdditionalUpdatesOpenItems (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper < 0 or
       oiReturnStatus  = 0
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0
    then do:
        <M-27 run StopExternalInstances
           (output viFcReturnSuper (oiReturnStatus)) in BPosting>
        return.
    end.
    
    /* ======================== */
    /* Create/Update Templates */
    /* ======================== */
    <M-3 run AdditionalUpdatesTemplate (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper < 0 or
       oiReturnStatus  = 0
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0
    then do:
        <M-28 run StopExternalInstances
           (output viFcReturnSuper (oiReturnStatus)) in BPosting>
        return.
    end.
    
    /* ============================================================================== */
    /* Check if the posting is really balanced and eventually create a balancing      */
    /* posting line (Posting Fall-Back mechanism                                      */
    /* ============================================================================== */
    <M-64 run AdditionalUpdatesPostFallBack  (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper < 0 or oiReturnStatus  = 0 then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0
    then do:
        <M-23 run StopExternalInstances  (output viFcReturnSuper (oiReturnStatus)) in BPosting>
        return.
    end.

    /* ======================================== */
    /* Add history records based on the posting */
    /* ======================================== */
    <M-4 run AdditionalUpdatesBQPosting (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper < 0 or
       oiReturnStatus  = 0
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0
    then do:
        <M-29 run StopExternalInstances
           (output viFcReturnSuper (oiReturnStatus)) in BPosting>
        return.
    end.
    
    /* ===================================================================================================================== */
    /* Create the QBudgetLinkActual records that will be processed by the daemon to keep the actuals for budgets up-to-date. */
    /* This is only needed in case the system is enabled for budgetting                                                      */
    /* ===================================================================================================================== */
    if tqSystemPropertyByAll.tlSysPropertyIsWithBudget = TRUE
    then do:
        <M-6 run AdditionalUpdatesBQBudgetActual
           (input  tqSystemPropertyByAll.tlSysPropertyIsBudOLCheckGL (ilSysPropertyIsBudOLCheckGL), 
            input  tqSystemPropertyByAll.tlSysPropertyIsBudOLCheckPrj (ilSysPropertyIsBudOLCheckPrj), 
            input  tqSystemPropertyByAll.tlSysPropertyIsBudOLCheckCC (ilSysPropertyIsBudOLCheckCC), 
            output viFcReturnSuper (oiReturnStatus)) in BPosting>
        if viFcReturnSuper < 0 or
           oiReturnStatus  = 0
        then assign oiReturnStatus = viFcReturnSuper.
        if oiReturnStatus < 0
        then do:
            <M-30 run StopExternalInstances
               (output viFcReturnSuper (oiReturnStatus)) in BPosting>
            return.
        end.
    end.
    
    /* ============================================================================== */
    /* Create QCrossCyPosting records that will be processed by cross-company daemons */
    /* ============================================================================== */
    <M-44 run AdditionalUpdatesCrossCyPosting  (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper < 0 or
       oiReturnStatus  = 0
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0
    then do:
        <M-54 run StopExternalInstances
           (output viFcReturnSuper (oiReturnStatus)) in BPosting>
        return.
    end.

    /*Update Legal Doc Number*/
    <M-53 run AdditionalUpdatesLegDoc  (output viFcReturnSuper (oiReturnStatus)) in BPosting>
    if viFcReturnSuper < 0 or
       oiReturnStatus  = 0
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0
    then do:
        <M-31 run StopExternalInstances  (output viFcReturnSuper (oiReturnStatus)) in BPosting>
        return.
    end.
<ANCESTOR-CODE>