Fix: Gestion plus correcte de la date (au format date et non chaine)
This commit is contained in:
parent
4d20b7c312
commit
706f11a84f
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
*
|
*
|
||||||
@ -312,7 +312,7 @@ class Commande
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Créé la commande
|
* \brief Créé la commande
|
||||||
* \param user Id utilisateur qui crée
|
* \param user Objet utilisateur qui crée
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
@ -338,16 +338,6 @@ class Commande
|
|||||||
$this->projetid = 0;
|
$this->projetid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On ne formate pas une date de livraison qui vient d'une propale
|
|
||||||
if ($this->propale_id)
|
|
||||||
{
|
|
||||||
$date_livraison = $this->date_livraison;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$date_livraison = $this->date_livraison?$this->db->idate($this->date_livraison):'null';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commande (';
|
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commande (';
|
||||||
$sql.= 'fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, ref_client,';
|
$sql.= 'fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, ref_client,';
|
||||||
$sql.= ' model_pdf, fk_cond_reglement, fk_mode_reglement, date_livraison, fk_adresse_livraison,';
|
$sql.= ' model_pdf, fk_cond_reglement, fk_mode_reglement, date_livraison, fk_adresse_livraison,';
|
||||||
@ -357,7 +347,7 @@ class Commande
|
|||||||
$sql.= ' '.$this->source.', ';
|
$sql.= ' '.$this->source.', ';
|
||||||
$sql.= " '".addslashes($this->note)."', ";
|
$sql.= " '".addslashes($this->note)."', ";
|
||||||
$sql.= " '".$this->ref_client."', '".$this->modelpdf.'\', \''.$this->cond_reglement_id.'\', \''.$this->mode_reglement_id.'\',';
|
$sql.= " '".$this->ref_client."', '".$this->modelpdf.'\', \''.$this->cond_reglement_id.'\', \''.$this->mode_reglement_id.'\',';
|
||||||
$sql.= " '".$date_livraison.'\',';
|
$sql.= ' '.($this->date_livraison?$this->db->idate($this->date_livraison):'null').',';
|
||||||
$sql.= " '".$this->adresse_livraison_id."',";
|
$sql.= " '".$this->adresse_livraison_id."',";
|
||||||
$sql.= " '".$this->remise_absolue."',";
|
$sql.= " '".$this->remise_absolue."',";
|
||||||
$sql.= " '".$this->remise_percent."')";
|
$sql.= " '".$this->remise_percent."')";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user