Commit graph

465 commits

Author SHA1 Message Date
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
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
ec521aef7d Fix cosmetic issue 2021-12-03 18:28:01 +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
1661661ffd Use amount object directly internally,
instead of relying on operator overloading, but keep the ones where direct use
would result in overly messy code.
2021-12-03 03:23:16 +01:00
Juerd Waalboer
58f49cbffb Restore forced + sign in accounts file (harmless bug) 2021-12-03 02:55:25 +01:00
Juerd Waalboer
9cda968d53 Document ABORT constant as possible return value from hook
This feature was introduced way back in commit add31004.
2021-12-03 01:49:25 +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
cf8ce7dc52 Document parse_amount 2021-12-02 23:12:13 +01:00
Juerd Waalboer
f796470a21 README 2021-12-02 23:07:44 +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
9b582d5f9b Different order needed for new +1/-1 feature 2021-08-10 21:55:03 +02: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
df771e22fd Fix bug where follow-up prompt of second command would split on whitespace
Bug:

    > 2x unlisted 6
    Please provide a short description: bar foo
    foo: No such product, user, or command.

Fixed:

    > 2x unlisted 6
    Please provide a short description: bar foo
    Pending:
    2x {
        6.00 bar foo
    }
    Enter username to pay 12.00; type 'abort' to abort.
2020-09-07 02:27:25 +02:00
Juerd Waalboer
f312b31576 Fix POD/markdown 2020-06-10 21:05:20 +02:00
Juerd Waalboer
ea5d8bd8b5 Merge branch 'master' of github.com:Juerd/revbank 2020-03-01 06:17:27 +01:00
Juerd Waalboer
f7a7a19d8d Fix #7 2020-03-01 06:16:08 +01:00
Juerd Waalboer
6091db39c7
Merge pull request #12 from xesxen/master
Fix the name of hook_checkout_done in Plugins.pod
2020-02-28 21:32:51 +01:00
Wouter
4315f1ecb5
Fix the name of hook_checkout_done in Plugins.pod 2020-02-28 21:29:12 +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