Merge pull request #7171 from atm-ph/fix_5.0_search_lost
Fix lost search value in list if come from thirdparty card
This commit is contained in:
commit
98cb1b7af1
@ -353,6 +353,7 @@ if ($resql)
|
|||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$soc->fetch($socid);
|
||||||
$title = $langs->trans('ListOfProposals') . ' - '.$soc->name;
|
$title = $langs->trans('ListOfProposals') . ' - '.$soc->name;
|
||||||
|
if (empty($search_societe)) $search_societe = $soc->name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -578,6 +578,7 @@ if ($resql)
|
|||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$soc->fetch($socid);
|
||||||
$title = $langs->trans('ListOfOrders') . ' - '.$soc->name;
|
$title = $langs->trans('ListOfOrders') . ' - '.$soc->name;
|
||||||
|
if (empty($search_company)) $search_company = $soc->name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -423,6 +423,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$soc->fetch($socid);
|
||||||
|
if (empty($search_societe)) $search_societe = $soc->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$param='&socid='.$socid;
|
$param='&socid='.$socid;
|
||||||
|
|||||||
@ -306,6 +306,13 @@ if ($resql)
|
|||||||
|
|
||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
|
if ($socid > 0)
|
||||||
|
{
|
||||||
|
$soc = new Societe($db);
|
||||||
|
$soc->fetch($socid);
|
||||||
|
if (empty($search_name)) $search_name = $soc->name;
|
||||||
|
}
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
|||||||
@ -211,7 +211,14 @@ $result=$db->query($sql);
|
|||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
|
if ($socid > 0)
|
||||||
|
{
|
||||||
|
$soc = new Societe($db);
|
||||||
|
$soc->fetch($socid);
|
||||||
|
if (empty($search_company)) $search_company = $soc->name;
|
||||||
|
}
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
|||||||
@ -394,6 +394,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$soc->fetch($socid);
|
||||||
|
if (empty($search_societe)) $search_societe = $soc->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$param='&socid='.$socid;
|
$param='&socid='.$socid;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user