From 3967fa9c79ce7af585ecba6b6bcebcc17b27061b Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 11 Nov 2007 16:39:29 -0600 Subject: [PATCH] further mods to change from ccode to itype at item-level itypes. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Circulation.pm | 2 +- C4/Overdues.pm | 6 +++--- circ/circulation.pl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index e25c616080..0a03c004dd 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -960,7 +960,7 @@ if ($borrower and $barcode and $barcodecheck ne '0'){ (borrowernumber, itemnumber,issuedate, date_due, branchcode) VALUES (?,?,?,?,?)" ); - my $itype=(C4::Context->preference('item-level_itypes')) ? $biblio->{'itemtype'} : $biblio->{'itype'}; + my $itype=(C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'} ; my $loanlength = GetLoanLength( $borrower->{'categorycode'}, $itype, diff --git a/C4/Overdues.pm b/C4/Overdues.pm index bad617e3b8..7cf64ab883 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -117,13 +117,13 @@ sub Getoverdues { my $dbh = C4::Context->dbh; my $sth = (C4::context->preference('item-level_itypes')) ? $dbh->prepare( - "SELECT issues.*,items.ccode as itemtype FROM issues + "SELECT issues.*,items.itype as itemtype FROM issues LEFT JOIN items USING (itemnumber) WHERE date_due < now() AND returndate IS NULL ORDER BY borrowernumber " ) : $dbh->prepare( - "SELECT issues.*,biblioitems.itemtype,items.ccode FROM issues + "SELECT issues.*,biblioitems.itemtype,items.itype FROM issues LEFT JOIN items USING (itemnumber) LEFT JOIN biblioitems USING (biblioitemnumber) WHERE date_due < now() @@ -1149,7 +1149,7 @@ display is filtered by branch sub GetOverduesForBranch { my ( $branch, $location) = @_; - my $itype_link = (C4::context->preference('item-level_itypes')) ? " items.ccode " : " biblioitems.itemtype "; + my $itype_link = (C4::context->preference('item-level_itypes')) ? " items.itype " : " biblioitems.itemtype "; if ( not $location ) { my $dbh = C4::Context->dbh; my $sth = $dbh->prepare(" diff --git a/circ/circulation.pl b/circ/circulation.pl index 88e86e0e39..a0108f865a 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -302,7 +302,7 @@ if ($borrowernumber) { my %getreserv; my %getWaitingReserveInfo; my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} ); - my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itype')) ? $getiteminfo->{'ccode'} : $getiteminfo->{'itemtype'} ); + my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itype')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} ); my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers( $num_res->{'itemnumber'} ); -- 2.39.5