[Koha-patches] [PATCH] fixes error below...

Mason James mason.loves.sushi at gmail.com
Sun Mar 15 06:52:35 CET 2009


 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
---
 circ/bookcount.pl |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/circ/bookcount.pl b/circ/bookcount.pl
index eeeff41..9965611 100755
--- a/circ/bookcount.pl
+++ b/circ/bookcount.pl
@@ -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,
 );
-- 
1.5.6.5




More information about the Koha-patches mailing list