grandtotal: skip hidden accounts
This commit is contained in:
parent
441bf05fde
commit
9b302372f3
1 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,10 @@ sub command :Tab(grandtotal) ($self, $cart, $command, @) {
|
||||||
|
|
||||||
open my $fh, "<", "revbank.accounts";
|
open my $fh, "<", "revbank.accounts";
|
||||||
while (defined(my $line = readline $fh)) {
|
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;
|
$neg += $credit if $credit < 0;
|
||||||
$pos += $credit if $credit > 0;
|
$pos += $credit if $credit > 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue