http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7420
--- Comment #29 from Paul Poulain <[email protected]> --- QA comment I tried to test this bug, with syspref finesCalendar set "Use Calendar to skip all days the library is closed", and for a late document I get a negative number for days_between, resulting in no fine being set. I think we should give more details on how days_between works. What we should say is: * if the 1st date is BEFORE the 2nd date, return a negative number * if the 1nd date is AFTER the 1st date, return a positive number (to be // with ->compare that says: Compare two DateTime objects. The semantics are compatible with Perl's "sort()" function; it returns -1 if $dt1 < $dt2, 0 if $dt1 == $dt2, 1 if $dt1 > $dt2. ATM, in fines calculation, days_between is called with $datedue, $today. if $date_due < $today, it returns a negative number, which is wrong. The CalcFine sub should be called with $today,$datedue Could you please check I'm right. For now, for me, I can't test this patch properly. Note that the problem is not related to this patch This is probably related to bug 8521, I tested with and without the patch provided by Koha Team Lyon 3, same result. I tried with $today,$duedate, it seems to have fixed the problem (with Koha Team Lyon 3 patch applied) I won't push this patch before having feedback -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
