project QadFinancials > class BCCollectionReport > method SetDataItemsBasesOnFilterTT


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCCollectionReport.CCollectionReport


program code (program3/bccollectionreport.p)

assign vcFilterCollectionNumber   = ?
       vtFilterFromCreationDate   = ?
       vtFilterTillCreationDate   = ?
       viFilterFromCreationTime   = ?
       viFilterTillCreationTime   = ?
       vcFilterUser               = ?
       vdFilterFromAmount         = ?
       vdFilterTillAmount         = ?
       vcFilterPaySelCodeList     = ?
       vlFilterIsExecuted         = ?
       vlFilterIsAutomatic        = ?
       vcFilterReference          = ?
       vcFilterGLCode             = ?.
       
for each tFilter:
    case tFilter.tcBusinessFieldName:
        /* start --- zhc 10249-0399
        when "Collection":U 
        then assign vcFilterCollectionNumber = tFilter.tcParameterValue no-error.
           end --- zhc 10249-0399 */
        when "CreDate_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign vtFilterFromCreationDate = date(int(substring(tFilter.tcParameterValue, 5, 2,"character":U)), int(substring(tFilter.tcParameterValue, 7, 2,"character":U)), int(substring(tFilter.tcParameterValue, 1, 4,"character":U))) no-error.
            if tFilter.tcOperator = "<=":U
            then assign vtFilterTillCreationDate = date(int(substring(tFilter.tcParameterValue, 5, 2,"character":U)), int(substring(tFilter.tcParameterValue, 7, 2,"character":U)), int(substring(tFilter.tcParameterValue, 1, 4,"character":U))) no-error.
        end. 
        when "CreTime_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign viFilterFromCreationTime = int(tFilter.tcParameterValue) no-error.
            if tFilter.tcOperator = "<=":U
            then assign viFilterTillCreationTime = int(tFilter.tcParameterValue) no-error.
        end.
        when "User":U
        then assign vcFilterUser = tFilter.tcParameterValue no-error.
        when "Amount_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign vdFilterFromAmount = dec(tFilter.tcParameterValue) no-error.
            if tFilter.tcOperator = "<=":U
            then assign vdFilterTillAmount = dec(tFilter.tcParameterValue) no-error.
        end.
        when "PaySelCodeList":U
        then assign vcFilterPaySelCodeList = tFilter.tcParameterValue no-error.
        when "IsExecuted":U
        then assign vlFilterIsExecuted = if tFilter.tcParameterValue = "true":U 
                                 then true 
                                 else if tFilter.tcParameterValue = "false":U 
                                      then false 
                                      else vlFilterIsExecuted no-error.
        when "IsAutomatic":U  
        then assign vlFilterIsAutomatic = if tFilter.tcParameterValue = "true":U 
                                  then true 
                                  else if tFilter.tcParameterValue = "false":U 
                                       then false 
                                       else vlFilterIsAutomatic no-error. 
        when "Reference":U
        then assign vcFilterReference = tFilter.tcParameterValue no-error.
        when "BankGLID":U   
        then assign vcFilterGLCode = tFilter.tcParameterValue no-error.                                                                         
    end.
end.