From f25fa87198cb28fe78913cc22a29ef79ec6eb464 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 16 Aug 2023 21:20:36 +0000 Subject: [PATCH] Bug 34547: Add transfer reason to checkedintable on returns.tt To test: 1. Apply patch, restart_all 2. Check some items out and prepare some reasons that would initiate a branchtransfer. According the schema it can be any of the following: 'Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'TransferCancellation', 'Recall', 'RecallCancellation. 3. CHeck in some the items and notice the 'Transfer reason' column in the table. Make sure the reasons are acurate and make sense. 4. To go Table settings and find the 'checkedintable'. Make sure you can properly hide the column from the display. Signed-off-by: AndrewA Signed-off-by: Emily Lamancusa Signed-off-by: Tomas Cohen Arazi --- admin/columns_settings.yml | 2 ++ circ/returns.pl | 1 + .../intranet-tmpl/prog/en/modules/circ/returns.tt | 15 +++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 6befc620fc..1d517a51c4 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1462,6 +1462,8 @@ modules: columnname: homelibrary - columnname: transferlibrary + - + columnname: transferreason - columnname: location - diff --git a/circ/returns.pl b/circ/returns.pl index 8a0cb1a41d..564e60c966 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -812,6 +812,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{homebranch} = $item->homebranch; $ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : ''; $ri{damaged} = $item->damaged; + $ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : ''; $ri{location} = $item->location; my $shelfcode = $ri{'location'}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index b15efad24f..f048287a63 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1206,6 +1206,7 @@ Barcode Home library Transfer to + Transfer reason Shelving location Call number Date acquired @@ -1255,6 +1256,20 @@ [% Branches.GetName( riloo.transferbranch ) | html %] + + [%- SWITCH riloo.transferreason -%] + [%- CASE 'Manual' -%]Manual + [%- CASE 'StockrotationAdvance' -%]Stock rotation advance + [%- CASE 'StockrotationRepatriation' -%]Stock rotation repatriation + [%- CASE 'ReturnToHome' -%]Return to home library + [%- CASE 'ReturnToHolding' -%]Return to holding library + [%- CASE 'RotatingCollection' -%]Rotating collection + [%- CASE 'Reserve' -%]Hold + [%- CASE 'LostReserve' -%]Lost hold + [%- CASE 'CancelReserve' -%]Cancelled hold + [%- CASE 'TransferCancellation' -%]Transfer was cancelled whilst in transit + [%- END -%] + [% riloo.location | html %] -- 2.39.5