my $bills = $self->editor->search_money_billing(
{
- billing_ts => { '>=' => $self->backdate },
+ billing_ts => { '>=' => $self->backdate . 'T23:59:59' },
xact => $self->circ->id,
billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS
}
my $bills = $session->request(
"open-ils.storage.direct.money.billing.search_where.atomic",
- billing_ts => { '>=' => $backdate },
+ billing_ts => { '>=' => $backdate . 'T23:59:59' },
xact => $circ->id,
billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS
)->gather(1);
#$last_fine += $fine_interval * $grace;
}
- my $pending_fine_count = int( ($now - $last_fine) / $fine_interval ) - 1;
- if ($pending_fine_count < 1) {
+ my $pending_fine_count = int( ($now - $last_fine) / $fine_interval );
+ if ($pending_fine_count < 1 + $grace) {
$client->respond( "\tNo fines to create. " );
if ($grace && $now < $due + $fine_interval * $grace) {
$client->respond( "Still inside grace period of: ". seconds_to_interval( $fine_interval * $grace)."\n" );