# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
-use strict;
-#use warnings; FIXME - Bug 2505
+use Modern::Perl;
use C4::Auth;
use CGI qw ( -utf8 );
use C4::Context;
use C4::Reports;
use C4::Members;
use Koha::DateUtils;
+use Koha::ItemTypes;
=head1 NAME
my $CGIsepChoice=GetDelimiterChoices;
#doctype
- my $itemtypes = GetItemTypes;
- my @itemtypeloop;
- foreach my $thisitemtype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description}} keys %$itemtypes) {
- my %row =(value => $thisitemtype,
- description => $itemtypes->{$thisitemtype}->{translated_description},
- );
- push @itemtypeloop, \%row;
- }
+ my $itemtypes = Koha::ItemTypes->search_with_localization;
#ccode
my $ccodes = GetAuthorisedValues('CCODE');
$template->param(
CGIextChoice => $CGIextChoice,
CGIsepChoice => $CGIsepChoice,
- itemtypeloop =>\@itemtypeloop,
+ itemtypes => $itemtypes,
ccodeloop =>\@ccodeloop,
shelvinglocloop =>\@shelvinglocloop,
patron_categories => $patron_categories,