if (C4::Context->preference("AutoSwitchPatron") && $barcode) {
if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) {
- print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$barcode);
+ print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$barcode&autoswitched=1");
}
}
has_modifications => $has_modifications,
override_high_holds => $override_high_holds,
nopermission => scalar $query->param('nopermission'),
+ autoswitched => $query->param("autoswitched"),
);
output_html_with_http_headers $query, $cookie, $template->output;
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
+[% IF autoswitched %]
+ <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
+[% END %]
+
[% IF additional_materials %]
<div id="materials" class="dialog message">Note about the accompanying materials: <br />
[% additional_materials %]