From 3d89d3d596318e39e44e67c3d7cfc0c1efae97a9 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 7 Jul 2023 16:25:17 +0000 Subject: [PATCH] Bug 16122: Add display and increment localuse Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer --- C4/Circulation.pm | 6 ++++++ admin/columns_settings.yml | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 ++ 3 files changed, 14 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d33d0d1ae4..227dbe98f5 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -826,6 +826,12 @@ sub CanBookBeIssued { interface => C4::Context->interface, } ); + + #increment items.localuse + my $localuse_count = $item_object->localuse; + $localuse_count++; + $item_object->localuse( $localuse_count )->store; + ModDateLastSeen( $item_object->itemnumber ); # FIXME Move to Koha::Item return( { STATS => 1 }, {}); } diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index ce860ab4ea..d6cf35c66e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -400,6 +400,9 @@ modules: - columnname: holdings_renewals is_hidden: 1 + - + columnname: holdings_localuse + is_hidden: 1 - columnname: holdings_dateaccessioned - @@ -463,6 +466,9 @@ modules: - columnname: otherholdings_renewals is_hidden: 1 + - + columnname: otherholdings_localuse + is_hidden: 1 - columnname: otherholdings_dateaccessioned - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 05da5acf56..eeaa482b83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -367,6 +367,7 @@ Last seen Checkouts Renewals + Local uses Date accessioned Date last borrowed Barcode @@ -571,6 +572,7 @@ [% item.datelastseen | $KohaDates with_hours => 1 %] [% item.issues || 0 | html %] [% item.renewals || 0 | html %] + [% item.localuse || 0 | html %] [% item.dateaccessioned | $KohaDates %] [% item.datelastborrowed | $KohaDates %] [% item.barcode | html %] -- 2.30.2