diff --git a/htdocs/facture.class.php3 b/htdocs/facture.class.php3 index 931316bfba3..78282371274 100644 --- a/htdocs/facture.class.php3 +++ b/htdocs/facture.class.php3 @@ -97,7 +97,12 @@ class Facture { if ( $this->db->query($sql) ) { $this->id = $this->db->last_insert_id(); - + + if ($this->id && $this->propalid) + { + $sql = "INSERT INTO llx_fa_pr (fk_facture, fk_propal) VALUES (".$this->id.",".$this->propalid.")"; + $this->db->query($sql); + } return $this->id; } else