From a3c5bef38150deb60d7b4d122016dd03329bf396 Mon Sep 17 00:00:00 2001 From: fhenry <florian.henry@open-concept.pro> Date: Fri, 19 Apr 2013 15:12:02 +0200 Subject: [PATCH] Fix bug FactureLine update for PgSQL http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/41317-impossible-de-modifier-une-ligne-de-facture#41422 --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 2333802cc40..578049503c4 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3457,7 +3457,7 @@ class FactureLigne $sql.= ",total_localtax1=".price2num($this->total_localtax1).""; $sql.= ",total_localtax2=".price2num($this->total_localtax2).""; } - $sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'"; + $sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?"'".$this->db->escape($this->fk_fournprice)."'":"null"); $sql.= " , buy_price_ht='".price2num($this->pa_ht)."'"; $sql.= ",fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null"); if (! empty($this->rang)) $sql.= ", rang=".$this->rang; -- GitLab