View | Details | Raw Unified | Return to bug 8058
Collapse All | Expand All

(-)a/circ/circulation.pl (-1 / +10 lines)
Lines 104-110 for (@failedreturns) { $return_failed{$_} = 1; } Link Here
104
my $findborrower = $query->param('findborrower');
104
my $findborrower = $query->param('findborrower');
105
$findborrower =~ s|,| |g;
105
$findborrower =~ s|,| |g;
106
my $borrowernumber = $query->param('borrowernumber');
106
my $borrowernumber = $query->param('borrowernumber');
107
108
$branch  = C4::Context->userenv->{'branch'};  
107
$branch  = C4::Context->userenv->{'branch'};  
109
$printer = C4::Context->userenv->{'branchprinter'};
108
$printer = C4::Context->userenv->{'branchprinter'};
110
109
Lines 132-137 my $issueconfirmed = $query->param('issueconfirmed'); Link Here
132
my $cancelreserve  = $query->param('cancelreserve');
131
my $cancelreserve  = $query->param('cancelreserve');
133
my $organisation   = $query->param('organisations');
132
my $organisation   = $query->param('organisations');
134
my $print          = $query->param('print');
133
my $print          = $query->param('print');
134
my $finesredirect   = $query->param('finesredirect');
135
my $newexpiry      = $query->param('dateexpiry');
135
my $newexpiry      = $query->param('dateexpiry');
136
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
136
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
137
137
Lines 180-185 if ( $print eq 'yes' && $borrowernumber ne '' ) { Link Here
180
        NetworkPrint($letter->{content});
180
        NetworkPrint($letter->{content});
181
    }
181
    }
182
    $query->param( 'borrowernumber', '' );
182
    $query->param( 'borrowernumber', '' );
183
}
184
185
if ( $finesredirect && $borrowernumber ne '' && $barcode eq '' ){
186
    print $query->redirect("/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber");
187
}
188
189
# this was initially inside the previous if with the same conditions but was interfering with $finesredirect
190
if ( $print eq 'yes' && $borrowernumber ne '' ) {
183
    $borrowernumber = '';
191
    $borrowernumber = '';
184
}
192
}
185
193
Lines 716-721 $template->param( Link Here
716
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
724
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
717
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
725
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
718
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
726
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
727
    CircPayFinesRedirect => (C4::Context->preference('CircPayFinesRedirect') ? $total > 0 : 0 ),
719
);
728
);
720
729
721
# save stickyduedate to session
730
# save stickyduedate to session
(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 326-332 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
326
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
326
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
327
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
327
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
328
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
328
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
329
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');
329
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.','Clear|Print|ClearAndPrin','Choice');
330
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free');
330
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free');
331
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free');
331
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free');
332
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TransferWhenCancelAllWaitingHolds','0','Transfer items when cancelling all waiting holds',NULL,'YesNo');
332
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TransferWhenCancelAllWaitingHolds','0','Transfer items when cancelling all waiting holds',NULL,'YesNo');
Lines 383-385 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
383
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowLibrariesPulldownMobile','1','Show the libraries pulldown on the mobile version of the OPAC.',NULL,'YesNo');
383
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowLibrariesPulldownMobile','1','Show the libraries pulldown on the mobile version of the OPAC.',NULL,'YesNo');
384
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');
384
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');
385
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('AuthDisplayHierarchy','0','Display authority hierarchies','','YesNo');
385
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('AuthDisplayHierarchy','0','Display authority hierarchies','','YesNo');
386
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');
(-)a/installer/data/mysql/updatedatabase.pl (+15 lines)
Lines 5982-5987 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5982
    SetVersion($DBversion);
5982
    SetVersion($DBversion);
5983
}
5983
}
5984
5984
5985
$DBversion = "3.09.00.XXX";
5986
if( C4::Context->preference("Version") < TransformToNum($DBversion) ){
5987
    $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')");
5988
5989
    my $sth = $dbh->prepare("SELECT value FROM systempreferences WHERE variable='CircAutoPrintQuickSlip'");
5990
    $sth->execute;
5991
    my @result = $sth->fetchrow_array;
5992
    print "REST IS (@result)\n";
5993
5994
    # a value of 1 maps to the new value of 'Print', a value of 0 maps to the new value 'Clear'
5995
    $dbh->do("UPDATE systempreferences SET type='Choice', options='Clear|Print|PrintAndClear', value=? WHERE variable='CircAutoPrintQuickSlip'", undef, ($result[0] ? 'Print' : 'Clear') );
5996
    print "Upgrade to $DBversion done (added syspref CircPayFinesRedirect and updated CircAutoPrintQuickSlip)\n";
5997
    SetVersion ($DBversion);
5998
}
5999
5985
=head1 FUNCTIONS
6000
=head1 FUNCTIONS
5986
6001
5987
=head2 TableExists($table)
6002
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +10 lines)
Lines 96-103 Circulation: Link Here
96
            - When an empty barcode field is submitted in circulation
