From b01902b523b0bce9223a907bfa84f0b9b04ee996 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 8 Sep 2006 06:25:01 +0000 Subject: [PATCH] added lame money hack to handle backdates that are full datetimes git-svn-id: svn://svn.open-ils.org/ILS/trunk@6026 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Circ/Circulate.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 32b882103b..6e13ae8116 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -1549,9 +1549,13 @@ sub checkin_handle_circ { sub checkin_handle_backdate { my $self = shift; + my $bd = $self->backdate; + $bd =~ s/^(\d{4}-\d{2}-\d{2}).*/$1/og; + $bd = "${bd}T23:59:59"; + my $bills = $self->editor->search_money_billing( { - billing_ts => { '>=' => $self->backdate . 'T23:59:59' }, + billing_ts => { '>=' => $bd }, xact => $self->circ->id, billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS } @@ -1575,9 +1579,14 @@ sub checkin_handle_backdate { sub _checkin_handle_backdate { my( $backdate, $circ, $requestor, $session, $closecirc ) = @_; + my $bd = $backdate; + $bd =~ s/^(\d{4}-\d{2}-\d{2}).*/$1/og; + $bd = "${bd}T23:59:59"; + + my $bills = $session->request( "open-ils.storage.direct.money.billing.search_where.atomic", - billing_ts => { '>=' => $backdate . 'T23:59:59' }, + billing_ts => { '>=' => $bd }, xact => $circ->id, billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS )->gather(1); -- 2.43.2