diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 36599833c2d..1538e47a9d1 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -578,7 +578,7 @@ class Entrepot extends CommonObject */ function getNomUrl($withpicto=0, $option='',$showfullpath=0, $notooltip=0) { - global $langs; + global $conf, $langs; $langs->load("stocks"); if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7a0068fdda8..2cec79d7020 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -613,14 +613,16 @@ if ($id > 0 || $ref) print ''; print $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1); print ''; - print ''.$object->stock_reel; + print ''.price2num($object->stock_reel, 'MS'); if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print ''; + $stocktheo = price2num($object->stock_theorique, 'MS'); + // Calculating a theorical value print ''.$langs->trans("VirtualStock").''; - print "".(empty($object->stock_theorique)?0:$object->stock_theorique); + print "".(empty($stocktheo)?0:$stocktheo); if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print ''; @@ -703,44 +705,19 @@ if ($id > 0 || $ref) dol_fiche_end(); } - /* - * Correct stock - */ + // Correct stock if ($action == "correction") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php'; print '

'; } - /* - * Transfer of units - */ + // Transfer of units if ($action == "transfert") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php'; print '

'; } - - /* - * Set initial stock - */ - /* - if ($_GET["action"] == "definir") - { - print load_fiche_titre($langs->trans("SetStock")); - print "
id\" method=\"post\">\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("Warehouse").''; - print $formproduct->selectWarehouses('','id_entrepot','',1); - print ''.$langs->trans("NumberOfUnit").'
 '; - print '
'; - print '
'; - } - */ } else { @@ -831,7 +808,7 @@ if ($resql) $entrepotstatic->id=$obj->rowid; $entrepotstatic->libelle=$obj->label; $entrepotstatic->lieu=$obj->lieu; - $stock_real = round($obj->reel, 10); + $stock_real = price2num($obj->reel, 'MS'); print ''; print ''.$entrepotstatic->getNomUrl(1).''; print ''.$stock_real.($stock_real < 0 ?' '.img_warning():'').''; @@ -862,8 +839,10 @@ if ($resql) { if ($action == 'editline' && GETPOST('lineid','int') == $pdluo->id) { //Current line edit - print "\n".''; - print '
'; + print "\n".''; + print '
'; + print ''; + print ''; print ''; print ''; print ''; - print '
'; $form->select_date($pdluo->eatby,'eatby','','',1,'',1,0,1); @@ -874,7 +853,8 @@ if ($resql) print ''.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').''; print '
'; + print '
'; + print ''; print ''; } else @@ -901,7 +881,7 @@ if ($resql) else dol_print_error($db); print ''.$langs->trans("Total").':'; -print ''.$total.''; +print ''.price2num($total, 'MS').''; print ''; print ($totalwithpmp?price(price2num($totalvalue/$totalwithpmp,'MU')):' '); // This value may have rounding errors print '';