Modification du format de la date dans create

This commit is contained in:
Rodolphe Quiedeville 2005-04-11 09:52:18 +00:00
parent 58f5f0400f
commit 16c0ee6f5e

View File

@ -106,7 +106,8 @@ class FactureFournisseur
$total = $totalht + $tva; $total = $totalht + $tva;
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn (facnumber, libelle, fk_soc, datec, datef, note, fk_user_author) "; $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) ) if ( $this->db->query($sql) )
{ {
@ -139,16 +140,17 @@ class FactureFournisseur
} }
else else
{ {
if ($this->db->errno() == DB_ERROR_RECORD_ALREADY_EXISTS) { if ($this->db->errno() == DB_ERROR_RECORD_ALREADY_EXISTS)
print "Erreur : Une facture possédant cet id existe déjà"; {
print "Erreur : Une facture possédant cet id existe déjà";
} }
else { else
dolibarr_print_error($this->db); {
} dolibarr_print_error($this->db);
}
return 0; return 0;
} }
} }
/** /**
* \brief Recupére l'objet facture et ses lignes de factures * \brief Recupére l'objet facture et ses lignes de factures