From 7d8cf99d58a61603ae52cc4cf429b505ba9e79d8 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 19 Nov 2014 18:19:27 +0100 Subject: [PATCH 01/95] FIX: bad margin and buy_price calculation when total_ht = 0 (discount 100%) on a line --- htdocs/margin/agentMargins.php | 4 ++-- htdocs/margin/customerMargins.php | 4 ++-- htdocs/margin/productMargins.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 51166bc472b..40a617daecd 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -109,8 +109,8 @@ $sql = "SELECT"; if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,"; $sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE); diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 6675753d4d6..77a50189b1b 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -164,8 +164,8 @@ $sql = "SELECT"; $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,"; if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index a394b42686e..b8d5f7f66ba 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -167,8 +167,8 @@ $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,"; if ($id > 0) $sql.= " d.fk_product,"; if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."product as p"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; From 891f8d9442d5532dba9a3440c8028caf31ff02c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 22 Nov 2014 19:02:15 +0100 Subject: [PATCH 02/95] Fix bug 1692 Can't update phone_pro with the contact webservice --- htdocs/webservices/server_contact.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index 126e4202018..1d7336e1482 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -655,6 +655,7 @@ function updateContact($authentication,$contact) $object->province_id=$contact['province_id']; + $object->phone_pro=$contact['phone_pro']; $object->phone_perso=$contact['phone_perso']; $object->phone_mobile=$contact['phone_mobile']; $object->fax=$contact['fax']; From b2a1408d8eb4d1c50f984b6e2cd816fabecae5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 00:51:13 +0100 Subject: [PATCH 03/95] Fix 1667 Pagination is only partially shown in supplier references list --- htdocs/fourn/product/list.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index a7ab0d0576f..afaf4c8e796 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -118,6 +118,13 @@ if ($fourn_id > 0) { $sql .= " AND ppf.fk_soc = ".$fourn_id; } +// Count total nb of records without orderby and limit +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit($limit + 1, $offset); @@ -143,7 +150,7 @@ if ($resql) $param="&tobuy=".$tobuy."&sref=".$sref."&snom=".$snom."&fourn_id=".$fourn_id.(isset($type)?"&type=".$type:"").(empty($sRefSupplier)?"":"&srefsupplier=".$sRefSupplier); - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); if (isset($catid)) From ffd435d9fff997dbc1f2959c16dc0597809f0300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 01:20:02 +0100 Subject: [PATCH 04/95] Fix 1662 Search filter display discrepancy --- htdocs/product/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index f242121625f..907181634ee 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -129,6 +129,8 @@ else { $texte = $langs->trans("ProductsAndServices"); } + // Add what we are searching for + if (! empty($sall)) $texte.= " - ".$sall; $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,'; $sql.= ' p.fk_product_type, p.tms as datem,'; From d9fdf8239112891666f65b59e94959c44d1ce502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 01:21:51 +0100 Subject: [PATCH 05/95] (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b152a38db02..2c30f4128c6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -70,7 +70,7 @@ $limit = $conf->liste_limit; $viewstatut=GETPOST('viewstatut'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 54541f9f14cb27e7e06333bb4c9dbf45013104c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:29:04 +0100 Subject: [PATCH 06/95] Update /cron/list.php --- htdocs/cron/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 79e5ae5b1a4..3c2844f3fe4 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -64,7 +64,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Do we click on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_label=''; $status=-1; From a10209ae9ffa7c1ba51888c967c019558bc0a1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:30:32 +0100 Subject: [PATCH 07/95] Update /holiday/index.php --- htdocs/holiday/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index e988e640711..86c4eca49eb 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -64,7 +64,7 @@ $search_employe = GETPOST('search_employe'); $search_valideur = GETPOST('search_valideur'); $search_statut = GETPOST('select_statut'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $month_create=""; From 46aea31e6c3401c4c90c26cacc6836f5bd547e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:31:20 +0100 Subject: [PATCH 08/95] Update /comm/list.php --- htdocs/comm/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ce7eb82f9a1..b35e4fab7cc 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -75,7 +75,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $a if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_sale=""; $search_categ=""; From b43f8eede36fcdc4eb7c422970b3634b2c423d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:32:46 +0100 Subject: [PATCH 09/95] Update /fichinter/list.php --- htdocs/fichinter/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index a6d3f9720ec..9030cd9c4ac 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -62,7 +62,7 @@ $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); $sall=GETPOST('sall'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From 91aca474ddd4d536f11ee31fe4080cfe9c1abcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:33:32 +0100 Subject: [PATCH 10/95] Update /expedition/list.php --- htdocs/expedition/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index af1d244e0d0..0722dedddf4 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -52,7 +52,7 @@ if (! $sortorder) $sortorder="DESC"; $limit = $conf->liste_limit; // Purge search criteria -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref_exp=''; $search_ref_liv=''; From 6f3ce0a63b3ae6ce115d1e61a8d3b8d82eb2a387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:20 +0100 Subject: [PATCH 11/95] Update /contrat/services.php --- htdocs/contrat/services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index b0fb4ed5edb..22ae64ef9cd 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -69,7 +69,7 @@ $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); $companystatic=new Societe($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From 7442b1a6b123190555cd75a3713e328247018d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:56 +0100 Subject: [PATCH 12/95] Update /contrat/list.php --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index b1b28192395..debe18e995e 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -58,7 +58,7 @@ $result = restrictedArea($user, 'contrat', $id); $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From 89deffa3a7e2856369a980767f40de0443935f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:36:07 +0100 Subject: [PATCH 13/95] Update /fourn/list.php --- htdocs/fourn/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index 296415c1aee..b0d7caf8695 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -60,7 +60,7 @@ if (! $sortfield) $sortfield="nom"; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('supplierlist')); -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $search_name=""; From 09f1f79f4eaca8423dc1c2cd49a7202f9ee10bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:46:24 +0100 Subject: [PATCH 14/95] Update /adherents/list.php --- htdocs/adherents/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 887bac4e1e7..b70e212d2d2 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -59,7 +59,7 @@ $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search=""; $search_ref=""; From fbee671db1d3dcbea2681e73995eb3934d812de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:47:19 +0100 Subject: [PATCH 15/95] Update /societe/consumption.php --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index f89212e5fbc..d5ef1af6dbb 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -58,7 +58,7 @@ $month = GETPOST('month','int'); $year = GETPOST('year','int'); // Clean up on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $sref=''; $sprod_fulldescr=''; From 5b0b222772bfdf038a1669363983133e3493a72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:13 +0100 Subject: [PATCH 16/95] Update /societe/societe.php --- htdocs/societe/societe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index f0b3532018b..2d046a3ec16 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -153,7 +153,7 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_sale=''; From 979eadf42e6d287cb3757369a5357371b4a3e4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:54 +0100 Subject: [PATCH 17/95] Update /compta/dons/list.php --- htdocs/compta/dons/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/dons/list.php b/htdocs/compta/dons/list.php index 174b5357bb2..95011ca0b74 100644 --- a/htdocs/compta/dons/list.php +++ b/htdocs/compta/dons/list.php @@ -50,7 +50,7 @@ $search_amount = GETPOST('search_amount','alpha'); if (!$user->rights->don->lire) accessforbidden(); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From d6e8211018e6b5f5516c3258a270e4c3ba029ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:49:30 +0100 Subject: [PATCH 18/95] Update /compta/deplacement/list.php --- htdocs/compta/deplacement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 42a6713c1ce..e34e7c2b3a6 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -57,7 +57,7 @@ $limit = $conf->liste_limit; $year=GETPOST("year"); $month=GETPOST("month"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_name=""; From 37eef59b5083016af34a708052b55aa302d7663d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:50:19 +0100 Subject: [PATCH 19/95] Update /compta/prelevement/list.php --- htdocs/compta/prelevement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 0a68aa686ae..921736faedf 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -53,7 +53,7 @@ $ligne=new LignePrelevement($db,$user); $offset = $conf->liste_limit * $page ; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_line=""; $search_bon=""; From adf0e8bb54f01fe60af1e457f4bcda5155c3cb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:03 +0100 Subject: [PATCH 20/95] Update /compta/tva/reglement.php --- htdocs/compta/tva/reglement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index ebba3888004..45a69076492 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -66,7 +66,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From fe725f1d8ad3804434f4477e12ba562757229715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:49 +0100 Subject: [PATCH 21/95] Update /compta/sociales/index.php --- htdocs/compta/sociales/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index db4bef2abe6..31e98370003 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -68,7 +68,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From cfe5784d494289b67425f3689067fcb6176b7db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:52:35 +0100 Subject: [PATCH 22/95] Update /compta/bank/search.php --- htdocs/compta/bank/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 1e8196481e6..127e428162c 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -73,7 +73,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='b.dateo'; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $description=""; $type=""; From c9a0208328ff029d8def311815ce99d4fdcc9f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:53:19 +0100 Subject: [PATCH 23/95] Update /compta/paiement/list.php --- htdocs/compta/paiement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 65615b9bbf3..c7fd426babf 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -58,7 +58,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From 865ec76a51c5068313c21f5a10b98db3c31c2e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:54:17 +0100 Subject: [PATCH 24/95] Update /compta/salaries/index.php --- htdocs/compta/salaries/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 17c3efdbfaa..678b3bfaa2e 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -64,7 +64,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From fef3cfbe811b692da10082b2eb501e10c0dfafd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:55:13 +0100 Subject: [PATCH 25/95] Update /compta/facture/list.php --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ba27f5659a9..56bd57c725a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -111,7 +111,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 0ea40c155ebebbeb3460481295a9602a5da1fc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:57:21 +0100 Subject: [PATCH 26/95] Update /compta/facture/impayees.php --- htdocs/compta/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c762aac5702..a010e7d7401 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -374,7 +374,7 @@ $search_montant_ttc = GETPOST("search_montant_ttc"); $late = GETPOST("late"); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refcustomer=''; From 5f1135454754c06278b724ee24359094a5b5bb88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:58:19 +0100 Subject: [PATCH 27/95] Update /accountancy/admin/account.php --- htdocs/accountancy/admin/account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 36739254d06..0c2a825604b 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -88,7 +88,7 @@ if ($action == 'disable') { } } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_account=""; $search_label=""; @@ -220,4 +220,4 @@ if ($result) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From e1addea6dbcdb3fe68d8cc39ee4012cdd76710e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:59:05 +0100 Subject: [PATCH 28/95] Update /accountancy/bookeeping/list.php --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 21da5bacbb9..b2acc60fb6a 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -51,7 +51,7 @@ $offset = $conf->liste_limit * $page; $formventilation = new FormVentilation($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_doc_type=""; $search_doc_ref=""; @@ -231,4 +231,4 @@ else { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 8356c1b5602f05f7d81ab7b84290e84e87e62dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:00:09 +0100 Subject: [PATCH 29/95] Update /comm/actions/listactions.php --- htdocs/comm/action/listactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 53243d0c165..245902013a1 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -100,7 +100,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi } // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $datestart=''; $dateend=''; From c6f71344145e0abebc5c7a9b9edf2d56defb05d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:01:07 +0100 Subject: [PATCH 30/95] Update /comm/prospect/list.php --- htdocs/comm/prospect/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 113618ffae8..3501d94aafd 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -154,7 +154,7 @@ $sts = array(-1,0,1,2,3); $hookmanager->initHooks(array('prospectlist')); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $stcomm=""; From 8bbc2d8db4998a0e9c9df1fd42ea1737daabaf0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:02:16 +0100 Subject: [PATCH 31/95] Update /product/stock/mouvement.php --- htdocs/product/stock/mouvement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 06e089c5209..83d856ed0cc 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -60,7 +60,7 @@ $offset = $conf->liste_limit * $page; if (! $sortfield) $sortfield="m.datem"; if (! $sortorder) $sortorder="DESC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $year=''; $month=''; From 018d1488fc353ed253173cd0839eb2c35ba7afb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:03:03 +0100 Subject: [PATCH 32/95] Update /fourn/commande/list.php --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ab0fd08d3f0..6affbae3045 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -58,7 +58,7 @@ if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refsupp=''; From edaf6aec100c72911900d09842aa7a4f02c1f37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:04:43 +0100 Subject: [PATCH 33/95] Update /fourn/facture/paiement.php --- htdocs/fourn/facture/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 57100bd98f0..65428cd138e 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -459,7 +459,7 @@ if (empty($action)) $search_amount=GETPOST('search_amount'); $search_company=GETPOST('search_company'); - if (GETPOST("button_removefilter")) + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From 38febad979a1e0cbc6250583b502152249db034d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:05:40 +0100 Subject: [PATCH 34/95] Update /fourn/facture/impayees.php --- htdocs/fourn/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 2767c792f9e..83d4b830c5f 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -64,7 +64,7 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.date_lim_reglement"; if (! $sortorder) $sortorder="ASC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_ref_supplier=""; From ffb4dd9e3de6abea3892ea95c2c70a4409026a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:06:40 +0100 Subject: [PATCH 35/95] Update /compta/paiement/cheque/list.php --- htdocs/compta/paiement/cheque/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 47a6ee8ba74..fdfe86ec178 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -61,7 +61,7 @@ $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); // If click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_amount=''; From 97a6bd842d567039f7cfed5af4782b7bcbcae581 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 12:39:53 +0100 Subject: [PATCH 36/95] Minor fixes. --- htdocs/core/menus/standard/eldy.lib.php | 14 +++++++------- htdocs/langs/en_US/stocks.lang | 2 +- htdocs/product/class/product.class.php | 4 ++-- htdocs/product/stock/index.php | 1 - htdocs/product/stock/product.php | 8 ++++---- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index db8f216fd60..60f26ded345 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1053,16 +1053,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } - // Stocks + // Warehouse if (! empty($conf->stock->enabled)) { $langs->load("stocks"); - $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); - if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); - if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); + $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); + $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); + $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); + if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); } // Expeditions diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 7a08148c9ce..b03d26dbe1d 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -23,7 +23,7 @@ ErrorWarehouseLabelRequired=Warehouse label is required CorrectStock=Correct stock ListOfWarehouses=List of warehouses ListOfStockMovements=List of stock movements -StocksArea=Stocks area +StocksArea=Warehouses area Location=Location LocationSummary=Short name location NumberOfDifferentProducts=Number of different products diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1bc30b2df5f..e2898943509 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3249,11 +3249,11 @@ class Product extends CommonObject $alt.=' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; if ($photo_vignette && $imgarray['height'] > $maxHeight) { $return.= ''; - $return.= ''; + $return.= 'dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">'; } else { $return.= ''; - $return.= ''; + $return.= 'dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">'; } $return.= ''."\n"; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index d2078d473e7..dc394f898dc 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -15,7 +15,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ /** diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 22dc080d6e2..96ecdb1d95d 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -334,15 +334,16 @@ if ($id > 0 || $ref) // Calculating a theorical value print ''.$langs->trans("VirtualStock").''; - print "".$product->stock_theorique; + print "".(empty($product->stock_theorique)?0:$product->stock_theorique); if ($product->stock_theorique < $product->seuil_stock_alerte) { print ' '.img_warning($langs->trans("StockLowerThanLimit")); } print ''; print ''; - + print ''; - $text_stock_options = (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'
':''); + $text_stock_options = ''; + $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER)?$langs->trans("DeStockOnValidateOrder").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_BILL)?$langs->trans("DeStockOnBill").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)?$langs->trans("ReStockOnBill").'
':''); @@ -353,7 +354,6 @@ if ($id > 0 || $ref) print ''; $found=0; - // Number of customer orders running if (! empty($conf->commande->enabled)) { From de48a048446f6e9dc0c7ce6e4a3b7e13c139a4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 12:53:00 +0100 Subject: [PATCH 37/95] Fix: W3C. form into table is forbidden. --- htdocs/comm/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 4129b561ed1..fd25287c029 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -90,15 +90,15 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { $var=false; - print ''; print ''; print ''; + print '
'; print ''; print ''; print ''; print ''; - print "
'.$langs->trans("SearchACustomerOrder").'
'; print ':
:

