NEW 21000 Added columns 'alias_name' on poject list
This commit is contained in:
parent
62c12bf55a
commit
dd9e77e764
@ -91,6 +91,7 @@ $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alph
|
||||
$search_ref = GETPOST("search_ref", 'alpha');
|
||||
$search_label = GETPOST("search_label", 'alpha');
|
||||
$search_societe = GETPOST("search_societe", 'alpha');
|
||||
$search_societe_alias = GETPOST("search_societe_alias", 'alpha');
|
||||
$search_status = GETPOST("search_status", 'int');
|
||||
$search_opp_status = GETPOST("search_opp_status", 'alpha');
|
||||
$search_opp_percent = GETPOST("search_opp_percent", 'alpha');
|
||||
@ -198,6 +199,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
|
||||
// Add non object fields to fields for list
|
||||
$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(empty($conf->societe->enabled) ? 0 : 1));
|
||||
$arrayfields['s.name_alias'] = array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>22);
|
||||
$arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23);
|
||||
$arrayfields['c.assigned'] = array('label'=>$langs->trans("AssignedTo"), 'checked'=>-1, 'position'=>120);
|
||||
$arrayfields['opp_weighted_amount'] = array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'position'=> 116, 'enabled'=>(empty($conf->global->PROJECT_USE_OPPORTUNITIES) ? 0 : 1), 'position'=>106);
|
||||
@ -246,6 +248,7 @@ if (empty($reshook)) {
|
||||
$search_ref = "";
|
||||
$search_label = "";
|
||||
$search_societe = "";
|
||||
$search_societe_alias = '';
|
||||
$search_status = -1;
|
||||
$search_opp_status = -1;
|
||||
$search_opp_amount = '';
|
||||
@ -447,6 +450,9 @@ if ($search_label) {
|
||||
if ($search_societe) {
|
||||
$sql .= natural_search('s.nom', $search_societe);
|
||||
}
|
||||
if ($search_societe_alias) {
|
||||
$sql .= natural_search('s.name_alias', $search_societe_alias);
|
||||
}
|
||||
if ($search_opp_amount) {
|
||||
$sql .= natural_search('p.opp_amount', $search_opp_amount, 1);
|
||||
}
|
||||
@ -687,6 +693,9 @@ if ($search_label != '') {
|
||||
if ($search_societe != '') {
|
||||
$param .= '&search_societe='.urlencode($search_societe);
|
||||
}
|
||||
if ($search_societe_alias != '') {
|
||||
$param .= '&search_societe_alias='.urlencode($search_societe_alias);
|
||||
}
|
||||
if ($search_status >= 0) {
|
||||
$param .= '&search_status='.urlencode($search_status);
|
||||
}
|
||||
@ -887,6 +896,18 @@ if (!empty($arrayfields['s.nom']['checked'])) {
|
||||
print '<input type="text" class="flat" name="search_societe" size="8" value="'.dol_escape_htmltag($search_societe).'">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
if ($socid > 0) {
|
||||
$tmpthirdparty = new Societe($db);
|
||||
$tmpthirdparty->fetch($socid);
|
||||
$search_societe_alias = $tmpthirdparty->name_alias;
|
||||
}
|
||||
print '<input type="text" class="flat" name="search_societe_alias" size="8" value="'.dol_escape_htmltag($search_societe_alias).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Sale representative
|
||||
if (!empty($arrayfields['commercial']['checked'])) {
|
||||
print '<td class="liste_titre"> </td>';
|
||||
@ -1050,6 +1071,9 @@ if (!empty($arrayfields['p.title']['checked'])) {
|
||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['commercial']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['commercial']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, 'tdoverflowmax100imp ');
|
||||
}
|
||||
@ -1185,7 +1209,20 @@ while ($i < min($num, $limit)) {
|
||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||
print '<td class="tdoverflowmax100">';
|
||||
if ($obj->socid) {
|
||||
print $companystatic->getNomUrl(1);
|
||||
print $companystatic->getNomUrl(1, '', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="tdoverflowmax100">';
|
||||
if ($obj->socid) {
|
||||
print $companystatic->name_alias;
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user