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

--- Comment #24 from Jonathan Druart <[email protected]> 
---
Comment on attachment 39800
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39800
Bug 14101: Automatic renewals exactly on due date

Review of attachment 39800:
 --> 
(http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14101&attachment=39800)
-----------------------------------------------------------------

::: C4/Circulation.pm
@@ +2737,4 @@
>      return ( 0, "too_many" )
>        if $issuingrule->{renewalsallowed} <= $itemissue->{renewals};
>  
> +    if ( defined $issuingrule->{norenewalbefore} ) {

What about the empty string? I am not sure it's relevant, but I would like to
be sure.

@@ +2751,5 @@
>              return ( 0, "too_soon" );
>          }
> +        else {
> +            return ( 0, "auto_renew" ) if $itemissue->{auto_renew};
> +            return ( 1, undef );

This last return is not needed, the process should continue I think.
Imagine someone else adds a new check in the futur.

@@ +2759,5 @@
> +    # Fallback for automatic renewals:
> +    # If norenewalbefore is undef, don't renew before due date.
> +    elsif ( $itemissue->{auto_renew} ) {
> +        return ( 0, "auto_renew" )
> +          if DateTime->now( time_zone => C4::Context->tz() ) >=

Prefer dt_from_string to get a DateTime object.

-- 
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/

Reply via email to