Ejemplo n.º 1
0
function getSearchListHeaderValues($focus, $module, $sort_qry = '', $sorder = '', $order_by = '', $relatedlist = '', $oCv = '')
{
    global $log;
    //changed by dingjianting on 2007-11-05 for php5.2.x
    $log->debug("Entering getSearchListHeaderValues() method ...");
    global $adb;
    global $theme;
    global $app_strings;
    global $mod_strings, $current_user;
    $arrow = '';
    $qry = getURLstring($focus);
    $search_header = array();
    $tabid = getTabid($module);
    //added for ec_customview 27/5
    if ($oCv != "" && $oCv) {
        if (isset($oCv->list_fields)) {
            $focus->list_fields = $oCv->list_fields;
            $focus->list_fields_name = $oCv->list_fields_name;
        }
    }
    foreach ($focus->list_fields as $name => $tableinfo) {
        $fieldname = $focus->list_fields_name[$name];
        foreach ($focus->list_fields[$name] as $tab => $col) {
            if (isset($mod_strings[$name])) {
                $name = $mod_strings[$name];
            }
        }
        if ($fieldname != 'parent_id') {
            $fld_name = $fieldname;
            $search_header[$fld_name] = $name;
        }
    }
    $log->debug("Exiting getSearchListHeaderValues method ...");
    return $search_header;
}
Ejemplo n.º 2
0
function getListViewHeader($focus, $module, $sort_qry = '', $sorder = '', $order_by = '', $relatedlist = '', $oCv = '', $relatedmodule = '', $skipActions = false)
{
    global $log, $singlepane_view;
    $log->debug("Entering getListViewHeader(" . $module . "," . $sort_qry . "," . $sorder . "," . $order_by . "," . $relatedlist . "," . (is_object($oCv) ? get_class($oCv) : $oCv) . ") method ...");
    global $adb;
    global $theme;
    global $app_strings;
    global $mod_strings;
    $arrow = '';
    $qry = getURLstring($focus);
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $list_header = array();
    //Get the vtiger_tabid of the module
    $tabid = getTabid($module);
    $tabname = getParentTab();
    global $current_user;
    //added for vtiger_customview 27/5
    if ($oCv) {
        if (isset($oCv->list_fields)) {
            $focus->list_fields = $oCv->list_fields;
        }
    }
    // Remove fields which are made inactive
    $focus->filterInactiveFields($module);
    //Added to reduce the no. of queries logging for non-admin user -- by Minnie-start
    $field_list = array();
    $j = 0;
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    foreach ($focus->list_fields as $name => $tableinfo) {
        $fieldname = $focus->list_fields_name[$name];
        if ($oCv) {
            if (isset($oCv->list_fields_name)) {
                $fieldname = $oCv->list_fields_name[$name];
            }
        }
        if ($fieldname == 'accountname' && $module != 'Accounts') {
            $fieldname = 'account_id';
        }
        if ($fieldname == 'lastname' && ($module == 'SalesOrder' || $module == 'PurchaseOrder' || $module == 'Invoice' || $module == 'Quotes' || $module == 'Calendar')) {
            $fieldname = 'contact_id';
        }
        if ($fieldname == 'productname' && $module != 'Products') {
            $fieldname = 'product_id';
        }
        array_push($field_list, $fieldname);
        $j++;
    }
    $field = array();
    if ($is_admin == false) {
        if ($module == 'Emails') {
            $query = "SELECT fieldname FROM vtiger_field WHERE tabid = ? and vtiger_field.presence in (0,2)";
            $params = array($tabid);
        } else {
            $profileList = getCurrentUserProfileList();
            $params = array();
            $query = "SELECT DISTINCT vtiger_field.fieldname\n\t\t\t\tFROM vtiger_field\n\t\t\t\tINNER JOIN vtiger_profile2field\n\t\t\t\t\tON vtiger_profile2field.fieldid = vtiger_field.fieldid\n\t\t\t\tINNER JOIN vtiger_def_org_field\n\t\t\t\t\tON vtiger_def_org_field.fieldid = vtiger_field.fieldid";
            if ($module == "Calendar") {
                $query .= " WHERE vtiger_field.tabid in (9,16) and vtiger_field.presence in (0,2)";
            } else {
                $query .= " WHERE vtiger_field.tabid = ? and vtiger_field.presence in (0,2)";
                array_push($params, $tabid);
            }
            $query .= " AND vtiger_profile2field.visible = 0\n\t\t\t\tAND vtiger_def_org_field.visible = 0\n\t\t\t\tAND vtiger_profile2field.profileid IN (" . generateQuestionMarks($profileList) . ")\n\t\t\t\tAND vtiger_field.fieldname IN (" . generateQuestionMarks($field_list) . ")";
            array_push($params, $profileList, $field_list);
        }
        $result = $adb->pquery($query, $params);
        for ($k = 0; $k < $adb->num_rows($result); $k++) {
            $field[] = $adb->query_result($result, $k, "fieldname");
        }
    }
    //end
    //modified for vtiger_customview 27/5 - $app_strings change to $mod_strings
    foreach ($focus->list_fields as $name => $tableinfo) {
        //added for vtiger_customview 27/5
        if ($oCv) {
            if (isset($oCv->list_fields_name)) {
                $fieldname = $oCv->list_fields_name[$name];
                if ($fieldname == 'accountname' && $module != 'Accounts') {
                    $fieldname = 'account_id';
                }
                if ($fieldname == 'lastname' && ($module == 'SalesOrder' || $module == 'PurchaseOrder' || $module == 'Invoice' || $module == 'Quotes' || $module == 'Calendar')) {
                    $fieldname = 'contact_id';
                }
                if ($fieldname == 'productname' && $module != 'Products') {
                    $fieldname = 'product_id';
                }
            } else {
                $fieldname = $focus->list_fields_name[$name];
            }
        } else {
            $fieldname = $focus->list_fields_name[$name];
            if ($fieldname == 'accountname' && $module != 'Accounts') {
                $fieldname = 'account_id';
            }
            if ($fieldname == 'lastname' && ($module == 'SalesOrder' || $module == 'PurchaseOrder' || $module == 'Invoice' || $module == 'Quotes' || $module == 'Calendar')) {
                $fieldname = 'contact_id';
            }
            if ($fieldname == 'productname' && $module != 'Products') {
                $fieldname = 'product_id';
            }
        }
        if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || in_array($fieldname, $field) || $fieldname == '' || $name == 'Close' && $module == 'Calendar') {
            if (isset($focus->sortby_fields) && $focus->sortby_fields != '') {
                //Added on 14-12-2005 to avoid if and else check for every list vtiger_field for arrow image and change order
                $change_sorder = array('ASC' => 'DESC', 'DESC' => 'ASC');
                $arrow_gif = array('ASC' => 'arrow_down.gif', 'DESC' => 'arrow_up.gif');
                foreach ($focus->list_fields[$name] as $tab => $col) {
                    if (in_array($col, $focus->sortby_fields)) {
                        if ($order_by == $col) {
                            $temp_sorder = $change_sorder[$sorder];
                            $arrow = "&nbsp;<img src ='" . vtiger_imageurl($arrow_gif[$sorder], $theme) . "' border='0'>";
                        } else {
                            $temp_sorder = 'ASC';
                        }
                        $lbl_name = getTranslatedString($name, $module);
                        //added to display vtiger_currency symbol in listview header
                        if ($lbl_name == 'Amount') {
                            $lbl_name .= ' (' . $app_strings['LBL_IN'] . ' ' . $user_info['currency_symbol'] . ')';
                        }
                        if ($relatedlist != '' && $relatedlist != 'global') {
                            $relationURL = '';
                            if (!empty($_REQUEST['relation_id'])) {
                                $relationURL = '&relation_id=' . vtlib_purify($_REQUEST['relation_id']);
                            }
                            $actionsURL = '';
                            if (!empty($_REQUEST['actions'])) {
                                $actionsURL = '&actions=' . vtlib_purify($_REQUEST['actions']);
                            }
                            if (empty($_REQUEST['header'])) {
                                $moduleLabel = getTranslatedString($module, $module);
                            } else {
                                $moduleLabel = $_REQUEST['header'];
                            }
                            $moduleLabel = str_replace(' ', '', $moduleLabel);
                            $name = "<a href='javascript:void(0);' onClick='loadRelatedListBlock" . "(\"module={$relatedmodule}&action=" . $relatedmodule . "Ajax&" . "file=DetailViewAjax&ajxaction=LOADRELATEDLIST&header=" . $moduleLabel . "&order_by={$col}&record={$relatedlist}&sorder={$temp_sorder}{$relationURL}" . "{$actionsURL}\",\"tbl_" . $relatedmodule . "_{$moduleLabel}\"," . "\"{$relatedmodule}" . "_{$moduleLabel}\");' class='listFormHeaderLinks'>" . $lbl_name . "" . $arrow . "</a>";
                        } elseif ($module == 'Users' && $name == 'User Name') {
                            $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"parenttab=" . $tabname . "&order_by=" . $col . "&start=1&sorder=" . $temp_sorder . "" . $sort_qry . "\");' class='listFormHeaderLinks'>" . getTranslatedString('LBL_LIST_USER_NAME_ROLE', $module) . "" . $arrow . "</a>";
                        } elseif ($relatedlist == "global") {
                            $name = $lbl_name;
                        } else {
                            $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"parenttab=" . $tabname . "&order_by=" . $col . "&start=1&sorder=" . $temp_sorder . "" . $sort_qry . "\");' class='listFormHeaderLinks'>" . $lbl_name . "" . $arrow . "</a>";
                        }
                        $arrow = '';
                    } else {
                        if (stripos($col, 'cf_') === 0) {
                            $tablenameArray = array_keys($tableinfo, $col);
                            $tablename = $tablenameArray[0];
                            $cf_columns = $adb->getColumnNames($tablename);
                            if (array_search($col, $cf_columns) != null) {
                                $pquery = "select fieldlabel,typeofdata from vtiger_field where tablename = ? and fieldname = ? and vtiger_field.presence in (0,2)";
                                $cf_res = $adb->pquery($pquery, array($tablename, $col));
                                if (count($cf_res) > 0) {
                                    $cf_fld_label = $adb->query_result($cf_res, 0, "fieldlabel");
                                    $typeofdata = explode("~", $adb->query_result($cf_res, 0, "typeofdata"));
                                    $new_field_label = $tablename . ":" . $col . ":" . $col . ":" . $module . "_" . str_replace(" ", "_", $cf_fld_label) . ":" . $typeofdata[0];
                                    $name = $cf_fld_label;
                                    // Update the existing field name in the database with new field name.
                                    $upd_query = "update vtiger_cvcolumnlist set columnname = ? where columnname like '" . $tablename . ":" . $col . ":" . $col . "%'";
                                    $upd_params = array($new_field_label);
                                    $adb->pquery($upd_query, $upd_params);
                                }
                            }
                        } else {
                            $name = getTranslatedString($name, $module);
                        }
                    }
                }
            }
            //added to display vtiger_currency symbol in related listview header
            if ($name == 'Amount' && $relatedlist != '') {
                $name .= ' (' . $app_strings['LBL_IN'] . ' ' . $user_info['currency_symbol'] . ')';
            }
            if ($module == "Calendar" && $name == $app_strings['Close']) {
                if (isPermitted("Calendar", "EditView") == 'yes') {
                    if (getFieldVisibilityPermission('Events', $current_user->id, 'eventstatus') == '0' || getFieldVisibilityPermission('Calendar', $current_user->id, 'taskstatus') == '0') {
                        array_push($list_header, $name);
                    }
                }
            } else {
                $list_header[] = $name;
            }
        }
    }
    //Added for Action - edit and delete link header in listview
    if (!$skipActions && (isPermitted($module, "EditView", "") == 'yes' || isPermitted($module, "Delete", "") == 'yes')) {
        $list_header[] = $app_strings["LBL_ACTION"];
    }
    $log->debug("Exiting getListViewHeader method ...");
    return $list_header;
}
Ejemplo n.º 3
0
function getListViewHeader($focus, $module, $sort_qry = '', $sorder = '', $order_by = '', $relatedlist = '', $oCv = '', $relatedmodule = '')
{
    global $log, $adb, $singlepane_view;
    $log->debug("Entering getListViewHeader() method ...");
    global $theme;
    global $app_strings;
    global $mod_strings;
    global $current_language;
    $current_module_strings = return_module_language($current_language, $module);
    $arrow = '';
    $qry = getURLstring($focus);
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $list_header = array();
    //Get the ec_tabid of the module
    $tabid = getTabid($module);
    //added for ec_customview 27/5
    if ($oCv != "" && $oCv) {
        if (isset($oCv->list_fields)) {
            $focus->list_fields = $oCv->list_fields;
            $focus->list_fields_name = $oCv->list_fields_name;
        }
    }
    //modified for ec_customview 27/5 - $app_strings change to $mod_strings
    foreach ($focus->list_fields as $name => $tableinfo) {
        //added for ec_customview 27/5
        $fieldname = $focus->list_fields_name[$name];
        $change_sorder = array('ASC' => 'DESC', 'DESC' => 'ASC');
        $arrow_gif = array('ASC' => 'arrow_down.gif', 'DESC' => 'arrow_up.gif');
        foreach ($focus->list_fields[$name] as $tab => $col) {
            //changed by dingjianting on 2007-3-11 for all fields can be sorted
            if ($order_by == $col) {
                $temp_sorder = $change_sorder[$sorder];
                $arrow = "<img src ='" . $image_path . $arrow_gif[$sorder] . "' border='0'>";
            } else {
                $temp_sorder = 'ASC';
            }
            if (isset($current_module_strings[$name])) {
                $lbl_name = $current_module_strings[$name];
            } elseif (isset($app_strings[$name])) {
                $lbl_name = $app_strings[$name];
            } else {
                $lbl_name = $name;
            }
            if ($relatedlist != '' && $relatedlist != 'global') {
                if ($singlepane_view == 'true') {
                    $name = "<a href='index.php?module=" . $relatedmodule . "&action=DetailView&relmodule=" . $module . "&order_by=" . $col . "&record=" . $relatedlist . "&sorder=" . $temp_sorder . "' class='listFormHeaderLinks'>" . $lbl_name . "&nbsp;" . $arrow . "</a>";
                } else {
                    $name = "<a href='index.php?module=" . $relatedmodule . "&action=CallRelatedList&relmodule=" . $module . "&order_by=" . $col . "&record=" . $relatedlist . "&sorder=" . $temp_sorder . "' class='listFormHeaderLinks'>" . $lbl_name . "&nbsp;" . $arrow . "</a>";
                }
            } elseif ($module == 'Users' && $name == 'User Name') {
                $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"order_by=" . $col . "&sorder=" . $temp_sorder . "" . $sort_qry . "\");' class='listFormHeaderLinks'>" . $mod_strings['LBL_LIST_USER_NAME_ROLE'] . "&nbsp;" . $arrow . "</a>";
            } elseif ($relatedlist == "global") {
                $name = $lbl_name;
            } else {
                $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"order_by=" . $col . "&start=" . $_SESSION["lvs"][$module]["start"] . "&sorder=" . $temp_sorder . "" . $sort_qry . "\");' class='listFormHeaderLinks'>" . $lbl_name . "&nbsp;" . $arrow . "</a>";
            }
            $arrow = '';
            //}
            //}
            $list_header[] = $name;
        }
    }
    if ($module != 'Qunfas' && $module != 'Maillists') {
        $list_header[] = $app_strings["LBL_ACTION"];
    }
    $log->debug("Exiting getListViewHeader method ...");
    return $list_header;
}
Ejemplo n.º 4
0
function getSearchListHeaderValues($focus, $module, $sort_qry = '', $sorder = '', $order_by = '', $relatedlist = '', $oCv = '')
{
    global $log;
    $log->debug("Entering getSearchListHeaderValues(" . (is_object($focus) ? get_class($focus) : '') . "," . $module . "," . $sort_qry . "," . $sorder . "," . $order_by . "," . $relatedlist . "," . (is_object($oCV) ? get_class($oCV) : '') . ") method ...");
    global $adb;
    global $theme;
    global $app_strings;
    global $mod_strings, $current_user;
    $arrow = '';
    $qry = getURLstring($focus);
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $search_header = array();
    //Get the vtiger_tabid of the module
    //require_once('include/utils/UserInfoUtil.php')
    $tabid = getTabid($module);
    //added for vtiger_customview 27/5
    if ($oCv) {
        if (isset($oCv->list_fields)) {
            $focus->list_fields = $oCv->list_fields;
        }
    }
    //Added to reduce the no. of queries logging for non-admin vtiger_users -- by Minnie-start
    $field_list = array();
    $j = 0;
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    foreach ($focus->list_fields as $name => $tableinfo) {
        $fieldname = $focus->list_fields_name[$name];
        if ($oCv) {
            if (isset($oCv->list_fields_name)) {
                $fieldname = $oCv->list_fields_name[$name];
            }
        }
        if ($fieldname == "accountname" && $module != "Accounts") {
            $fieldname = "account_id";
        }
        if ($fieldname == "productname" && $module == "Campaigns") {
            $fieldname = "product_id";
        }
        if ($fieldname == "lastname" && $module != "Leads" && $module != "Contacts") {
            $fieldname = "contact_id";
        }
        if ($fieldname == 'folderid' && $module == 'Documents') {
            $fieldname = 'foldername';
        }
        array_push($field_list, $fieldname);
        $j++;
    }
    //Getting the Entries from Profile2 vtiger_field vtiger_table
    if ($is_admin == false) {
        $profileList = getCurrentUserProfileList();
        //changed to get vtiger_field.fieldname
        $query = "SELECT vtiger_profile2field.*,vtiger_field.fieldname FROM vtiger_field INNER JOIN vtiger_profile2field ON vtiger_profile2field.fieldid=vtiger_field.fieldid INNER JOIN vtiger_def_org_field ON vtiger_def_org_field.fieldid=vtiger_field.fieldid WHERE vtiger_field.tabid=? AND vtiger_profile2field.visible=0 AND vtiger_def_org_field.visible=0 AND vtiger_profile2field.profileid IN (" . generateQuestionMarks($profileList) . ") AND vtiger_field.fieldname IN (" . generateQuestionMarks($field_list) . ") and vtiger_field.presence in (0,2) GROUP BY vtiger_field.fieldid";
        if ($adb->dbType == "pgsql") {
            $query = fixPostgresQuery($query, $log, 0);
        }
        $result = $adb->pquery($query, array($tabid, $profileList, $field_list));
        $field = array();
        for ($k = 0; $k < $adb->num_rows($result); $k++) {
            $field[] = $adb->query_result($result, $k, "fieldname");
        }
        //if this field array is empty and the user don't have any one of the admin, view all, edit all permissions then the search picklist options will be empty and we cannot navigate the users list - js error will thrown in function getListViewEntries_js in Smarty\templates\Popup.tpl
        if ($module == 'Users' && empty($field)) {
            $field = array("last_name", "email1");
        }
    }
    // Remove fields which are made inactive
    $focus->filterInactiveFields($module);
    //modified for vtiger_customview 27/5 - $app_strings change to $mod_strings
    foreach ($focus->list_fields as $name => $tableinfo) {
        //added for vtiger_customview 27/5
        if ($oCv) {
            if (isset($oCv->list_fields_name)) {
                if ($oCv->list_fields_name[$name] == '') {
                    $fieldname = 'crmid';
                } else {
                    $fieldname = $oCv->list_fields_name[$name];
                }
            } else {
                if ($focus->list_fields_name[$name] == '') {
                    $fieldname = 'crmid';
                } else {
                    $fieldname = $focus->list_fields_name[$name];
                }
            }
            if ($fieldname == "lastname" && $module != "Leads" && $module != "Contacts") {
                $fieldname = "contact_id";
            }
            if ($fieldname == "accountname" && $module != "Accounts") {
                $fieldname = "account_id";
            }
            if ($fieldname == "productname" && $module == "Campaigns") {
                $fieldname = "product_id";
            }
        } else {
            if ($focus->list_fields_name[$name] == '') {
                $fieldname = 'crmid';
            } else {
                $fieldname = $focus->list_fields_name[$name];
            }
            if ($fieldname == "lastname" && $module != "Leads" && $module != "Contacts") {
                $fieldname = "contact_id";
            }
        }
        if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || in_array($fieldname, $field)) {
            if ($fieldname != 'parent_id') {
                $fld_name = $fieldname;
                if ($fieldname == 'contact_id' && $module != "Contacts") {
                    $name = $app_strings['LBL_CONTACT_LAST_NAME'];
                } elseif ($fieldname == 'contact_id' && $module == "Contacts") {
                    $name = $mod_strings['Reports To'] . " - " . $mod_strings['LBL_LIST_LAST_NAME'];
                }
                //assign the translated string
                //added to fix #5205
                //Added condition to hide the close column in calendar search header
                if ($name != $app_strings['Close']) {
                    $search_header[$fld_name] = getTranslatedString($name);
                }
            }
        }
        if ($module == 'HelpDesk' && $fieldname == 'crmid') {
            $fld_name = $fieldname;
            $search_header[$fld_name] = getTranslatedString($name);
        }
    }
    $log->debug("Exiting getSearchListHeaderValues method ...");
    return $search_header;
}
Ejemplo n.º 5
0
 public function getListViewHeader($focus, $module, $sort_qry = '', $sorder = '', $orderBy = '', $skipActions = false)
 {
     global $log, $singlepane_view;
     global $theme;
     $arrow = '';
     $qry = getURLstring($focus);
     $theme_path = "themes/" . $theme . "/";
     $image_path = $theme_path . "images/";
     $header = array();
     //Get the vtiger_tabid of the module
     $tabid = getTabid($module);
     $tabname = getParentTab();
     global $current_user;
     require 'user_privileges/user_privileges_' . $current_user->id . '.php';
     $fields = $this->queryGenerator->getFields();
     $whereFields = $this->queryGenerator->getWhereFields();
     $meta = $this->queryGenerator->getMeta($this->queryGenerator->getModule());
     $moduleFields = $meta->getModuleFields();
     $accessibleFieldList = array_keys($moduleFields);
     $listViewFields = array_intersect($fields, $accessibleFieldList);
     //Added on 14-12-2005 to avoid if and else check for every list
     //vtiger_field for arrow image and change order
     $change_sorder = array('ASC' => 'DESC', 'DESC' => 'ASC');
     $arrow_gif = array('ASC' => 'arrow_down.gif', 'DESC' => 'arrow_up.gif');
     foreach ($listViewFields as $fieldName) {
         $field = $moduleFields[$fieldName];
         if (in_array($field->getColumnName(), $focus->sortby_fields)) {
             if ($orderBy == $field->getColumnName()) {
                 $temp_sorder = $change_sorder[$sorder];
                 $arrow = "&nbsp;<img src ='" . vtiger_imageurl($arrow_gif[$sorder], $theme) . "' border='0'>";
             } else {
                 $temp_sorder = 'ASC';
             }
             $label = getTranslatedString($field->getFieldLabelKey(), $module);
             //added to display vtiger_currency symbol in listview header
             if ($label == 'Amount') {
                 $label .= ' (' . getTranslatedString('LBL_IN', $module) . ' ' . $user_info['currency_symbol'] . ')';
             }
             if ($field->getUIType() == '9') {
                 $label .= ' (%)';
             }
             if ($module == 'Users' && $fieldName == 'User Name') {
                 $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"parenttab=" . $tabname . "&order_by=" . $field->getColumnName() . "&sorder=" . $temp_sorder . $sort_qry . "\");' class='listFormHeaderLinks'>" . getTranslatedString('LBL_LIST_USER_NAME_ROLE', $module) . "" . $arrow . "</a>";
             } else {
                 if ($this->isHeaderSortingEnabled()) {
                     $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"parenttab=" . $tabname . "&foldername=Default&order_by=" . $field->getColumnName() . "&start=" . $_SESSION["lvs"][$module]["start"] . "&sorder=" . $temp_sorder . "" . $sort_qry . "\");' class='listFormHeaderLinks'>" . $label . "" . $arrow . "</a>";
                 } else {
                     $name = $label;
                 }
             }
             $arrow = '';
         } else {
             $name = getTranslatedString($field->getFieldLabelKey(), $module);
         }
         //added to display vtiger_currency symbol in related listview header
         if ($name == 'Amount') {
             $name .= ' (' . getTranslatedString('LBL_IN') . ' ' . $user_info['currency_symbol'] . ')';
         }
         $header[] = $name;
     }
     //Added for Action - edit and delete link header in listview
     if (!$skipActions && (isPermitted($module, "EditView", "") == 'yes' || isPermitted($module, "Delete", "") == 'yes')) {
         $header[] = getTranslatedString("LBL_ACTION", $module);
     }
     return $header;
 }