$smarty->assign("MODULE", $currentModule); $smarty->assign("CUSTOMVIEW_OPTION", $customviewcombo_html); $smarty->assign("VIEWID", $viewid); //Retreive the list from Database $query = ""; $recordid = ""; if (isset($_REQUEST['recordid']) && $_REQUEST['recordid'] != '') { $recordid = $_REQUEST['recordid']; $smarty->assign("RECORDID", $recordid); $url_string .= '&recordid=' . $recordid; } $return_module = ""; if (isset($_REQUEST['return_module'])) { $return_module = $_REQUEST['return_module']; } $where_relquery = getRelCheckquery($currentModule, $return_module, $recordid); //if((!isset($is_disable_approve) || (isset($is_disable_approve) && !$is_disable_approve)) && (isset($module_enable_approve) && $module_enable_approve)) { // $where_relquery .= ' AND ec_crmentity.approved=1 '; //} if (empty($query)) { $query = $focus->getListQuery($where_relquery, true); //viewscope = all_to_me } //customview begin if ($viewid != "0") { $query = $oCustomView->getModifiedCvListQuery($viewid, $query, $currentModule, true); } //customview end if (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true') { list($where, $ustring) = explode("#@@#", getWhereCondition($currentModule)); $url_string .= "&query=true" . $ustring;
} // END $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); //Retreive the list from Database if ($currentModule == 'PriceBooks') { $productid = $_REQUEST['productid']; $currency_id = $_REQUEST['currencyid']; if ($currency_id == null) { $currency_id = fetchCurrency($current_user->id); } $query = 'select vtiger_pricebook.*, vtiger_pricebookproductrel.productid, vtiger_pricebookproductrel.listprice, ' . 'vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime ' . 'from vtiger_pricebook inner join vtiger_pricebookproductrel on vtiger_pricebookproductrel.pricebookid = vtiger_pricebook.pricebookid ' . 'inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_pricebook.pricebookid ' . 'where vtiger_pricebookproductrel.productid=' . $adb->sql_escape_string($productid) . ' and vtiger_crmentity.deleted=0 ' . 'and vtiger_pricebook.currency_id=' . $adb->sql_escape_string($currency_id) . ' and vtiger_pricebook.active=1'; } else { if (isset($_REQUEST['recordid']) && $_REQUEST['recordid'] != '') { $smarty->assign("RECORDID", vtlib_purify($_REQUEST['recordid'])); $url_string .= '&recordid=' . vtlib_purify($_REQUEST['recordid']); $where_relquery = getRelCheckquery($currentModule, $_REQUEST['return_module'], $_REQUEST['recordid']); } if (isset($_REQUEST['relmod_id']) || isset($_REQUEST['fromPotential'])) { if ($_REQUEST['relmod_id'] != '') { $mod = vtlib_purify($_REQUEST['parent_module']); $id = vtlib_purify($_REQUEST['relmod_id']); } else { if ($_REQUEST['fromPotential'] != '') { $mod = "Accounts"; $id = vtlib_purify($_REQUEST['acc_id']); } } $smarty->assign("mod_var_name", "parent_module"); $smarty->assign("mod_var_value", $mod); $smarty->assign("recid_var_name", "relmod_id"); $smarty->assign("recid_var_value", $id);