implemented new money input

This commit is contained in:
Manuel Simon Hirsig
2016-01-26 02:50:23 +01:00
parent 847c027293
commit 6474b1716f
7 changed files with 155 additions and 150 deletions
-19
View File
@@ -73,25 +73,6 @@ function Aux.util.iter(array)
end
end
function Aux.util.format_money(val)
local g = math.floor(val / 10000)
val = val - g * 10000
local s = math.floor(val / 100)
val = val - s * 100
local c = math.floor(val)
local g_string = g ~= 0 and g .. 'g' or ''
local s_string = s ~= 0 and s .. 's' or ''
local c_string = (c ~= 0 or g == 0 and s == 0) and c .. 'c' or ''
return g_string .. s_string .. c_string
end
function Aux.util.set_add(set, key)
set[key] = true
end