Bug 15139: Add non-public item notes to overdue report
authorKatrin Fischer <katrin.fischer.83@web.de>
Sat, 11 Aug 2018 18:47:23 +0000 (18:47 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 15 Oct 2018 13:56:22 +0000 (13:56 +0000)
Sometimes libraries want to see internal notes on the overdue
reports page, this patch adds the notes.

Additional fixes:
- Library column was always empty, now library displays
- Replacement price was not formatted according to CurrencyFormat

To test:
- Make sure you have some overdue issues in your system
- Circulation > Overdues report
- Make sure everything displays as it should
  - Verify internal item note shows
  - Verify price is correctly formatted (syspref CurrencyFormat)
  - Library shows
- Download list of overdues
  - Verify the new column displays

Signed-off-by: Spencer <ssmith3@mckinneytexas.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove the branchcode line, added on its own bug report,
see bug 21463

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
circ/overdue.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt

index e60d3cc..5adc8d8 100755 (executable)
@@ -238,7 +238,8 @@ if ($noreport) {
         biblio.biblionumber,
         items.itemcallnumber,
         items.replacementprice,
-        items.enumchron
+        items.enumchron,
+        items.itemnotes_nonpublic
       FROM issues
     LEFT JOIN borrowers   ON (issues.borrowernumber=borrowers.borrowernumber )
     LEFT JOIN items       ON (issues.itemnumber=items.itemnumber)
@@ -325,6 +326,7 @@ if ($noreport) {
             holdingbranchcode      => $data->{holdingbranchcode},
             itemcallnumber         => $data->{itemcallnumber},
             replacementprice       => $data->{replacementprice},
+            itemnotes_nonpublic    => $data->{itemnotes_nonpublic},
             enumchron              => $data->{enumchron},
             patron_attr_value_loop => \@patron_attr_value_loop,
         };
@@ -374,7 +376,7 @@ sub build_csv {
     # build header ...
     my @keys =
       qw ( duedate title author borrowertitle firstname surname phone barcode email address address2 zipcode city country
-      branchcode itemcallnumber biblionumber borrowernumber itemnum issuedate replacementprice streetnumber streettype);
+      branchcode itemcallnumber biblionumber borrowernumber itemnum issuedate replacementprice itemnotes_nonpublic streetnumber streettype);
     my $csv = Text::CSV_XS->new();
     $csv->combine(@keys);
     push @lines, $csv->string();
index 496d1f8..367cd35 100644 (file)
@@ -2,6 +2,7 @@
 [% USE Asset %]
 [% USE KohaDates %]
 [%- USE Branches -%]
+[%- USE Price -%]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate | html %]</title>
@@ -53,6 +54,7 @@
           <th>Barcode</th>
           <th>Call number</th>
           <th>Price</th>
+          <th>Non-public note</th>
         </tr>
       </thead>
       [%- BLOCK subject -%]Overdue:[%- END -%]
@@ -70,7 +72,8 @@
           <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overdueloo.biblionumber %][% overdueloo.title | html %]  [% overdueloo.subtitle | html %]</a> [% IF ( overdueloo.author ) %], by [% overdueloo.author | html %][% END %][% IF ( overdueloo.enumchron ) %], [% overdueloo.enumchron | html %][% END %]</td>
           <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% overdueloo.biblionumber | html %]&amp;itemnumber=[% overdueloo.itemnum | html %]#item[% overdueloo.itemnum | html %]">[% overdueloo.barcode | html %]</a></td>
           <td>[% overdueloo.itemcallnumber | html %]</td>
-          <td>[% overdueloo.replacementprice | html %]</td>
+          <td>[% overdueloo.replacementprice | $Price %]</td>
+          <td>[% overdueloo.itemnotes_nonpublic | html %]</td>
         </tr>
       [% END %]
       </tbody>