Fix rounding

This commit is contained in:
Laurent Destailleur 2021-06-23 02:51:31 +02:00
parent 5c6c708531
commit 3bc1f90589
2 changed files with 2 additions and 2 deletions

View File

@ -2666,7 +2666,7 @@ class Product extends CommonObject
$obj = $this->db->fetch_object($result);
$this->stats_mo['customers_'.$role] = $obj->nb_customers ? $obj->nb_customers : 0;
$this->stats_mo['nb_'.$role] = $obj->nb ? $obj->nb : 0;
$this->stats_mo['qty_'.$role] = $obj->qty ? $obj->qty : 0;
$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM()
} else {
$this->error = $this->db->error();
$error++;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
*
* This program is free software; you can redistribute it and/or modify