From 311d051f77fdc4c5d6081404aff28624bb93210c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 11 Feb 2011 13:56:28 +0100 Subject: [PATCH] bug 4306: respect item-level_itypes when displaying item label batches Signed-off-by: Galen Charlton Signed-off-by: Salvador Zaragoza Rubio Signed-off-by: Chris Cormack --- C4/Creators/Lib.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Creators/Lib.pm b/C4/Creators/Lib.pm index ded0a5d0e6..8fd25fd6e8 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'}; -- 2.39.5