fix for bug 2359: Returning an item from moremember.pl...
authorJesse Weaver <jesse.weaver@liblime.com>
Thu, 17 Jul 2008 17:43:55 +0000 (12:43 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 18 Jul 2008 18:06:20 +0000 (13:06 -0500)
Adds a 'forgive fines' checkbox to moremember.pl that defaults to off, and removes the hardcoded $exemptfine = 1 argument to AddReturn in reserves/renewscript.pl. Also, cleans up a little inline CSS.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
reserve/renewscript.pl

index 128968c..75b8b7d 100644 (file)
@@ -351,8 +351,8 @@ if (nodename =="barcodes[]"){
             <th scope="col">Date due</th>
             <th scope="col">Charge</th>
             <th scope="col">Price</th>
-            <th scope="col">Renew <p style="font-size: 80%;"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
-            <th scope="col">Return <p style="font-size: 80%;"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
+            <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
+            <th scope="col">Return <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
         </tr></thead>
     
        <tbody> <!-- TMPL_LOOP name="issueloop" -->
@@ -408,17 +408,22 @@ if (nodename =="barcodes[]"){
             <td colspan="5" style="text-align: right; font-weight:bold;">Total replacement cost:</td>
             <td><!-- TMPL_VAR NAME="totalprice" --></td>
             <td colspan="2">      
-            renewal due date :<input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" />
-      <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
-      <script type="text/javascript">
-       //<![CDATA[
-        Calendar.setup({
-            inputField : "newduedate",
-            ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
-            button : "newduedate_button"
-          });
-      //]]>
-      </script>
+                <p>
+                    Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" />
+                    <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
+                    <script type="text/javascript">
+                        //<![CDATA[
+                        Calendar.setup({
+                            inputField : "newduedate",
+                            ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
+                            button : "newduedate_button"
+                        });
+                        //]]>
+                    </script>
+                </p>
+                <p>
+                    Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" />
+                </p>
             </td>
         </tr>
         </table>
index 6e3cf14..48e6076 100755 (executable)
@@ -74,6 +74,7 @@ if ($input->param('newduedate')){
 #
 my $cardnumber = $input->param("cardnumber");
 my $borrowernumber = $input->param("borrowernumber");
+my $exemptfine = $input->param("exemptfine") || 0;
 my $failedrenews;
 foreach my $itemno (@data) {
     # check status before renewing issue
@@ -87,9 +88,9 @@ foreach my $itemno (@data) {
 }
 my $failedreturn;
 foreach my $barcode (@barcodes) {
-    # check status before renewing issue  
+    # check status before renewing issue
    my ( $returned, $messages, $issueinformation, $borrower ) = 
-    AddReturn($barcode,$branch,1);
+    AddReturn($barcode, $branch, $exemptfine);
    $failedreturn.="&failedreturn=$barcode" unless ($returned);
 }