From 75dbcf4a78048a067cfeb4e16fcdce4f1dfb46a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Dec 2014 04:35:48 +0100 Subject: [PATCH 1/5] Fixed: doxygen --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b97103458c3..2cb3e634841 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2848,10 +2848,10 @@ class Societe extends CommonObject } /** - * Check if thirdparty may using localtax or not + * Check if we must use localtax feature or not according to country (country of $mysocin most cases). * * @param int $localTaxNum To get info for only localtax1 or localtax2 - * @return array array(0=>boolean, 1=>boolean) + * @return boolean true or false */ function useLocalTax($localTaxNum=0) { @@ -2873,9 +2873,9 @@ class Societe extends CommonObject } /** - * Check if thirdparty is from a country using revenue stamps + * Check if we must use revenue stamps feature or not according to country (country of $mysocin most cases). * - * @return boolean Yes or no + * @return boolean true or false */ function useRevenueStamp() { From d40229e9cc87e706e533b07de90ce0f7ee9a29ec Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 26 Dec 2014 09:14:19 +0100 Subject: [PATCH 2/5] Fix: Bad order field value --- htdocs/product/stats/facture.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index dc65764defd..001b528d431 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,7 +154,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; From bdf5f5726f7af2f85a14eff9a64f417bf11ca95f Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 26 Dec 2014 09:29:27 +0100 Subject: [PATCH 3/5] Fix: Bad order field value --- htdocs/product/stats/facture.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 39768262f10..49e5651b065 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -155,7 +156,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; From 9f6f90275a651b3893693483b0f6f7b1a0ac0da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 26 Dec 2014 12:03:29 +0100 Subject: [PATCH 4/5] Fix [ bug #1714 ] Id "sall" is used twice in different HTML tags --- htdocs/core/search_page.php | 4 ++-- htdocs/main.inc.php | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 9f1734b2326..49fefc3ebed 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -85,7 +85,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', '', 'sall'.rand(0,10)); $nbofsearch++; } @@ -100,7 +100,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) { $langs->load("members"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'sall'.rand(0,10)); $nbofsearch++; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 15f2281cc1f..ae9f347f4e8 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -9,6 +9,7 @@ * Copyright (C) 2008 Matteli * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2014 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1556,7 +1557,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'sall'.rand(0, 10)); } if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled) @@ -1569,7 +1570,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) { $langs->load("members"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M', 'sall'.rand(0, 10)); } // Execute hook printSearchForm @@ -1806,12 +1807,17 @@ function getHelpParamFor($helppagename,$langs) * @param string $htmlmodesearch Value to set into parameter "mode_search" ('soc','contact','products','member',...) * @param string $htmlinputname Field Name input form * @param string $accesskey Accesskey + * @param string $htmlinputid Input ID * @return string */ -function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinputname,$accesskey='') +function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinputname,$accesskey='', $htmlinputid = '') { global $conf,$langs; + if (!$htmlinputid) { + $htmlinputid = $htmlinputname; + } + $ret=''; $ret.='
'; $ret.='