Note optional modules, for later reference.
[koha_gimpoz] / catalogue / updateitem.pl
index d48f845..26a99fe 100755 (executable)
@@ -68,7 +68,7 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form
     $item_changes->{'damaged'} = $damaged;
 } else {
     #nothings changed, so do nothing.
-    print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber");
+    print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");
        exit;
 }
 
@@ -81,7 +81,7 @@ ModItem($item_changes, $biblionumber, $itemnumber);
 # a charge has been added
 # FIXME : if no replacement price, borrower just doesn't get charged?
 if ($itemlost==1) {
-    my $sth=$dbh->prepare("SELECT * FROM issues WHERE (itemnumber=? AND returndate IS NULL)");
+    my $sth=$dbh->prepare("SELECT * FROM issues WHERE itemnumber=?");
     $sth->execute($itemnumber);
     my $issues=$sth->fetchrow_hashref();
 
@@ -97,7 +97,7 @@ if ($itemlost==1) {
         # OK, they haven't
         unless ($existing_charge_hashref) {
             # This item is on issue ... add replacement cost to the borrower's record and mark it returned
-            my $accountno = getnextacctno('',$issues->{'borrowernumber'},$dbh);
+            my $accountno = getnextacctno($issues->{'borrowernumber'});
             my $sth2=$dbh->prepare("INSERT INTO accountlines
             (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
             VALUES
@@ -112,4 +112,4 @@ if ($itemlost==1) {
     $sth->finish;
 }
 
-print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber");
+print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");