sub set_item_lost {
- my ($class, $e, $copy_id) = @_;
+ my ($class, $e, $copy_id, $backdate) = @_;
return $class->set_item_lost_or_lod(
$e, $copy_id,
bill_fee_note => 'Lost Materials Processing Fee',
event => 'COPY_MARKED_LOST',
stop_fines => OILS_STOP_FINES_LOST,
+ stop_fines_time => $backdate || 'now',
at_hook => 'lost'
);
}
sub set_item_long_overdue {
- my ($class, $e, $copy_id) = @_;
+ my ($class, $e, $copy_id, $backdate) = @_;
return $class->set_item_lost_or_lod(
$e, $copy_id,
bill_fee_note => 'Long Overdue Materials Processing Fee',
event => 'COPY_MARKED_LONG_OVERDUE',
stop_fines => 'LONGOVERDUE',
+ stop_fines_time => $backdate || 'now',
at_hook => 'longoverdue'
);
}
# ---------------------------------------------------------------------
# move the copy into LOST status
$copy->status($args{status});
+ $copy->status_changed_time($args{stop_fines_time});
$copy->editor($e->requestor->id);
$copy->edit_date('now');
$e->update_asset_copy($copy) or return $e->die_event;
# ---------------------------------------------------------------------
# mark the circ as lost and stop the fines
$circ->stop_fines($args{stop_fines});
- $circ->stop_fines_time('now') unless $circ->stop_fines_time;
+ $circ->stop_fines_time($args{stop_fines_time}) unless $circ->stop_fines_time;
$e->update_action_circulation($circ) or return $e->die_event;
# ---------------------------------------------------------------------
signature => q/
Sets the copy and related open circulation to lost
@param auth
- @param args : barcode
+ @param args : barcode, backdate
/
);
my $copy = $e->search_asset_copy({barcode=>$$args{barcode}, deleted=>'f'})->[0]
or return $e->die_event;
- my $evt = OpenILS::Application::Cat::AssetCommon->set_item_lost($e, $copy->id);
+ my $evt = OpenILS::Application::Cat::AssetCommon->set_item_lost($e, $copy->id, $$args{backdate});
return $evt if $evt;
$e->commit;