use Koha;
use Koha::Caches;
use Koha::AuthUtils qw(get_script_name hash_password);
+use Koha::Checkouts;
use Koha::DateUtils qw(dt_from_string);
use Koha::Library::Groups;
use Koha::Libraries;
EnableBorrowerFiles => C4::Context->preference('EnableBorrowerFiles'),
UseKohaPlugins => C4::Context->preference('UseKohaPlugins'),
UseCourseReserves => C4::Context->preference("UseCourseReserves"),
- useDischarge => C4::Context->preference('useDischarge')
+ useDischarge => C4::Context->preference('useDischarge'),
+ pending_checkout_notes => scalar Koha::Checkouts->search({ noteseen => 0 }),
);
}
else {
use C4::Debug;
use Koha::DateUtils;
use Koha::BiblioFrameworks;
-use Koha::Checkouts;
use Data::Dumper;
=head1 branchoverdues.pl
push( @overduesloop, \%overdueforbranch );
}
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
# initiate the templates for the overdueloop
$template->param(
overduesloop => \@overduesloop,
location => $location,
- pending_checkout_notes => $pending_checkout_notes,
);
# Checking if there is a Fast Cataloging Framework
use Koha::Holds;
use Koha::Items;
use Koha::Patrons;
-use Koha::Checkouts;
###############################################
# Getting state
# use Data::Dumper;
# warn "FINAL ============= ".Dumper(@trsfitemloop);
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
$template->param(
found => $found,
reserved => $reserved,
trsfitemloop => \@trsfitemloop,
errmsgloop => \@errmsgloop,
CircAutocompl => C4::Context->preference("CircAutocompl"),
- pending_checkout_notes => $pending_checkout_notes,
);
# Checking if there is a Fast Cataloging Framework
}
);
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
-$template->param(
- pending_checkout_notes => $pending_checkout_notes,
-);
-
my $action;
foreach (qw( seen notseen )) {
$action = $_ if ( $query->param("mark_selected-$_") );
use Koha::SearchEngine;
use Koha::SearchEngine::Search;
use Koha::Patron::Modifications;
-use Koha::Checkouts;
use Date::Calc qw(
Today
);
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-$template->param( pending_checkout_notes => $pending_checkout_notes );
-
my $force_allow_issue = $query->param('forceallow') || 0;
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
$force_allow_issue = 0;
use C4::Output;
use C4::Koha;
use Koha::BiblioFrameworks;
-use Koha::Checkouts;
my $cgi = new CGI;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts();
$template->param(
pending_onsite_checkouts => $pending_onsite_checkouts,
- pending_checkout_notes => $pending_checkout_notes,
);
output_html_with_http_headers $cgi, $cookie, $template->output;
use Koha::DateUtils;
use Koha::Database;
use Koha::BiblioFrameworks;
-use Koha::Checkouts;
my $cgi = new CGI;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-$template->param( pending_checkout_notes => $pending_checkout_notes );
-
output_html_with_http_headers( $cgi, $cookie, $template->output );
use Koha::Holds;
use Koha::Items;
use Koha::Patrons;
-use Koha::Checkouts;
my $query = new CGI;
push @riloop, \%ri;
}
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
$template->param(
riloop => \@riloop,
printer => $printer,
forgivemanualholdsexpire => $forgivemanualholdsexpire,
overduecharges => $overduecharges,
AudioAlerts => C4::Context->preference("AudioAlerts"),
- pending_checkout_notes => $pending_checkout_notes,
);
$itemnumber = GetItemnumberFromBarcode( $barcode );
use C4::Koha;
use Koha::BiblioFrameworks;
use Koha::Libraries;
-use Koha::Checkouts;
# this will be the script that chooses branch and printer settings....
print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
}
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
$template->param(
referer => $referer,
printerloop => \@printerloop,
branch => $branch,
recycle_loop=> \@recycle_loop,
- pending_checkout_notes => $pending_checkout_notes,
);
# Checking if there is a Fast Cataloging Framework
use Koha::DateUtils;
use Koha::BiblioFrameworks;
use Koha::Patrons;
-use Koha::Checkouts;
my $input = new CGI;
my $itemnumber = $input->param('itemnumber');
push( @branchesloop, \%branchloop ) if %branchloop;
}
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
$template->param(
branchesloop => \@branchesloop,
show_date => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
latetransfers => $latetransfers ? 1 : 0,
- pending_checkout_notes => $pending_checkout_notes,
);
# Checking if there is a Fast Cataloging Framework
use C4::Items;
use C4::HoldsQueue qw(GetHoldsQueueItems);
use Koha::BiblioFrameworks;
-use Koha::Checkouts;
use Koha::ItemTypes;
my $query = new CGI;
);
}
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-$template->param( pending_checkout_notes => $pending_checkout_notes );
-
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
use Koha::Items;
use Koha::ItemTypes;
use Koha::Patrons;
-use Koha::Checkouts;
my $input = new CGI;
$template->param(cancel_result => \@cancel_result) if @cancel_result;
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
-
$template->param(
reserveloop => \@reservloop,
reservecount => $reservcount,
show_date => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
ReservesMaxPickUpDelay => $max_pickup_delay,
tab => $tab,
- pending_checkout_notes => $pending_checkout_notes,
);
# Checking if there is a Fast Cataloging Framework
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li>
[% END %][% END %]
[% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes %]
- <li><a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes</a> [% IF pending_checkout_notes %]<span class="number_box"><a href="/cgi-bin/koha/circ/checkout-notes.pl">[% pending_checkout_notes %]</span>[% END %]</li>
+ <li><a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes</a> [% IF pending_checkout_notes.count %]<span class="number_box"><a href="/cgi-bin/koha/circ/checkout-notes.pl">[% pending_checkout_notes.count %]</span>[% END %]</li>
[% END %]
</ul>
<div class="row">
<div class="col-sm-12">
[%# Following statement must be in one line for translatability %]
- [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes ) %]
+ [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) %]
<div id="area-pending">
[% IF pending_article_requests %]
<div class="pending-info" id="article_requests_pending">
</div>
[% END %]
- [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes %]
+ [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count %]
<div class="pending-info" id="checkout_notes_pending">
<a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes pending</a>:
- <span class="pending-number-link">[% pending_checkout_notes %]</span>
+ <span class="pending-number-link">[% pending_checkout_notes.count %]</span>
</div>
[% END %]
use Koha::Patron::Discharge;
use Koha::Reviews;
use Koha::ArticleRequests;
-use Koha::Checkouts;
my $query = new CGI;
$branch ? ( branchcode => $branch ) : (),
}
)->count;
-my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
$template->param(
pendingcomments => $pendingcomments,
pending_borrower_modifications => $pending_borrower_modifications,
pending_discharge_requests => $pending_discharge_requests,
pending_article_requests => $pending_article_requests,
- pending_checkout_notes => $pending_checkout_notes,
);
output_html_with_http_headers $query, $cookie, $template->output;