[Koha-bugs] [Bug 9041] Hourly fines does not work in koha 3.8.6

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 13 18:34:11 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9041

--- Comment #1 from Humberto Blanco <hblancoca at gmail.com> ---
Review the source code i found that in Koha::Calendar.pm,  in the sub addDate
when  evaluate   $self->is_holiday($dt)  the results for $dt appears bad, then
in the Circulation.pm returns INVALID_DATE and needs manually checkout.
For my biblio, i assume that all loans not in holidays then i put this in
Koha::Calendar.pm
if ( $days_mode eq 'Datedue' ){ 
  my $dt = $base_date + $add_duration;

  if($unit ne 'hours'){  # Added for me
     while ( $self->is_holiday($dt) ) {
    $dt->add_duration($day_dur);
    if ( $unit eq 'hours' ) {
       $dt->set_hour($return_by_hour);    # Staffs specific
    }
     }
  } # End added for me

  return $dt; 
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list