@@ -, +, @@
message if that's the case - circulation.pl
---
circ/circulation.pl | 2 +-
.../prog/en/modules/circ/circulation.tt | 16 ++++++-----
.../en/modules/circ/circulation_batch_checkouts.tt | 28 +++++++++++++-------
3 files changed, 28 insertions(+), 18 deletions(-)
--- a/circ/circulation.pl
+++ a/circ/circulation.pl
@@ -537,7 +537,7 @@ foreach my $flag ( sort keys %$flags ) {
}
}
-my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0;
+my $amountold = $borrower->{flags} ? $borrower->{flags}->{'CHARGES'}->{'message'} || 0 : 0;
$amountold =~ s/^.*\$//; # remove upto the $, if any
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -10,7 +10,7 @@
[% INCLUDE 'doc-head-open.inc' %]
[% SET destination = "circ" %]
Koha › Circulation
-[% IF borrowernumber %]
+[% IF borrowernumber and borrower%]
› Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
[% END %]
@@ -50,7 +50,7 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
-[% IF ( borrowernumber ) %]
+[% IF borrowernumber and borrower %]
if($.cookie("holdfor") != [% borrowernumber %]){
$.removeCookie("holdfor", { path: '/' });
}
@@ -129,7 +129,7 @@ $(document).ready(function() {
[% INCLUDE 'circ-search.inc' %]
Home ›
Circulation ›
-[% IF ( borrowernumber ) %]
+[% IF borrowernumber and borrower %]
Checkouts › [% INCLUDE 'patron-title.inc' %]
[% ELSE %]
Checkouts
@@ -149,7 +149,7 @@ $(document).ready(function() {
[% END %]
-[% IF ( borrowernumber ) %]
+[% IF borrowernumber and borrower %]
[% INCLUDE 'members-toolbar.inc' %]
[% END %]
@@ -599,7 +599,7 @@ No patron matched
[% message %]
-[% IF ( borrowernumber ) %]
+[% IF borrowernumber and borrower %]
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
@@ -977,13 +977,15 @@ No patron matched [% message %]
[% END %]
-[% END %]
+[% ELSE %]
+
+[% END %]
[% END %]
-[% UNLESS ( borrowers ) %][% IF ( borrowernumber ) %]
+[% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]
[% INCLUDE 'circ-menu.inc' %]
[% END %][% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
@@ -7,7 +7,7 @@
[% INCLUDE 'doc-head-open.inc' %]
[% SET destination = "circ" %]
Koha › Circulation
-[% IF borrowernumber %]
+[% IF borrowernumber and borrower %]
› Batch check out › Issuing items to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
[% END %]
@@ -42,7 +42,11 @@ $(document).ready(function() {
[% INCLUDE 'circ-search.inc' %]
@@ -52,20 +56,20 @@ $(document).ready(function() {
-[% IF ( borrowernumber ) %]
+[% IF borrowernumber and borrower %]
[% INCLUDE 'members-toolbar.inc' %]
[% END %]
-[% IF NOT batch_allowed %]
+[% IF borrower and not batch_allowed %]
You are not allowed to use batch checkout for this patron
-[% ELSIF noissues and not checkout_infos %]
+[% ELSIF borrower and noissues and not checkout_infos %]
Cannot check out!
[% IF charges_is_blocker %]
Checkouts are BLOCKED because fine balance is OVER THE LIMIT.
[% END %]
-[% ELSIF NOT checkout_infos %]
+[% ELSIF borrower and not checkout_infos %]
-[% ELSE %]
+[% ELSIF borrower %]
[% IF confirmation_needed && CAN_user_circulate_force_checkout %]
Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]
[% END %]
+[% ELSE %]
+
[% END %]
-
-[% INCLUDE 'circ-menu.inc' %]
-
+[% IF borrower %]
+
+ [% INCLUDE 'circ-menu.inc' %]
+
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
--