mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2024-12-29 16:14:36 +00:00
thing
This commit is contained in:
parent
fdc4036187
commit
f5a045dc96
2 changed files with 6 additions and 6 deletions
|
@ -127,12 +127,11 @@ local function format(template, params)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function format_amount(amount, tag, classes)
|
local function format_amount(amount, tag, classes)
|
||||||
-- local s = format("{+price.amount}", {
|
local s = format("{+price.amount}", {
|
||||||
-- sign = amount > 0 and "{+price.sign.pos}" or "{+price.sign.neg}",
|
sign = amount >= 0 and "+" or "-",
|
||||||
-- amount = string.format("%.2f", math.abs(amount / 100)),
|
amount = string.format("%.2f", math.abs(amount / 100)),
|
||||||
-- unit = config.unit or "€"
|
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
|
if tag == nil then return s end
|
||||||
return format(
|
return format(
|
||||||
[[<{tag} class="amount-{sign} {classes}">{content}</{tag}>]], {
|
[[<{tag} class="amount-{sign} {classes}">{content}</{tag}>]], {
|
||||||
|
|
|
@ -46,3 +46,4 @@ user.form.transaction=Create Transaction
|
||||||
user.last_txn=Last transaction added {time}.
|
user.last_txn=Last transaction added {time}.
|
||||||
user.lazy_creation=This user account does not exist yet. It will only be created after the first transaction.
|
user.lazy_creation=This user account does not exist yet. It will only be created after the first transaction.
|
||||||
user.view_log=View user log
|
user.view_log=View user log
|
||||||
|
price.amount={sign}{amount}{unit}
|
||||||
|
|
Loading…
Reference in a new issue