project QadFinancials > class BBudget > method AdditionalUpdValBudgetFDSOverlap

Description

This method will check the overlap of the FDS records.


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBudget.AdditionalUpdates


program code (program4/bbudget.p)

/* =============================================================================== */
    /* Check for FDS-overlap on the budget (depending on system- and comapny-settings) */
    /* If Budget is Cy-dep and cy-settings = true then perform the test                */
    /* If Budgte is cy-indep and system-setting = true then perform the test           */
    /* =============================================================================== */
    for each tBudget where
             tBudget.tc_Status <> "D":U no-lock :
        if not can-find (first tBudgetWbs where
                               tBudgetWBS.tc_ParentRowid  = tBudget.tc_Rowid and 
                               (tBudgetWBS.tc_Status = "N":U or 
                                tBudgetWBS.tc_Status = "C":U))
        then next.
        if tBudget.BudgetIsCompanyDependent
        then do :
            find first tBudgetCompany where
                       tBudgetCompany.tc_ParentRowid  = tBudget.tc_Rowid and 
                       tBudget.tc_Status             <> "D":U
                       no-lock no-error.
            if not available tBudgetCompany
            then next.
            <Q-1 run CompanyPropertyForAllData (all) (Read) (NoCache)
               (input tBudgetCompany.Company_ID, (CompanyId)
                output dataset tqCompanyPropertyForAllData) in BCompanyProperty >
            find first tqCompanyPropertyForAllData no-lock no-error.
            if not available tqCompanyPropertyForAllData or
               tqCompanyPropertyForAllData.tlCompanyPropertyIsBudOverCh <> true
            then next.
        end. /* if tBudget.BudgetIsCompanyDependent */
        else do :
            if vlSysPropertyIsBudOverCh <> true
            then next.
        end. /* if tBudget.BudgetIsCompanyDependent=false */
        <M-3 run BudgetCheckFDSOverlap (input  tBudget.Budget_ID (iiBudgetID), 
                                input  '':U (icBudgetCode), 
                                output viFcReturnSuper (oiReturnStatus)) in BBudget>
        if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
        if oiReturnStatus < 0 then return.
    end. /* for each tBudget where */