[HEAD](bug #3318) Granular renew permissions
[koha.git] / admin / itemtypes.pl
index 9f0395c..2c31a18 100755 (executable)
@@ -112,7 +112,6 @@ if ( $op eq 'add_form' ) {
     $template->param(
         itemtype        => $itemtype,
         description     => $data->{'description'},
-        renewalsallowed => $data->{'renewalsallowed'},
         rentalcharge    => sprintf( "%.2f", $data->{'rentalcharge'} ),
         notforloan      => $data->{'notforloan'},
         imageurl        => $data->{'imageurl'},
@@ -138,7 +137,6 @@ elsif ( $op eq 'add_validate' ) {
         my $query2 = '
             UPDATE itemtypes
             SET    description = ?
-                 , renewalsallowed = ?
                  , rentalcharge = ?
                  , notforloan = ?
                  , imageurl = ?
@@ -148,7 +146,6 @@ elsif ( $op eq 'add_validate' ) {
         $sth = $dbh->prepare($query2);
         $sth->execute(
             $input->param('description'),
-            $input->param('renewalsallowed'),
             $input->param('rentalcharge'),
             ( $input->param('notforloan') ? 1 : 0 ),
             (
@@ -165,7 +162,7 @@ elsif ( $op eq 'add_validate' ) {
     else {    # add a new itemtype & not modif an old
         my $query = "
             INSERT INTO itemtypes
-                (itemtype,description,renewalsallowed,rentalcharge, notforloan, imageurl,summary)
+                (itemtype,description,rentalcharge, notforloan, imageurl,summary)
             VALUES
                 (?,?,?,?,?,?,?);
             ";
@@ -174,7 +171,6 @@ elsif ( $op eq 'add_validate' ) {
         $sth->execute(
             $input->param('itemtype'),
             $input->param('description'),
-            $input->param('renewalsallowed'),
             $input->param('rentalcharge'),
             $input->param('notforloan') ? 1 : 0,
             $image eq 'removeImage' ?           ''                 :
@@ -204,14 +200,13 @@ elsif ( $op eq 'delete_confirm' ) {
 
     my $sth =
       $dbh->prepare(
-"select itemtype,description,renewalsallowed,rentalcharge from itemtypes where itemtype=?"
+"select itemtype,description,rentalcharge from itemtypes where itemtype=?"
       );
     $sth->execute($itemtype);
     my $data = $sth->fetchrow_hashref;
     $template->param(
         itemtype        => $itemtype,
         description     => $data->{description},
-        renewalsallowed => $data->{renewalsallowed},
         rentalcharge    => sprintf( "%.2f", $data->{rentalcharge} ),
         imageurl        => $data->{imageurl},
         total           => $total