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 386-388 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('OPACdidy Link Here
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
389
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 6002-6007 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
6002
    SetVersion($DBversion);
6002
    SetVersion($DBversion);
6003
}
6003
}
6004
6004
6005
$DBversion = "3.09.00.XXX";
6006
if( C4::Context->preference("Version") < TransformToNum($DBversion) ){
6007
    $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')");
6008
6009
    my $sth = $dbh->prepare("SELECT value FROM systempreferences WHERE variable='CircAutoPrintQuickSlip'");
6010
    $sth->execute;
6011
    my @result = $sth->fetchrow_array;
6012
    print "REST IS (@result)\n";
6013
6014
    # a value of 1 maps to the new value of 'Print', a value of 0 maps to the new value 'Clear'
6015
    $dbh->do("UPDATE systempreferences SET type='Choice', options='Clear|Print|PrintAndClear', value=? WHERE variable='CircAutoPrintQuickSlip'", undef, ($result[0] ? 'Print' : 'Clear') );
6016
    print "Upgrade to $DBversion done (added syspref CircPayFinesRedirect and updated CircAutoPrintQuickSlip)\n";
6017
    SetVersion ($DBversion);
6018
}
6019
6005
=head1 FUNCTIONS
6020
=head1 FUNCTIONS
6006
6021
6007
=head2 TableExists($table)
6022
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +10 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 121-126 Circulation: Link Here
121
                yes: Export
122
                yes: Export
122
                no: "Don't export"
123
                no: "Don't export"
123
            - fields for csv or iso2709 export
124
            - fields for csv or iso2709 export
125
        -
126
            - When an empty barcode field is submitted in circulation and a patron has outstanding fines
127
            - pref: CircPayFinesRedirect
128
              choices:
129
                  yes: "Redirect to pay to fines screen"
130
                  no: "do nothing"
131
            - .
124
    Checkout Policy:
132
    Checkout Policy:
125
        -
133
        -
126
            - pref: AllowNotForLoanOverride
134
            - 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