From a32c92c6013b199cc26efd15d0442e3f3a2eed6b Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 11 Aug 2018 18:47:23 +0000 Subject: [PATCH] Bug 15139: Add non-public item notes to overdue report 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 Signed-off-by: Jonathan Druart Amended patch: remove the branchcode line, added on its own bug report, see bug 21463 Signed-off-by: Nick Clemens --- circ/overdue.pl | 6 ++++-- koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index e60d3ccc8d..5adc8d83fb 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -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(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 496d1f8cfb..367cd35587 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% USE KohaDates %] [%- USE Branches -%] +[%- USE Price -%] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Items overdue as of [% todaysdate | html %] @@ -53,6 +54,7 @@ Barcode Call number Price + Non-public note [%- BLOCK subject -%]Overdue:[%- END -%] @@ -70,7 +72,8 @@ [% INCLUDE 'biblio-default-view.inc' biblionumber = overdueloo.biblionumber %][% overdueloo.title | html %] [% overdueloo.subtitle | html %] [% IF ( overdueloo.author ) %], by [% overdueloo.author | html %][% END %][% IF ( overdueloo.enumchron ) %], [% overdueloo.enumchron | html %][% END %] [% overdueloo.barcode | html %] [% overdueloo.itemcallnumber | html %] - [% overdueloo.replacementprice | html %] + [% overdueloo.replacementprice | $Price %] + [% overdueloo.itemnotes_nonpublic | html %] [% END %] -- 2.39.5