my @query_params = ();
- if ( defined $title ) {
+ if ( $title ) {
$query .= " AND biblio.title LIKE ? ";
$title =~ s/\s+/%/g;
push @query_params, "%$title%";
}
- if ( defined $author ) {
+ if ( $author ) {
$query .= " AND biblio.author LIKE ? ";
push @query_params, "%$author%";
}
- if ( defined $isbn ) {
+ if ( $isbn ) {
$query .= " AND biblioitems.isbn LIKE ? ";
push @query_params, "%$isbn%";
}
- if ( defined $name ) {
+ if ( $name ) {
$query .= " AND aqbooksellers.name LIKE ? ";
push @query_params, "%$name%";
}
- if ( defined $from_placed_on ) {
+ if ( $from_placed_on ) {
$query .= " AND creationdate >= ? ";
push @query_params, $from_placed_on;
}
- if ( defined $to_placed_on ) {
+ if ( $to_placed_on ) {
$query .= " AND creationdate <= ? ";
push @query_params, $to_placed_on;
}
use C4::Auth;
use C4::Output;
use C4::Koha;
+use C4::Members qw/ GetMember /;
+use C4::Budgets qw/ GetBudgetHierarchy /;
my $input = new CGI;
}
+my $borrower= GetMember('borrowernumber' => $loggedinuser);
+my $budgets = GetBudgetHierarchy(q{},$borrower->{branchcode},$borrower->{borrowernumber});
+my $has_budgets = 0;
+foreach my $r (@{$budgets}) {
+ if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) {
+ next;
+ }
+ $has_budgets = 1;
+ last;
+}
+
$template->param(
+ has_budgets => $has_budgets,
basketno => $basketno,
- booksellerid => $bookseller->{'id'},
- name => $bookseller->{'name'},
+ booksellerid => $bookseller->{'id'},
+ name => $bookseller->{'name'},
resultsloop => \@results,
total => $total_hits,
query => $query,
[% ELSE %]
You can't create any orders unless you first <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">define a budget and a fund</a>.
[% END %]
-</fieldset>
\ No newline at end of file
+</fieldset>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
+<script type="text/javascript" src="[% ( themelang ) %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">//<![CDATA[
+$(document).ready(function() {
+ $("#holdst").tablesorter({
+ sortList: [[6,0]],
+ });
+});
+//]]>
+</script>
+
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
› <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
› <a href="/cgi-bin/koha/circ/view_holdsqueue.pl">Holds Queue</a>
<div id="yui-main">
<div class="yui-b">
- [% IF ( opacuserlogin ) %]
- [% IF ( loggedinusername ) %]
- <div class="yui-g">
- <div>
- [% ELSE %]
- <div class="yui-ge">
- <div class="yui-u first">
+ [% IF ( opacuserlogin ) %]
+ [% IF ( loggedinusername ) %]
+ <div id="loggedin" class="yui-g">
+ <div>
+ [% ELSE %]
+ <div id="notloggedin" class="yui-ge">
+ <div class="yui-u first">
+ [% END %]
+ [% ELSE %]
+ <div id="notloggedin" class="yui-g">
+ <div>
[% END %]
- [% ELSE %]
- <div class="yui-g">
- <div>
- [% END %]
[% IF ( koha_news_count ) %]
<div id="news" class="container">
[% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
+ [% IF ( BORROWER_INF.warndeparture ) %]
+ <div class="dialog alert">
+ <strong>Please note:</strong><span> Your card will expire on [% BORROWER_INF.warndeparture %]. Please contact the library if you wish to renew your subscription.</span>
+ [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span> Also note that you must return all checked out items before your card expires.</span>[% END %]
+ </div>
+ [% END %]
[% IF ( BORROWER_INF.flagged ) %]
<div class="dialog alert">
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
+use Date::Calc qw(
+ Today
+ Add_Delta_Days
+ Date_to_Days
+);
+
my $query = new CGI;
BEGIN {
# get borrower information ....
my ( $borr ) = GetMemberDetails( $borrowernumber );
+my ( $today_year, $today_month, $today_day) = Today();
+my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'};
+
for (qw(dateenrolled dateexpiry dateofbirth)) {
($borr->{$_}) and $borr->{$_} = format_date($borr->{$_});
}
my @bordat;
$bordat[0] = $borr;
+# Warningdate is the date that the warning starts appearing
+if ( C4::Context->preference('NotifyBorrowerDeparture') &&
+ Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
+ Date_to_Days( $today_year, $today_month, $today_day ) )
+{
+ # borrower card soon to expire, warn the borrower
+ $borr->{'warndeparture'} = $borr->{dateexpiry};
+ if (C4::Context->preference('ReturnBeforeExpiry')){
+ $borr->{'returnbeforeexpiry'} = 1;
+ }
+}
+
$template->param( BORROWER_INFO => \@bordat,
borrowernumber => $borrowernumber,
patron_flagged => $borr->{flagged},
if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){
my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue);
return "" unless $borr;
- return $$borr{firstname} . ", " . $$borr{surname};
+ return $$borr{surname} . ", " . $$borr{firstname};
}
if ( $displayby =~ /budgetid/) {
my $budget = GetBudget($criteriumvalue);