[Koha-bugs] [Bug 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 23 13:05:23 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #16 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
+    # FIXME Is it right? I'd have expected 5 * 2 - 1 instead
+    # Same for the others
+    my $expected_expiration = output_pref(
+        {
+            dt         => dt_from_string->add( days => ( 5 - 1 ) * 2 ),

If I look to the code:
my $grace =           DateTime::Duration->new( $unit =>
$issuing_rule->firstremind );
        my $deltadays = DateTime::Duration->new(             days =>
$chargeable_units         );
        if ( $deltadays->subtract($grace)->is_positive() ) {
            my $suspension_days = $deltadays * $finedays;
Then I would expect indeed (5-1)*2.
Why would you expect 5*2-1 ?
First you do deltadays - grace (=1) and then you multiply with finedays (2)

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


More information about the Koha-bugs mailing list