\n"; + print "
\n"; } // Search contract From 3aef9d928b7213d68c1947caee1c936d5121412e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 13:14:03 +0100 Subject: [PATCH 38/95] Fix: W3C --- htdocs/product/admin/product_tools.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index a4aae519b98..84dacf8db43 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -298,10 +298,9 @@ else */ print ''; - print ''; // Boutons actions - print '
'; + print '
'; print ''; print '
'; From 1c1e2ed246370df5db6d1e6609e55300b229dfaf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 13:19:28 +0100 Subject: [PATCH 39/95] Better comment --- htdocs/public/test/test_forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index cb551e60761..c600e9b0acd 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -18,7 +18,7 @@ llxHeader(); ?>

-This page is a sample of page using html methods. It is designed to make test with
+This page is a sample of page using Dolibarr HTML widget methods. It is designed to make test with
- css (edit page to change to test another css)
- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)

From 6cb3bafd9381966b4b45b3147f11d07044fe1bd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 15:41:13 +0100 Subject: [PATCH 40/95] Debug travis pb --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 57781d47e44..830923fa8f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,6 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ + - ls /var/log/apache2/* - cat index.html From 835b359179b0119fefde05ffe781547002c2ff0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 15:42:29 +0100 Subject: [PATCH 41/95] Fixed [ bug #1658 ] Linked files in supplier invoices wrongly shows amounts --- htdocs/fourn/facture/document.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d47433af4f5..c7219c6e415 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -168,30 +168,6 @@ if ($object->id > 0) print $form->editfieldval("Label",'label',$object->label,$object,0); print ''; - // Status - $alreadypaid=$object->getSommePaiement(); - print ''.$langs->trans('Status').''.$object->getLibStatut(4,$alreadypaid).''; - - // Amount - print ''.$langs->trans('AmountHT').''.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).''; - print ''.$langs->trans('AmountVAT').''.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).''; - - // Amount Local Taxes - //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj=="1") //Localtax1 - { - print ''.$langs->transcountry("AmountLT1",$societe->country_code).''; - print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).''; - print ' '; - } - if ($societe->localtax2_assuj=="1") //Localtax2 - { - print ''.$langs->transcountry("AmountLT2",$societe->country_code).''; - print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).''; - print ''; - } - print ''.$langs->trans('AmountTTC').''.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).''; - print '
'; print ''; From 3f06274d5e09570f9699831be5376edeb3b68907 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 15:54:59 +0100 Subject: [PATCH 42/95] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 830923fa8f1..393db48438b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - ls /var/log/apache2/* + - cat /var/log/apache2/error.log - cat index.html From 7d719743621a3e25acc5c5894591b35f03180c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:14:12 +0100 Subject: [PATCH 43/95] Fixed [ bug #1712 ] Unable to add a social charge --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 72b7c8fe549..05402898ee6 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -192,7 +192,7 @@ $tabfield[3] = "code,libelle,country_id,country"; $tabfield[4] = "code,label"; $tabfield[5] = "code,label"; $tabfield[6] = "code,libelle,type,color,position"; -$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; +$tabfield[7] = "code,libelle,country,accountancy_code,deductible"; $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; From bd765ef3ae5922e35deb0a6b28d0f966de99e391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:17:09 +0100 Subject: [PATCH 44/95] Fixed [ bug #1705 ] Members statistics menu entry strange target --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index db8f216fd60..e637455152e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,7 +1233,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); From 4f83eea3cf9add94885b0ea1069631b8e7da930f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:22:38 +0100 Subject: [PATCH 45/95] Fixed[ bug #1661 ] Bookmarks list "Target" translation missing --- htdocs/bookmarks/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 61dc0a91d7e..a22b24388b1 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; $langs->load("bookmarks"); +$langs->load("admin"); // Security check if (! $user->rights->bookmark->lire) { From a1cc95d35271e8b4040ae5b1f3198ed7048a89a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:26:55 +0100 Subject: [PATCH 46/95] Fixed design of edit page of a bookmark --- htdocs/bookmarks/card.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 640e7e72c57..1d217b64154 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -153,7 +153,7 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); print '
'; @@ -196,8 +196,15 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $bookmark=new Bookmark($db); $bookmark->fetch($id); + $head = array( + array( + '', + $langs->trans('Card'), + 'card' + ) + ); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); if ($action == 'edit') { From d2762f50779c4c9efcedf6687d9580ee107e4709 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:28:25 +0100 Subject: [PATCH 47/95] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 393db48438b..26111b8ae48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - cat /var/log/apache2/error.log + - sudo ls /var/log/apache2/* - cat index.html From be2fe19e03d1309c33cdb590696d0e18ab913dca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:31:37 +0100 Subject: [PATCH 48/95] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 26111b8ae48..94452733a5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - sudo ls /var/log/apache2/* + - sudo ls /var/log/apache/* - cat index.html From 26a652814f6ccdda527bf810dd47dcf7da4910a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:34:56 +0100 Subject: [PATCH 49/95] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 26111b8ae48..f9c1e097af0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - sudo ls /var/log/apache2/* + - sudo cat /etc/apache2/envvars - cat index.html From 89e3e3bee3192425ff218c19230f25b357582903 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:38:59 +0100 Subject: [PATCH 50/95] Debug travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index feb9f034f6e..8140caba269 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,8 +83,8 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - echo ${APACHE_LOG_DIR} - sudo cat /etc/apache2/envvars + - sudo ls /var/log/apache2* - cat index.html From eb569fe23526f7b1e553a136518928c6bd69b0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:14:12 +0100 Subject: [PATCH 51/95] Fixed [ bug #1712 ] Unable to add a social charge --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 72b7c8fe549..05402898ee6 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -192,7 +192,7 @@ $tabfield[3] = "code,libelle,country_id,country"; $tabfield[4] = "code,label"; $tabfield[5] = "code,label"; $tabfield[6] = "code,libelle,type,color,position"; -$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; +$tabfield[7] = "code,libelle,country,accountancy_code,deductible"; $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; From c40be71dcdd817e19619983acf92d6754578bfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:44:49 +0100 Subject: [PATCH 52/95] Fixed design of new bookmark page --- htdocs/bookmarks/card.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 1d217b64154..2c1c61c5981 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -153,8 +153,6 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); - print '
'; print ''; @@ -183,8 +181,6 @@ if ($action == 'create') print ''; print ''; - - dol_fiche_end(); } @@ -220,12 +216,12 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; - print ''; - print ''; From b83e4cffb08e68e9365189bbe376728e553ded3e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:45:33 +0100 Subject: [PATCH 53/95] Debug travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8140caba269..dc2c543b07e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,7 +84,7 @@ before_script: - sudo /etc/init.d/apache2 restart - wget http://localhost/ - sudo cat /etc/apache2/envvars - - sudo ls /var/log/apache2* + - sudo cat /var/log/apache2/error.log - cat index.html From 52eb4943e2492a0a733800e1c557f96b3bf35e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:46:48 +0100 Subject: [PATCH 54/95] Fixed entities problems in error messages when creating a bookmark --- htdocs/bookmarks/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 2c1c61c5981..5e8f770c91c 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -69,12 +69,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (! $title) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); } if (! $url) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); } if (! $error) @@ -95,7 +95,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("WarningBookmarkAlreadyExists"), 'warnings'); + setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings'); } else { From 373bdcf5d7cc1169c1c3039626aa749534c2fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:54:09 +0100 Subject: [PATCH 55/95] Fixed problem when editing a bookmark and failing --- htdocs/bookmarks/card.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5e8f770c91c..9e115a611e6 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -50,6 +50,13 @@ $backtopage=GETPOST('backtopage','alpha'); if ($action == 'add' || $action == 'addproduct' || $action == 'update') { + + if ($action == 'update') { + $invertedaction = 'edit'; + } else { + $invertedaction = 'create'; + } + $error = 0; if (GETPOST("cancel")) @@ -101,12 +108,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') { setEventMessage($bookmark->error, 'errors'); } - $action='create'; + $action = $invertedaction; } } else { - $action='create'; + $action = $invertedaction; } } From 5578bc6f5d1a8c90d2541d5269b6b6555e443f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 15:42:29 +0100 Subject: [PATCH 56/95] Fixed [ bug #1658 ] Linked files in supplier invoices wrongly shows amounts --- htdocs/fourn/facture/document.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d47433af4f5..c7219c6e415 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -168,30 +168,6 @@ if ($object->id > 0) print $form->editfieldval("Label",'label',$object->label,$object,0); print ''; - // Status - $alreadypaid=$object->getSommePaiement(); - print ''; - - // Amount - print ''; - print ''; - - // Amount Local Taxes - //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj=="1") //Localtax1 - { - print ''; - print ''; - print ''; - } - if ($societe->localtax2_assuj=="1") //Localtax2 - { - print ''; - print ''; - print ''; - } - print ''; - print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
'.$langs->trans("Ref").''.$bookmark->ref.'
'.$langs->trans("BookmarkTitle").''; + print '
'.$langs->trans("BookmarkTitle").''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print '
'.$langs->trans("UrlOrLink").''; + print '
'.$langs->trans("UrlOrLink").''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print '
'.$langs->trans('Status').''.$object->getLibStatut(4,$alreadypaid).'
'.$langs->trans('AmountHT').''.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('AmountVAT').''.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'
'.$langs->transcountry("AmountLT1",$societe->country_code).''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' 
'.$langs->transcountry("AmountLT2",$societe->country_code).''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('AmountTTC').''.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'

'; print ''; From a927a04421a68f9e2b31b87a680c6c6ff33a3477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:17:09 +0100 Subject: [PATCH 57/95] Fixed [ bug #1705 ] Members statistics menu entry strange target --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 60f26ded345..781de5f2913 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,7 +1233,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); From 1347a16fd346d1c94a2c44916f35781c074e107b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:22:38 +0100 Subject: [PATCH 58/95] Fixed[ bug #1661 ] Bookmarks list "Target" translation missing --- htdocs/bookmarks/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 61dc0a91d7e..a22b24388b1 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; $langs->load("bookmarks"); +$langs->load("admin"); // Security check if (! $user->rights->bookmark->lire) { From 231ad04fbd5555b42a535934226141e1830359d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:58:46 +0100 Subject: [PATCH 59/95] Highlight of required fields should be only in edit mode --- htdocs/bookmarks/card.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 9e115a611e6..5896f63106a 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur + * 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 @@ -223,12 +224,31 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; - print ''; - print ''; From 652b0f84a7fc74beb7a7efeac55a8b8b8e9db7ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 17:03:22 +0100 Subject: [PATCH 60/95] Fixed: Field is used only by module accounting so must have a condition on it. --- htdocs/compta/bank/card.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 5d3d2a051d6..b1852785466 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -346,8 +346,11 @@ if ($action == 'create') } // Accountancy journal - print ''; - print ''; + if (! empty($conf->accounting->enabled)) + { + print ''; + print ''; + } print '
'.$langs->trans("Ref").''.$bookmark->ref.'
'.$langs->trans("BookmarkTitle").''; + print '
'; + if ($action == 'edit') { + print ''; + } + + print $langs->trans("BookmarkTitle"); + + if ($action == 'edit') { + print ''; + } + + print ''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print '
'.$langs->trans("UrlOrLink").''; + print '
'; + if ($action == 'edit') { + print ''; + } + print $langs->trans("UrlOrLink"); + if ($action == 'edit') { + print ''; + } + print ''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print '
'.$langs->trans("AccountancyJournal").'
'.$langs->trans("AccountancyJournal").'
'; @@ -470,8 +473,11 @@ else print ''.$account->account_number.''; // Accountancy journal - print ''.$langs->trans("AccountancyJournal").''; - print ''.$account->accountancy_journal.''; + if (! empty($conf->accounting->enabled)) + { + print ''.$langs->trans("AccountancyJournal").''; + print ''.$account->accountancy_journal.''; + } print ''; @@ -633,8 +639,11 @@ else } // Accountancy journal - print ''.$langs->trans("AccountancyJournal").''; - print 'accountancy_journal).'">'; + if (! empty($conf->accounting->enabled)) + { + print ''.$langs->trans("AccountancyJournal").''; + print 'accountancy_journal).'">'; + } print ''; From b76a58b898d64f7548de2d8d813298641786112a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:03:25 +0100 Subject: [PATCH 61/95] Fixed typo --- htdocs/bookmarks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index a22b24388b1..748a4d9b7fa 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -59,7 +59,7 @@ if ($_GET["action"] == 'delete') } else { - $setEventMessage($bookmark->error, 'errors'); + setEventMessage($bookmark->error, 'errors'); } } From 496a3fcaaef0f6e4a36bfe8d9aff9fad8b23d24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:06:51 +0100 Subject: [PATCH 62/95] Removed unused action of card.php --- htdocs/bookmarks/card.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5896f63106a..05d6a0b4843 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -118,28 +118,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } } -if ($action == 'delete') -{ - $bookmark=new Bookmark($db); - $bookmark->id=$_GET["bid"]; - $bookmark->url=$user->id; - $bookmark->target=$user->id; - $bookmark->title='xxx'; - $bookmark->favicon='xxx'; - - $res=$bookmark->remove(); - if ($res > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - setEventMessage($bookmark->error, 'errors'); - } -} - - /* * View */ From 912384a9fad737c007dbe449cec47bd85cd64884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:24:37 +0100 Subject: [PATCH 63/95] Fixed [ bug #1679 ] Can't sort groups by user count in user groups list --- htdocs/user/group/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 00af5b0e6d2..1f06fa3a3c2 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -91,7 +91,7 @@ if ($resql) { print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"g.nb",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; $var=True; From d17b5268fa50a874cf3ebf7f463bae2882404fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 01:21:51 +0100 Subject: [PATCH 64/95] (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b152a38db02..2c30f4128c6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -70,7 +70,7 @@ $limit = $conf->liste_limit; $viewstatut=GETPOST('viewstatut'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 28e620a7bf2f8fd1078368d79b5ec523192c1b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:29:04 +0100 Subject: [PATCH 65/95] Update /cron/list.php --- htdocs/cron/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 79e5ae5b1a4..3c2844f3fe4 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -64,7 +64,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Do we click on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_label=''; $status=-1; From baaadd772e668aaae72b0a16753f4d2d183c869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:30:32 +0100 Subject: [PATCH 66/95] Update /holiday/index.php --- htdocs/holiday/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index e988e640711..86c4eca49eb 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -64,7 +64,7 @@ $search_employe = GETPOST('search_employe'); $search_valideur = GETPOST('search_valideur'); $search_statut = GETPOST('select_statut'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $month_create=""; From e6da4a251871801dabc36cb803f441f33e55545c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:31:20 +0100 Subject: [PATCH 67/95] Update /comm/list.php --- htdocs/comm/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ce7eb82f9a1..b35e4fab7cc 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -75,7 +75,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $a if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_sale=""; $search_categ=""; From b396ccaf738dd919ab01a16cf9cf84975091d475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:32:46 +0100 Subject: [PATCH 68/95] Update /fichinter/list.php --- htdocs/fichinter/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index a6d3f9720ec..9030cd9c4ac 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -62,7 +62,7 @@ $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); $sall=GETPOST('sall'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From 84d3bd2b4357a8e98af54577b61170a145158af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:33:32 +0100 Subject: [PATCH 69/95] Update /expedition/list.php --- htdocs/expedition/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index af1d244e0d0..0722dedddf4 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -52,7 +52,7 @@ if (! $sortorder) $sortorder="DESC"; $limit = $conf->liste_limit; // Purge search criteria -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref_exp=''; $search_ref_liv=''; From c97e95f6abe3d2afcc0c2f7b314a2414d6497f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:20 +0100 Subject: [PATCH 70/95] Update /contrat/services.php --- htdocs/contrat/services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index b0fb4ed5edb..22ae64ef9cd 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -69,7 +69,7 @@ $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); $companystatic=new Societe($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From d57344a2e725264a8078dc5d6c1dc237479a616d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:56 +0100 Subject: [PATCH 71/95] Update /contrat/list.php --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index b1b28192395..debe18e995e 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -58,7 +58,7 @@ $result = restrictedArea($user, 'contrat', $id); $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From f6db1d5da2be8cec0ba48800fbf94d68b5ea72af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:36:07 +0100 Subject: [PATCH 72/95] Update /fourn/list.php --- htdocs/fourn/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index 296415c1aee..b0d7caf8695 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -60,7 +60,7 @@ if (! $sortfield) $sortfield="nom"; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('supplierlist')); -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $search_name=""; From e7f9b9bf1b4bd887035a407c0f6bc5e022088da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:46:24 +0100 Subject: [PATCH 73/95] Update /adherents/list.php --- htdocs/adherents/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 887bac4e1e7..b70e212d2d2 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -59,7 +59,7 @@ $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search=""; $search_ref=""; From 62876cc0227157e32b29a613f5a937bc460814c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:47:19 +0100 Subject: [PATCH 74/95] Update /societe/consumption.php --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index f89212e5fbc..d5ef1af6dbb 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -58,7 +58,7 @@ $month = GETPOST('month','int'); $year = GETPOST('year','int'); // Clean up on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $sref=''; $sprod_fulldescr=''; From 64497de4d8aecc7a8464f2433efe1cc7baf01471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:13 +0100 Subject: [PATCH 75/95] Update /societe/societe.php --- htdocs/societe/societe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index f0b3532018b..2d046a3ec16 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -153,7 +153,7 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_sale=''; From 045c2f9568d3f4d5606204163c14c140eb0c9294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:54 +0100 Subject: [PATCH 76/95] Update /compta/dons/list.php --- htdocs/compta/dons/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/dons/list.php b/htdocs/compta/dons/list.php index 174b5357bb2..95011ca0b74 100644 --- a/htdocs/compta/dons/list.php +++ b/htdocs/compta/dons/list.php @@ -50,7 +50,7 @@ $search_amount = GETPOST('search_amount','alpha'); if (!$user->rights->don->lire) accessforbidden(); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From 68ccb33def0b854bfea8e151466bb030b5ed86bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:49:30 +0100 Subject: [PATCH 77/95] Update /compta/deplacement/list.php --- htdocs/compta/deplacement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 42a6713c1ce..e34e7c2b3a6 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -57,7 +57,7 @@ $limit = $conf->liste_limit; $year=GETPOST("year"); $month=GETPOST("month"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_name=""; From 8c839cc2a1390a444fe10cef842d4828b879221b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:50:19 +0100 Subject: [PATCH 78/95] Update /compta/prelevement/list.php --- htdocs/compta/prelevement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 0a68aa686ae..921736faedf 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -53,7 +53,7 @@ $ligne=new LignePrelevement($db,$user); $offset = $conf->liste_limit * $page ; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_line=""; $search_bon=""; From 59494db8c16b9f49d2a384d6ba17f0443ec47593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:03 +0100 Subject: [PATCH 79/95] Update /compta/tva/reglement.php --- htdocs/compta/tva/reglement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index ebba3888004..45a69076492 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -66,7 +66,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From 2a79c2c82604b58d71e88eae0d401457b4c51287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:49 +0100 Subject: [PATCH 80/95] Update /compta/sociales/index.php --- htdocs/compta/sociales/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index db4bef2abe6..31e98370003 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -68,7 +68,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From dd1c39b44e6d46b13b6439b974a76a5f1a75b780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:52:35 +0100 Subject: [PATCH 81/95] Update /compta/bank/search.php --- htdocs/compta/bank/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 1e8196481e6..127e428162c 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -73,7 +73,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='b.dateo'; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $description=""; $type=""; From fa89e310aeca7d0ffe303d470ba0cebe2f3f34df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:53:19 +0100 Subject: [PATCH 82/95] Update /compta/paiement/list.php --- htdocs/compta/paiement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 65615b9bbf3..c7fd426babf 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -58,7 +58,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From 9b731753e75da978a10c6fcbb3669ec02df1e244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:54:17 +0100 Subject: [PATCH 83/95] Update /compta/salaries/index.php --- htdocs/compta/salaries/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 17c3efdbfaa..678b3bfaa2e 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -64,7 +64,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From ccff0f09528dc8c79b6f75372a0ca9d212942737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:55:13 +0100 Subject: [PATCH 84/95] Update /compta/facture/list.php --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ba27f5659a9..56bd57c725a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -111,7 +111,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 339415034e1f84222ca5936a85fa68a3bfd43a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:57:21 +0100 Subject: [PATCH 85/95] Update /compta/facture/impayees.php --- htdocs/compta/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c762aac5702..a010e7d7401 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -374,7 +374,7 @@ $search_montant_ttc = GETPOST("search_montant_ttc"); $late = GETPOST("late"); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refcustomer=''; From b6824877e5ee295285cae8acd027ae6476f95b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:58:19 +0100 Subject: [PATCH 86/95] Update /accountancy/admin/account.php --- htdocs/accountancy/admin/account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 36739254d06..0c2a825604b 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -88,7 +88,7 @@ if ($action == 'disable') { } } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_account=""; $search_label=""; @@ -220,4 +220,4 @@ if ($result) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 199239ac8b8f0f2f7f90e9997aeccb47cea000b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:59:05 +0100 Subject: [PATCH 87/95] Update /accountancy/bookeeping/list.php --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 21da5bacbb9..b2acc60fb6a 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -51,7 +51,7 @@ $offset = $conf->liste_limit * $page; $formventilation = new FormVentilation($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_doc_type=""; $search_doc_ref=""; @@ -231,4 +231,4 @@ else { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 627e3e0a2b7489fb0b01af6e5fedc383d4664b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:00:09 +0100 Subject: [PATCH 88/95] Update /comm/actions/listactions.php --- htdocs/comm/action/listactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 53243d0c165..245902013a1 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -100,7 +100,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi } // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $datestart=''; $dateend=''; From 01e6d9fc1253416fe281a2a38b069a7dfe3c5184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:01:07 +0100 Subject: [PATCH 89/95] Update /comm/prospect/list.php --- htdocs/comm/prospect/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 113618ffae8..3501d94aafd 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -154,7 +154,7 @@ $sts = array(-1,0,1,2,3); $hookmanager->initHooks(array('prospectlist')); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $stcomm=""; From 99e88c16c4c9d207bd11143a67f36aaec15dffcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:02:16 +0100 Subject: [PATCH 90/95] Update /product/stock/mouvement.php --- htdocs/product/stock/mouvement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 06e089c5209..83d856ed0cc 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -60,7 +60,7 @@ $offset = $conf->liste_limit * $page; if (! $sortfield) $sortfield="m.datem"; if (! $sortorder) $sortorder="DESC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $year=''; $month=''; From afc87f54458bb248f50d1ae67a434ce72099b319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:03:03 +0100 Subject: [PATCH 91/95] Update /fourn/commande/list.php --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ab0fd08d3f0..6affbae3045 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -58,7 +58,7 @@ if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refsupp=''; From 0384f90607cfe746bc4a0b2f41e534c7401c58d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:04:43 +0100 Subject: [PATCH 92/95] Update /fourn/facture/paiement.php --- htdocs/fourn/facture/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 57100bd98f0..65428cd138e 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -459,7 +459,7 @@ if (empty($action)) $search_amount=GETPOST('search_amount'); $search_company=GETPOST('search_company'); - if (GETPOST("button_removefilter")) + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From ba7500a5045d759ec7db1f3bbb05a5466a30b99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:05:40 +0100 Subject: [PATCH 93/95] Update /fourn/facture/impayees.php --- htdocs/fourn/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 2767c792f9e..83d4b830c5f 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -64,7 +64,7 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.date_lim_reglement"; if (! $sortorder) $sortorder="ASC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_ref_supplier=""; From 979d6dffa2b8c008556f1e85ce7fc762be615de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:06:40 +0100 Subject: [PATCH 94/95] Update /compta/paiement/cheque/list.php --- htdocs/compta/paiement/cheque/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 47a6ee8ba74..fdfe86ec178 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -61,7 +61,7 @@ $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); // If click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_amount=''; From bbdd25f97cde68b4ad46a2f2f268ddd3eee08f6c Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:37:45 +0100 Subject: [PATCH 95/95] Add function purge criteria in project module --- htdocs/projet/list.php | 14 ++++++++++++-- htdocs/projet/tasks/index.php | 13 ++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index b4260e8ea91..614f91468cc 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -63,6 +63,14 @@ $search_label=GETPOST("search_label"); $search_societe=GETPOST("search_societe"); $search_all=GETPOST("search_all"); +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_ref=""; + $search_label=""; + $search_societe=""; + $search_all=0; +} /* * View @@ -147,8 +155,10 @@ if ($resql) print ''; print ''; print ' '; - print ''; - print "\n"; + print ''; + print ''; + print ''; + print ''; while ($i < $num) { diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index cdf90a918a3..4354fc23b2c 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -51,7 +51,13 @@ $page = $page == -1 ? 0 : $page; $mine = $_REQUEST['mode']=='mine' ? 1 : 0; - +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_project=""; + $search_status=""; +} +if (empty($search_status)) $search_status=1; /* * View @@ -122,9 +128,10 @@ print $form->selectarray('search_status', $listofstatus, $search_status); print ''; print ''; print ' '; +print ''; +print ''; +print ''; print ''; -print ''; -print "\n"; if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) {