From 66353372cf6d0b76b7be1024f14e91a236d0e0d3 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 11 Sep 2014 16:24:54 +0200 Subject: [PATCH] Bug 12909 - item withdrawn is missing in inventory results In inventory results, CSV or screen, the item withdrawn information is missing. This information can be usefull to understand why an item was not scanned. Test plan : - Check you have in default framework an item subfield mapped with items.withdrawn - Create a biblio with default framework - Create an item with barcode='000AAA1', callnumber='ZZZAAA1' and withdrawn=0 - Create an item with barcode='000AAA2', callnumber='ZZZAAA2' and withdrawn=1 - Go to inventory tool : /cgi-bin/koha/tools/inventory.pl - Enter item callnumber between 'ZZZ' and 'ZZZZ' - Submit => You see a column 'Withdrawn' with withdrawn value - Go to inventory tool : /cgi-bin/koha/tools/inventory.pl - Enter item callnumber between 'ZZZ' and 'ZZZZ' - Check 'Export to CSV file' - Submit - Open exported file => You see a column 'Withdrawn' with withdrawn value Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/Items.pm | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 4 ++++ tools/inventory.pl | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 62e89c8f9b..d309abbbb2 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1052,7 +1052,7 @@ sub GetItemsForInventory { my ( @bind_params, @where_strings ); my $select_columns = q{ - SELECT items.itemnumber, barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, stocknumber + SELECT items.itemnumber, barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber }; my $select_count = q{SELECT COUNT(*)}; my $query = q{ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 6ec6c2e9a1..fdac5fa73e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -246,6 +246,7 @@ $(document).ready(function(){ Status Lost Damaged + Withdrawn Unseen since Problems @@ -278,6 +279,9 @@ $(document).ready(function(){ [% result.damaged | html %] + [% result.withdrawn | html %] + + [% result.datelastseen | $KohaDates | html %] diff --git a/tools/inventory.pl b/tools/inventory.pl index 6a5ddc4874..ba10b14bb5 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -345,7 +345,7 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ items.homebranch items.location items.itemcallnumber items.notforloan items.itemlost items.damaged - items.stocknumber + items.withdrawn items.stocknumber / ) { push @translated_keys, $columns_def_hashref->{$key}; } @@ -354,7 +354,7 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ $csv->combine(@translated_keys); print $csv->string, "\n"; - my @keys = qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged stocknumber /; + my @keys = qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged withdrawn stocknumber /; for my $item ( @results ) { my @line; for my $key (@keys) { -- 2.39.2