[Koha-patches] [PATCH] Bug 3507 - This is the closest bug I could find to the pop up. We just need a simple syspref
Darrell Ulm
darrellulm at smfpl.org
Wed Aug 26 19:48:20 CEST 2009
---
circ/circulation.pl | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/circ/circulation.pl b/circ/circulation.pl
index 986b10c..e46a630 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -100,12 +100,13 @@ my $borrowernumber = $query->param('borrowernumber');
$branch = C4::Context->userenv->{'branch'};
$printer = C4::Context->userenv->{'branchprinter'};
-
# If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian
if (C4::Context->preference("AutoLocation") ne 1) { # FIXME: string comparison to number
$template->param(ManualLocation => 1);
}
+my $confirmissuescharge = C4::Context->preference('confirmissuescharge');
+
my $barcode = $query->param('barcode') || '';
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
@@ -275,12 +276,18 @@ if ($borrowernumber) {
# STEP 3 : ISSUING
#
#
+
+# pull the borrower flags, we need them early to block the extraneous pop up
+my $flags = $borrower->{'flags'};
+
if ($barcode) {
# always check for blockers on issuing
my ( $error, $question ) =
CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
my $blocker = $invalidduedate ? 1 : 0;
+ $debt_confirmed = 1 if ( $flags->{'CHARGES'}->{'amount'} < $confirmissuescharge );
+
delete $question->{'DEBT'} if ($debt_confirmed);
foreach my $impossible ( keys %$error ) {
$template->param(
@@ -551,7 +558,7 @@ foreach my $flag ( sort keys %$flags ) {
elsif ( $flag eq 'DBARRED' ) {
$template->param( dbarred => 'true' );
}
- elsif ( $flag eq 'CHARGES' ) {
+ elsif ( $flag eq 'CHARGES' ) {
$template->param(
charges => 'true',
chargesmsg => $flags->{'CHARGES'}->{'message'},
@@ -567,7 +574,7 @@ foreach my $flag ( sort keys %$flags ) {
}
}
else {
- if ( $flag eq 'CHARGES' ) {
+ if ( $flag eq 'CHARGES' ) {
$template->param(
charges => 'true',
flagged => 1,
--
1.5.6.5
More information about the Koha-patches
mailing list