Bump to v3.4; make all transactions balanced using hidden accounts

See UPGRADING.md for details.
This commit is contained in:
Juerd Waalboer 2022-06-11 18:51:05 +02:00
parent e3a04a0e36
commit 441bf05fde
14 changed files with 116 additions and 40 deletions

View file

@ -27,6 +27,7 @@ sub new($class, $amount, $description, $attributes = {}) {
sub add_contra($self, $user, $amount, $description) {
$amount = RevBank::Amount->parse_string($amount) if not ref $amount;
$user = RevBank::Users::assert_user($user);
$description =~ s/\$you/$self->{user}/g if defined $self->{user};
@ -84,7 +85,7 @@ sub as_printable($self) {
push @s, sprintf "%8s %s", $self->{amount}->string_flipped, $self->{description};
for my $c ($self->contras) {
next if RevBank::Users::is_hidden($c->{user});
next if RevBank::Users::is_hidden($c->{user}) and not $ENV{REVBANK_DEBUG};
push @s, sprintf(
"%11s %s %s",