|
Lines 30-35
use C4::Reports;
Link Here
|
| 30 |
use C4::Members; |
30 |
use C4::Members; |
| 31 |
use Koha::AuthorisedValues; |
31 |
use Koha::AuthorisedValues; |
| 32 |
use Koha::DateUtils; |
32 |
use Koha::DateUtils; |
|
|
33 |
use Koha::ItemTypes; |
| 33 |
use Koha::Libraries; |
34 |
use Koha::Libraries; |
| 34 |
use Koha::Patron::Categories; |
35 |
use Koha::Patron::Categories; |
| 35 |
use List::MoreUtils qw/any/; |
36 |
use List::MoreUtils qw/any/; |
|
Lines 74-80
$sep = "\t" if ($sep eq 'tabulation');
Link Here
|
| 74 |
$template->param(do_it => $do_it, |
75 |
$template->param(do_it => $do_it, |
| 75 |
); |
76 |
); |
| 76 |
|
77 |
|
| 77 |
my $itemtypes = GetItemTypes(); |
|
|
| 78 |
my @patron_categories = Koha::Patron::Categories->search_limited({}, {order_by => ['description']}); |
78 |
my @patron_categories = Koha::Patron::Categories->search_limited({}, {order_by => ['description']}); |
| 79 |
|
79 |
|
| 80 |
my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; |
80 |
my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; |
|
Lines 130-140
my @values;
Link Here
|
| 130 |
my %labels; |
130 |
my %labels; |
| 131 |
my %select; |
131 |
my %select; |
| 132 |
|
132 |
|
| 133 |
# create itemtype arrayref for <select>. |
133 |
my $itemtypes = Koha::ItemTypes->search_with_localization; |
| 134 |
my @itemtypeloop; |
|
|
| 135 |
for my $itype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description}} keys(%$itemtypes)) { |
| 136 |
push @itemtypeloop, { code => $itype , description => $itemtypes->{$itype}->{translated_description} } ; |
| 137 |
} |
| 138 |
|
134 |
|
| 139 |
# location list |
135 |
# location list |
| 140 |
my @locations; |
136 |
my @locations; |
|
Lines 153-159
my $CGIsepChoice=GetDelimiterChoices;
Link Here
|
| 153 |
|
149 |
|
| 154 |
$template->param( |
150 |
$template->param( |
| 155 |
categoryloop => \@patron_categories, |
151 |
categoryloop => \@patron_categories, |
| 156 |
itemtypeloop => \@itemtypeloop, |
152 |
itemtypes => $itemtypes, |
| 157 |
locationloop => \@locations, |
153 |
locationloop => \@locations, |
| 158 |
ccodeloop => \@ccodes, |
154 |
ccodeloop => \@ccodes, |
| 159 |
hassort1=> $hassort1, |
155 |
hassort1=> $hassort1, |
|
Lines 319-331
sub display_value {
Link Here
|
| 319 |
my ( $crit, $value ) = @_; |
315 |
my ( $crit, $value ) = @_; |
| 320 |
my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; |
316 |
my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; |
| 321 |
my $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) }; |
317 |
my $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) }; |
| 322 |
my $itemtypes = GetItemTypes(); |
|
|
| 323 |
my $Bsort1 = GetAuthorisedValues("Bsort1"); |
318 |
my $Bsort1 = GetAuthorisedValues("Bsort1"); |
| 324 |
my $Bsort2 = GetAuthorisedValues("Bsort2"); |
319 |
my $Bsort2 = GetAuthorisedValues("Bsort2"); |
| 325 |
my $display_value = |
320 |
my $display_value = |
| 326 |
( $crit =~ /ccode/ ) ? $ccodes->{$value} |
321 |
( $crit =~ /ccode/ ) ? $ccodes->{$value} |
| 327 |
: ( $crit =~ /location/ ) ? $locations->{$value} |
322 |
: ( $crit =~ /location/ ) ? $locations->{$value} |
| 328 |
: ( $crit =~ /itemtype/ ) ? $itemtypes->{$value}->{description} |
323 |
: ( $crit =~ /itemtype/ ) ? Koha::ItemTypes->find( $value )->translated_description |
| 329 |
: ( $crit =~ /branch/ ) ? Koha::Libraries->find($value)->branchname |
324 |
: ( $crit =~ /branch/ ) ? Koha::Libraries->find($value)->branchname |
| 330 |
: ( $crit =~ /reservestatus/ ) ? reservestatushuman($value) |
325 |
: ( $crit =~ /reservestatus/ ) ? reservestatushuman($value) |
| 331 |
: $value; # default fallback |
326 |
: $value; # default fallback |