Exemplo n.º 1
0
 /**
  * function to get the custom view fields information by id
  * @param integer $id 
  * @return mix
  */
 public function get_custom_view_fields_information($id)
 {
     $fields = $this->get_custom_view_fields($id);
     if (false !== $fields) {
         $idmodule = $this->idmodule;
         $do_crm_fields = new CRMFields();
         return $do_crm_fields->get_specific_fields_information($fields, $idmodule, true, 'idfields');
     } else {
         return false;
     }
 }
Exemplo n.º 2
0
 /**
  * function to get the field information for a list view (list,popup,related)
  * gets the object name with the module and the list type and then generates the 
  * persistant object for the module and returns the fields information.
  * @param string $module
  * @param integer $module_id
  * @param string $list_type
  * @return array with the field information
  */
 public function get_listview_field_info($module, $module_id, $list_type, $custom_view_id = 0)
 {
     $object_name = $this->generate_list_view_object_name($module, $list_type);
     $do_list = new $module();
     $do_list->sessionPersistent($object_name, "logout.php", TTL);
     if ((int) $custom_view_id > 0) {
         $do_customview_fields = new CustomViewFields();
         $fields_info = $do_customview_fields->get_custom_view_fields_information($custom_view_id);
     } else {
         // fall back to the module's member property list view field information
         $do_crm_fields = new CRMFields();
         $fields_info = $do_crm_fields->get_specific_fields_information($_SESSION[$object_name]->list_view_fields, $module_id, true);
     }
     $_SESSION[$object_name]->list_view_field_information = $fields_info;
     return $fields_info;
 }
Exemplo n.º 3
0
Arquivo: list.php Projeto: sQcrm/sqcrm
<?php

// Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt
/**
* List view data 
* @author Abhik Chakraborty
*/
$list_object = new cpanel_invoice\Invoice();
$fields = $list_object->list_view_fields;
$do_crm_fields = new \CRMFields();
$fields_info = $do_crm_fields->get_specific_fields_information($fields, 15, true);
$module_namespace = 'cpanel_invoice';
if (isset($_GET['ajaxreq']) && $_GET['ajaxreq'] == true) {
    require_once 'view/listview_entry.php';
} else {
    require_once 'view/listview.php';
}
Exemplo n.º 4
0
$crm_global_settings = new CRMGlobalSettings();
$currency = $crm_global_settings->get_setting_data_by_name('currency_setting');
$currency_data = json_decode($currency, true);
$report_date_start = '';
$report_date_end = '';
// if submit is clicked with some param then get the values and set to variables
if (isset($_GET['runtime']) && (int) $_GET['runtime'] > 0) {
    $custom_date_filter_values = (int) $_GET['report_date_filter_type_runtime'] == 1 ? true : false;
    $date_filter_type = (int) $_GET['report_date_filter_type_runtime'];
    $report_date_start = isset($_GET['report_date_start_runtime']) ? $_GET['report_date_start_runtime'] : '';
    $report_date_end = isset($_GET['report_date_start_runtime']) ? $_GET['report_date_start_runtime'] : '';
    $selected_user = isset($_GET['report_user_filter_runtime']) ? (int) $_GET['report_user_filter_runtime'] : 0;
}
// p and ptg are table alias names used in the report query
$user_where = $prospect_lost->get_report_where($selected_user, 'p', 'ptg');
$additional_where = $prospect_lost->get_date_filter_where('p', 'expected_closing_date', $date_filter_type, $report_date_start, $report_date_end);
$where = $user_where . $additional_where;
// get the data for the report
$prospect_lost_data_by_amount = $prospect_lost->get_propect_lost_by_amount($where);
$prospect_lost_data_by_no = $prospect_lost->get_propect_lost_by_volume($where);
$prospect_lost->get_detailed_funnel_data('', $selected_user, $date_filter_type, $report_date_start, $report_date_end);
// detailed data fields to be displayed
$detailed_data_fields = array('potential_name', 'potential_type', 'sales_stage', 'lost_reason', 'expected_closing_date', 'assigned_to', 'amount');
$do_crm_fields = new CRMFields();
$fields_info = $do_crm_fields->get_specific_fields_information($detailed_data_fields, 5, true);
// breadcrumbs
$breadcrumb = $prospect_lost->get_breadcrumbs($_GET['path']);
if (false === $custom_date_filter_values) {
    $date_range_display = 'style="display:none;margin-left:3px;"';
}
include_once 'view/report_view.php';
Exemplo n.º 5
0
* The fileds information is stored in the memmber array list_view_field_information of the object
* @see view/listview.php
* @author Abhik Chakraborty
*/
include_once "config.php";
$m = $_GET["m"];
$mid = $_GET["mid"];
$module_namespace = $_GET["module_namespace"];
$lp = false;
// if where is already in the query then no need to add the WHERE string
$method_param_used = false;
$module_object_name = $module_namespace . '\\' . $m;
$module_object = new $module_object_name();
$fields = $module_object->list_view_fields;
$do_crmfields = new \CRMFields();
$fields_info = $do_crmfields->get_specific_fields_information($fields, $mid, true);
/**
* FIXME
* For some reason when the array index starts with 0 the text box search works well but the asc/desc on the header does not
* So $aColumns array is used for text search and adding a new array $ahColumns for header sort
*/
$aColumns = array();
$col_count = 0;
foreach ($fields_info as $field_name => $info) {
    $aColumns[$col_count++] = $field_name;
}
$ahColumns = array();
$hcol_count = 0;
foreach ($fields_info as $field_name => $info) {
    $ahColumns[$hcol_count++] = $field_name;
}