[% USE KohaDates %]
[% USE Price %]
[% USE ItemTypes %]
+[% USE TablesSettings %]
[% PROCESS 'member-display-address-style.inc' %]
[% SET footerjs = 1 %]
</ul>
[% IF ( issues ) %]
- <table>
+ <table id="print-summary-checkouts">
<caption>Items checked out</caption>
- <tr>
- <th>Title</th>
- <th>Author</th>
- <th>Call number</th>
- <th>Item type</th>
- <th>Date due</th>
- <th>Barcode</th>
- <th>Inventory number</th>
- <th>Charge</th>
- <th>Price</th>
- <th>Status</th>
- </tr>
-
- [% FOREACH issue IN issues %]
- [% IF ( issue.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
- <td>
- [% issue.title | html %]
- <a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issue.itemnumber | uri %]&biblionumber=[% issue.biblionumber | uri %]&bi=[% issue.biblioitemnumber | uri %]"></a>
+ <thead>
+ <tr>
+ <th>Title</th>
+ <th>Author</th>
+ <th>Call number</th>
+ <th>Item type</th>
+ <th>Date due</th>
+ <th>Barcode</th>
+ <th>Inventory number</th>
+ <th>Charge</th>
+ <th>Price</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH issue IN issues %]
+ <tr>
+ <td>
+ [% INCLUDE 'biblio-title.inc' biblio=issue link = 0 %]
+ </td>
+ <td>[% issue.author | html %]</td>
+ <td>[% issue.itemcallnumber | html %]</td>
+ <td>[% ItemTypes.GetDescription( issue.itype ) | html %]</td>
+ <td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
+ <td>[% issue.barcode | html %]</td>
+ <td>[% issue.stocknumber | html %]</td>
+ [% IF ( issue.charge <= 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% issue.charge | $Price %]
+ </td>
+ [% IF ( issue.replacementprice <= 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% issue.replacementprice | $Price %]
+ </td>
+ <td>[% IF ( issue.overdue ) %]Overdue![% ELSE %] [% END %]</td>
+ </tr>
+ [% END %]
+ </tbody>
+ <tfoot>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td style="text-align: right; font-weight:bold;">Totals:</td>
+ [% IF ( totaldue <= 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% totaldue | $Price %]
+ </td>
+ [% IF ( totalprice <= 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% totalprice | $Price %]
</td>
- <td>[% issue.author | html %]</td>
- <td>[% issue.itemcallnumber | html %]</td>
- <td>[% ItemTypes.GetDescription( issue.itype ) | html %]</td>
- <td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
- <td>[% issue.barcode | html %]</td>
- <td>[% issue.stocknumber | html %]</td>
- <td>[% issue.charge | $Price %]</td>
- <td>[% issue.replacementprice | $Price %]</td>
- <td>[% IF ( issue.overdue ) %]Overdue![% ELSE %] [% END %]</td>
+ <td></td>
</tr>
- [% END %]
-
- <tr>
- <td colspan="7" style="text-align: right; font-weight:bold;">Totals:</td>
- <td>[% totaldue | $Price %]</td>
- <td>[% totalprice | $Price %]</td>
- <td colspan="3"> </td>
- </tr>
- </table>
- [% END %]
+ </tfoot>
+ </table>
+ [% END %]
[% IF ( reserves ) %]
- <table>
+ <table id="print-summary-holds">
<caption>Pending holds</caption>
- <tr>
- <th>Title</th>
- <th>Author</th>
- <th>Placed on</th>
- <th>Expires on</th>
- <th>Pick up location</th>
- </tr>
-
- [% FOREACH reserve IN reserves %]
+ <thead>
<tr>
- <td>[% reserve.title | html %]</td>
- <td>[% reserve.author | html %]</td>
- <td>[% reserve.reservedate | $KohaDates %]</td>
- <td>[% reserve.expirationdate | $KohaDates %]</td>
- <td>[% reserve.waiting_at | html %]</td>
+ <th>Title</th>
+ <th>Author</th>
+ <th>Placed on</th>
+ <th>Expires on</th>
+ <th>Pick up location</th>
</tr>
- [% END %]
+ </thead>
+ <tbody>
+ [% FOREACH reserve IN reserves %]
+ <tr>
+ <td>[% reserve.title | html %]</td>
+ <td>[% reserve.author | html %]</td>
+ <td>[% reserve.reservedate | $KohaDates %]</td>
+ <td>[% reserve.expirationdate | $KohaDates %]</td>
+ <td>[% reserve.waiting_at | html %]</td>
+ </tr>
+ [% END %]
+ </tbody>
</table>
[% END %]
[% IF accounts && totaldue != 0 %]
- <table id="table_account_fines">
+ <table id="print-summary-fines">
<caption>Account fines and payments</caption>
<thead>
<tr>
<th>Outstanding</th>
</tr>
</thead>
-
- [% FOREACH account IN accounts %]
- <tr>
- <td>[% account.date | $KohaDates %]</td>
- <td>
- [% PROCESS account_type_description account=account %]
- [%- IF account.payment_type %]
- , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %]
- [% END %]
- [%- IF account.description %]
- , [% account.description | html %]
- [% END %]
-
- [% IF ( account.itemnumber AND account.debit_type_code != 'OVERDUE' ) %]
- <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>
- [% END %]
- </td>
- <td>
- [% account.note | html_line_break %]
- </td>
- [% IF ( account.amount < 0 ) %]
- <td class="credit" style="text-align: right;">
- [% ELSE %]
- <td class="debit" style="text-align: right;">
- [% END %][% account.amount | $Price %]
- </td>
- [% IF ( account.amountoutstanding < 0 ) %]
- <td class="credit" style="text-align: right;">
- [% ELSE %]
- <td class="debit" style="text-align: right;">
- [% END %]
- [% account.amountoutstanding | $Price %]
- </td>
- </tr>
- [% END %]
-
+ <tbody>
+ [% FOREACH account IN accounts %]
+ <tr>
+ <td>[% account.date | $KohaDates %]</td>
+ <td>
+ [% PROCESS account_type_description account=account %]
+ [%- IF account.payment_type %]
+ , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %]
+ [% END %]
+ [%- IF account.description %]
+ , [% account.description | html %]
+ [% END %]
+
+ [% IF ( account.itemnumber AND account.debit_type_code != 'OVERDUE' ) %]
+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>
+ [% END %]
+ </td>
+ <td>
+ [% account.note | html_line_break %]
+ </td>
+ [% IF ( account.amount <= 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% account.amount | $Price %]
+ </td>
+ [% IF ( account.amountoutstanding <= 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% account.amountoutstanding | $Price %]
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
<tfoot>
<tr>
- <td colspan="4">Total due</td>
- <td colspan="2" style="text-align:right;">[% totaldue | $Price %]</td>
+ <td></td>
+ <td></td>
+ <td ></td>
+ [% IF ( totaldue < 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ Total due:
+ </td>
+ [% IF ( totaldue < 0 ) %]
+ <td class="credit">
+ [% ELSE %]
+ <td class="debit">
+ [% END %]
+ [% totaldue | $Price %]
+ </td>
</tr>
</tfoot>
</table>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'slip-print.inc' #printThenClose %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ <script>
+ var checkouts_columns = [% TablesSettings.GetColumns( 'circ', 'print_summary', 'print-summary-checkouts', 'json' ) | $raw %];
+ var holds_columns = [% TablesSettings.GetColumns( 'circ', 'print_summary', 'print-summary-holds', 'json' ) | $raw %];
+ var fines_columns = [% TablesSettings.GetColumns( 'circ', 'print_summary', 'print-summary-fines', 'json' ) | $raw %];
+
+ function moveColumnsButton( tableId ){
+ /* Hide the export button */
+ $("#" + tableId + "_wrapper").find("button.export_controls").remove();
+ /* We don't show the table controls toolbar here, so the columns settings button looks better as part of the caption */
+ $("#" + tableId).find("caption").append( $("#" + tableId + "_wrapper").find("button.columns_controls") );
+ }
+
+ $(document).ready(function() {
+
+ KohaTable("print-summary-checkouts", {
+ "dom": "Bt",
+ "paging": "false",
+ initComplete: function( settings) {
+ moveColumnsButton( settings.nTable.id );
+ }
+ }, checkouts_columns);
+
+ KohaTable("print-summary-holds", {
+ "dom": "Bt",
+ "paging": "false",
+ initComplete: function( settings) {
+ moveColumnsButton( settings.nTable.id );
+ }
+ }, holds_columns);
+
+ KohaTable("print-summary-fines", {
+ "dom": "Bt",
+ "paging": "false",
+ initComplete: function( settings) {
+ moveColumnsButton( settings.nTable.id );
+ }
+ }, fines_columns);
+
+ });
+ </script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]