diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php
index c24e509ff60..00626b2558c 100644
--- a/htdocs/accountancy/bookkeeping/listbyaccount.php
+++ b/htdocs/accountancy/bookkeeping/listbyaccount.php
@@ -962,8 +962,8 @@ while ($i < min($num, $limit)) {
} else {
print '
' . $langs->trans("TotalForAccount") . ' ' . length_accountg($displayed_account_number) . ': | ';
}
- print ''.price($sous_total_debit).' | ';
- print ''.price($sous_total_credit).' | ';
+ print ''.price(price2num($sous_total_debit, 'MT')).' | ';
+ print ''.price(price2num($sous_total_credit, 'MT')).' | ';
print ' | ';
print '';
// Show balance of last shown account
@@ -972,13 +972,13 @@ while ($i < min($num, $limit)) {
print ''.$langs->trans("Balance").': | ';
if ($balance > 0) {
print '';
- print price($sous_total_debit - $sous_total_credit);
+ print price(price2num($sous_total_debit - $sous_total_credit, 'MT'));
print ' | ';
print ' | ';
} else {
print ' | ';
print '';
- print price($sous_total_credit - $sous_total_debit);
+ print price(price2num($sous_total_credit - $sous_total_debit, 'MT'));
print ' | ';
}
print ' | ';
@@ -1233,8 +1233,8 @@ while ($i < min($num, $limit)) {
if ($num > 0 && $colspan > 0) {
print '';
print '| '.$langs->trans("TotalForAccount").' '.$accountg.': | ';
- print ''.price($sous_total_debit).' | ';
- print ''.price($sous_total_credit).' | ';
+ print ''.price(price2num($sous_total_debit, 'MT')).' | ';
+ print ''.price(price2num($sous_total_credit, 'MT')).' | ';
print ' | ';
print '
';
// Show balance of last shown account
@@ -1243,19 +1243,29 @@ if ($num > 0 && $colspan > 0) {
print ''.$langs->trans("Balance").': | ';
if ($balance > 0) {
print '';
- print price($sous_total_debit - $sous_total_credit);
+ print price(price2num($sous_total_debit - $sous_total_credit, 'MT'));
print ' | ';
print ' | ';
} else {
print ' | ';
print '';
- print price($sous_total_credit - $sous_total_debit);
+ print price(price2num($sous_total_credit - $sous_total_debit, 'MT'));
print ' | ';
}
print ' | ';
print '';
}
+
+// Clean total values to round them
+if (!empty($totalarray['val']['totaldebit'])) {
+ $totalarray['val']['totaldebit'] = price2num($totalarray['val']['totaldebit'], 'MT');
+}
+if (!empty($totalarray['val']['totalcredit'])) {
+ $totalarray['val']['totalcredit'] = price2num($totalarray['val']['totalcredit'], 'MT');
+}
+
+
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';