project QadFinancials > class BCMask > method ValidateComponentPre

Description

Implement extra validations for the Closing mask


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCMask.ValidateComponent


program code (program1/bcmask.p)

/* ============================================================================================ *
 * Got through all closing masks and perform extra validations                                  *
 * ============================================================================================ */
for each t_sCMask:

    /* Skip execution when not needed */
    if t_sCMask.tc_Status = "":U                                                     and
       not can-find(first t_sCMaskJournal where
                          t_sCMaskJournal.tc_ParentRowid   = t_sCMask.tc_Rowid and
                          t_sCMaskJournal.tc_Status       <> "":U)                   and
       not can-find(first t_sCMaskJrnlGroup where
                          t_sCMaskJrnlGroup.tc_ParentRowid = t_sCMask.tc_Rowid and
                          t_sCMaskJrnlGroup.tc_Status     <> "":U)
    then next.
    
    /* backwards compatibility : fill new mandatory field when not filled yet */
    if t_sCMask.CMaskDescription = "":U or 
       t_sCMask.CMaskDescription = ? 
    then assign t_sCMask.CMaskDescription = t_sCMask.CMaskCode.
    
    /* CMask validation */
    <M-51 run ValidateComponentPreCMask  (output viFcReturnSuper (oiReturnStatus)) in BCMask>
    if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.


end. /* for each t_sCMask: */