Hi, i have the following circ rule for a material Patron category: all Item type: computer Current checkouts allowed: 1 Loan period: 2 Unit: hours Hard due date: None defined Fine amount: 2000 Fine charging interval: 1 Fine grace period (day): 0 Suspension in days (day): 0 Renewals allowed (count): 0 Holds allowed (count): 0 Rental discount (%): 0 when i checkout this material type i recibe an alert saying "Please confirm checkout" and i have to put manually the due date; an then checkout the item. if i checkout the item with no due date automatically the due date is for the same day but at 0 hours (then the user is blocked), or if i apply the patch and modify circulation.pl then the due date is 23:59 of today. But never work when the due date is lower than 10 hours. I really appreciate your help.
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; }
*** This bug has been marked as a duplicate of bug 8882 ***