From 4f54ed379246e9d36723854d8f4fed48093efc06 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Thu, 11 Oct 2007 15:52:18 -0500 Subject: [PATCH] bug fixing : 1459 + fixing a jserror in basket.tmpl Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Circulation.pm | 8 ++++---- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 8363ea8e59..e05dcfcc1c 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -690,10 +690,10 @@ sub CanBookBeIssued { if ( $borrower->{'dateexpiry'} eq '0000-00-00') { $issuingimpossible{EXPIRED} = 1; } else { - if ( Date_to_Days(Today) > - Date_to_Days( split "-", $borrower->{'dateexpiry'} ) ) - { - $issuingimpossible{EXPIRED} = 1; + my @expirydate= split /-/,$borrower->{'dateexpiry'}; + if($expirydate[0]==0 || $expirydate[1]==0|| $expirydate[2]==0 || + Date_to_Days(Today) > Date_to_Days( @expirydate )) { + $issuingimpossible{EXPIRED} = 1; } } # diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl index 22b1310c26..5806102328 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl @@ -3,7 +3,8 @@