(bug #3801) fix itemtype administration
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Mon, 23 Nov 2009 08:39:12 +0000 (09:39 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 1 Dec 2009 09:30:21 +0000 (10:30 +0100)
This delete all code related to renewals allowed in itemtype administration.

admin/itemtypes.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl

index 9f0395c..4e6fc5f 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,16 +162,15 @@ 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
-                (?,?,?,?,?,?,?);
+                (?,?,?,?,?,?);
             ";
         my $sth = $dbh->prepare($query);
                my $image = $input->param('image');
         $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
index a519c0e..4c34695 100644 (file)
@@ -224,10 +224,6 @@ Item Types Administration
           (if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item)
         
       </li>
-      <li>
-          <label for="renewalsallowed">Renewals: </label>
-                 <input type="text" id="renewalsallowed" name="renewalsallowed" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="renewalsallowed" -->" />
-        </li>
       <li>
           <label for="rentalcharge">Rental charge: </label>
                  <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="<!-- TMPL_VAR name="rentalcharge" -->" />
@@ -263,7 +259,6 @@ Item Types Administration
 
        <tr><th scope="row">Description</th><td><!-- TMPL_VAR name="description" --></td></tr>
        <tr><th scope="row">Loan length</th><td><!-- TMPL_VAR name="loanlength" --></td></tr>
-       <tr><th scope="row">Renewals</th><td><!-- TMPL_IF name="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></td></tr>
 <tr><th scope="row">Rental charge</th><td><!-- TMPL_VAR name="rentalcharge" --></td></tr></table>
                <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
                <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" /><!-- TMPL_IF name="total" -->
@@ -285,7 +280,6 @@ Item Types Administration
     <th>Code</th>
     <th>Description</th>
     <th>Not for loan</th>
-    <th>Renewable</th>
     <th>Charge</th>
     <th>Actions</th>
   </tr>
@@ -304,13 +298,6 @@ Item Types Administration
     <td><!-- TMPL_VAR name="description" --></td>
     <td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
     <td>
-    <!-- TMPL_IF NAME="renewalsallowed" -->
-      <!-- TMPL_VAR name="renewalsallowed" --> times
-    <!-- TMPL_ELSE -->
-      No
-    <!-- /TMPL_IF -->
-    </td>
-    <td>
     <!-- TMPL_UNLESS name="notforloan" -->
       <!-- TMPL_VAR NAME="rentalcharge" -->
     <!-- /TMPL_UNLESS -->