| '.$langs->trans('Discount').' | ';
if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent);
@@ -225,7 +225,7 @@ if ($id > 0 || ! empty($ref))
print '';
dol_fiche_end();
-
+
print ' ';
// Contacts lines
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index 132ab187777..351bdc74a46 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -107,7 +107,7 @@ if ($object->id)
// Contract card
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$morehtmlref='';
@@ -170,7 +170,7 @@ if ($object->id)
print '';
print ' ';
-
+
print ' ';
print '| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ';
print '| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.$totalsize.' '.$langs->trans("bytes").' | ';
@@ -179,7 +179,7 @@ if ($object->id)
print '';
dol_fiche_end();
-
+
$modulepart = 'contract';
$permission = $user->rights->contrat->creer;
$permtoedit = $user->rights->contrat->creer;
diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php
index 95ab0b9ca25..7f5d0c103fa 100644
--- a/htdocs/contrat/info.php
+++ b/htdocs/contrat/info.php
@@ -62,7 +62,7 @@ dol_fiche_head($head, 'info', $langs->trans("Contract"), -1, 'contract');
// Contract card
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = ''.$langs->trans("BackToList").'';
$morehtmlref='';
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 64f2b6b94f2..36b59309298 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -323,16 +323,17 @@ if ($resql)
}
$param='';
- if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
- if ($sall != '') $param.='&sall='.$sall;
- if ($search_contract != '') $param.='&search_contract='.$search_contract;
- if ($search_name != '') $param.='&search_name='.$search_name;
- if ($search_email != '') $param.='&search_email='.$search_email;
- if ($search_ref_supplier != '') $param.='&search_ref_supplier='.$search_ref_supplier;
- if ($search_sale != '') $param.='&search_sale=' .$search_sale;
- if ($show_files) $param.='&show_files=' .$show_files;
- if ($optioncss != '') $param.='&optioncss='.$optioncss;
+ if ($sall != '') $param.='&sall='.urlencode($sall);
+ if ($search_contract != '') $param.='&search_contract='.urlencode($search_contract);
+ if ($search_name != '') $param.='&search_name='.urlencode($search_name);
+ if ($search_email != '') $param.='&search_email='.urlencode($search_email);
+ if ($search_ref_customer != '') $param.='&search_ref_customer='.urlencode($search_ref_customer);
+ if ($search_ref_supplier != '') $param.='&search_ref_supplier='.urlencode($search_ref_supplier);
+ if ($search_sale != '') $param.='&search_sale=' .urlencode($search_sale);
+ if ($show_files) $param.='&show_files=' .urlencode($show_files);
+ if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
{
@@ -600,6 +601,11 @@ if ($resql)
$contracttmp->ref_customer=$obj->ref_customer;
$contracttmp->ref_supplier=$obj->ref_supplier;
+ if ($obj->socid > 0)
+ {
+ $result=$socstatic->fetch($obj->socid);
+ }
+
print '';
if (! empty($arrayfields['c.ref']['checked']))
{
@@ -631,7 +637,13 @@ if ($resql)
}
if (! empty($arrayfields['s.nom']['checked']))
{
- print '| '.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.' | ';
+ print '';
+ //print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'';
+ if ($obj->socid > 0)
+ {
+ print $socstatic->getNomUrl(1, '');
+ }
+ print ' | ';
}
if (! empty($arrayfields['s.email']['checked']))
{
@@ -683,7 +695,6 @@ if ($resql)
print '';
if ($obj->socid > 0)
{
- $result=$socstatic->fetch($obj->socid);
$listsalesrepresentatives=$socstatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) dol_print_error($db);
$nbofsalesrepresentative=count($listsalesrepresentatives);
diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php
index 7d4927d19b8..ff0df34de67 100644
--- a/htdocs/contrat/note.php
+++ b/htdocs/contrat/note.php
@@ -74,7 +74,7 @@ if ($id > 0 || ! empty($ref))
// Contract card
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$morehtmlref='';
@@ -139,7 +139,7 @@ if ($id > 0 || ! empty($ref))
print '';
-
+
// Ligne info remises tiers
print '| '.$langs->trans('Discount').' | ';
if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent);
@@ -161,9 +161,9 @@ if ($id > 0 || ! empty($ref))
print ' | ';
print " ";
-
+
print '';
-
+
//print ' ';
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 84bcebf8ea1..87ff0adfafa 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1148,7 +1148,7 @@ else if ($id > 0 || ! empty($ref))
// Intervention card
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$morehtmlref='';
diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index 1c023415de0..bdbb03492f7 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -655,28 +655,52 @@ class Fichinter extends CommonObject
/**
* Return clicable name (with picto eventually)
*
- * @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
- * @param string $option Options
- * @return string String with URL
+ * @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
+ * @param string $option Options
+ * @param int $notooltip 1=Disable tooltip
+ * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
+ * @return string String with URL
*/
- function getNomUrl($withpicto=0,$option='')
+ function getNomUrl($withpicto=0, $option='', $notooltip=0, $save_lastsearch_value=-1)
{
global $langs;
$result='';
+
$label = ' ' . $langs->trans("ShowIntervention") . '';
if (! empty($this->ref))
$label .= ' ' . $langs->trans('Ref') . ': '.$this->ref;
- $link = ' ';
+ $picto='intervention';
+ $url = DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id;
+
+ //if ($option !== 'nolink')
+ //{
+ // Add param to save lastsearch_values or not
+ $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
+ //}
+
+ $linkclose='';
+ if (empty($notooltip))
+ {
+ if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
+ {
+ $label=$langs->trans("ShowIntervention");
+ $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
+ }
+ $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
+ $linkclose.=' class="classfortooltip"';
+ }
+
+ $linkstart = '';
$linkend='';
- $picto='intervention';
-
-
- if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend);
+ if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
- if ($withpicto != 2) $result.=$link.$this->ref.$linkend;
+ if ($withpicto != 2) $result.=$linkstart.$this->ref.$linkend;
return $result;
}
diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php
index 2b40553a3d9..d7be9c95cec 100644
--- a/htdocs/fichinter/contact.php
+++ b/htdocs/fichinter/contact.php
@@ -126,9 +126,9 @@ if ($id > 0 || ! empty($ref))
// Intervention card
- $linkback = ' '.$langs->trans("BackToList").'';
-
-
+ $linkback = ' '.$langs->trans("BackToList").'';
+
+
$morehtmlref=' ';
// Ref customer
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
@@ -169,13 +169,13 @@ if ($id > 0 || ! empty($ref))
}
}
$morehtmlref.=' ';
-
+
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
-
+
dol_fiche_end();
-
+
print ' ';
-
+
if (! empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser=1;
if (! empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_THIPARTY)) $hideaddcontactforthirdparty=1;
diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php
index 3d5a3c544e8..33db56a6e78 100644
--- a/htdocs/fichinter/document.php
+++ b/htdocs/fichinter/document.php
@@ -102,9 +102,9 @@ if ($object->id)
// Intervention card
- $linkback = ' '.$langs->trans("BackToList").'';
-
-
+ $linkback = ' '.$langs->trans("BackToList").'';
+
+
$morehtmlref=' ';
// Ref customer
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
@@ -145,13 +145,13 @@ if ($object->id)
}
}
$morehtmlref.=' ';
-
+
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
-
-
+
+
print ' ';
print ' ';
-
+
print ' ';
print '| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ';
print '| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.$totalsize.' '.$langs->trans("bytes").' | ';
@@ -160,7 +160,7 @@ if ($object->id)
print '';
dol_fiche_end();
-
+
$modulepart = 'ficheinter';
$permission = $user->rights->ficheinter->creer;
$permtoedit = $user->rights->ficheinter->creer;
diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php
index a32cda9bb57..c8520a6645f 100644
--- a/htdocs/fichinter/info.php
+++ b/htdocs/fichinter/info.php
@@ -63,7 +63,7 @@ $head = fichinter_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), -1, 'intervention');
// Intervention card
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = ''.$langs->trans("BackToList").'';
$morehtmlref='';
diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php
index 43a2654d1fd..a5a9675eb43 100644
--- a/htdocs/fichinter/note.php
+++ b/htdocs/fichinter/note.php
@@ -61,14 +61,14 @@ $form = new Form($db);
if ($id > 0 || ! empty($ref))
{
$object->fetch_thirdparty();
-
+
$head = fichinter_prepare_head($object);
dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), -1, 'intervention');
// Intervention card
- $linkback = ' '.$langs->trans("BackToList").'';
-
-
+ $linkback = ' '.$langs->trans("BackToList").'';
+
+
$morehtmlref=' ';
// Ref customer
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
@@ -109,17 +109,17 @@ if ($id > 0 || ! empty($ref))
}
}
$morehtmlref.=' ';
-
+
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
-
+
print ' ';
print ' ';
-
+
$cssclass="titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
print ' ';
-
+
dol_fiche_end();
}
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index abd2d85d723..b0ac73f871b 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -594,12 +594,13 @@ class CommandeFournisseur extends CommonOrder
/**
* Return clicable name (with picto eventually)
*
- * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
- * @param string $option On what the link points
- * @param int $notooltip 1=Disable tooltip
- * @return string Chain with URL
+ * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
+ * @param string $option On what the link points
+ * @param int $notooltip 1=Disable tooltip
+ * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
+ * @return string Chain with URL
*/
- public function getNomUrl($withpicto=0,$option='',$notooltip=0)
+ public function getNomUrl($withpicto=0, $option='', $notooltip=0, $save_lastsearch_value=-1)
{
global $langs, $conf;
@@ -619,6 +620,14 @@ class CommandeFournisseur extends CommonOrder
$picto='order';
$url = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id;
+ if ($option !== 'nolink')
+ {
+ // Add param to save lastsearch_values or not
+ $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
+ }
+
$linkclose='';
if (empty($notooltip))
{
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index b040fdcb95d..c2f535db079 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -1839,15 +1839,16 @@ class FactureFournisseur extends CommonInvoice
/**
* Return clicable name (with picto eventually)
*
- * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
- * @param string $option Where point the link
- * @param int $max Max length of shown ref
- * @param int $short 1=Return just URL
- * @param string $moretitle Add more text to title tooltip
- * @param int $notooltip 1=Disable tooltip
- * @return string String with URL
+ * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
+ * @param string $option Where point the link
+ * @param int $max Max length of shown ref
+ * @param int $short 1=Return just URL
+ * @param string $moretitle Add more text to title tooltip
+ * @param int $notooltip 1=Disable tooltip
+ * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
+ * @return string String with URL
*/
- public function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip=0)
+ public function getNomUrl($withpicto=0, $option='',$max=0, $short=0, $moretitle='', $notooltip=0, $save_lastsearch_value=-1)
{
global $langs, $conf;
@@ -1858,6 +1859,14 @@ class FactureFournisseur extends CommonInvoice
if ($short) return $url;
+ if ($option !== 'nolink')
+ {
+ // Add param to save lastsearch_values or not
+ $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
+ }
+
$picto='bill';
if ($this->type == self::TYPE_REPLACEMENT) $picto.='r'; // Replacement invoice
if ($this->type == self::TYPE_CREDIT_NOTE) $picto.='a'; // Credit note
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 0e23b62fbb0..ecae12d260f 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -560,7 +560,7 @@ if (empty($reshook))
$res = $line->fetch($lineid);
if (!$res) dol_print_error($db);
}
-
+
$productsupplier = new ProductFournisseur($db);
if ($productsupplier->get_buyprice(0, price2num($_POST['qty']), $line->fk_product, 'none', GETPOST('socid','int')) < 0 )
{
@@ -683,7 +683,7 @@ if (empty($reshook))
dol_print_error($db,$object->error);
exit;
}
-
+
}
// Remove a product line
@@ -1792,7 +1792,7 @@ elseif (! empty($object->id))
// Supplier order card
- $linkback = ' '.$langs->trans("BackToList").'';
+ $linkback = ' '.$langs->trans("BackToList").'';
$morehtmlref=' ';
// Ref supplier
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 820768ac7bd..a8c6c502f0c 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2028,7 +2028,7 @@ else
// Supplier invoice card
- $linkback = ' '.$langs->trans("BackToList").'';
+ $linkback = ' '.$langs->trans("BackToList").'';
$morehtmlref=' ';
// Ref supplier
diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php
index 0f56c5f7bae..ffc58195e26 100644
--- a/htdocs/fourn/facture/contact.php
+++ b/htdocs/fourn/facture/contact.php
@@ -135,12 +135,12 @@ if ($id > 0 || ! empty($ref))
$object->fetch_thirdparty();
$alreadypaid=$object->getSommePaiement();
-
+
$head = facturefourn_prepare_head($object);
dol_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill');
- $linkback = ' ' . $langs->trans("BackToList") . '';
+ $linkback = ' ' . $langs->trans("BackToList") . '';
$morehtmlref=' ';
// Ref supplier
@@ -186,7 +186,7 @@ if ($id > 0 || ! empty($ref))
$object->totalpaye = $alreadypaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
-
+
print ' ';
print ' ';
diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php
index 6926770bd91..77c0559aeca 100644
--- a/htdocs/fourn/facture/document.php
+++ b/htdocs/fourn/facture/document.php
@@ -90,10 +90,10 @@ if ($object->id > 0)
{
$head = facturefourn_prepare_head($object);
dol_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'bill');
-
+
$totalpaye = $object->getSommePaiement();
- $linkback = ' ' . $langs->trans("BackToList") . '';
+ $linkback = ' ' . $langs->trans("BackToList") . '';
$morehtmlref=' ';
// Ref supplier
@@ -231,7 +231,7 @@ if ($object->id > 0)
print ' ';
print ' ';
-
+
print ' ';
// Nb of files
@@ -241,9 +241,9 @@ if ($object->id > 0)
print ' ';
print ' ';
-
+
dol_fiche_end();
-
+
$modulepart = 'facture_fournisseur';
$permission = $user->rights->fournisseur->facture->creer;
diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php
index 73d6b94a0d6..ffda7e2f4cd 100644
--- a/htdocs/fourn/facture/info.php
+++ b/htdocs/fourn/facture/info.php
@@ -63,7 +63,7 @@ $head = facturefourn_prepare_head($object);
$titre=$langs->trans('SupplierInvoice');
dol_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill');
-$linkback = ' ' . $langs->trans("BackToList") . '';
+$linkback = ' ' . $langs->trans("BackToList") . '';
$morehtmlref=' ';
// Ref supplier
diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php
index 9df425040e1..6afe9f37c8c 100644
--- a/htdocs/fourn/facture/note.php
+++ b/htdocs/fourn/facture/note.php
@@ -76,14 +76,14 @@ if ($object->id > 0)
$object->fetch_thirdparty();
$alreadypaid=$object->getSommePaiement();
-
+
$head = facturefourn_prepare_head($object);
$titre=$langs->trans('SupplierInvoice');
dol_fiche_head($head, 'note', $titre, -1, 'bill');
// Supplier invoice card
- $linkback = ' '.$langs->trans("BackToList").'';
+ $linkback = ' '.$langs->trans("BackToList").'';
$morehtmlref=' ';
// Ref supplier
@@ -128,7 +128,7 @@ if ($object->id > 0)
$object->totalpaye = $alreadypaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
- dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print ' ';
print ' ';
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index a997b5f4b96..af192c63d1c 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1327,7 +1327,7 @@ if ($action == 'create')
// Supplier proposal card
- $linkback = ' ' . $langs->trans("BackToList") . '';
+ $linkback = ' ' . $langs->trans("BackToList") . '';
$morehtmlref=' ';
diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index 53c2d4215df..8cad07a231e 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -2364,13 +2364,14 @@ class SupplierProposal extends CommonObject
/**
* Return clicable link of object (with eventually picto)
*
- * @param int $withpicto Add picto into link
- * @param string $option Where point the link ('compta', 'expedition', 'document', ...)
- * @param string $get_params Parametres added to url
- * @param int $notooltip 1=Disable tooltip
- * @return string String with URL
+ * @param int $withpicto Add picto into link
+ * @param string $option Where point the link ('compta', 'expedition', 'document', ...)
+ * @param string $get_params Parametres added to url
+ * @param int $notooltip 1=Disable tooltip
+ * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
+ * @return string String with URL
*/
- function getNomUrl($withpicto=0,$option='', $get_params='', $notooltip=0)
+ function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1)
{
global $langs, $conf, $user;
@@ -2397,6 +2398,14 @@ class SupplierProposal extends CommonObject
$url = DOL_URL_ROOT.'/supplier_proposal/document.php?id='.$this->id. $get_params;
}
+ if ($option !== 'nolink')
+ {
+ // Add param to save lastsearch_values or not
+ $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
+ }
+
$linkclose='';
if (empty($notooltip) && $user->rights->propal->lire)
{
diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php
index 4985fd34629..9bb7db0222b 100644
--- a/htdocs/supplier_proposal/document.php
+++ b/htdocs/supplier_proposal/document.php
@@ -94,7 +94,7 @@ if ($object->id > 0)
// Supplier proposal card
- $linkback = ' ' . $langs->trans("BackToList") . '';
+ $linkback = ' ' . $langs->trans("BackToList") . '';
$morehtmlref=' ';
diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php
index 8cee304e3bb..9f134b332ae 100644
--- a/htdocs/supplier_proposal/info.php
+++ b/htdocs/supplier_proposal/info.php
@@ -58,7 +58,7 @@ $head = supplier_proposal_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans('CommRequest'), -1, 'supplier_proposal');
// Supplier proposal card
-$linkback = ' ' . $langs->trans("BackToList") . '';
+$linkback = ' ' . $langs->trans("BackToList") . '';
$morehtmlref=' ';
diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php
index 10a9668382c..997cb67db2f 100644
--- a/htdocs/supplier_proposal/note.php
+++ b/htdocs/supplier_proposal/note.php
@@ -71,7 +71,7 @@ if ($id > 0 || ! empty($ref))
if ($object->fetch($id, $ref))
{
$object->fetch_thirdparty();
-
+
$societe = new Societe($db);
if ( $societe->fetch($object->socid) )
{
@@ -80,9 +80,9 @@ if ($id > 0 || ! empty($ref))
// Supplier proposal card
- $linkback = ' ' . $langs->trans("BackToList") . '';
-
-
+ $linkback = ' ' . $langs->trans("BackToList") . '';
+
+
$morehtmlref=' ';
// Ref supplier
//$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
@@ -123,17 +123,17 @@ if ($id > 0 || ! empty($ref))
}
}
$morehtmlref.=' ';
-
-
+
+
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
-
-
+
+
print ' ';
print ' ';
-
+
$cssclass="titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
-
+
print ' ';
dol_fiche_end();
| |