Skip to content

Commit

Permalink
Fix decimals in payments of supplier invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
openthink-laurent committed Dec 7, 2015
1 parent 5710bcd commit 7e31c8f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions htdocs/fourn/class/paiementfourn.class.php
Expand Up @@ -128,10 +128,9 @@ function create($user,$closepaidinvoices=0)
$this->total = 0;
foreach ($this->amounts as $key => $value)
{
$value = price2num($value);
$val = round($value, 2);
$this->amounts[$key] = $val;
$this->total += $val;
$newvalue = price2num($value, 'MT');
$this->amounts[$key] = $newvalue;
$this->total += $newvalue;
}
$this->total = price2num($this->total);

Expand Down

0 comments on commit 7e31c8f

Please sign in to comment.