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

(-)a/circ/circulation.pl (+7 lines)
Lines 46-51 use C4::Members::Attributes qw(GetBorrowerAttributes); Link Here
46
use Koha::Borrower::Debarments qw(GetDebarments IsDebarred);
46
use Koha::Borrower::Debarments qw(GetDebarments IsDebarred);
47
use Koha::DateUtils;
47
use Koha::DateUtils;
48
use Koha::Database;
48
use Koha::Database;
49
use Koha::Borrowers;
49
50
50
use Date::Calc qw(
51
use Date::Calc qw(
51
  Today
52
  Today
Lines 87-92 if (!C4::Context->userenv && !$branch){ Link Here
87
    }
88
    }
88
}
89
}
89
90
91
if (C4::Context->preference("AutoSwitchPatron") ) {
92
    if (Koha::Borrowers->search( { cardnumber => $query->param('barcode')} )->count() > 0) {
93
        print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$query->param('barcode'));
94
    }
95
}
96
90
my $barcodes = [];
97
my $barcodes = [];
91
my $barcode =  $query->param('barcode');
98
my $barcode =  $query->param('barcode');
92
# Barcode given by user could be '0'
99
# Barcode given by user could be '0'
(-)a/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.pl (+2 lines)
Line 0 Link Here
1
INSERT INTO systempreferences (variable,value,options,explanation,type)
2
VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo');
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 58-63 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
58
('AutoSelfCheckAllowed','0','','For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.','YesNo'),
58
('AutoSelfCheckAllowed','0','','For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.','YesNo'),
59
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
59
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
60
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
60
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
61
('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'),
61
('Babeltheque','0','','Turn ON Babeltheque content  - See babeltheque.com to subscribe to this service','YesNo'),
62
('Babeltheque','0','','Turn ON Babeltheque content  - See babeltheque.com to subscribe to this service','YesNo'),
62
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
63
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
63
('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
64
('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +7 lines)
Lines 2-7 Circulation: Link Here
2
# FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring.
2
# FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring.
3
    Interface:
3
    Interface:
4
        -
4
        -
5
            - pref: AutoSwitchPatron
6
              choices:
7
                  yes: "Enable"
8
                  no: "Don't enable"
9
            - the automatic redirection to another patron when a patron barcode is scanned instead of a book.
10
            - This should not be enabled if you have overlapping patron and book barcodes.
11
        -
5
            - pref: CircAutocompl
12
            - pref: CircAutocompl
6
              choices:
13
              choices:
7
                  yes: Try
14
                  yes: Try
8
- 

Return to bug 15752