示例#1
0
<?php

// Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt
/**
* Report run
* @author Abhik Chakraborty
*/
include_once BASE_PATH . '/modules/Report/CustomReports/ProspectLostByLostReason/ProspectLostByLostReason.class.php';
$prospect_lost = new ProspectLostByLostReason();
$user_list = $prospect_lost->get_report_user_filter();
$date_filter_options = CommonUtils::get_date_filter_options();
$custom_date_filter_values = false;
$date_range_display = 'style="display:block;margin-left:3px;"';
$date_filter_type = 15;
$selected_user = 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);
示例#2
0
 /**
  * get date filter options
  * @return array
  */
 public function get_date_filter_options()
 {
     return CommonUtils::get_date_filter_options();
 }