From 9a5b46330aef9e6a5ca80230183b2ec0bda91723 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Wed, 15 Jan 2014 14:49:22 +0100 Subject: [PATCH 01/11] Add right to export project in export tool As the right does not exist, the tool could never be exploited --- htdocs/core/modules/modProjet.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index a384a1a9739..fb7fa20533b 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -144,6 +144,13 @@ class modProjet extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'supprimer'; + $r++; + $this->rights[$r][0] = 45; // id de la permission + $this->rights[$r][1] = "Exporter les projets"; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'export'; + $r++; $this->rights[$r][0] = 141; // id de la permission $this->rights[$r][1] = "Lire tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission From 8a0bddf4c5f37088694ad03cc4478e94ab4611c1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Tue, 21 Jan 2014 18:55:45 +0100 Subject: [PATCH 02/11] typo --- htdocs/main.inc.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 3c48228613e..877ddc5aa9c 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2011-2014 Philippe Grand * Copyright (C) 2008 Matteli * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel @@ -138,7 +138,7 @@ function analyse_sql_and_script(&$var, $type) } -// Check consitency of NOREQUIREXXX DEFINES +// Check consistency of NOREQUIREXXX DEFINES if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && ! defined('NOREQUIREMENU')) dol_print_error('','If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not use them'); // Sanity check on URL @@ -162,7 +162,7 @@ if (! empty($_SERVER['DOCUMENT_ROOT'])) set_include_path($_SERVER['DOCUMENT_ROOT // Include the conf.php and functions.lib.php require_once 'filefunc.inc.php'; -// If there is a POST parameter to tell to save automatically some POST params into a cookies, we do it +// If there is a POST parameter to tell to save automatically some POST parameters into a cookies, we do it if (! empty($_POST["DOL_AUTOSET_COOKIE"])) { require_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; @@ -261,7 +261,7 @@ if (! empty($conf->file->main_force_https)) } -// Chargement des includes complementaires de presentation +// Loading of additional presentation includes if (! defined('NOREQUIREHTML')) require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php'; // Need 660ko memory (800ko in 2.2) if (! defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; // Need 22ko memory @@ -292,7 +292,7 @@ if ((! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_V // Creation of a token against CSRF vulnerabilities if (! defined('NOTOKENRENEWAL')) { - $token = dol_hash(uniqid(mt_rand(),TRUE)); // Genere un hash d'un nombre aleatoire + $token = dol_hash(uniqid(mt_rand(),TRUE)); // Generates a hash of a random number // roulement des jetons car cree a chaque appel if (isset($_SESSION['newtoken'])) $_SESSION['token'] = $_SESSION['newtoken']; $_SESSION['newtoken'] = $token; @@ -396,7 +396,7 @@ if (! defined('NOLOGIN')) $sessionkey = 'dol_antispam_value'; $ok=(array_key_exists($sessionkey, $_SESSION) === TRUE && (strtolower($_SESSION[$sessionkey]) == strtolower($_POST['code']))); - // Verifie code + // Check code if (! $ok) { dol_syslog('Bad value for code, connexion refused'); @@ -407,14 +407,14 @@ if (! defined('NOLOGIN')) $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode"); $test=false; - // Appel des triggers + // Call of triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,GETPOST('entity','int')); if ($result < 0) { $error++; } - // Fin appel triggers + // End Call of triggers } } @@ -468,14 +468,14 @@ if (! defined('NOLOGIN')) $user->trigger_mesg=$langs->trans("ErrorBadLoginPassword").' - login='.GETPOST("username","alpha",2); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword"); - // Appel des triggers + // Call of triggers include_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,GETPOST("username","alpha",2)); if ($result < 0) { $error++; } - // Fin appel triggers + // End Call of triggers } } From 9341db3e86a75a3c9eb25389145cced770d44ed7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Jan 2014 03:20:18 +0100 Subject: [PATCH 03/11] Fix: Missing id --- htdocs/comm/action/fiche.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 4f455d26dd2..0e8843579fe 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -626,7 +626,7 @@ if ($action == 'create') // Other attributes - $parameters=array(); + $parameters=array('id'=>$actioncomm->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook @@ -861,7 +861,7 @@ if ($id > 0) print ''; // Other attributes - $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); + $parameters=array('colspan'=>' colspan="3"', 'colspanvalue'=>'3', 'id'=>$act->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { @@ -1043,7 +1043,7 @@ if ($id > 0) print ''; // Other attributes - $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); + $parameters=array('colspan'=>' colspan="3"', 'colspanvalue'=>'3', 'id'=>$act->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook print ''; From eb7d802a8fe0e335dcc99c8ae024be3c8728771d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 23 Jan 2014 09:07:15 +0100 Subject: [PATCH 04/11] Thousand separator has been set to None instead of space --- htdocs/langs/fr_FR/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index dfd5f45f1f0..61922bb9021 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -7,7 +7,7 @@ DIRECTION=ltr FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=, -SeparatorThousand=None +SeparatorThousand= FormatDateShort=%d/%m/%Y FormatDateShortInput=%d/%m/%Y FormatDateShortJava=dd/MM/yyyy From 9e7f3686dba878ef31991de096e2a94dff0cab58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Jan 2014 08:54:39 +0100 Subject: [PATCH 05/11] Fix: No message if module mailman disabled --- htdocs/adherents/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 0847af47624..99a89ff0d1e 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -1272,10 +1272,10 @@ else // Cree un tableau formulaire $formquestion=array(); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?true:false)); - if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { + if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_MAILMAN)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"),'value'=>''); } - if (! empty($conf->global->ADHERENT_USE_SPIP)) { + if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); } print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1); From ce24a7e9ad4b73e0e0579ee124c92be2d253bd5e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Jan 2014 09:19:15 +0100 Subject: [PATCH 06/11] Fix: Bad error management making rollback instead of commit --- htdocs/user/class/user.class.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b89c3904f74..479f211eaef 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1007,12 +1007,15 @@ class User extends CommonObject $this->db->begin(); - // Cree et positionne $this->id + // Create and set $this->id $result=$this->create($user); if ($result > 0) { - $result=$this->setPassword($user,$this->pass); - if ($member->fk_soc) { + $newpass=$this->setPassword($user,$this->pass); + if (is_numeric($newpass) && $newpass < 0) $result=-2; + + if ($result > 0 && $member->fk_soc) // If member is linked to a thirdparty + { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql.= " SET fk_societe=".$member->fk_soc; $sql.= " WHERE rowid=".$this->id; @@ -1026,7 +1029,7 @@ class User extends CommonObject } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::create_from_member - 1 - ".$this->error, LOG_ERR); $this->db->rollback(); @@ -1034,13 +1037,19 @@ class User extends CommonObject } } } + + if ($result > 0) + { + $this->db->commit(); + return $this->id; + } else { // $this->error deja positionne dol_syslog(get_class($this)."::create_from_member - 2 - ".$this->error, LOG_ERR); $this->db->rollback(); - return $result; + return -2; } } From 35051f8c77b707df606c91374a41077b57b1ff0f Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 23 Jan 2014 12:18:15 +0100 Subject: [PATCH 07/11] Thousand separator must be space into Spain --- htdocs/langs/ca_ES/main.lang | 2 +- htdocs/langs/es_ES/main.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index 5da87a963a3..0be3ab1e84b 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -7,7 +7,7 @@ DIRECTION=ltr FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=, -SeparatorThousand=None +SeparatorThousand= FormatDateShort=%d/%m/%Y FormatDateShortInput=%d/%m/%Y FormatDateShortJava=dd/MM/yyyy diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index 3b495f6f67c..f8f5fd0e101 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -7,7 +7,7 @@ DIRECTION=ltr FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=, -SeparatorThousand=None +SeparatorThousand= FormatDateShort=%d/%m/%Y FormatDateShortInput=%d/%m/%Y FormatDateShortJava=dd/MM/yyyy From cd1313280c16d17e952275bedc7b475a89c8f77f Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 23 Jan 2014 16:00:15 +0100 Subject: [PATCH 08/11] Fix: Bad navigation into stock product tab --- htdocs/product/stock/product.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 153356d969f..7896476775a 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -5,6 +5,7 @@ * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Juanjo Menent * * 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 @@ -41,8 +42,8 @@ $action=GETPOST("action"); $cancel=GETPOST('cancel'); // Security check -$id = GETPOST('id')?GETPOST('id'):GETPOST('ref'); -$ref = GETPOST('ref'); +$id=GETPOST('id', 'int'); +$ref=GETPOST('ref', 'alpha'); $stocklimit = GETPOST('stocklimit'); $desiredstock = GETPOST('desiredstock'); $cancel = GETPOST('cancel'); From 6fed307d70bc84273d6f4c203436ab961cfd7f3a Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 23 Jan 2014 16:26:07 +0100 Subject: [PATCH 09/11] Fix: box of bank balances lines without decimals --- htdocs/core/boxes/box_comptes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 9b80ffefb74..c6ea786aaab 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005 Christophe * Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Juanjo Menent * * 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 @@ -122,7 +123,7 @@ class box_comptes extends ModeleBoxes ); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => price($solde, 1, $langs, 0, -1, 0, $objp->currency_code) + 'text' => price($solde, 0, $langs, 0, 0, -1, $objp->currency_code) ); $listofcurrencies[$objp->currency_code]=1; From 21d6e22f031b696e959ddd7c98bb4a5da16f66a3 Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 23 Jan 2014 17:05:07 +0100 Subject: [PATCH 10/11] Trad: Add missing ca_ES and es_ES files --- htdocs/langs/ca_ES/link.lang | 9 +++++++++ htdocs/langs/es_ES/link.lang | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 htdocs/langs/ca_ES/link.lang create mode 100644 htdocs/langs/es_ES/link.lang diff --git a/htdocs/langs/ca_ES/link.lang b/htdocs/langs/ca_ES/link.lang new file mode 100644 index 00000000000..688d7f4eda6 --- /dev/null +++ b/htdocs/langs/ca_ES/link.lang @@ -0,0 +1,9 @@ +CHARSET=UTF-8 +LinkANewFile=Enllaçar un nou arxiu/document +LinkedFiles=Arxius i documents enllaçats +NoLinkFound=No hi ha enllaços associats +LinkComplete=L'arxiu s'ha enllaçat correctament +ErrorFileNotLinked=L'arxiu no ha pogut ser enllaçat +LinkRemoved=Ha estat eliminat l'enllaç %s +ErrorFailedToDeleteLink=Impossible eliminar l'enllaç '%s' +ErrorFailedToUpdateLink=Impossible modificar l'enllaç '%s' diff --git a/htdocs/langs/es_ES/link.lang b/htdocs/langs/es_ES/link.lang new file mode 100644 index 00000000000..305963a8ad8 --- /dev/null +++ b/htdocs/langs/es_ES/link.lang @@ -0,0 +1,9 @@ +CHARSET=UTF-8 +LinkANewFile=Enlazar un nuevo archivo/documento +LinkedFiles=Archivos y documentos enlazados +NoLinkFound=No hay enlaces asociados +LinkComplete=El archivo se ha enlazado correctamente +ErrorFileNotLinked=El archivo no ha podido ser enlazado +LinkRemoved=Ha sido eliminado el enlace %s +ErrorFailedToDeleteLink=Imposible eliminar el enlace '%s' +ErrorFailedToUpdateLink=Imposible actualizar el enlace '%s' From 21b43d76041ce527662664968fae838e0b0c261b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Jan 2014 20:02:19 +0100 Subject: [PATCH 11/11] Fix: if module invoice is disabled, option to automatically classify order as billed does not exists, so "Classify billed" for order must be done manually from order card. --- htdocs/admin/workflow.php | 1 + htdocs/commande/fiche.php | 58 +++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index e948bc1be79..cea1690b818 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -80,6 +80,7 @@ $workflowcodes=array( 'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array('enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order'), 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array('enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order','warning'=>'WarningCloseAlways'), 'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array('enabled'=>'! empty($conf->commande->enabled) && ! empty($conf->facture->enabled)', 'picto'=>'bill'), + // For the following 2 options, if module invoice is disabled, they does not exists, so "Classify billed" for order must be done manually from order card. 'WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER'=>array('enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'bill','warning'=>'WarningCloseAlways'), 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array('enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'bill','warning'=>'WarningCloseAlways'), diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index d40d8bf5a7c..4c400f37a7f 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1,34 +1,34 @@ * Copyright (C) 2004-2013 Laurent Destailleur -* Copyright (C) 2005 Marc Barilley / Ocebo -* Copyright (C) 2005-2013 Regis Houssin -* Copyright (C) 2006 Andre Cianfarani -* Copyright (C) 2010-2013 Juanjo Menent -* Copyright (C) 2011 Philippe Grand -* Copyright (C) 2012-2013 Christophe Battarel -* Copyright (C) 2012 Marcos García -* Copyright (C) 2013 Florian Henry -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2012-2013 Christophe Battarel + * Copyright (C) 2012 Marcos García + * Copyright (C) 2013 Florian Henry + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/commande/fiche.php -* \ingroup commande -* \brief Page to show customer order -*/ + * \ingroup commande + * \brief Page to show customer order + */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -2483,15 +2483,15 @@ else print ''; } - // Create bill and Classify billed - if (! empty($conf->facture->enabled) && $object->statut > 0 && ! $object->billed) + // Note: Even if module invoice is not enabled, we should be able to use button "Classified billed" + if ($object->statut > 0 && ! $object->billed) { - if ($user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) + if (! empty($conf->facture->enabled) && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) { print ''; } - if ($user->rights->commande->creer && $object->statut > 2 && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORsKFLOW_BILL_ON_SHIPMENT)) + if ($user->rights->commande->creer && $object->statut > 2 && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { print ''; }