From 52af016f294f9afef9620af1bfa91d90a9c9f9a1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 10 Feb 2011 16:06:05 -0500 Subject: [PATCH] bug 4306: respect item-level_itypes when displaying item label batches Signed-off-by: Galen Charlton --- C4/Creators/Lib.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Creators/Lib.pm b/C4/Creators/Lib.pm index ded0a5d..8fd25fd 100644 --- a/C4/Creators/Lib.pm +++ b/C4/Creators/Lib.pm @@ -306,7 +306,7 @@ sub get_label_summary { my %params = @_; my $label_number = 0; my @label_summaries = (); - my $query = " SELECT b.title, b.author, bi.itemtype, i.barcode, i.biblionumber + my $query = " SELECT b.title, b.author, bi.itemtype, i.barcode, i.biblionumber, i.itype FROM creator_batches AS c LEFT JOIN items AS i ON (c.item_number=i.itemnumber) LEFT JOIN biblioitems AS bi ON (i.biblioitemnumber=bi.biblioitemnumber) LEFT JOIN biblio AS b ON (bi.biblionumber=b.biblionumber) @@ -329,7 +329,7 @@ sub get_label_summary { # should not know that it's part of a web app $record->{'title'} = ' ' . $record->{'title'} . ''; $label_summary->{'_summary'} = $record->{'title'} . " | " . ($record->{'author'} ? $record->{'author'} : 'N/A'); - $label_summary->{'_item_type'} = $record->{'itemtype'}; + $label_summary->{'_item_type'} = C4::Context->preference("item-level_itypes") ? $record->{'itype'} : $record->{'itemtype'}; $label_summary->{'_barcode'} = $record->{'barcode'}; $label_summary->{'_item_number'} = $item->{'item_number'}; $label_summary->{'_label_id'} = $item->{'label_id'}; -- 1.7.2.3