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

(-)a/tools/inventory.pl (-10 / +4 lines)
Lines 37-42 use C4::Charset qw( NormalizeString ); Link Here
37
37
38
use Koha::Biblios;
38
use Koha::Biblios;
39
use Koha::DateUtils qw( dt_from_string output_pref );
39
use Koha::DateUtils qw( dt_from_string output_pref );
40
use Koha::Database::Columns;
40
use Koha::AuthorisedValues;
41
use Koha::AuthorisedValues;
41
use Koha::BiblioFrameworks;
42
use Koha::BiblioFrameworks;
42
use Koha::ClassSources;
43
use Koha::ClassSources;
Lines 383-396 if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ Link Here
383
        -attachment => 'inventory.csv',
384
        -attachment => 'inventory.csv',
384
    );
385
    );
385
386
386
    my $columns_def_hashref = C4::Reports::Guided::_get_column_defs($input);
387
    my $columns = Koha::Database::Columns->columns;
387
    foreach my $key ( keys %$columns_def_hashref ) {
388
        my $initkey = $key;
389
        $key =~ s/[^\.]*\.//;
390
        $columns_def_hashref->{$initkey}=NormalizeString($columns_def_hashref->{$initkey} // '');
391
        $columns_def_hashref->{$key} = $columns_def_hashref->{$initkey};
392
    }
393
394
    my @translated_keys;
388
    my @translated_keys;
395
    for my $key (qw / biblioitems.title    biblio.author
389
    for my $key (qw / biblioitems.title    biblio.author
396
                      items.barcode        items.itemnumber
390
                      items.barcode        items.itemnumber
Lines 399-405 if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ Link Here
399
                      items.itemlost       items.damaged
393
                      items.itemlost       items.damaged
400
                      items.withdrawn      items.stocknumber
394
                      items.withdrawn      items.stocknumber
401
                      / ) {
395
                      / ) {
402
       push @translated_keys, $columns_def_hashref->{$key};
396
        my ( $table, $column ) = split '\.', $key;
397
        push @translated_keys, NormalizeString($columns->{$table}->{$column} // '');
403
    }
398
    }
404
    push @translated_keys, 'problem' if $uploadbarcodes;
399
    push @translated_keys, 'problem' if $uploadbarcodes;
405
400
406
- 

Return to bug 29695