Commit graph

259 commits

Author SHA1 Message Date
Juerd Waalboer
0b43e5d7a4 undo: recent transaction list as part of prompt
This hides it when the command is given as a oneliner ("undo 123\n", as
opposed to "undo\n" + "123\n").
2023-01-16 03:06:48 +01:00
Juerd Waalboer
2836a5a671 Make GitHub do syntax highlighting 2023-01-09 03:43:39 +01:00
Juerd Waalboer
83c008dd61 Add 'statiegeld' plugin 2023-01-08 22:36:37 +01:00
Juerd Waalboer
c667fa676d Document percentage addon products 2023-01-05 20:47:00 +01:00
Juerd Waalboer
d4c6c1be35 Replace add_info() with extra parameter for add_contra()
add_info was a thing that grew organically to account for hidden
contras, but just wasn't right. The assumption was that if the
contra account is hidden, the contra itself should be hidden from
view - the sign of the amount would be wrong anyway.

The correct approach, however, would of course to flip the sign so it
matches the user's perspective, and to add a separate description string
to display to the user.
2023-01-05 20:46:46 +01:00
Juerd Waalboer
7c05b3108c New feature: percentage addons (discounts etc) 2023-01-05 19:42:34 +01:00
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
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
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
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
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
3a07b8eadb Use string amounts for balance
Doesn't change anything in practice
2022-06-12 02:17:44 +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
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
Juerd Waalboer
21788feb38 Don't log REGISTER anymore
It's ~25% of our logfile.

This feature was made so you can theoretically do a replay of the log, which
requires knowing which plugins were active when. But I don't think anyone's
actually doing that because it also requires other info that isn't logged.
2022-01-19 21:51:35 +01:00
Juerd Waalboer
abdcda89c1 Document another caveat 2022-01-19 17:58:18 +01:00
Juerd Waalboer
ec2092ba1b Add json plugin for machine parseable output 2022-01-19 17:40:05 +01:00
Juerd Waalboer
93754dbf60 Fix syntax error 2021-12-03 18:11:37 +01:00