$circ->stop_fines_time('now') unless $circ->stop_fines_time;
if( $backdate ) {
+ $backdate = cleanse_ISO8601($backdate);
+
+ my $original_date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($circ->due_date));
+ my $new_date = DateTime::Format::ISO8601->new->parse_datetime($backdate);
+ $backdate = $new_date->ymd . 'T' . $original_date->strftime('%T%z');
+
# make it look like the circ stopped at the cliams returned time
- $circ->stop_fines_time(cleanse_ISO8601($backdate));
+ $circ->stop_fines_time($backdate);
my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ, $backdate);
return $evt if $evt;
}
# clean up the backdate for date comparison
# we want any bills created on or after the backdate
# ------------------------------------------------------------------
- $bd =~ s/^(\d{4}-\d{2}-\d{2}).*/$1/og;
- #$bd = "${bd}T23:59:59";
+ my $original_date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($self->circ->due_date));
+ my $new_date = DateTime::Format::ISO8601->new->parse_datetime($bd);
+ $bd = $new_date->ymd . 'T' . $original_date->strftime('%T%z');
+
+ $self->backdate($bd);
my $bills = $self->editor->search_money_billing(
{