[Koha-patches] [PATCH] bug 2004: changes to guided reports on items
Galen Charlton
galen.charlton at liblime.com
Tue Apr 8 23:08:12 CEST 2008
* 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
---
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 02cfc9c..376196a 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 2a2f1b5..d53685a 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
--
1.5.5.rc0.16.g02b00
More information about the Koha-patches
mailing list