diff --git a/htdocs/facturefourn.class.php b/htdocs/facturefourn.class.php index c5ab94e4a59..ce64b8821b5 100644 --- a/htdocs/facturefourn.class.php +++ b/htdocs/facturefourn.class.php @@ -20,7 +20,8 @@ * */ -class FactureFourn { +class FactureFourn +{ var $id; var $db; var $socid; @@ -44,7 +45,8 @@ class FactureFourn { * */ - Function FactureFourn($DB, $soc_idp="", $facid="") { + Function FactureFourn($DB, $soc_idp="", $facid="") + { $this->db = $DB ; $this->socidp = $soc_idp; $this->products = array(); @@ -108,6 +110,8 @@ class FactureFourn { Function update_ligne($id, $label, $puht, $tauxtva, $qty=1) { + $puht = ereg_replace(",",".",$puht); + $totalht = $puht * $qty; $tva = tva($totalht, $tauxtva); $totalttc = $totalht + $tva; @@ -198,8 +202,7 @@ class FactureFourn { $this->updateprice($this->id); - return 1; - + return $this->id; } else {