project QadFinancials > class BCompanyGroup > method ValidateComponentPost

Description

Validate component data


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCompanyGroup.ValidateComponent


program code (program1/bcompanygroup.p)

/* ====================================================================================== *
 * Method       : ValidatecomponentPost                                                   *
 * Description  : Implement extra validations                                             *
 * -------------------------------------------------------------------------------------- *
 * Parameters   :                                                                         *
 * ====================================================================================== */
 
MAIN_BLOCK:
do on error undo, throw:
    
    for each t_sCyGroup:
    
        /* If there is not any change, no validation is needed */
        if t_sCyGroup.tc_Status = '':U and
           not can-find(first t_sCyGroupCompany where
                              t_sCyGroupCompany.tc_ParentRowid = t_sCyGroup.tc_Rowid and
                              t_sCyGroupCompany.tc_Status     <> "":U)
        then next.
        
        /* =============================================================================== *
         * Validate CyGroup record                                                         *
         * =============================================================================== */
        <M-21 run ValidateComponentPostCyGroup  (output viFcReturnSuper (oiReturnStatus)) in BCYGroup>
        if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
    
    end. /* for each t_sCyGroup: */
end. /* MAIN_BLOCK */