From cdddac6c9b36d551b5c58cda4f90100380574b02 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 8 Apr 2008 16:08:12 -0500 Subject: [PATCH] bug 2004: changes to guided reports on items * Added items.location and items.ccode to list of columns available for limiting * choice of item type column (i.e., biblioitems.itemtype or items.itype) to limit by now respects item-level_itypes syspref Signed-off-by: Joshua Ferraro --- C4/Reports.pm | 11 +++++++++-- koha-tmpl/intranet-tmpl/prog/en/columns.def | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/C4/Reports.pm b/C4/Reports.pm index 02cfc9c3eb..376196aac6 100644 --- a/C4/Reports.pm +++ b/C4/Reports.pm @@ -70,16 +70,23 @@ $keys{'5'} = ['borrowers.borrowernumber=accountlines.borrowernumber']; our %criteria; $criteria{'1'} = [ 'statistics.type', 'borrowers.categorycode', - 'statistics.branch', 'biblioitems.itemtype', + 'statistics.branch', 'biblioitems.publicationyear|date', 'items.dateaccessioned|date' ]; $criteria{'2'} = - [ 'biblioitems.itemtype', 'items.holdingbranch', 'items.homebranch' ,'items.itemlost']; + [ 'items.holdingbranch', 'items.homebranch' ,'items.itemlost', 'items.location', 'items.ccode']; $criteria{'3'} = ['borrowers.branchcode']; $criteria{'4'} = ['aqorders.datereceived|date']; $criteria{'5'} = ['borrowers.branchcode']; +if (C4::Context->preference('item-level_itypes')) { + unshift @{ $criteria{'1'} }, 'items.itype'; + unshift @{ $criteria{'2'} }, 'items.itype'; +} else { + unshift @{ $criteria{'1'} }, 'biblioitems.itemtype'; + unshift @{ $criteria{'2'} }, 'biblioitems.itemtype'; +} =head1 NAME diff --git a/koha-tmpl/intranet-tmpl/prog/en/columns.def b/koha-tmpl/intranet-tmpl/prog/en/columns.def index 2a2f1b57ec..d53685a7fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/columns.def +++ b/koha-tmpl/intranet-tmpl/prog/en/columns.def @@ -78,6 +78,8 @@ items.holdingbranch Current Branch items.paidfor Has Item been lost and then paid for items.timestamp Timestamp items.location Location +items.ccode Koha Collection +items.itype Item-level Item Type items.spystatus items.spydescr items.itemlog @@ -97,7 +99,7 @@ biblioitems.biblionumber Biblio Number biblioitems.volume Volume Number biblioitems.number Number biblioitems.classification Classification -biblioitems.itemtype Itemtype +biblioitems.itemtype Biblio-level Item Type biblioitems.isbn ISBN biblioitems.issn ISSN biblioitems.dewey Dewey/Classification -- 2.39.5