Modif arrondis

This commit is contained in:
Rodolphe Quiedeville 2003-09-15 16:06:16 +00:00
parent 9f8071b77b
commit 1d2ad8728f

View File

@ -488,12 +488,19 @@ class Facture
}
$total_ht = $amount - $total_remise;
$total_tva = $total_tva + tva($lprice, $obj->tva_taux);
$ligne_tva = ($lprice * ($obj->tva_tx / 100));
$total_tva = $total_tva + $ligne_tva;
$i++;
}
$this->db->free();
$this->total_ttc = $total_ht + $total_tva;
/*
* Sommes et arrondis
*/
$this->total_ttc = round($total_ht, 2) + round($total_tva, 2);
$sql = "UPDATE llx_facture SET amount = $amount, remise=$total_remise, total=$total_ht, tva=$total_tva, total_ttc=$this->total_ttc";
$sql .= " WHERE rowid = $facid ;";