From 2c5b25c1fcae11fa4af974924a502657732b9521 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 13 Mar 2008 17:18:13 -0500 Subject: [PATCH] more item-level_itypes fixes Signed-off-by: Joshua Ferraro --- circ/circulation.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 12a162f80b..8664b4afbd 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -329,7 +329,7 @@ if ($borrowernumber) { my %getreserv; my %getWaitingReserveInfo; my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} ); - my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itype')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} ); + my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} ); my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers( $num_res->{'itemnumber'} ); @@ -427,6 +427,9 @@ if ($borrower) { # split in 2 arrays for today & previous foreach my $it ( @$issueslist ) { + # set itemtype per item-level_itype syspref - FIXME this is an ugly hack + $it->{'itemtype'} = (C4::Context->preference('item-level_itypes')) ? $it->{'itype'} : $it->{'itemtype'}; + my $issuedate = $it->{'issuedate'}; $issuedate =~ s/-//g; $issuedate = substr( $issuedate, 0, 8 ); -- 2.39.5