From 487b5b25dbf9457228e1ad55c737de9dd927714f Mon Sep 17 00:00:00 2001 From: altatof Date: Fri, 13 Jan 2017 15:37:33 +0100 Subject: [PATCH 1/7] FIX: extrafield input for varchar was not working with special char within (ie double quotes) --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 496a8f2e251..63621d56a82 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -763,7 +763,7 @@ class ExtraFields } elseif ($type == 'phone') { - $out=''; + $out=''; } elseif ($type == 'price') { From 55c0a99bce46ae767e86069cc7823b307f0f1654 Mon Sep 17 00:00:00 2001 From: altatof Date: Fri, 13 Jan 2017 15:42:07 +0100 Subject: [PATCH 2/7] fix was not at the right place --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 63621d56a82..cc6b61b236e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -739,7 +739,7 @@ class ExtraFields } elseif ($type == 'varchar') { - $out=''; + $out=''; } elseif ($type == 'text') { @@ -763,7 +763,7 @@ class ExtraFields } elseif ($type == 'phone') { - $out=''; + $out=''; } elseif ($type == 'price') { From 3dd160c6635ebd7eb69bf9defc194eb442229db6 Mon Sep 17 00:00:00 2001 From: altatof Date: Mon, 16 Jan 2017 09:17:37 +0100 Subject: [PATCH 3/7] use dol_escape_htmltag --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index cc6b61b236e..0c9e4f3226e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -739,7 +739,7 @@ class ExtraFields } elseif ($type == 'varchar') { - $out=''; + $out=''; } elseif ($type == 'text') { From 9c60474953b5aa0d393d4d93d1fb3abafcf405d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Jan 2017 11:06:17 +0100 Subject: [PATCH 4/7] FIX #6277 --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 51b6aa48e84..960c0db42c4 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -314,7 +314,7 @@ if ($id > 0 || ! empty($ref)) if ($commande->methode_commande) { - print ''.$langs->trans("Method").''.$commande->methode_commande.''; + print ''.$langs->trans("Method").''.$commande->getInputMethod().''; } } From fdbe4051f135d5cda58314721a1c8d5774f45d99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Jan 2017 12:54:51 +0100 Subject: [PATCH 5/7] FIX #6230 --- htdocs/user/class/user.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index fb27aef9d2e..cd0000c1e60 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1050,7 +1050,8 @@ class User extends CommonObject $this->town = $contact->town; $this->state_id = $contact->state_id; $this->country_id = $contact->country_id; - + $this->employee = 0; + if (empty($login)) $login=strtolower(substr($contact->firstname, 0, 4)) . strtolower(substr($contact->lastname, 0, 4)); $this->login = $login; From d21bb1e6b1ebea6efa3f9460ee908441440b792f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Jan 2017 13:10:54 +0100 Subject: [PATCH 6/7] FIX #6237 --- htdocs/fichinter/card.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 290f650faa1..d81f25b0c71 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -583,7 +583,7 @@ if (empty($reshook)) } } - // Classify Billed + // Classify unbilled else if ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) { $result=$object->setStatut(1); @@ -598,6 +598,21 @@ if (empty($reshook)) } } + // Classify Done + else if ($action == 'classifydone' && $user->rights->ficheinter->creer) + { + $result=$object->setStatut(3); + if ($result > 0) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + /* * Mise a jour d'une ligne d'intervention */ From 2cedcfece2c3a9f41c5385176e6e66d72969dd55 Mon Sep 17 00:00:00 2001 From: arnaud Date: Fri, 20 Jan 2017 12:01:20 +0100 Subject: [PATCH 7/7] FIX bug margin calcul by user with multicompany --- htdocs/margin/agentMargins.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index f9189ed7e97..d023720a875 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -126,6 +126,7 @@ $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE f.fk_soc = s.rowid"; +$sql.= " AND f.entity = ".$conf->entity; $sql.= " AND sc.fk_soc = f.fk_soc"; $sql.= " AND (d.product_type = 0 OR d.product_type = 1)"; if (! empty($conf->global->AGENT_CONTACT_TYPE))