FIX When editing a numeric that is not defined, we must not show 0 but

an empty field.
This commit is contained in:
Laurent Destailleur 2016-04-09 10:40:56 +02:00
parent 874c65dfda
commit cd13c942ed

View File

@ -169,7 +169,8 @@ class Form
else if (preg_match('/^(numeric|amount)/',$typeofdata))
{
$tmp=explode(':',$typeofdata);
$ret.='<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.price(price2num($editvalue?$editvalue:$value)).'"'.($tmp[1]?' size="'.$tmp[1].'"':'').'>';
$valuetoshow=price2num($editvalue?$editvalue:$value);
$ret.='<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.($valuetoshow!=''?price($valuetoshow):'').'"'.($tmp[1]?' size="'.$tmp[1].'"':'').'>';
}
else if (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata))
{