fixes error below...
authorMason James <mason.loves.sushi@gmail.com>
Sun, 15 Mar 2009 05:52:35 +0000 (18:52 +1300)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 26 May 2009 19:15:03 +0000 (21:15 +0200)
 bookcount.pl: Illegal Date 'Item has no branch transfers record' does not match 'iso' format: yyyy-mm-dd at /home/mason/git/kap-k3-2/circ/bookcount.pl line 88

tested on 3.0.x

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
circ/bookcount.pl

index eeeff41..9965611 100755 (executable)
@@ -23,6 +23,7 @@
 
 use strict;
 use CGI;
+use C4::Debug;
 use C4::Context;
 use C4::Circulation;
 use C4::Output;
@@ -49,7 +50,7 @@ my ( $lastmove, $message ) = lastmove($itm);
 my $lastdate;
 my $count;
 if ( not $lastmove ) {
-    $lastdate = $message;
+#    $lastdate = $message;
     $count = issuessince( $itm, 0 );
 }
 else {
@@ -81,6 +82,8 @@ foreach my $branchcode ( keys %$branches ) {
     push( @branchloop, \%linebranch );
 }
 
+### $lastdate
+
 $template->param(
     biblionumber            => $biblionumber,
     title                   => $data->{'title'},
@@ -89,7 +92,7 @@ $template->param(
     biblioitemnumber        => $bi,
     homebranch              => $homebranch,
     holdingbranch           => $holdingbranch,
-    lastdate                => format_date($lastdate),
+    lastdate                => $lastdate ?  format_date($lastdate) : $message,
     count                   => $count,
     branchloop              => \@branchloop,
 );