Commit graph

34 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
0de7e2dda6 Tweak output (increase indendation) 2023-12-26 19:33:11 +01:00
Juerd Waalboer
3670a72c31 Fix padding
Somehow the %8s for the amount got turned into %6s in commit ef5babd3,
which should only have changed the padding for the quantity.
2023-12-26 05:47:29 +01:00
Juerd Waalboer
3470ebeb1c Explicitly use Perl 5.32
Was already implicitly required (since 59387ddb) because RevBank::Amount
uses the "isa" feature, which was introduced in Perl 5.32 (but no longer
experimental since 5.36, not 5.32 as the old comment said).

Perl 5.32 was released in June 2020, and ships with Debian bullseye
("oldstable") which was released in August 2021.
2023-12-12 00:28:17 +01:00
Juerd Waalboer
99154a4b62 Show deprecation notice for unbalanced entries 2023-11-24 06:22:30 +01:00
Juerd Waalboer
59387ddba4 Use formerly experimental Perl features with "use experimental"
This is semantically equivalent to use feature + no warnings, but less
noisy. I've also added comments to indicate when the line can be
removed.
2023-09-10 02:13:33 +02:00
Juerd Waalboer
c43764afbb Deal with @_ in signatured sub being experimental in Perl 5.36 2023-07-17 21:56:13 +02:00
Juerd Waalboer
0e1aa77fe5 statiegeld_tokens: simplify void
- No more red messages
- Accept "yes" case insensitively
- Change entry description and amount so the voiding is logged, which is
  more code but less complex than passing an attribute to be used during
  checkout.
2023-02-13 02:44:02 +01:00
Juerd Waalboer
248681631d More contrast
Some terminals (notably: linux non-framebuffer vt) do support colors,
but do not support the bold/bright attribute.
2023-02-12 17:51:17 +01:00
Juerd Waalboer
416c722511 Pad differently
Experimental code (never committed) had ANSI escape sequences there, and
required manual padding. Those were gone, but I forgot to change the
manual padding into normal sprintf padding.

This also makes it explicit that the left alignment is actually intended
here. (Actually looks better here.)
2023-01-30 05:05:26 +01:00
Juerd Waalboer
e5c004958f Always show quantity if quantity changed 2023-01-30 04:42:12 +01:00
Juerd Waalboer
99435cef17 Highlight change; apply operators to last scanned instead of last added 2023-01-30 04:40:42 +01:00
Juerd Waalboer
ef5babd3df More compact display for repeated products
Might revert later
2023-01-30 03:59:42 +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
da523f8daa v3.6: products overhaul
New features, new documentation.
2022-12-25 05:32:00 +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
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
4ed3479ade Make undo/skim line up nicer in recent transactions view 2022-06-12 02:31:52 +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
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
f84a69372a Hide contras of hidden users
For future "behind the scenes" actual bookkeeping
2022-06-11 17:17:53 +02:00
Juerd Waalboer
ec521aef7d Fix cosmetic issue 2021-12-03 18:28:01 +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
38a0229899 Ditch floating point numbers, use cents instead; bump version to 3.2 2021-12-02 22:18:06 +01:00
Juerd Waalboer
32e84f3725 Fix that 'changed' would return true just because the attribute existed :)
Another option would have been to implement 'delete_attribute'.
2019-11-06 17:43: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
0354b3d740 Tweak whitespace
Most amounts will have 1 digit before the decimal point, and
I prefer 4 space indents :)
2019-11-05 05:27:37 +01:00
Juerd Waalboer
08af3442a4 Restore # in logs (external tooling and plugin/users::recent depend on it) 2019-11-05 01:50:02 +01:00
Juerd Waalboer
63f81e3711 Change logging of quantity: replace EUR field 2019-11-05 01:32:42 +01:00
Juerd Waalboer
1cbc906f1e Further update to new ledger-like internals 2019-11-05 00:57:39 +01:00
Juerd Waalboer
5a7a7184dd Refactor cart to use "entries" instead of "items" 2019-11-04 21:53:07 +01:00
Juerd Waalboer
ed03f09414 Class for transaction (cart) entries. 2019-11-04 19:44:08 +01:00