From 321474ab318f429f47be9cdd25fbf2bde6b5072a Mon Sep 17 00:00:00 2001 From: bob_lyon Date: Wed, 7 Jun 2006 02:31:18 +0000 Subject: [PATCH] merging katipo changes... fixing syntax mistake and adding specific change allowing workers at a library not to have issuing impossible alerts --- C4/Circulation/Circ2.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index f853df0c90..88452c2ea4 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -797,8 +797,8 @@ sub canbookbeissued { # DEBTS my $amount = checkaccount($env,$borrower->{'borrowernumber'}, $dbh,$duedate); - if($C4::Context->preference("IssuingInProcess")){ - my $amountlimit = $C4::Context->preference("noissuescharge"); + if(C4::Context->preference("IssuingInProcess")){ + my $amountlimit = C4::Context->preference("noissuescharge"); if ($amount > $amountlimit && !$inprocess) { $issuingimpossible{DEBT} = sprintf("%.2f",$amount); } elsif ($amount <= $amountlimit && !$inprocess) { @@ -848,7 +848,7 @@ sub canbookbeissued { if ($renewstatus == 0) { # no more renewals allowed $issuingimpossible{NO_MORE_RENEWALS} = 1; } else { - $needsconfirmation{RENEW_ISSUE} = 1; + # $needsconfirmation{RENEW_ISSUE} = 1; } } elsif ($currentborrower) { # issued to someone else @@ -876,7 +876,16 @@ sub canbookbeissued { $needsconfirmation{RESERVED} = "$res->{'reservedate'} : $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'})"; } } - return(\%issuingimpossible,\%needsconfirmation); + if(C4::Context->preference("LibraryName") eq "Horowhenua Library Trust"){ + if ($borrower->{'categorycode'} eq 'W'){ + my %issuingimpossible; + return(\%issuingimpossible,\%needsconfirmation); + } else { + return(\%issuingimpossible,\%needsconfirmation); + } + } else { + return(\%issuingimpossible,\%needsconfirmation); + } } =head2 issuebook -- 2.39.5