Update holdings sort to sort by items.enumchron if there's no serial record and the...
authorRyan Higgins <rch@liblime.com>
Wed, 23 Jul 2008 20:04:19 +0000 (15:04 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 24 Jul 2008 16:26:02 +0000 (11:26 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Items.pm

index fa31f52..74196e9 100644 (file)
@@ -1261,7 +1261,7 @@ sub GetItemsInfo {
     }
     $sth->finish;
        if($serial) {
-               return( sort { $b->{'publisheddate'} cmp $a->{'publisheddate'} } @results );
+               return( sort { ($b->{'publisheddate'} || $b->{'enumchron'}) cmp ($a->{'publisheddate'} || $a->{'enumchron'}) } @results );
        } else {
        return (@results);
        }