my (@openedsubscriptions, @closedsubscriptions);
for my $sub ( @subscriptions ) {
unless ( $sub->{closed} ) {
- push @openedsubscriptions, $sub;
+ push @openedsubscriptions, $sub
+ unless $sub->{cannotdisplay};
} else {
- push @closedsubscriptions, $sub;
+ push @closedsubscriptions, $sub
+ unless $sub->{cannotdisplay};
}
}
my @branches_loop;
foreach (sort keys %$branches){
my $selected = 0;
- $selected = 1 if( $branch eq $_ );
+ $selected = 1 if( defined $branch and $branch eq $_ );
push @branches_loop, {
branchcode => $_,
branchname => $branches->{$_}->{'branchname'},