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

(-)a/tools/inventory.pl (-7 / +6 lines)
Lines 39-45 use C4::Circulation; Link Here
39
my $minlocation=$input->param('minlocation') || '';
39
my $minlocation=$input->param('minlocation') || '';
40
my $maxlocation=$input->param('maxlocation');
40
my $maxlocation=$input->param('maxlocation');
41
$maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation );
41
$maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation );
42
my $location=$input->param('location');
42
my $location=$input->param('location') || '';
43
my $itemtype=$input->param('itemtype'); # FIXME note, template does not currently supply this
43
my $itemtype=$input->param('itemtype'); # FIXME note, template does not currently supply this
44
my $ignoreissued=$input->param('ignoreissued');
44
my $ignoreissued=$input->param('ignoreissued');
45
my $datelastseen = $input->param('datelastseen');
45
my $datelastseen = $input->param('datelastseen');
Lines 48-54 my $markseen = $input->param('markseen'); Link Here
48
$offset=0 unless $offset;
48
$offset=0 unless $offset;
49
my $pagesize = $input->param('pagesize');
49
my $pagesize = $input->param('pagesize');
50
$pagesize=50 unless $pagesize;
50
$pagesize=50 unless $pagesize;
51
my $branchcode = $input->param('branchcode');
51
my $branchcode = $input->param('branchcode') || '';
52
my $branch     = $input->param('branch');
52
my $branch     = $input->param('branch');
53
my $op = $input->param('op');
53
my $op = $input->param('op');
54
my $res;    #contains the results loop
54
my $res;    #contains the results loop
Lines 74-80 for my $branch_hash (keys %$branches) { Link Here
74
74
75
@branch_loop = sort {$a->{branchname} cmp $b->{branchname}} @branch_loop;
75
@branch_loop = sort {$a->{branchname} cmp $b->{branchname}} @branch_loop;
76
my @authorised_value_list;
76
my @authorised_value_list;
77
my $authorisedvalue_categories;
77
my $authorisedvalue_categories = '';
78
78
79
my $frameworks = getframeworks();
79
my $frameworks = getframeworks();
80
for my $fwk (keys %$frameworks){
80
for my $fwk (keys %$frameworks){
Lines 106-112 my $staton = {}; #authorized values that are ticked Link Here
106
for my $authvfield (@$statuses) {
106
for my $authvfield (@$statuses) {
107
    $staton->{$authvfield->{fieldname}} = [];
107
    $staton->{$authvfield->{fieldname}} = [];
108
    for my $authval (@{$authvfield->{values}}){
108
    for my $authval (@{$authvfield->{values}}){
109
        if ( $input->param('status-' . $authvfield->{fieldname} . '-' . $authval->{id}) eq 'on' ){
109
        if ( defined $input->param('status-' . $authvfield->{fieldname} . '-' . $authval->{id}) && $input->param('status-' . $authvfield->{fieldname} . '-' . $authval->{id}) eq 'on' ){
110
            push @{$staton->{$authvfield->{fieldname}}}, $authval->{id};
110
            push @{$staton->{$authvfield->{fieldname}}}, $authval->{id};
111
        }
111
        }
112
    }
112
    }
Lines 191-197 if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa Link Here
191
                        prevoffset => ($offset?$offset-$pagesize:0),
191
                        prevoffset => ($offset?$offset-$pagesize:0),
192
                        );
192
                        );
193
    }
193
    }
194
    if ( ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){
194
    if ( defined $input->param('compareinv2barcd') && ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){
195
        if ( scalar @brcditems > scalar @$res ){
195
        if ( scalar @brcditems > scalar @$res ){
196
            for my $brcditem (@brcditems) {
196
            for my $brcditem (@brcditems) {
197
                if (! grep(/$brcditem->{barcode}/, @$res) ){
197
                if (! grep(/$brcditem->{barcode}/, @$res) ){
Lines 212-218 if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa Link Here
212
    }
212
    }
213
}
213
}
214
214
215
if ($input->param('CSVexport') eq 'on'){
215
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
216
    eval {use Text::CSV};
216
    eval {use Text::CSV};
217
    my $csv = Text::CSV->new or
217
    my $csv = Text::CSV->new or
218
            die Text::CSV->error_diag ();
218
            die Text::CSV->error_diag ();
219
- 

Return to bug 2505