From 883d1ef58bfd11b136772f83f527cc29f31d4cee Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 17 Oct 2022 22:04:40 +0000 Subject: [PATCH] Bug 28577: Add column for copynumber to overdues report This adds the copynumber as optional column to the circulation report 'overdues'. The column can be made visible temporarily or permanently using the table settings configuration. To test: * Make sure you have some overdue checkouts in your installation. * Make sure the items for those checkouts have copynumber set, also one should have serial enumaration. * Go to circulation > overdues * Verify the copynumber column is hidden by default, but can be made visible using the column settings * Verify that the export to CSV via the link on top of the table (not the table export) works correctly and includes both: copynumber and serial enumeration Serial enumaration shows after the title in the overdues list, but was missing from export. This was also fixed here. --- admin/columns_settings.yml | 3 +++ circ/overdue.pl | 7 +++++-- koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index be507f2041..4aad04636e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1587,6 +1587,9 @@ modules: columnname: barcode - columnname: call_number + - + columname: copynumber + is_hidden: 1 - columnname: item_type is_hidden: 1 diff --git a/circ/overdue.pl b/circ/overdue.pl index e2bb848d42..0e6e5375b5 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -252,8 +252,9 @@ if ($noreport) { biblio.author, biblio.biblionumber, items.itemcallnumber, - items.replacementprice, items.enumchron, + items.copynumber, + items.replacementprice, items.itemnotes_nonpublic, items.itype, return_claims.created_on AS return_claim_created_on, @@ -348,6 +349,8 @@ if ($noreport) { holdingbranchcode => $data->{holdingbranch}, location => $data->{location}, itemcallnumber => $data->{itemcallnumber}, + enumchron => $data->{enumchron}, + copynumber => $data->{copynumber}, replacementprice => $data->{replacementprice}, itemnotes_nonpublic => $data->{itemnotes_nonpublic}, return_claim_created_on => $data->{return_claim_created_on}, @@ -400,7 +403,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 itemnotes_nonpublic streetnumber streettype); + branchcode itemcallnumber enumchron copynumber 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 a6ea7739d1..99c4e8cd56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -94,6 +94,7 @@ Shelving location Barcode Call number + Copy number Item type Price Non-public note @@ -122,7 +123,8 @@ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => overdueloo.location ) | html %] [% overdueloo.barcode | html %] [% overdueloo.itemcallnumber | html %] - [% ItemTypes.GetDescription( overdueloo.itemtype ) | html %] + [% ItemTypes.GetDescription( overdueloo.itemtype ) | html %] + [% overdueloo.copynumber | html %] [% overdueloo.replacementprice | $Price %] [% overdueloo.itemnotes_nonpublic | html %] [% IF Koha.Preference('ClaimReturnedLostValue') %] -- 2.30.2