mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-28 19:53:20 +01:00
Fix: la date de livraison n'tait pas rcupre sur la commande
This commit is contained in:
@@ -303,14 +303,26 @@ class Commande
|
||||
|
||||
// On positionne en mode brouillon la commande
|
||||
$this->brouillon = 1;
|
||||
|
||||
if (! $remise)
|
||||
{
|
||||
$remise = 0 ;
|
||||
}
|
||||
|
||||
if (! $this->projetid)
|
||||
{
|
||||
$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.= 'fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, ref_client,';
|
||||
@@ -321,7 +333,7 @@ class Commande
|
||||
$sql.= ' '.$this->source.', ';
|
||||
$sql.= " '".addslashes($this->note)."', ";
|
||||
$sql.= " '".$this->ref_client."', '".$this->modelpdf.'\', \''.$this->cond_reglement_id.'\', \''.$this->mode_reglement_id.'\',';
|
||||
$sql.= " '".($this->date_livraison?$this->db->idate($this->date_livraison):'null').'\',';
|
||||
$sql.= " '".$date_livraison.'\',';
|
||||
$sql.= " '".$this->adresse_livraison_id."',";
|
||||
$sql.= " '".$this->remise_absolue."',";
|
||||
$sql.= " '".$this->remise_percent."')";
|
||||
|
||||
Reference in New Issue
Block a user