grandtotal: skip hidden accounts

This commit is contained in:
Juerd Waalboer 2022-06-11 19:27:51 +02:00
parent 441bf05fde
commit 9b302372f3

View file

@ -10,7 +10,10 @@ sub command :Tab(grandtotal) ($self, $cart, $command, @) {
open my $fh, "<", "revbank.accounts";
while (defined(my $line = readline $fh)) {
my $credit = (split " ", $line)[1];
my ($username, $balance) = split " ", $line;
next if RevBank::Users::is_hidden($username);
my $credit = $balance;
$neg += $credit if $credit < 0;
$pos += $credit if $credit > 0;
}