Fix arguments to price()

This commit is contained in:
MDW
2024-03-26 13:41:54 +01:00
parent 37958e8b1f
commit 0b64b3cd26

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -179,7 +180,7 @@ foreach ($listofstatus as $status) {
print '<tr class="oddeven">';
print '<td><a href="list.php?search_status='.$status.'">'.$donstatic->LibStatut($status, 4).'</a></td>';
print '<td class="right">'.(!empty($nb[$status]) ? $nb[$status] : '&nbsp;').'</td>';
print '<td class="right nowraponall amount">'.(!empty($nb[$status]) ? price($somme[$status], 'MT') : '&nbsp;').'</td>';
print '<td class="right nowraponall amount">'.(!empty($nb[$status]) ? price($somme[$status], 1, '', 1, -1, 'MT') : '&nbsp;').'</td>';
print '<td class="right nowraponall">'.(!empty($nb[$status]) ? price(price2num($somme[$status] / $nb[$status], 'MT')) : '&nbsp;').'</td>';
$totalnb += (!empty($nb[$status]) ? $nb[$status] : 0);
$total += (!empty($somme[$status]) ? $somme[$status] : 0);
@@ -189,7 +190,7 @@ foreach ($listofstatus as $status) {
print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
print '<td class="right nowraponall">'.$totalnb.'</td>';
print '<td class="right nowraponall">'.price($total, 'MT').'</td>';
print '<td class="right nowraponall">'.price($total, 1, "", 1, -1, 'MT').'</td>';
print '<td class="right nowraponall">'.($totalnb ? price(price2num($total / $totalnb, 'MT')) : '&nbsp;').'</td>';
print '</tr>';
print "</table>";