Commit graph

281 commits

Author SHA1 Message Date
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
Juerd Waalboer
9edd6e2e77 Delete nonsensical example
Was never supposed to be committed :)
2021-12-03 18:08:45 +01:00
Juerd Waalboer
eed0db7897 Cleanup: use subroutine signatures, remove deprecated methods.
The signatures feature has been "experimental" since Perl 5.20 (May 2014), but
expected to stay. After 8 years I'm ready to take the risk :)

Have added Perl v5.28 (June 2018) as the minimum requirement, even though the
current revbank should work with 5.20, to see if this bothers any users. Perl
v5.28 is in Debian "buster", which is now oldstable.
2021-12-03 18:00:34 +01:00
Juerd Waalboer
6850ed22be Remove requirement for dummy command method in hook-only plugins 2021-12-03 01:49:11 +01:00
Juerd Waalboer
38a0229899 Ditch floating point numbers, use cents instead; bump version to 3.2 2021-12-02 22:18:06 +01:00
Juerd Waalboer
2f182b34ed Support +1 and -1 2021-08-10 21:53:24 +02:00
Juerd Waalboer
83caf2c183 This is not a browser 2021-07-28 01:21:48 +02:00
Juerd Waalboer
cbaf86a23e Support non-repeatable entries 2021-07-28 00:40:36 +02:00
Juerd Waalboer
88cb8f5cb7 Debug 2021-07-28 00:40:23 +02:00
Juerd Waalboer
55fd4f457c Include transaction id in description 2021-07-27 23:58:55 +02:00
Juerd Waalboer
79cc37e4c6 Add revspace_mollie plugin 2021-07-27 23:24:48 +02:00
Juerd Waalboer
f7a7a19d8d Fix #7 2020-03-01 06:16:08 +01:00
Juerd Waalboer
31a1aa5c45 Fix spelling
Reported by Noor
2020-02-07 01:36:52 +01:00
Juerd Waalboer
9c3e773e6f RevSpace balance text update
It said that a negative balance is allowed, but this is only true for participants.
2020-01-29 01:13:13 +01:00
Juerd Waalboer
73cfe8c0e4 There is no last item in an empty list 2020-01-29 01:12:06 +01:00
Juerd Waalboer
a0eafa21f5 New plugin: plus 2019-12-13 00:01:01 +01:00
Juerd Waalboer
29b3eea131 market/products: reuse existing entry 2019-12-12 23:16:10 +01:00
Juerd Waalboer
da043ba2df New plugin: beep on error
If you computer beeps, that is. Most revbank setups run on raspberry pi's,
which don't beep...
2019-11-08 03:41:49 +01:00
Juerd Waalboer
354738fc02 New plugin: revspace_ascii 2019-11-07 04:07:31 +01:00
Juerd Waalboer
bb8c52b593 Do provide final cart when no pending cart was ever shown... 2019-11-06 06:13:18 +01:00
Juerd Waalboer
f4eb91a22b Increase maximum multiplication factor (repeat limit)
The limit was mostly imposed because of the actually repeated
lines, which would scroll off the screen. Now that the quantity
is just displayed as a number, I don't really see any technical
reason for a low limit; maybe 200 is still too low.
2019-11-06 03:25:38 +01:00
Juerd Waalboer
1f21d49bb9 Drop details of final transaction
They're the same as the last "pending" display, anyway.
2019-11-06 03:24:35 +01:00
Juerd Waalboer
321ada19ae Fix bug introduced by code order swap 2019-11-06 03:00:58 +01:00
Juerd Waalboer
f1389c8c5c Fix bug: would eat its own queued entry, resulting in no-op
It would work for the first item because the size >= 2 guard prevented the rest
of the sub from running.
2019-11-05 05:42:54 +01:00
Juerd Waalboer
1a9044df4f repeat: prettier placeholder 2019-11-05 03:26:47 +01:00
Juerd Waalboer
7c32eaeb3f Remove dead code 2019-11-05 02:56:42 +01:00
Juerd Waalboer
c7b66a1084 Fix revspace_mqtt plugin after change to new api 2019-11-05 01:49:02 +01:00
Juerd Waalboer
89885a29c1 Remove last references to "EUR"
Except the one in the EPC QR code, because the specification says
that EUR is mandatory.
2019-11-05 01:33:31 +01:00
Juerd Waalboer
1cbc906f1e Further update to new ledger-like internals 2019-11-05 00:57:39 +01:00