further mods to change from ccode to itype at item-level itypes.
authorRyan Higgins <rch@balrog.liblime.com>
Sun, 11 Nov 2007 22:39:29 +0000 (16:39 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 12 Nov 2007 00:40:20 +0000 (18:40 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Circulation.pm
C4/Overdues.pm
circ/circulation.pl

index e25c616..0a03c00 100644 (file)
@@ -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,
index bad617e..7cf64ab 100644 (file)
@@ -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("
index 88e86e0..a0108f8 100755 (executable)
@@ -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'} );