modules/Forecasts/ForecastUtils.php

Show: inherited
    Table of Contents

    Functions

    functionadd_downline( Object $user, object $parent_node ) : void

    Parameters
    Name Type Description
    $user Object

    user: object of type Forecasts/Common representing the user downline nodes will be created for.

    $parent_node object

    parent_node: object of type Node, codes created in this function will have this parent.

    Details
    Version
    since 4.5  
    functionbuildExportLink( \echo $forecast_type ) : string

    Display the export link

    Parameters
    Name Type Description
    $forecast_type \echo

    Bool set true if you want it echo'd, set false to have contents returned

    Returns
    Type Description
    string export link html
    functioncreate_node( string $user_id, string $href = true, boolean $dynamic = true, boolean $force_direct = false, boolean $top_level = false, boolean $commit = false ) : void

    create a new node for the tree widget

    Parameters
    Name Type Description
    $user_id string

    user_id, primary key value of a valid sugar user.

    $href string

    href script for the node.

    $dynamic boolean

    dynamic: allow dynamic loading of child node, defult is true

    $force_direct boolean

    force_direct: force direct forecast for the node default false.

    $top_level boolean

    top_level: is this the top level node, if yes add forecast type of node label, default false

    $commit boolean

    commit: commit of forecast is allowed from this node.

    functionget_chart_for_user(  $user = null,  $user_id = null,  $forecast_type = 'Direct' ) : void

    Generate chart for current user's forecast history

    Parameters
    Name Type Description
    $user
    $user_id
    $forecast_type
    functionget_worksheet_defintion(  $user_id,  $forecast_type,  $timeperiod_id,  $allow_commit = false ) : void

    Parameters
    Name Type Description
    $user_id
    $forecast_type
    $timeperiod_id
    $allow_commit
    functionprocessnavigation(  $url_string,  $json = null ) : void

    Parameters
    Name Type Description
    $url_string
    $json
    functionupsert_worksheet_record(  $owner_id,  $timeperiod_id,  $forecast_type,  $wk_related_id,  $related_forecast_type,  $best_case,  $likely_case,  $worst_case,  $convert_to_basecurrency = true ) : void

    Parameters
    Name Type Description
    $owner_id
    $timeperiod_id
    $forecast_type
    $wk_related_id
    $related_forecast_type
    $best_case
    $likely_case
    $worst_case
    $convert_to_basecurrency
    functionuser_owns_opps(  $user_id = null,  $user = null ) : void

    Parameters
    Name Type Description
    $user_id
    $user
    Documentation was generated by DocBlox 0.18.1.