added some logging, removed some old code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 21:39:20 +0000 (21:39 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 21:39:20 +0000 (21:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5314 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm

index 2e5a7f7..648350f 100644 (file)
@@ -240,32 +240,9 @@ sub set_circ_lost {
                        $user, $circ, $session, $backdate );
                return $evt if $evt;
 
-#              $evt = $U->check_perms($user->id, $circ->circ_lib, 'SET_CIRC_CLAIMS_RETURNED');
-#              return $evt if $evt;
-#              $circ->stop_fines("CLAIMSRETURNED");
-#
-#              $logger->activity("user ".$user->id." marking circ".  $circ->id. " as claims returned");
-#
-#              # allow the caller to backdate the circulation and void any fines
-#              # that occurred after the backdate
-#              if($backdate) {
-#                      OpenILS::Application::Circ::Circulate::_checkin_handle_backdate(
-#                              $backdate, $circ, $user, $session );
-#              }
-#
-#              my $patron;
-#              ($patron, $evt) = $U->fetch_user($circ->usr);
-#              return $evt if $evt;
-#              $patron->claims_returned_count( 
-#                      $patron->claims_returned_count + 1 );
-#
-#              my $stat = $U->storagereq(
-#                      'open-ils.storage.direct.actor.user.update', $patron );
-#              return $U->DB_UPDATE_FAILED($patron) unless $stat;
-
        }
 
-       $circ->stop_fines_time('now') unless $circ->stop_fines_time('now');
+       $circ->stop_fines_time('now') unless $circ->stop_fines_time;
        my $s = $session->request(
                "open-ils.storage.direct.action.circulation.update", $circ )->gather(1);
 
@@ -287,7 +264,7 @@ sub _set_circ_lost {
        my $newstat = $U->copy_status_from_name('lost');
        if( $copy->status ne $newstat->id ) {
 
-               $copy->status($newstat);
+               $copy->status($newstat->id);
                $U->update_copy(
                        copy            => $copy, 
                        editor  => $reqr->id, 
@@ -298,6 +275,8 @@ sub _set_circ_lost {
 
        my $copy_price = $copy->price || 0;
 
+       $logger->debug("lost copy has a price of $copy_price");
+
        # If the copy has a price configured, charge said price to the user
        if($copy_price and $copy_price > 0) {
                $evt = _make_bill($session, $copy_price, 'Lost Materials', $circ->id);