Commit graph

252 commits

Author SHA1 Message Date
Juerd Waalboer
eb55aa0eb5 revbank.products: trim whitespace, document comment/whitespace rules
Beginning of a line was already trimmed, courtesy of the whitespace
split. The end of a line was previously not trimmed because of the limit
for split.
2022-12-26 04:54:41 +01:00
Juerd Waalboer
7d5018a5ef Remove plugins/revspace_bounties
Replaced by 3 lines in revbank.products:

BOUNTY1  -10.00@-expenses/bounties  Bedankt voor het vegen/stofzuigen
BOUNTY2  -10.00@-expenses/bounties  Bedankt voor het afvoeren van het afval
BOUNTY3  -25.00@-expenses/bounties  Bedankt voor het dweilen
2022-12-25 05:50:44 +01:00
Juerd Waalboer
a444512bf1 Enable Perl warnings for plugins 2022-12-25 05:39:15 +01:00
Juerd Waalboer
da523f8daa v3.6: products overhaul
New features, new documentation.
2022-12-25 05:32:00 +01:00
Juerd Waalboer
e748566913 Silence warnings if there are <10 transactions 2022-12-25 02:10:22 +01:00
Juerd Waalboer
8998566068 Remove "pfand" plugin
Originally written as a proof of concept demo. Reportedly it's broken
and cumbersome to use anyway, because of the external config file.

I don't think anyone is actually using this right now.
2022-12-25 02:10:18 +01:00
Juerd Waalboer
c34caf434a Fix bug: "split" ignored quantity set by "repeat" or "plus" plugin 2022-12-22 19:37:57 +01:00
Juerd Waalboer
b9c91c0054 Formatting
One more character so values >= 100.00 don't mess up the columns, at
least up to 999.99. I hope nobody's actually parsing the logs with fixed
character offsets.
2022-12-13 21:39:57 +01:00
Juerd Waalboer
a2e0512ff5 Add help2 line for log 2022-11-14 20:34:40 +01:00
Juerd Waalboer
ad168a87e1 Tab completion for log command 2022-11-01 18:51:52 +01:00
Juerd Waalboer
50675af660 Case insensitive sort 2022-11-01 04:50:52 +01:00
Juerd Waalboer
4613a14a9f pager: don't scroll down for non-log
+ some code moved around in TextEditor
2022-11-01 04:48:49 +01:00
Juerd Waalboer
a18ef9939a Sort shame 2022-11-01 04:45:59 +01:00
Juerd Waalboer
900539af5a Use internal pager + new command "log"
No pager for "shame" because Curses::UI::TextEditor doesn't do color. If
it doesn't fit on the screen, you have bigger problems anyway.
2022-11-01 04:34:16 +01:00
Juerd Waalboer
922f8dc8f6 Ensure unique transaction IDs
Long overdue :)
2022-10-31 19:00:20 +01:00
Juerd Waalboer
44d17e6ae0 Remove redundant checks
Signatures already do arity-checking.
2022-10-31 16:37:19 +01:00
Juerd Waalboer
db73324c4e Add LICENSE file 2022-10-17 17:19:35 +02:00
Juerd Waalboer
45f12a9354 Fix saving files in text editor
It stored the old content, so effectively not changing the file.

I don't really understand why *this* was the version I committed,
because I was sure I tested it and it worked :)
2022-09-06 23:48:55 +02:00
Juerd Waalboer
4c380a8ac4 Fix bug in REJECT handling
Next input would not be split.

    > withdraw 1
    Pending:
	1.00 Withdrawal
    Enter username to deduct 1.00 from your account; type 'abort' to abort.

    > undo
    Undo is not available mid-transaction. Enter 'abort' to abort.
    > undo 123
    undo 123: No such product, user, or command.

Of course, "undo 123" as top-level input should have been split on
whitespace.

