mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2024-12-29 16:14:36 +00:00
revert amount formatting
This commit is contained in:
parent
51bc73ae4d
commit
fdc4036187
1 changed files with 6 additions and 7 deletions
|
@ -127,13 +127,12 @@ local function format(template, params)
|
|||
end
|
||||
|
||||
local function format_amount(amount, tag, classes)
|
||||
local s = format("{+price.amount}", {
|
||||
sign = amount > 0 and "{+price.sign.pos}" or "{+price.sign.neg}",
|
||||
amount = string.format("%.2f", math.abs(amount / 100)),
|
||||
unit = config.unit or "€"
|
||||
})
|
||||
|
||||
-- local s = string.format("%s%.02f%s", amount > 0 and "+" or "", amount / 100, )
|
||||
-- local s = format("{+price.amount}", {
|
||||
-- sign = amount > 0 and "{+price.sign.pos}" or "{+price.sign.neg}",
|
||||
-- amount = string.format("%.2f", math.abs(amount / 100)),
|
||||
-- unit = config.unit or "€"
|
||||
-- })
|
||||
local s = string.format("%s%.02f%s", amount > 0 and "+" or "", amount / 100, config.unit or "€")
|
||||
if tag == nil then return s end
|
||||
return format(
|
||||
[[<{tag} class="amount-{sign} {classes}">{content}</{tag}>]], {
|
||||
|
|
Loading…
Reference in a new issue