Commit graph

347 commits

Author SHA1 Message Date
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
Juerd Waalboer
f84a69372a Hide contras of hidden users
For future "behind the scenes" actual bookkeeping
2022-06-11 17:17:53 +02:00
Juerd Waalboer
ccae71021a Get 'cash' working again
Now implemented via a hidden user called '-cash'.

This also introduces the concept of hidden accounts, that begin with '+' or
'-', for result accounts and balance accounts. Future versions can further
use this for more detailed bookkeeping. The idea behind the sign is that
'-' accounts should be inverted to get the intuitive value. So if the account
'-cash' has -13.37, that means there should be +13.37 in the cash box (or,
well, once the rest of this is implemented and the initial values are then set
correctly.)
2022-06-11 16:58:20 +02:00
Juerd Waalboer
f262bce57c Split "help" into "help" and "help2"; ditch pager 2022-06-11 16:31:44 +02:00
Juerd Waalboer
a7a5f14e0c Introduce 'withdraw', remove "withdrawal or unlisted" feature.
This should have been done much earlier, but wasn't done for nostalgic reasons.
To new users, it didn't make sense that you could just enter an amount, and
revbank would just accept that as "withdrawal or unlisted product". It existed
for backwards compatibility with the very first revbank version, which didn't
have a product list, and which was not yet used with a barcode scanner. You
would simply enter the amount and your name, and there were no further
statistics.

Nowadays, there are statistics that are messed up if you don't use the product
codes. And some people were looking for a withdrawal command, and try 'take' as
that seems closest to it, but which instead transfers money to another account.

Additionally, some texts were changed for improved clarity. ("Enter username to
pay", when withdrawing, was confusing: one expects money back, not to pay more.)
2022-06-04 02:41:17 +02:00
Juerd Waalboer
e71df9b092 Warn from 19.84 instead of 13.37
This should probably not be hardcoded, but revbank currently has no
configuration mechanism.
2022-04-12 19:39:14 +02:00