12,727
edits
(_Currency: Conditional formatting for negative amounts, and refactor to avoid repeated string concatenation) Tag: Reverted |
(_Currency: Conditional formatting for negative amounts, and refactor to avoid repeated string concatenation) |
||
(One intermediate revision by the same user not shown) | |||
Line 857: | Line 857: | ||
if tonumber(amount) ~= nil then | if tonumber(amount) ~= nil then | ||
local function numColour(amount) | local function numColour(amount) | ||
if amount < 0 then | if tonumber(amount) < 0 then | ||
return '<span style="color:red;">' .. formatnum(amount) .. '</span>' | return '<span style="color:red;">' .. formatnum(amount) .. '</span>' | ||
else | else |