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
}
);
-my $schema = Koha::Database->new()->schema();
-my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] });
+my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
+my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] });
+
$template->param(
- notes => \@notes,
+ pending_checkout_notes => $pending_checkout_notes,
+ notes => \@notes,
);
my $action;
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_onsite_notes => $pending_onsite_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,
+ 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
[% IF ( fast_cataloging ) %][% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
<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>
+ [% END %]
</ul>
<h5>Circulation reports</h5>
Checkout notes
</div>
-<div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2" -->
+[% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
<div id="bd">
<div id="yui-main">
+ [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
<h1>Checkout notes</h1>
[% FOREACH note IN notes %]
<tr>
<td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
- <td>[% note.item.biblionumber.title %] - [% note.item.biblionumber.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber.biblionumber %]">[% note.item.barcode %]</a>)</td>
+ <td>[% note.item.biblio.title %] - [% note.item.biblio.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber %]">[% note.item.barcode %]</a>)</td>
<td>[% note.note %]</td>
<td>[% note.notedate | $KohaDates %]</td>
- <td>[% note.borrower.firstname %] [% note.borrower.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.borrower.borrowernumber %]">[% note.borrower.cardnumber %]</a>)</td>
- <td>[% IF ( note.noteseen == 0 ) %]
- <span id="status_[% note.issue_id %]">Not seen</span>
- [% ELSIF ( note.noteseen == 1 ) %]
- <span id="status_[% note.issue_id %]">Seen</span>
- [% END %]</td>
- <td class="actions">[% IF ( note.noteseen == 1 ) %]
- <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs"><i class="fa fa-eye-slash"></i> Mark not seen</button>
- [% ELSIF ( note.noteseen == 0 ) %]
- <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
- [% END %]</td>
+ <td>[% IF note.borrower.title %][% note.borrower.title [% END %][% note.borrower.firstname %] [% note.borrower.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.borrower.borrowernumber %]">[% note.borrower.cardnumber %]</a>)</td>
+ <td>
+ [% IF ( note.noteseen == 0 ) %]
+ <span id="status_[% note.issue_id %]">Not seen</span>
+ [% ELSIF ( note.noteseen == 1 ) %]
+ <span id="status_[% note.issue_id %]">Seen</span>
+ [% END %]
+ </td>
+ <td class="actions">
+ [% IF ( note.noteseen == 1 ) %]
+ <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs"><i class="fa fa-eye-slash"></i> Mark not seen</button>
+ [% ELSIF ( note.noteseen == 0 ) %]
+ <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
+ [% END %]
+ </td>
</tr>
[% END %]
</tbody>
[% END %] <!-- selected_count -->
- </div> <!-- yui-main -->
+ </div> <!-- yui-imain -->
+
+ [% IF Koha.Preference('CircSidebar') %]
+ </div>
+
+ <div class="yui-b noprint">
+ [% INCLUDE 'circ-nav.inc' %]
+ </div>
+ [% END %]
+
</div> <!-- bd -->
</div> <!-- doc3 -->