Commit graph

20 commits

Author SHA1 Message Date
Juerd Waalboer
a303cad131 Remove support for unbalanced transaction, release v7.0.0 2024-11-17 01:14:43 +01:00
Juerd Waalboer
f4d3b7fd5c undo: assert undoability instead of rolling back invalid undo
Making use of other recent changes, like that it's now safe to throw
exceptions during hook_checkout_prepare to abort the transaction.
2023-12-26 02:10:34 +01:00
Juerd Waalboer
6b04ecc256 undo: deal with checkout exception
The ancient decision to let undo perform the checkout by itself still
makes sense from a UX perspective, but keeps requiring specific handling
of edge cases.

In this case, the easiest way to deal with trailing input is to just
abort entirely.

Also: updated lib/RevBank/Plugins.pm to import 'isa' and get up to 5.32
level.
2023-12-26 02:08:24 +01:00
Juerd Waalboer
ca03cb95d4 New plugin statiegeld_tokens
Activating statiegeld_tokens will limit the use of the statiegeld plugin
for container deposit refunds to what was bought at this venue.

Still needs documentation.

Changes to 'statiegeld' and 'undo' were made to support the new
plugin, specifically:

- metadata (attributes) added in $cart->add, for the statiegeld_tokens
  plugin to use.
- statiegeld plugin now shares a global variable (configuration).
- undo can now be rolled back during hook_checkout.
2023-01-16 03:08:42 +01:00
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
22ca2ec61e Implement global advisory lock 2022-08-29 17:50:12 +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
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
f262bce57c Split "help" into "help" and "help2"; ditch pager 2022-06-11 16:31:44 +02: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
1cbc906f1e Further update to new ledger-like internals 2019-11-05 00:57:39 +01:00
Juerd Waalboer
fa60e1081a chmod 644 plugins/*
Undoes 714b337 because github seems to no longer require chmod +x
for syntax highlighting extensionless files.
2019-08-07 15:42:16 +02:00
Juerd Waalboer
a9889ecefb Improve command descriptions 2017-04-24 22:22:16 +02:00
Juerd Waalboer
1f658524f0 Fix bug: "undo ?" would undo EVERYTHING.
Reported by qguv.

Cause: user input used in a regex without validation or escaping.
2015-10-01 15:48:27 +02:00
Juerd Waalboer
6372e30cac "give" now takes a reason like "take", only optional args between [] in help.
Contributed by BugBlue
2013-02-28 16:31:05 +01:00
Juerd Waalboer
4995e84b83 Git highlight alleen met +x? Okay, dan doen we +x :-) 2013-02-26 04:44:29 +01:00
Juerd Waalboer
18d1a552fb Shebangs voor syntax highlighting 2013-02-26 04:42:45 +01:00
Juerd Waalboer
c157ea0214 RevBank 2.0, a rewrite. It's plugin based now. 2013-02-26 04:11:13 +01:00