diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index bedf489467e..56567c24ee3 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3939,7 +3939,7 @@ class PropaleLigne extends CommonObjectLine $sql.= " ".price2num($this->localtax2_tx).","; $sql.= " '".$this->db->escape($this->localtax1_type)."',"; $sql.= " '".$this->db->escape($this->localtax2_type)."',"; - $sql.= " ".($this->subprice?price2num($this->subprice):"null").","; + $sql.= " ".(price2num($this->subprice)!==''?price2num($this->subprice):"null").","; $sql.= " ".price2num($this->remise_percent).","; $sql.= " ".(isset($this->info_bits)?"'".$this->db->escape($this->info_bits)."'":"null").","; $sql.= " ".price2num($this->total_ht).","; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index d2f1c21654e..9007490d421 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -4065,7 +4065,7 @@ class OrderLine extends CommonOrderLine $sql.= ' '.(! empty($this->fk_product)?$this->fk_product:"null").','; $sql.= " '".$this->db->escape($this->product_type)."',"; $sql.= " '".price2num($this->remise_percent)."',"; - $sql.= " ".($this->subprice!=''?"'".price2num($this->subprice)."'":"null").","; + $sql.= " ".(price2num($this->subprice)!==''?price2num($this->subprice):"null").","; $sql.= " ".($this->price!=''?"'".price2num($this->price)."'":"null").","; $sql.= " '".price2num($this->remise)."',"; $sql.= ' '.(! empty($this->fk_remise_except)?$this->fk_remise_except:"null").','; @@ -4074,11 +4074,11 @@ class OrderLine extends CommonOrderLine $sql.= ' '.(! empty($this->fk_fournprice)?$this->fk_fournprice:"null").','; $sql.= ' '.price2num($this->pa_ht).','; $sql.= " '".$this->db->escape($this->info_bits)."',"; - $sql.= " '".price2num($this->total_ht)."',"; - $sql.= " '".price2num($this->total_tva)."',"; - $sql.= " '".price2num($this->total_localtax1)."',"; - $sql.= " '".price2num($this->total_localtax2)."',"; - $sql.= " '".price2num($this->total_ttc)."',"; + $sql.= " ".price2num($this->total_ht).","; + $sql.= " ".price2num($this->total_tva).","; + $sql.= " ".price2num($this->total_localtax1).","; + $sql.= " ".price2num($this->total_localtax2).","; + $sql.= " ".price2num($this->total_ttc).","; $sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").','; $sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").','; $sql.= ' '.(!$this->fk_unit ? 'NULL' : $this->fk_unit);