diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
index d32f45c6161..562ede506f4 100755
--- a/dev/translation/sanity_check_en_langfiles.php
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -331,7 +331,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
}
//$search = '\'trans("'.$value.'")\'';
- $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\'';
+ $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')"';
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
//print $string."
\n";
exec($string,$output);
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index a17614238be..873d71de81b 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -312,8 +312,11 @@ if ($result)
}
else if ($links[$key]['type']=='company') {
print '';
- print img_object($langs->trans('ShowCompany'),'company').' ';
- print $links[$key]['label'];
+ //print img_object($langs->trans('ShowCompany'),'company').' ';
+ $societe=new Societe($db);
+ $societe->fetch($links[$key]['url_id']);
+ //print $links[$key]['label'];
+ print $societe->getNomUrl(1);
print '';
}
else if ($links[$key]['type']=='sc') {
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index 9b1b0c8328f..8860fa7c4ab 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -53,20 +53,6 @@ $search_dt_end = dol_mktime(0, 0, 0, GETPOST('search_end_dtmonth', 'int'), GETPO
$search_thirdparty=GETPOST("thirdparty",'alpha');
$search_req_nb=GETPOST("req_nb",'alpha');
-$param='';
-if (!empty($description)) $param.='&description='.$description;
-if (!empty($type)) $param.='&type='.$type;
-if (!empty($debit)) $param.='&debit='.$debit;
-if (!empty($credit)) $param.='&credit='.$credit;
-if (!empty($account)) $param.='&account='.$account;
-if (!empty($bid)) $param.='&bid='.$bid;
-if (dol_strlen($search_dt_start) > 0)
- $param .= '&search_start_dtmonth=' . GETPOST('search_start_dtmonth', 'int') . '&search_start_dtday=' . GETPOST('search_start_dtday', 'int') . '&search_start_dtyear=' . GETPOST('search_start_dtyear', 'int');
-if (dol_strlen($search_dt_end) > 0)
- $param .= '&search_end_dtmonth=' . GETPOST('search_end_dtmonth', 'int') . '&search_end_dtday=' . GETPOST('search_end_dtday', 'int') . '&search_end_dtyear=' . GETPOST('search_end_dtyear', 'int');
-if (GETPOST("req_nb")) $param.='&req_nb='.urlencode(GETPOST("req_nb"));
-if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
-
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@@ -78,6 +64,27 @@ $pagenext = $page + 1;
if (! $sortorder) $sortorder='DESC';
if (! $sortfield) $sortfield='b.dateo';
+$param='';
+if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+if (!empty($description)) $param.='&description='.$description;
+if (!empty($type)) $param.='&type='.$type;
+if (!empty($debit)) $param.='&debit='.$debit;
+if (!empty($credit)) $param.='&credit='.$credit;
+if (!empty($account)) $param.='&account='.$account;
+if (!empty($bid)) $param.='&bid='.$bid;
+if (dol_strlen($search_dt_start) > 0)
+ $param .= '&search_start_dtmonth=' . GETPOST('search_start_dtmonth', 'int') . '&search_start_dtday=' . GETPOST('search_start_dtday', 'int') . '&search_start_dtyear=' . GETPOST('search_start_dtyear', 'int');
+if (dol_strlen($search_dt_end) > 0)
+ $param .= '&search_end_dtmonth=' . GETPOST('search_end_dtmonth', 'int') . '&search_end_dtday=' . GETPOST('search_end_dtday', 'int') . '&search_end_dtyear=' . GETPOST('search_end_dtyear', 'int');
+if (GETPOST("req_nb")) $param.='&req_nb='.urlencode(GETPOST("req_nb"));
+if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
+
+
+/*
+ * Actions
+ */
+
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$description="";
@@ -88,8 +95,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$bid="";
$search_req_nb='';
$search_thirdparty='';
+ $thirdparty='';
}
+
/*
* View
*/
@@ -108,7 +117,8 @@ else $viewline = 50;
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq,";
$sql.= " b.fk_account, b.fk_type,";
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
-$sql.= " bu.label as labelurl, bu.url_id";
+$sql.= " bu.url_id,";
+$sql.= " s.nom, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
$sql.= " FROM ";
if ($bid) $sql.= MAIN_DB_PREFIX."bank_class as l,";
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba,";
@@ -155,7 +165,6 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
}
$sql.= $db->plimit($limit+1,$offset);
-//print $sql;
dol_syslog('compta/bank/search.php::', LOG_DEBUG);
$resql = $db->query($sql);
@@ -193,7 +202,7 @@ if ($resql)
$moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('DateStart') . ' ';
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
$moreforfilter .= ' - ';
- $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
+ $moreforfilter .= $langs->trans('DateEnd') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
$moreforfilter .= '';
if ($moreforfilter)
@@ -209,9 +218,9 @@ if ($resql)
print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Value'),$_SERVER['PHP_SELF'],'b.datev','',$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),$_SERVER['PHP_SELF'],'','',$param,'align="center"',$sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Numero"));
- print_liste_field_titre($langs->trans("Description"));
- print_liste_field_titre($langs->trans("ThirdParty"));
+ print_liste_field_titre($langs->trans("Numero"),$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Description"),$_SERVER['PHP_SELF'],'','',$param,'',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],'bu.label','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
@@ -225,7 +234,8 @@ if ($resql)
print '