Bug 15705: Add specific warning messages for auto_too_much_oweing

Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-10-24 11:43:31 +00:00 committed by Kyle M Hall
parent 14fb70aa01
commit ee53560da6
4 changed files with 12 additions and 0 deletions

View file

@ -18,6 +18,7 @@
var NOT_RENEWABLE_TOO_SOON = _("No renewal before %s");
var NOT_RENEWABLE_AUTO_TOO_SOON = _("Scheduled for automatic renewal");
var NOT_RENEWABLE_AUTO_TOO_LATE = _("Can no longer be auto-renewed - number of checkout days exceeded");
var NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING = _("Automatic renewal failed, patron has unpaid fines");
var NOT_RENEWABLE_AUTO_RENEW = _("Scheduled for automatic renewal");
var RENEWALS_REMAINING = _("%s of %s renewals remaining");
var HOLD_IS_SUSPENDED = _("Hold is <strong>suspended</strong>");

View file

@ -374,6 +374,13 @@ $(document).ready(function() {
+ NOT_RENEWABLE_AUTO_TOO_LATE
+ "</span>";
span_style = "display: none";
span_class = "renewals-allowed";
} else if ( oObj.can_renew_error == "auto_too_much_oweing" ) {
content += "<span class='renewals-disabled'>"
+ NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING
+ "</span>";
span_style = "display: none";
span_class = "renewals-allowed";
} else if ( oObj.can_renew_error == "auto_renew" ) {

View file

@ -291,6 +291,9 @@ Using this account is not recommended because some parts of Koha will not functi
Not allowed <span class="renewals">(overdue)</span>
[% ELSIF ( ISSUE.auto_too_late ) %]
No longer renewable
[% ELSIF ISSUE.auto_too_much_oweing %]
Automatic renewal failed, you have unpaid fines.
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
[% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
Automatic renewal
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>

View file

@ -222,6 +222,7 @@ if ($issues){
$issue->{'auto_renew'} = 1 if $renewerror eq 'auto_renew';
$issue->{'auto_too_soon'} = 1 if $renewerror eq 'auto_too_soon';
$issue->{'auto_too_late'} = 1 if $renewerror eq 'auto_too_late';
$issue->{'auto_too_much_oweing'} = 1 if $renewerror eq 'auto_too_much_oweing';
if ( $renewerror eq 'too_soon' ) {
$issue->{'too_soon'} = 1;