I am not sure if this a the correct fix, but it seems to work.
replace(request.form("l"), ",", ".")
was used to replace a comma with a dot, but that was messing up the look in the database as numbers is comma separated.
Changing it to replace(request.form("l"), ".", ",")
seems to have fixed it - for now.