View | Details | Raw Unified | Return to bug 12913
Collapse All | Expand All

(-)a/tools/inventory.pl (-17 / +4 lines)
Lines 93-98 for my $fwk (keys %$frameworks){ Link Here
93
}
93
}
94
94
95
my $statuses = [];
95
my $statuses = [];
96
my @notforloans;
96
for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){
97
for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){
97
    my $hash = {};
98
    my $hash = {};
98
    $hash->{fieldname} = $statfield;
99
    $hash->{fieldname} = $statfield;
Lines 101-106 for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.dama Link Here
101
        my $arr = GetAuthorisedValues($hash->{authcode});
102
        my $arr = GetAuthorisedValues($hash->{authcode});
102
        $hash->{values} = $arr;
103
        $hash->{values} = $arr;
103
        push @$statuses, $hash;
104
        push @$statuses, $hash;
105
        if ( $statfield eq 'items.notforloan') {
106
            @notforloans = map { $_->{'authorised_value'} } @$arr;
107
        }
104
    }
108
    }
105
}
109
}
106
110
Lines 116-131 for my $authvfield (@$statuses) { Link Here
116
    }
120
    }
117
}
121
}
118
122
119
my $notforloanlist;
120
my $statussth = '';
121
for my $authvfield (@$statuses) {
122
    if ( scalar @{$staton->{$authvfield->{fieldname}}} > 0 ){
123
        my $joinedvals = join ',', @{$staton->{$authvfield->{fieldname}}};
124
        $statussth .= "$authvfield->{fieldname} in ($joinedvals) and ";
125
        $notforloanlist = $joinedvals if ($authvfield->{fieldname} eq "items.notforloan");
126
    }
127
}
128
$statussth =~ s, and $,,g;
129
$template->param(
123
$template->param(
130
    branchloop               => \@branch_loop,
124
    branchloop               => \@branch_loop,
131
    authorised_values        => \@authorised_value_list,
125
    authorised_values        => \@authorised_value_list,
Lines 138-151 $template->param( Link Here
138
    branch                   => $branch,
132
    branch                   => $branch,
139
    datelastseen             => $datelastseen,
133
    datelastseen             => $datelastseen,
140
    compareinv2barcd         => $compareinv2barcd,
134
    compareinv2barcd         => $compareinv2barcd,
141
    notforloanlist           => $notforloanlist
142
);
135
);
143
136
144
my @notforloans;
145
if (defined $notforloanlist) {
146
    @notforloans = split(/,/, $notforloanlist);
147
}
148
149
my @scanned_items;
137
my @scanned_items;
150
my @errorloop;
138
my @errorloop;
151
if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) {
139
if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) {
152
- 

Return to bug 12913