diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 8e271879059..73a4954bdb7 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * @@ -17,15 +17,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/commande/commande.class.php \ingroup commande \brief Fichier des classes de commandes - \version $Revision$ + \version $Id$ */ require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php"); @@ -34,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); /** \class Commande - \brief Classe de gestion de commande + \brief Class to manage orders */ class Commande extends CommonObject { @@ -104,7 +102,7 @@ class Commande extends CommonObject */ function create_from_propale($user, $propale_id) { - dolibarr_syslog("Commande.class.php::create_from_propale propale_id=$propale_id"); + dolibarr_syslog("Commande.class::create_from_propale propale_id=$propale_id"); $propal = new Propal($this->db); $propal->fetch($propale_id); @@ -476,13 +474,13 @@ class Commande extends CommonObject // Nettoyage parametres $this->brouillon = 1; // On positionne en mode brouillon la commande - dolibarr_syslog("Commande.class.php::create"); + dolibarr_syslog("Commande.class::create"); // Vérification paramètres if ($this->source < 0) { $this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Source")); - dolibarr_syslog("Commande.class.php::create ".$this->error, LOG_ERR); + dolibarr_syslog("Commande.class::create ".$this->error, LOG_ERR); return -1; } if (! $remise) $remise=0; @@ -493,7 +491,7 @@ class Commande extends CommonObject if ($result < 0) { $this->error="Failed to fetch company"; - dolibarr_syslog("Commande.class.php::create ".$this->error, LOG_ERR); + dolibarr_syslog("Commande.class::create ".$this->error, LOG_ERR); return -2; } @@ -509,13 +507,12 @@ class Commande extends CommonObject $sql.= " '".addslashes($this->note)."', "; $sql.= " '".addslashes($this->note_public)."', "; $sql.= " '".addslashes($this->ref_client)."', '".$this->modelpdf."', '".$this->cond_reglement_id."', '".$this->mode_reglement_id."',"; - $sql.= " '".($this->date_livraison?$this->db->idate($this->date_livraison):'')."',"; + $sql.= " ".($this->date_livraison?"'".$this->db->idate($this->date_livraison)."'":"null").","; $sql.= " '".$this->adresse_livraison_id."',"; $sql.= " '".$this->remise_absolue."',"; $sql.= " '".$this->remise_percent."')"; - dolibarr_syslog("Commande.class.php::create sql=".$sql); - + dolibarr_syslog("Commande::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -2389,8 +2386,8 @@ class CommandeLigne } /** - * \brief Recupére l'objet ligne de commande - * \param rowid id de la ligne de commande + * \brief Load line order + * \param rowid id line order */ function fetch($rowid) { diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index 2dd417c210a..0e6032b1ca0 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -527,7 +527,9 @@ class CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element; $sql.= " WHERE ".$fieldid." > '".addslashes($this->ref)."'"; if (isset($filter)) $sql.=" AND ".$filter; + // Rem: Bug in some mysql version: SELECT rowid FROM llx_socpeople WHERE rowid > 1 when one row in database with rowid=1, returns 1 instead of null + //print $sql; $result = $this->db->query($sql) ; if (! $result) { diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index dc1571e7b76..4dabd3d503f 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2008 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -16,15 +16,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/compta/commande/fiche.php \ingroup commande \brief Fiche commande - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 1c08602ab74..5a9a3154ec2 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke @@ -18,15 +18,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/contact/fiche.php \ingroup societe \brief Onglet général d'un contact - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -206,9 +204,8 @@ if ($user->rights->societe->contact->creer) /* - * - * - */ +* View +*/ llxHeader();