96
            - When an empty barcode field is submitted in circulation
97
            - pref: CircAutoPrintQuickSlip
97
            - pref: CircAutoPrintQuickSlip
98
              choices:
98
              choices:
99
                  yes: "open a print quick slip window"
99
                  Print: "open a print quick slip window"
100
                  no: "clear the screen"
100
                  Clear: "clear the screen"
101
                  PrintAndClear: "open a print quick slip window and clear the screen"
101
            - .
102
            - .
102
        -
103
        -
103
            - Include the stylesheet at
104
            - Include the stylesheet at
Lines 116-121 Circulation: Link Here
116
                yes: Export
117
                yes: Export
117
                no: "Don't export"
118
                no: "Don't export"
118
            - fields for csv or iso2709 export
119
            - fields for csv or iso2709 export
120
        -
121
            - When an empty barcode field is submitted in circulation and a patron has outstanding fines
122
            - pref: CircPayFinesRedirect
123
              choices:
124
                  yes: "Redirect to pay to fines screen"
125
                  no: "do nothing"
126
            - .
119
    Checkout Policy:
127
    Checkout Policy:
120
        -
128
        -
121
            - pref: AllowNotForLoanOverride
129
            - pref: AllowNotForLoanOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-4 / +15 lines)
Lines 54-65 Link Here
54
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
54
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
55
            }
55
            }
56
        } ).attr( 'checked', false );
56
        } ).attr( 'checked', false );
57
        [% END %][% IF ( CircAutoPrintQuickSlip ) %]
57
        [% END %]
58
59
        [% IF ( CircAutoPrintQuickSlip != 'Clear') %]
58
        // listen submit to trigger qslip on empty checkout
60
        // listen submit to trigger qslip on empty checkout
59
        $('#mainform').bind('submit',function() {
61
        $('#mainform').bind('submit',function() {
60
          if ($('#barcode').val() == '') {
62
          if ($('#barcode').val() == '') {
61
            return printx_window('qslip'); }
63
            [% IF CircAutoPrintQuickSlip == 'PrintAndClear' || CircPayFinesRedirect %]
62
        });[% END %]
64
                /* if we want to continue submitting the form, needed for redirect (return false will stop this) */
65
                printx_window('qslip');
66
            [% ELSE %]
67
                /* show quick slip window and do not redirect or clear screen */
68
                return printx_window('qslip');
69
            [% END %]
70
          }
71
        });
72
        [% END %]
73
63
74
64
75
65
var allcheckboxes = $(".checkboxed");
76
var allcheckboxes = $(".checkboxed");
Lines 574-579 No patron matched <span class="ex">[% message %]</span> Link Here
574
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
585
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
575
    [% END %]
586
    [% END %]
576
    <input type="submit" value="Check Out" />
587
    <input type="submit" value="Check Out" />
588
    <input type="hidden" name="finesredirect" value="[% CircPayFinesRedirect %]" />
577
589
578
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
590
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
579
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
591
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
580
- 

Return to bug 8058