>> ';
$ways = $object->print_all_ways(" >> ", '', 1);
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index b63431780e7..9791cdeb5be 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -189,7 +189,7 @@ print dol_get_fiche_head($head, 'translation', $langs->trans($title), -1, 'categ
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
$linkback = '
';
-$object->next_prev_filter = ' type = '.$object->type;
+$object->next_prev_filter = 'type = '.((int) $object->type);
$object->ref = $object->label;
$morehtmlref = '
'.$langs->trans("Root").' >> ';
$ways = $object->print_all_ways(" >> ", '', 1);
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index 2791cf1556a..707c23dfe5e 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -257,7 +257,7 @@ print dol_get_fiche_head($head, 'card', $langs->trans($title), -1, 'category');
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
$linkback = '
'.$langs->trans("BackToList").' ';
-$object->next_prev_filter = ' type = '.$object->type;
+$object->next_prev_filter = 'type = '.((int) $object->type);
$object->ref = $object->label;
$morehtmlref = '
'.$langs->trans("Root").' >> ';
$ways = $object->print_all_ways(" >> ", '', 1);
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 067cbce8efe..8fd0fcf726d 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -713,9 +713,10 @@ if ($object->fetch($id) >= 0) {
print '';
//Statut
- print '
';
- print $formmailing->selectDestinariesStatus($search_dest_status, 'search_dest_status', 1);
+ print ' ';
+ print $formmailing->selectDestinariesStatus($search_dest_status, 'search_dest_status', 1, 'width100 onrightofpage');
print ' ';
+
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
@@ -739,12 +740,12 @@ if ($object->fetch($id) >= 0) {
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "mc.lastname", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "mc.firstname", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre("OtherInformations", $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder);
- print_liste_field_titre("Source", $_SERVER["PHP_SELF"], "", $param, "", 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("Source", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'center ');
// Date last update
- print_liste_field_titre("DateLastModification", $_SERVER["PHP_SELF"], "mc.tms", $param, "", 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("DateLastModification", $_SERVER["PHP_SELF"], "mc.tms", $param, "", '', $sortfield, $sortorder, 'center ');
// Date sending
- print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, '', 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "mc.statut", $param, '', 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, '', '', $sortfield, $sortorder, 'center ');
+ print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "mc.statut", $param, '', '', $sortfield, $sortorder, 'center ');
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
@@ -830,22 +831,22 @@ if ($object->fetch($id) >= 0) {
print dol_print_date(dol_stringtotime($obj->tms), 'dayhour');
print ' ';
- // Status of recipient sending email (Warning != status of emailing)
- if ($obj->statut == $object::STATUS_DRAFT) {
+ // Date sent
+ print '
';
+ if ($obj->statut != $object::STATUS_DRAFT) {
// Date sent
- print ' ';
-
- print '
';
- print $object::libStatutDest($obj->statut, 2, '');
- print ' ';
- } else {
- // Date sent
- print '
'.$obj->date_envoi.' ';
-
- print '
';
- print $object::libStatutDest($obj->statut, 2, $obj->error_text);
- print ' ';
+ print $obj->date_envoi;
}
+ print '';
+
+ // Status of recipient sending email (Warning != status of emailing)
+ print '
';
+ if ($obj->statut == $object::STATUS_DRAFT) {
+ print $object::libStatutDest($obj->statut, 2, '');
+ } else {
+ print $object::libStatutDest($obj->statut, 2, $obj->error_text);
+ }
+ print ' ';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php
index 2a3512a9b70..54d9441a489 100644
--- a/htdocs/comm/mailing/class/mailing.class.php
+++ b/htdocs/comm/mailing/class/mailing.class.php
@@ -223,11 +223,11 @@ class Mailing extends CommonObject
$this->statuts[2] = 'MailingStatusSentPartialy';
$this->statuts[3] = 'MailingStatusSentCompletely';
- $this->statut_dest[-1] = 'MailingStatusError';
$this->statut_dest[0] = 'MailingStatusNotSent';
$this->statut_dest[1] = 'MailingStatusSent';
$this->statut_dest[2] = 'MailingStatusRead';
$this->statut_dest[3] = 'MailingStatusReadAndUnsubscribe'; // Read but ask to not be contacted anymore
+ $this->statut_dest[-1] = 'MailingStatusError';
}
/**
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index c0fd5d133b5..252d10e731f 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -111,8 +111,8 @@ $search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'alpha');
+$search_customer_code = GETPOST("search_customer_code", 'alphanohtml');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
-$search_company_code_client = GETPOST("search_type_thirdparty", 'alpha');
$search_user = GETPOST('search_user', 'int');
$search_sale = GETPOST('search_sale', 'int');
$search_date_startday = GETPOST('search_date_startday', 'int');
@@ -348,6 +348,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
$search_state = "";
$search_country = '';
$search_type_thirdparty = '';
+ $search_customer_code = '';
$search_date_startday = '';
$search_date_startmonth = '';
$search_date_startyear = '';
@@ -697,8 +698,8 @@ if (empty($arrayfields['s.name_alias']['checked']) && $search_company) {
if ($search_parent_name) {
$sql .= natural_search('s2.nom', $search_parent_name);
}
-if ($search_company_code_client) {
- $sql .= natural_search('s.code_client', $search_company_code_client);
+if ($search_customer_code) {
+ $sql .= natural_search('s.code_client', $search_customer_code);
}
if ($search_town) {
$sql .= natural_search('s.town', $search_town);
@@ -1093,6 +1094,9 @@ if ($resql) {
if ($search_type_thirdparty != '') {
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
}
+ if ($search_customer_code) {
+ $param .= '&search_customer_code='.urlencode($search_customer_code);
+ }
if ($search_sale > 0) {
$param .= '&search_sale='.urlencode($search_sale);
}
@@ -1422,7 +1426,7 @@ if ($resql) {
}
// Customer Code
if (!empty($arrayfields['s.code_client']['checked'])) {
- print '
';
+ print '
';
}
// Town
if (!empty($arrayfields['s.town']['checked'])) {
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 348bba8064d..da18035e1ee 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2090,7 +2090,8 @@ abstract class CommonObject
/**
* Load properties id_previous and id_next by comparing $fieldid with $this->ref
*
- * @param string $filter Optional filter. Example: " AND (t.field1 = 'aa' OR t.field2 = 'bb')". Do not allow user input data here.
+ * @param string $filter Optional SQL filter. Example: "(t.field1 = 'aa' OR t.field2 = 'bb')". Do not allow user input data here.
+ * Use SQL and not Universal Search Filter. @TODO Replace this with an USF string after changing all ->next_prev_filter
* @param string $fieldid Name of field to use for the select MAX and MIN
* @param int $nodbprefix Do not include DB prefix to forge table name
* @return int <0 if KO, >0 if OK
@@ -2155,7 +2156,7 @@ abstract class CommonObject
}
if (!empty($filter)) {
if (!preg_match('/^\s*AND/i', $filter)) {
- $sql .= " AND "; // For backward compatibility
+ $sql .= " AND ";
}
$sql .= $filter;
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index ad8b034f9d7..4af7a99bd07 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4622,20 +4622,20 @@ class Form
}
/**
- * Return a HTML select list of shipping mode
+ * Return a HTML select list of shipping mode
*
- * @param string $selected Id shipping mode pre-selected
- * @param string $htmlname Name of select zone
- * @param string $filtre To filter list. This parameter must not come from input of users
- * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
- * @param string $moreattrib To add more attribute on select
- * @param int $noinfoadmin 0=Add admin info, 1=Disable admin info
- * @param string $morecss More CSS
- * @return void
+ * @param string $selected Id shipping mode pre-selected
+ * @param string $htmlname Name of select zone
+ * @param string $filtre To filter list. This parameter must not come from input of users
+ * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
+ * @param string $moreattrib To add more attribute on select
+ * @param int $noinfoadmin 0=Add admin info, 1=Disable admin info
+ * @param string $morecss More CSS
+ * @return void
*/
public function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '', $noinfoadmin = 0, $morecss = '')
{
- global $langs, $conf, $user;
+ global $langs, $user;
$langs->load("admin");
$langs->load("deliveries");
@@ -8241,7 +8241,7 @@ class Form
}
}
$idname = str_replace(array('[', ']'), array('', ''), $htmlname);
- $out .= '
statut_dest;
// Note -1 is used for error, so we use -2 for tempty value
- return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1);
+ return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1, 0, 0, '', $morecss);
}
}
diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php
index f78d4a9ba2f..9c1bf7c2361 100644
--- a/htdocs/eventorganization/conferenceorbooth_card.php
+++ b/htdocs/eventorganization/conferenceorbooth_card.php
@@ -216,7 +216,7 @@ if (!empty($withproject)) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->project->all->lire)) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
- $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php
index 7810114aec1..6ec1927e5a8 100644
--- a/htdocs/eventorganization/conferenceorbooth_contact.php
+++ b/htdocs/eventorganization/conferenceorbooth_contact.php
@@ -194,7 +194,7 @@ if (!empty($withproject)) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->project->all->lire)) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
- $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php
index 0326449b0be..802e6be12d3 100644
--- a/htdocs/eventorganization/conferenceorbooth_document.php
+++ b/htdocs/eventorganization/conferenceorbooth_document.php
@@ -167,7 +167,7 @@ if (!empty($withproject)) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->project->all->lire)) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
- $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 2d88979c907..8fa96f1e9c4 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -329,7 +329,7 @@ if ($projectid > 0) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->project->all->lire)) {
$objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
- $project->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
+ $project->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($project, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index cb31eb4ac62..5084b3bf798 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -242,7 +242,7 @@ if (!empty($withproject)) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
- $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 00fbe27663f..7404550cdba 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -429,7 +429,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
- $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php
index bedc36f3730..bb2c22ab09d 100644
--- a/htdocs/partnership/class/partnership.class.php
+++ b/htdocs/partnership/class/partnership.class.php
@@ -122,7 +122,7 @@ class Partnership extends CommonObject
'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,),
'url_to_check' => array('type'=>'url', 'label'=>'UrlToCheck', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>70, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax150'),
'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>71, 'notnull'=>0, 'visible'=>-4, 'default'=>'0',),
- 'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>72, 'notnull'=>0, 'visible'=>-4,),
+ 'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>72, 'notnull'=>0, 'visible'=>-4, 'csslist'=>'nowraponall'),
'reason_decline_or_cancel' => array('type'=>'text', 'label'=>'ReasonDeclineOrCancel', 'enabled'=>'1', 'position'=>73, 'notnull'=>0, 'visible'=>-2,),
'ip' => array('type'=>'ip', 'label'=>'IPOfApplicant', 'enabled'=>'1', 'position'=>74, 'notnull'=>0, 'visible'=>-2,),
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>2, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '2'=>'Approved', '3'=>'Refused', '9'=>'Terminated'),),
diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php
index bf51b1fe5df..d1fb24eb493 100644
--- a/htdocs/partnership/partnership_card.php
+++ b/htdocs/partnership/partnership_card.php
@@ -444,12 +444,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
*/
$morehtmlref .= ' ';
- if (!isset($npfilter)) {
- $npfilter = "";
- }
- if ($managedfor == 'member') $npfilter .= " AND te.fk_member > 0 "; else $npfilter .= " AND te.fk_soc > 0 ";
- $object->next_prev_filter = $npfilter;
+ if ($managedfor == 'member') {
+ $object->next_prev_filter = "te.fk_member > 0";
+ } else {
+ $object->next_prev_filter = "te.fk_soc > 0";
+ }
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php
index e77aacc195d..ed5d456b3a5 100644
--- a/htdocs/product/agenda.php
+++ b/htdocs/product/agenda.php
@@ -161,7 +161,7 @@ if ($id > 0 || $ref) {
print dol_get_fiche_head($head, 'agenda', $titre, -1, $picto);
$linkback = '
'.$langs->trans("BackToList").' ';
- $object->next_prev_filter = " fk_product_type = ".$object->type;
+ $object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php
index 7e44b0daf2f..a5a8fedc969 100644
--- a/htdocs/product/canvas/product/tpl/card_view.tpl.php
+++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php
@@ -33,7 +33,7 @@ $titre = $langs->trans("CardProduct".$object->type);
print dol_get_fiche_head($head, 'card', $titre, -1, 'product');
$linkback = '
'.$langs->trans("BackToList").' ';
-$object->next_prev_filter = " fk_product_type = ".$object->type;
+$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/canvas/service/tpl/card_view.tpl.php b/htdocs/product/canvas/service/tpl/card_view.tpl.php
index 3236e7e7074..1bea6ffe23c 100644
--- a/htdocs/product/canvas/service/tpl/card_view.tpl.php
+++ b/htdocs/product/canvas/service/tpl/card_view.tpl.php
@@ -33,7 +33,7 @@ $titre = $langs->trans("CardProduct".$object->type);
print dol_get_fiche_head($head, 'card', $titre, -1, 'service');
$linkback = '
'.$langs->trans("BackToList").' ';
-$object->next_prev_filter = " fk_product_type = ".$object->type;
+$object->next_prev_filter = " fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index a10e9d1bb75..093814c3e08 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2353,7 +2353,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print dol_get_fiche_head($head, 'card', $titre, -1, $picto);
$linkback = '
'.$langs->trans("BackToList").' ';
- $object->next_prev_filter = " fk_product_type = ".$object->type;
+ $object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index 9b6876150d2..f7753432043 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -240,7 +240,7 @@ if ($object->id) {
$linkback = '
'.$langs->trans("BackToList").' ';
- $object->next_prev_filter = " fk_product_type = ".$object->type;
+ $object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 122b28406a1..b36c134d20b 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -391,7 +391,7 @@ if ($id > 0 || $ref) {
print dol_get_fiche_head($head, 'suppliers', $titre, -1, $picto);
$linkback = '
'.$langs->trans("BackToList").' ';
- $object->next_prev_filter = " fk_product_type = ".$object->type;
+ $object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/note.php b/htdocs/product/note.php
index 54c214224d5..f8dab5e6bf3 100644
--- a/htdocs/product/note.php
+++ b/htdocs/product/note.php
@@ -123,7 +123,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_head($head, 'note', $titre, -1, $picto);
$linkback = '
'.$langs->trans("BackToList").' ';
- $object->next_prev_filter = " fk_product_type = ".$object->type;
+ $object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 1bb825b2d04..713c68c6974 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -873,7 +873,7 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
print dol_get_fiche_head($head, 'price', $titre, -1, $picto);
$linkback = '
'.$langs->trans("BackToList").' ';
-$object->next_prev_filter = " fk_product_type = ".$object->type;
+$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/projet/agenda.php b/htdocs/projet/agenda.php
index 84a204a2e6a..4b8b2640afe 100644
--- a/htdocs/projet/agenda.php
+++ b/htdocs/projet/agenda.php
@@ -147,7 +147,7 @@ $morehtmlref .= '
';
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
- $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ $object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index dc26ca4ca76..801129da8e6 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -1251,7 +1251,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
// Define a complementary filter for search of next/prev ref.
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
- $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
+ $object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php
index 8991d2dcc26..a27bb8db561 100644
--- a/htdocs/projet/comment.php
+++ b/htdocs/projet/comment.php
@@ -118,7 +118,7 @@ $morehtmlref .= '