Bugzilla – Attachment 12567 Details for
Bug 8058
Circulation empty barcode field redirect to pay fines screen if borrower has outstanding fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed error in redirecting when user had positive balance
0001-bug-8058-allow-empty-barcode-in-circulation-to-redir.patch (text/plain), 6.38 KB, created by
Chris Hall
on 2012-09-28 06:02:54 UTC
(
hide
)
Description:
Fixed error in redirecting when user had positive balance
Filename:
MIME Type:
Creator:
Chris Hall
Created:
2012-09-28 06:02:54 UTC
Size:
6.38 KB
patch
obsolete
>From d05359b488c7fa0677d3f9001444bcf600494122 Mon Sep 17 00:00:00 2001 >From: Chris Hall <chrish@catalyst.net.nz> >Date: Tue, 8 May 2012 10:32:51 +1200 >Subject: [PATCH] bug 8058 allow empty barcode in circulation to redirect to pay fines screen Also adds the option for printing the quickslip and then clearing the screen. > >--- > circ/circulation.pl | 11 ++++++++++- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../en/modules/admin/preferences/circulation.pref | 6 ++++++ > .../prog/en/modules/circ/circulation.tt | 4 +++- > 5 files changed, 27 insertions(+), 2 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index f15d4ce..0b4d355 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -104,7 +104,6 @@ for (@failedreturns) { $return_failed{$_} = 1; } > my $findborrower = $query->param('findborrower'); > $findborrower =~ s|,| |g; > my $borrowernumber = $query->param('borrowernumber'); >- > $branch = C4::Context->userenv->{'branch'}; > $printer = C4::Context->userenv->{'branchprinter'}; > >@@ -132,6 +131,7 @@ my $issueconfirmed = $query->param('issueconfirmed'); > my $cancelreserve = $query->param('cancelreserve'); > my $organisation = $query->param('organisations'); > my $print = $query->param('print'); >+my $finesredirect = $query->param('finesredirect'); > my $newexpiry = $query->param('dateexpiry'); > my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice > >@@ -180,6 +180,14 @@ if ( $print eq 'yes' && $borrowernumber ne '' ) { > NetworkPrint($letter->{content}); > } > $query->param( 'borrowernumber', '' ); >+} >+ >+if ( $finesredirect && $borrowernumber ne '' && $barcode eq '' ){ >+ print $query->redirect("/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber"); >+} >+ >+# this was initially inside the previous if with the same conditions but was interfering with $finesredirect >+if ( $print eq 'yes' && $borrowernumber ne '' ) { > $borrowernumber = ''; > } > >@@ -716,6 +724,7 @@ $template->param( > activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), > SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'), > AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), >+ CircPayFinesRedirect => (C4::Context->preference('CircPayFinesRedirect') ? $total > 0 : 0 ), > ); > > # save stickyduedate to session >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index ef2538c..43e4b6d 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -383,3 +383,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowLibrariesPulldownMobile','1','Show the libraries pulldown on the mobile version of the OPAC.',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowFiltersPulldownMobile','1','Show the search filters pulldown on the mobile version of the OPAC.',NULL,'YesNo'); > INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('AuthDisplayHierarchy','0','Display authority hierarchies','','YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CircPayFinesRedirect','0','When an empty barcode is entered into the checkout field will redirect to pay fines page if borrowser has fines to pay (after quickslip if enabled)',NULL,'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index eb45fb2..92bddbb 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5982,6 +5982,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.09.00.XXX"; >+if( C4::Context->preference("Version") < TransformToNum($DBversion) ){ >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CircPayFinesRedirect',' 0','When an empty barcode is entered into the checkout field will redirect to pay fines page if borrowser has fines to pay (after quickslip if enabled)',NULL,'YesNo')"); >+ print "Upgrade to $DBversion done\n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 531b878..cf481b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -116,6 +116,12 @@ Circulation: > yes: Export > no: "Don't export" > - fields for csv or iso2709 export >+ - >+ - pref: CircPayFinesRedirect >+ choices: >+ yes: "Redirect to pay to fines screen if borrower has outstanding fines" >+ no: "do nothing" >+ - . > Checkout Policy: > - > - pref: AllowNotForLoanOverride >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index db17ced..b6a6f9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -58,10 +58,11 @@ > // listen submit to trigger qslip on empty checkout > $('#mainform').bind('submit',function() { > if ($('#barcode').val() == '') { >- return printx_window('qslip'); } >+ printx_window('qslip'); } > });[% END %] > > >+ > var allcheckboxes = $(".checkboxed"); > $("#renew_all").click(function(){ > $(allcheckboxes).checkCheckboxes(":input[name*=items]"); >@@ -574,6 +575,7 @@ No patron matched <span class="ex">[% message %]</span> > <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" /> > [% END %] > <input type="submit" value="Check Out" /> >+ <input type="hidden" name="finesredirect" value="[% CircPayFinesRedirect %]" /> > > [% IF ( SpecifyDueDate ) %]<div class="date-select"> > <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div> >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8058
:
9445
|
9446
|
9574
|
10528
|
10531
|
12567
|
12670
|
12692
|
12693
|
15649