Top-level input is handled by the 'command' method, so that should be a
reliable way to detect that the prompt is a top-level prompt, rather
than a follow-up prompt. Keeping an additional global boolean was a dumb
approach anyway.
2022-08-30 22:50:04 +02:00
Juerd Waalboer
13e3435d33 Document new dependency 2022-08-30 21:08:25 +02:00
Juerd Waalboer
042db97ea8 editor: only ask to save if anything's changed; print status 2022-08-30 20:57:41 +02:00
Juerd Waalboer
43a1990974 bump to v3.5; add built-in editor 2022-08-30 20:45:01 +02:00
Juerd Waalboer
defe8d490c pfand: fix syntax error 2022-08-30 20:42:44 +02:00
Juerd Waalboer
596c64136a Fix pfand/repeat
If both plugins were loaded at the same time, nothing would still work.
2022-08-30 20:40:55 +02:00
Juerd Waalboer
22ca2ec61e Implement global advisory lock 2022-08-29 17:50:12 +02:00
Juerd Waalboer
9db2b208eb deposit: print formatted amount in prompt 2022-08-29 00:17:25 +02:00
Juerd Waalboer
ccaf5016ff New feature: cash box check via 'cash' command 2022-08-27 06:04:56 +02:00
Juerd Waalboer
92fb63088c donate command: s/Price/Amount/ 2022-08-27 05:00:15 +02:00
Juerd Waalboer
23e08fa977 New plugin: undeposit 2022-06-18 21:55:40 +02:00
Juerd Waalboer
9a81e2e100 Balance market plugin 2022-06-13 23:39:29 +02:00
Juerd Waalboer
c9ef624d82 Update error message 2022-06-12 22:49:33 +02:00
Juerd Waalboer
65566349f6 Prepare for future removal of support for unbalanced transactions
Don't worry, that won't happen for at least months. First we'll just log
warnings for a while.
2022-06-12 21:49:22 +02:00
Juerd Waalboer
507d368947 Don't leave messages for hidden accounts :D 2022-06-12 20:47:24 +02:00
Juerd Waalboer
34cb925906 plugins/tail: hide hidden accounts here too 2022-06-12 15:11:49 +02:00
Juerd Waalboer
8ebe489ade Don't allow undoing undos 2022-06-12 04:56:17 +02:00
Juerd Waalboer
2371e41f71 Let undo show recent transactions 2022-06-12 04:50:45 +02:00
Juerd Waalboer
73e8963c2f Fix undo
A non-existing account is no longer supported if it does not start with - or +
but the undo plugin used the "account" named "**UNDO**".
2022-06-12 04:27:22 +02:00
Juerd Waalboer
bdb4b2ce34 Refuse weird cash combos
Because withdraw/deposit make no sense without an account
2022-06-12 04:19:18 +02:00
Juerd Waalboer
8f43f326b1 typo 2022-06-12 02:34:34 +02:00
Juerd Waalboer
bec9578558 Display "0.00" instead of "0" when the -cash account doesn't exit yet 2022-06-12 02:32:41 +02:00
Juerd Waalboer
4ed3479ade Make undo/skim line up nicer in recent transactions view 2022-06-12 02:31:52 +02:00
Juerd Waalboer
76ef79b9ee Suppress warning when -cash does not yet exist 2022-06-12 02:31:29 +02:00
Juerd Waalboer
3a07b8eadb Use string amounts for balance
Doesn't change anything in practice
2022-06-12 02:17:44 +02:00
Juerd Waalboer
0cdb1b7eba Update README.md
and fix example revbank.accounts
2022-06-12 02:04:43 +02:00
Juerd Waalboer
d3328534c2 Add more info to UPGRADING.md 2022-06-11 21:31:11 +02:00
Juerd Waalboer
064841c25e Add cash box tracking with new plugin "cash" 2022-06-11 21:16:47 +02:00
Juerd Waalboer
681db369e7 New command: skim, for adjusting the amount in the cashbox
Generally intended for board members only, so not listed in "help".
2022-06-11 20:02:42 +02:00
Juerd Waalboer
9b302372f3 grandtotal: skip hidden accounts 2022-06-11 19:27:51 +02:00
Juerd Waalboer
441bf05fde Bump to v3.4; make all transactions balanced using hidden accounts
See UPGRADING.md for details.
2022-06-11 18:51:26 +02:00
Juerd Waalboer
e3a04a0e36 Keep track of cash
First attempt at keeping track of where cash goes using the new hidden
'-cash' account.
2022-06-11 17:18:31 +02:00