Fix: la date de livraison n'était pas récupérée sur la commande
This commit is contained in:
parent
8081a6e136
commit
37a142d332
@ -303,14 +303,26 @@ class Commande
|
|||||||
|
|
||||||
// On positionne en mode brouillon la commande
|
// On positionne en mode brouillon la commande
|
||||||
$this->brouillon = 1;
|
$this->brouillon = 1;
|
||||||
|
|
||||||
if (! $remise)
|
if (! $remise)
|
||||||
{
|
{
|
||||||
$remise = 0 ;
|
$remise = 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $this->projetid)
|
if (! $this->projetid)
|
||||||
{
|
{
|
||||||
$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,';
|
||||||
@ -321,7 +333,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.= " '".($this->date_livraison?$this->db->idate($this->date_livraison):'null').'\',';
|
$sql.= " '".$date_livraison.'\',';
|
||||||
$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