From 9ff424e23b63ef50ce3b52e67b33154dbe423aed Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 20 Feb 2020 11:45:46 +0100 Subject: [PATCH 1/3] FIX: Visualization rights correction on last modified contacts box --- htdocs/core/boxes/box_contacts.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 2d9d7e9461b..ebe7f8f9be0 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2018 Josep LluĂ­s Amador + * Copyright (C) 2020 Ferran Marcet * * 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 @@ -90,7 +91,7 @@ class box_contacts extends ModeleBoxes $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE sp.entity IN (".getEntity('socpeople').")"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($user->societe_id) $sql.= " AND sp.fk_soc = ".$user->societe_id; $sql.= " ORDER BY sp.tms DESC"; $sql.= $db->plimit($max, 0); From 559fc9f61ee0f471c1314c3261cd82c9eb05aab8 Mon Sep 17 00:00:00 2001 From: gmilad <61253440+gmilad@users.noreply.github.com> Date: Sat, 22 Feb 2020 13:07:25 +0100 Subject: [PATCH 2/3] Update note.php Fix : #13168 --- htdocs/adherents/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index c12c45de8b7..6d50ab58f88 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -75,7 +75,7 @@ if ($id) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'rowid', $linkback); + dol_banner_tab($object, 'id', $linkback); print '
'; From 0ab16ed5ae22727622035eba824e11c38d76eb7c Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 23 Feb 2020 16:50:24 +0100 Subject: [PATCH 3/3] Fix #10179 discount split --- htdocs/comm/remx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index aa9307df8d2..4e8da77c5c0 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -121,7 +121,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') $newdiscount2->datec=$discount->datec; $newdiscount1->tva_tx=$discount->tva_tx; $newdiscount2->tva_tx=$discount->tva_tx; - $newdiscount1->amount_ttc=$_POST["amount_ttc_1"]; + $newdiscount1->amount_ttc=$amount_ttc_1; $newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc); $newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT'); $newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');