diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 7ef28b3ee76..1211c334617 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -771,7 +771,7 @@ class ExtraFields } elseif ($type == 'varchar') { - $out=''; + $out=''; } elseif (in_array($type, array('mail', 'phone', 'url'))) { diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 9b0bb737128..827fd5c5e4a 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -595,7 +595,7 @@ if (empty($reshook)) } } - // Classify Billed + // Classify unbilled else if ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) { $result=$object->setStatut(1); @@ -610,19 +610,19 @@ if (empty($reshook)) } } - // Classify Billed + // 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'); - } + $result=$object->setStatut(3); + if ($result > 0) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } } /* diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index d8d60e96272..44dfb07f255 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -368,7 +368,7 @@ if ($id > 0 || ! empty($ref)) { print ""; if ($object->methode_commande) { - print '' . $langs->trans("Method") . '' . $object->methode_commande . ''; + print '' . $langs->trans("Method") . '' . $commande->getInputMethod() . ''; } } diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index a0ca6fc2206..23e49db7511 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -129,6 +129,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)) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ee76525a6ae..c215f5f29cc 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1061,7 +1061,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;