From 2f1ac6fad87b6c1dc47f8aba3136772ae976a59c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 13 May 2018 20:35:07 +0200 Subject: [PATCH 1/4] Fix : Double WHERE on admin/journal_list.php --- htdocs/accountancy/admin/journals_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 37c166dabe9..d65f7eeba7d 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -86,7 +86,7 @@ $tablib[35]= "DictionaryAccountancyJournal"; // Requests to extract data $tabsql=array(); -$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a WHERE a.entity=".$conf->entity; +$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a"; // Criteria to sort dictionaries $tabsqlsort=array(); From ca09fddfb32aa5e583b33277ad4acd7462119cd0 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Mon, 14 May 2018 15:16:07 +0200 Subject: [PATCH 2/4] FIX : Select user on add time spent form --- htdocs/projet/tasks/time.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 79ff8f9d9b0..2da534e53a0 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -568,7 +568,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $contactsoftask=$object->getListContactId('internal'); if (count($contactsoftask)>0) { - $userid=$contactsoftask[0]; + if(in_array($user->id, $contactsoftask)) $userid = $user->id; + else $userid=$contactsoftask[0]; print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200'); } else From 88bc2dd41629710baa007f6852d2e89d6be3d237 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 14 May 2018 20:59:38 +0200 Subject: [PATCH 3/4] Correct insert --- htdocs/accountancy/admin/journals_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index d65f7eeba7d..971fdc20811 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -102,7 +102,7 @@ $tabfieldvalue[35]= "code,label,nature"; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert=array(); -$tabfieldinsert[35]= "code,label,nature,entity"; +$tabfieldinsert[35]= "code,label,nature"; // Nom du rowid si le champ n'est pas de type autoincrement // Example: "" if id field is "rowid" and has autoincrement on From 5c727c077b34a335f0a4916c18440b3db1464b9c Mon Sep 17 00:00:00 2001 From: alexis Algoud Date: Wed, 16 May 2018 16:34:19 +0200 Subject: [PATCH 4/4] fix task contact card without withproject parameters --- htdocs/projet/tasks/contact.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index a2db82fc0ed..fad5466cb7f 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -303,6 +303,7 @@ if ($id > 0 || ! empty($ref)) // Project if (empty($withproject)) { + $result=$projectstatic->fetch($object->fk_project); $morehtmlref.='
'; $morehtmlref.=$langs->trans("Project").': '; $morehtmlref.=$projectstatic->getNomUrl(1); @@ -310,7 +311,11 @@ if ($id > 0 || ! empty($ref)) // Third party $morehtmlref.=$langs->trans("ThirdParty").': '; - $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); + if($projectstatic->socid>0) { + $projectstatic->fetch_thirdparty(); + $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); + } + $morehtmlref.='
'; }