From efd2e6c80ebf20fbc4a24929c00693e804af2a43 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 31 Oct 2024 00:19:10 +0100 Subject: [PATCH] revert txn from log --- strichliste.lua | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/strichliste.lua b/strichliste.lua index c0f73a2..818cdab 100755 --- a/strichliste.lua +++ b/strichliste.lua @@ -204,9 +204,9 @@ local function r_user_post(username) log:flush() log:close() return string.format([[ -

Transaction successful: %.02f€ (%s)

- - ]], +

Transaction successful: %.02f€ (%s)

+ + ]], amount >= 0 and "pos" or "neg", amount / 100, escape(comment), config.transaction_sound or "" @@ -277,11 +277,27 @@ local function r_log(filter) print("TimeUsernameAmountComment") for time, username, amount, comment in read_log() do if filter == nil or filter == username then - print(string.format( - "%d (%s ago)%s%.02f€%s", + print(string.format([[ + + %d (%s ago) + %s + %.02f€ + %s + +
+ + + +
+ + + ]], time, format_duration(os.time() - time), escape(username), amount >= 0 and "pos" or "neg", amount / 100, + escape(comment), + escape(username), + -amount, escape(comment) )) end