Gestion des virgules dans les prix

This commit is contained in:
Rodolphe Quiedeville 2003-08-04 12:33:24 +00:00
parent 1a743939fc
commit f6de363a78

View File

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