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') || q{};
104
my $findborrower = $query->param('findborrower') || q{};
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') || q{};
133
my $print          = $query->param('print') || q{};
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 712-717 $template->param( Link Here
712
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
720
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
713
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
721
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
714
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
722
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
723
    CircPayFinesRedirect => (C4::Context->preference('CircPayFinesRedirect') ? $total > 0 : 0 ),
715
);
724
);
716
725
717
# save stickyduedate to session
726
# save stickyduedate to session
(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 327-335 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
327
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 ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
328
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('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
329
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('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
330
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');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('RentalsInNoissuesCharge', '1', 'Rental charges block checkouts (added to noissuescharge).',NULL,'YesNo');
330
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('RentalsInNoissuesCharge', '1', 'Rental charges block checkouts (added to noissuescharge).',NULL,'YesNo');
332
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ManInvInNoissuesCharge', '1', 'MANUAL_INV charges block checkouts (added to noissuescharge).',NULL,'YesNo');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ManInvInNoissuesCharge', '1', 'MANUAL_INV charges block checkouts (added to noissuescharge).',NULL,'YesNo');
332
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|PrintAndClear','Choice');
333
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free');
333
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free');
334
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free');
334
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free');
335
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TransferWhenCancelAllWaitingHolds','0','Transfer items when cancelling all waiting holds',NULL,'YesNo');
335
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TransferWhenCancelAllWaitingHolds','0','Transfer items when cancelling all waiting holds',NULL,'YesNo');
Lines 416-418 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
416
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo');
416
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo');
417
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UNIMARCField100Language', 'fre','UNIMARC field 100 default language',NULL,'short');
417
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UNIMARCField100Language', 'fre','UNIMARC field 100 default language',NULL,'short');
418
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo');
418
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo');
419
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 (+14 lines)
Lines 6438-6443 if ( CheckVersion($DBversion) ) { Link Here
6438
}
6438
}
6439
6439
6440
6440
6441
$DBversion = "3.11.00.XXX";
6442
if( C4::Context->preference("Version") < TransformToNum($DBversion) ){
6443
    $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')");
6444
6445
    my $sth = $dbh->prepare("SELECT value FROM systempreferences WHERE variable='CircAutoPrintQuickSlip'");
6446
    $sth->execute;
6447
    my @result = $sth->fetchrow_array;
6448
6449
    # a value of 1 maps to the new value of 'Print', a value of 0 maps to the new value 'Clear'
6450
    $dbh->do("UPDATE systempreferences SET type='Choice', options='Clear|Print|PrintAndClear', value=? WHERE variable='CircAutoPrintQuickSlip'", undef, ($result[0] ? 'Print' : 'Clear') );
6451
    print "Upgrade to $DBversion done (added syspref CircPayFinesRedirect and updated CircAutoPrintQuickSlip)\n";
6452
    SetVersion ($DBversion);
6453
}
6454
6441
=head1 FUNCTIONS
6455
=head1 FUNCTIONS
6442
6456
6443
=head2 TableExists($table)
6457
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +11 lines)
Lines 101-108 Circulation: Link Here
101
            - When an empty barcode field is submitted in circulation
101
            - When an empty barcode field is submitted in circulation
102
            - pref: CircAutoPrintQuickSlip
102
            - pref: CircAutoPrintQuickSlip
103
              choices:
103
              choices:
104
                  yes: "open a print quick slip window"
104
                  Print: "open a print quick slip window"
105
                  no: "clear the screen"
105
                  Clear: "clear the screen"
106
                  PrintAndClear: "open a print quick slip window and clear the screen"
106
            - .
107
            - .
107
        -
108
        -
108
            - Include the stylesheet at
109
            - Include the stylesheet at
Lines 123-128 Circulation: Link Here
123
            - The following fields should be excluded from the patron checkout history CSV or iso2709 export
124
            - The following fields should be excluded from the patron checkout history CSV or iso2709 export
124
            - pref: ExportRemoveFields
125
            - pref: ExportRemoveFields
125
            - (separate fields with space, e.g. 100a 200b 300c)
126
            - (separate fields with space, e.g. 100a 200b 300c)
127
        -
128
129
            - When an empty barcode field is submitted in circulation and a patron has outstanding fines
130
            - pref: CircPayFinesRedirect
131
              choices:
132
                  yes: "Redirect to pay to fines screen"
133
                  no: "do nothing"
134
            - .
126
135
127
    Checkout Policy:
136
    Checkout Policy:
128
        -
137
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-4 / +15 lines)
Lines 55-66 Link Here
55
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
55
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
56
            }
56
            }
57
        } ).attr( 'checked', false );
57
        } ).attr( 'checked', false );
58
        [% END %][% IF ( CircAutoPrintQuickSlip ) %]
58
        [% END %]
59
60
        [% IF ( CircAutoPrintQuickSlip != 'Clear') %]
59
        // listen submit to trigger qslip on empty checkout
61
        // listen submit to trigger qslip on empty checkout
60
        $('#mainform').bind('submit',function() {
62
        $('#mainform').bind('submit',function() {
61
          if ($('#barcode').val() == '') {
63
          if ($('#barcode').val() == '') {
62
            return printx_window('qslip'); }
64
            [% IF CircAutoPrintQuickSlip == 'PrintAndClear' || CircPayFinesRedirect %]
63
        });[% END %]
65
                /* if we want to continue submitting the form, needed for redirect (return false will stop this) */
66
                printx_window('qslip');
67
            [% ELSE %]
68
                /* show quick slip window and do not redirect or clear screen */
69
                return printx_window('qslip');
70
            [% END %]
71
          }
72
        });
73
        [% END %]
74
64
75
65
76
66
var allcheckboxes = $(".checkboxed");
77
var allcheckboxes = $(".checkboxed");
Lines 572-577 No patron matched <span class="ex">[% message %]</span> Link Here
572
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
583
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
573
    [% END %]
584
    [% END %]
574
    <input type="submit" value="Check Out" />
585
    <input type="submit" value="Check Out" />
586
    <input type="hidden" name="finesredirect" value="[% CircPayFinesRedirect %]" />
575
587
576
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
588
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
577
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
589
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
578
- 

Return to bug 8058