sanop specific : sorting itemtype
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 3 Jun 2009 15:19:37 +0000 (17:19 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 30 Sep 2009 09:30:25 +0000 (11:30 +0200)
should not be ported to head, as it's a dirty unimarc hack, that will disappear with itemtype at item level

acqui/addorderiso2709.pl

index 51df588..6329307 100755 (executable)
@@ -266,7 +266,7 @@ sub import_biblios_list {
 # Itemtype is mandatory for adding a biblioitem, we just add a default, the user needs to modify this aftewards
     my $itemtypehash = GetItemTypes();
     my @itemtypes;
-    for my $key (keys %$itemtypehash) {
+    for my $key (sort { $itemtypehash->{$a}->{description} cmp $itemtypehash->{$b}->{description} } keys %$itemtypehash) {
         push(@itemtypes, $itemtypehash->{$key});
     }
     foreach my $biblio (@$biblios) {