From eeb28c7dc298600c89ea6932fc0535bdd90f261f Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 4 Aug 2006 21:39:20 +0000 Subject: [PATCH] added some logging, removed some old code git-svn-id: svn://svn.open-ils.org/ILS/trunk@5314 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Circ.pm | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index 2e5a7f7d77..648350f644 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -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); -- 2.43.2