/** * get the fields by report fields * @param integer $idmodule * @return array */ public function get_module_fields_for_report($idmodule) { $do_crm_fields = new CRMFields(); return $do_crm_fields->get_fieldinfo_grouped_by_block($idmodule, true); /*$qry = " select f.idfields, f.field_label, f.field_name, f.idblock, f.field_type, case when b.block_label <> '' then b.block_label else 'Other' end as block_name from fields f left join block b on b.idblock = f.idblock where f.idmodule = ? order by case when f.idblock <> 0 then 0 else 1 end, b.sequence, f.field_sequence " ; $this->query($qry,array($idmodule)); $fields = array(); while($this->next()){ $fields[$this->idblock][$this->block_name][] = array( "idfields"=>$this->idfields, "field_label"=>$this->field_label, "field_name"=>$this->field_name, "field_type"=>$this->field_type ); } return $fields ;*/ }
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * Customview add * @author Abhik Chakraborty */ $do_crmfields = new CRMFields(); if (isset($_REQUEST["target_module_id"]) && (int) $_REQUEST["target_module_id"] > 0) { $target_module_id = (int) $_REQUEST["target_module_id"]; $cv_fields = $do_crmfields->get_fieldinfo_grouped_by_block($target_module_id, true); $date_filters = $do_crmfields->get_date_fields($target_module_id, true); $date_filter_options = ViewFilterUtils::get_date_filter_otions(); $advanced_filter_options = ViewFilterUtils::get_advanced_filter_options(); require_once 'view/customview_create_view.php'; }
$do_edit = false; } if ($module_obj->is_editable == 0) { $do_edit = false; } } else { $do_edit = false; } } else { $do_edit = false; } if ($do_edit === false) { echo '<div class="alert alert-error alert-block" style="height:100px;margin-top:100px;margin-left:200px;margin-right:200px;">'; echo '<h4>'; echo _('Access Denied ! '); echo '</h4>'; echo _('You are not authorized to perform this operation.'); echo '</div>'; } else { $do_crmfields = new CRMFields(); $do_custom_view_fields = new CustomViewFields(); $do_custom_view_filter = new CustomViewFilter(); $cv_fields = $do_crmfields->get_fieldinfo_grouped_by_block($module_obj->idmodule, true); $date_filters = $do_crmfields->get_date_fields($module_obj->idmodule, true); $date_filter_options = ViewFilterUtils::get_date_filter_otions(); $advanced_filter_options = ViewFilterUtils::get_advanced_filter_options(); $saved_fields = $do_custom_view_fields->get_custom_view_fields($sqcrm_record_id); $saved_date_filter = $do_custom_view_filter->get_date_filter_information($sqcrm_record_id); $saved_advanced_filter = $do_custom_view_filter->get_saved_advanced_filter_information($sqcrm_record_id); require_once 'view/customview_edit_view.php'; }