From dcb7958be9ee104be290711f16d0cf6fee133d60 Mon Sep 17 00:00:00 2001 From: Frans Bosman Date: Sat, 13 Mar 2021 08:44:16 +0100 Subject: [PATCH] Update list.php Changed the presentation of the stock to show decimals and thousands separator. changes price2num to price and use MAIN_MAX_DECIMALS_STOCK --- htdocs/product/list.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 5bc973e56b7..3d471ff314f 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1643,7 +1643,9 @@ if ($resql) { if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) { print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; } - print price2num($product_static->stock_reel, 'MS'); + $decimals = !isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? 5 : $conf->global->MAIN_MAX_DECIMALS_STOCK; + print price($product_static->stock_reel, 0, $langs->defaultlang,1,-1,$decimals); + //print price2num($product_static->stock_reel, 'MS'); } print ''; if (!$i) { @@ -1657,7 +1659,9 @@ if ($resql) { if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) { print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; } - print price2num($product_static->stock_theorique, 'MS'); + $decimals = !isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? 5 : $conf->global->MAIN_MAX_DECIMALS_STOCK; + print price($product_static->stock_theorique, 0, $langs->defaultlang,1,-1,$decimals); + //print price2num($product_static->stock_theorique, 'MS'); } print ''; if (!$i) {