now using unit price in the post tab, allowing decimals to still be able to undercut by 1c

This commit is contained in:
Manuel Simon Hirsig
2016-02-06 17:23:41 +01:00
parent 17e7b840c3
commit 76fca97a40
6 changed files with 35 additions and 32 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ function m.to_string(money, pad, trim, color, no_color)
money = abs(money)
local gold = floor(money / COPPER_PER_GOLD)
local silver = floor(mod(money, COPPER_PER_GOLD) / COPPER_PER_SILVER)
local copper = Aux.round(mod(money, COPPER_PER_SILVER))
-- local copper = Aux.round(mod(money, COPPER_PER_SILVER))
local copper = mod(money, COPPER_PER_SILVER)
local gold_text, silver_text, copper_text
if no_color then
gold_text, silver_text, copper_text = 'g', 's', 'c'