(bug #3405) fix on loan list in search result
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Wed, 8 Jul 2009 11:46:48 +0000 (13:46 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:19 +0000 (23:19 +0200)
The hash keys were made using a base and $item->{date_due}, but this key doesn't exists, so the possibility to have duplicate keys exists, and sometimes the others items were not shown. This patch fix this bug.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Search.pm

index 7fbbab3..d7770a3 100644 (file)
@@ -1379,7 +1379,7 @@ s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
 # For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
             if ( $item->{onloan} ) {
                 $onloan_count++;
-                               my $key = $prefix . $item->{due_date};
+                               my $key = $prefix . $item->{onloan} . $item->{barcode};
                                $onloan_items->{$key}->{due_date} = format_date($item->{onloan});
                                $onloan_items->{$key}->{count}++ if $item->{$hbranch};
                                $onloan_items->{$key}->{branchname} = $item->{branchname};