project QadFinancials > class BBudget > method BudgetCheckOverlapSetting

Description

This method will be called from UI for enable/disable overlap check on context menu of structure.


Parameters


iiCompanyIDinputintegerCompanyID
ilCompanyDependentinputlogicalCompanyDependent
olCheckOverlapoutputlogicalCheckOverlap
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program7/bbudget.p)

/* =============================================================================== */
/* get the setting of budget overlap checking                                      */
/* If Budget is Cy-dep and cy-settings = true then return true                     */
/* If Budgte is cy-indep and system-setting = true then return true                */
/* =============================================================================== */

/* ========================= */
/* Set default output values */
/* ========================= */
assign olCheckOverlap = false.

/* ========================================== */
/* Validations                                */
/* ========================================== */
if ilCompanyDependent = ? then return.
if ilCompanyDependent = true and (iiCompanyID = ? or iiCompanyID = 0) then return.

/* ========================================== */
/* Check the overlap setting                  */
/* ========================================== */
if not ilCompanyDependent
then assign olCheckOverlap = vlSysPropertyIsBudOverCh.
else do:
    <Q-10 run CompanyPropertyForAllData (all) (Read) (NoCache)
       (input iiCompanyID, (CompanyId)
        output dataset tqCompanyPropertyForAllData) in BCompanyProperty >
    find first tqCompanyPropertyForAllData no-error.
    if available tqCompanyPropertyForAllData 
    then assign olCheckOverlap = tqCompanyPropertyForAllData.tlCompanyPropertyIsBudOverCh.
end. /* end of else do */