From 6701a47a9b69ac7476367cd6f2026b9e2e628a94 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 11 Apr 2005 15:16:41 +0000 Subject: [PATCH] Deplacement --- htdocs/fourn/fournisseur.facture.class.php | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php index 0ae1ff6b7b3..7c02f0e2bba 100644 --- a/htdocs/fourn/fournisseur.facture.class.php +++ b/htdocs/fourn/fournisseur.facture.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * @@ -23,7 +23,7 @@ */ /** - \file htdocs/fourn/fournisseur.facture.class.php + \file htdocs/fournisseur.facture.class.php \ingroup fournisseur \brief Fichier de la classe des factures fournisseurs \version $Revision$ @@ -106,7 +106,8 @@ class FactureFournisseur $total = $totalht + $tva; $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn (facnumber, libelle, fk_soc, datec, datef, note, fk_user_author) "; - $sql .= " VALUES ('".$this->number."','".$this->libelle."',". $this->socid.", now(),".$this->date.",'".$this->note."', ".$user->id.");"; + $sql .= " VALUES ('".$this->number."','".$this->libelle."',"; + $sql .= $this->socid.", now(),".$this->db->idate($this->date).",'".$this->note."', ".$user->id.");"; if ( $this->db->query($sql) ) { @@ -139,16 +140,17 @@ class FactureFournisseur } else { - if ($this->db->errno() == DB_ERROR_RECORD_ALREADY_EXISTS) { - print "Erreur : Une facture possédant cet id existe déjà"; + if ($this->db->errno() == DB_ERROR_RECORD_ALREADY_EXISTS) + { + print "Erreur : Une facture possédant cet id existe déjà"; } - else { - dolibarr_print_error($this->db); - } - - return 0; + else + { + dolibarr_print_error($this->db); + } + return 0; } - } + } /** * \brief Recupére l'objet facture et ses lignes de factures