View | Details | Raw Unified | Return to bug 24083
Collapse All | Expand All

(-)a/C4/Circulation.pm (-8 / +57 lines)
Lines 2782-2787 sub CanBookBeRenewed { Link Here
2782
                'no_auto_renewal_after_hard_limit',
2782
                'no_auto_renewal_after_hard_limit',
2783
                'lengthunit',
2783
                'lengthunit',
2784
                'norenewalbefore',
2784
                'norenewalbefore',
2785
                'unseen_renewals_allowed'
2785
            ]
2786
            ]
2786
        }
2787
        }
2787
    );
2788
    );
Lines 2789-2794 sub CanBookBeRenewed { Link Here
2789
    return ( 0, "too_many" )
2790
    return ( 0, "too_many" )
2790
      if not $issuing_rule->{renewalsallowed} or $issuing_rule->{renewalsallowed} <= $issue->renewals;
2791
      if not $issuing_rule->{renewalsallowed} or $issuing_rule->{renewalsallowed} <= $issue->renewals;
2791
2792
2793
    return ( 0, "too_unseen" )
2794
      if C4::Context->preference('UnseenRenewals') &&
2795
        $issuing_rule->{unseen_renewals_allowed} &&
2796
        $issuing_rule->{unseen_renewals_allowed} <= $issue->unseen_renewals;
2797
2792
    my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing');
2798
    my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing');
2793
    my $restrictionblockrenewing = C4::Context->preference('RestrictionBlockRenewing');
2799
    my $restrictionblockrenewing = C4::Context->preference('RestrictionBlockRenewing');
2794
    $patron         = Koha::Patrons->find($borrowernumber); # FIXME Is this really useful?
2800
    $patron         = Koha::Patrons->find($borrowernumber); # FIXME Is this really useful?
Lines 2879-2885 sub CanBookBeRenewed { Link Here
2879
2885
2880
=head2 AddRenewal
2886
=head2 AddRenewal
2881
2887
2882
  &AddRenewal($borrowernumber, $itemnumber, $branch, [$datedue], [$lastreneweddate]);
2888
  &AddRenewal($borrowernumber, $itemnumber, $branch, [$datedue], [$lastreneweddate], [$seen]);
2883
2889
2884
Renews a loan.
2890
Renews a loan.
2885
2891
Lines 2899-2904 this parameter is not supplied, lastreneweddate is set to the current date. Link Here
2899
If C<$datedue> is the empty string, C<&AddRenewal> will calculate the due date automatically
2905
If C<$datedue> is the empty string, C<&AddRenewal> will calculate the due date automatically
2900
from the book's item type.
2906
from the book's item type.
2901
2907
2908
C<$seen> is a boolean flag indicating if the item was seen or not during the renewal. This
2909
informs the incrementing of the unseen_renewals column. If this flag is not supplied, we
2910
fallback to a true value
2911
2902
=cut
2912
=cut
2903
2913
2904
sub AddRenewal {
2914
sub AddRenewal {
Lines 2907-2912 sub AddRenewal { Link Here
2907
    my $branch          = shift;
2917
    my $branch          = shift;
2908
    my $datedue         = shift;
2918
    my $datedue         = shift;
2909
    my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz);
2919
    my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz);
2920
    my $seen            = shift;
2921
2922
    # Fallback on a 'seen' renewal
2923
    $seen = defined $seen && $seen == 0 ? 0 : 1;
2910
2924
2911
    my $item_object   = Koha::Items->find($itemnumber) or return;
2925
    my $item_object   = Koha::Items->find($itemnumber) or return;
2912
    my $biblio = $item_object->biblio;
2926
    my $biblio = $item_object->biblio;
Lines 2959-2973 sub AddRenewal { Link Here
2959
            }
2973
            }
2960
        );
2974
        );
2961
2975
2976
        # Increment the unseen renewals, if appropriate
2977
        # We only do so if the syspref is enabled and
2978
        # a maximum value has been set in the circ rules
2979
        my $unseen_renewals = $issue->unseen_renewals;
2980
        if (C4::Context->preference('UnseenRenewals')) {
2981
            my $rule = Koha::CirculationRules->get_effective_rule(
2982
                {   categorycode => $patron->categorycode,
2983
                    itemtype     => $item_object->effective_itemtype,
2984
                    branchcode   => $circ_library->branchcode,
2985
                    rule_name    => 'unseen_renewals_allowed'
2986
                }
2987
            );
2988
            if (!$seen && $rule && $rule->rule_value) {
2989
                $unseen_renewals++;
2990
            } else {
2991
                # If the renewal is seen, unseen should revert to 0
2992
                $unseen_renewals = 0;
2993
            }
2994
        }
2995
2962
        # Update the issues record to have the new due date, and a new count
2996
        # Update the issues record to have the new due date, and a new count
2963
        # of how many times it has been renewed.
2997
        # of how many times it has been renewed.
2964
        my $renews = ( $issue->renewals || 0 ) + 1;
2998
        my $renews = ( $issue->renewals || 0 ) + 1;
2965
        my $sth = $dbh->prepare("UPDATE issues SET date_due = ?, renewals = ?, lastreneweddate = ?
2999
        my $sth = $dbh->prepare("UPDATE issues SET date_due = ?, renewals = ?, unseen_renewals = ?, lastreneweddate = ?
2966
                                WHERE borrowernumber=?
3000
                                WHERE borrowernumber=?
2967
                                AND itemnumber=?"
3001
                                AND itemnumber=?"
2968
        );
3002
        );
2969
3003
2970
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $lastreneweddate, $borrowernumber, $itemnumber );
3004
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber );
2971
3005
2972
        # Update the renewal count on the item, and tell zebra to reindex
3006
        # Update the renewal count on the item, and tell zebra to reindex
2973
        $renews = ( $item_object->renewals || 0 ) + 1;
3007
        $renews = ( $item_object->renewals || 0 ) + 1;
Lines 3049-3056 sub GetRenewCount { Link Here
3049
    my ( $bornum, $itemno ) = @_;
3083
    my ( $bornum, $itemno ) = @_;
3050
    my $dbh           = C4::Context->dbh;
3084
    my $dbh           = C4::Context->dbh;
3051
    my $renewcount    = 0;
3085
    my $renewcount    = 0;
3086
    my $unseencount    = 0;
3052
    my $renewsallowed = 0;
3087
    my $renewsallowed = 0;
3088
    my $unseenallowed = 0;
3053
    my $renewsleft    = 0;
3089
    my $renewsleft    = 0;
3090
    my $unseenleft    = 0;
3054
3091
3055
    my $patron = Koha::Patrons->find( $bornum );
3092
    my $patron = Koha::Patrons->find( $bornum );
3056
    my $item   = Koha::Items->find($itemno);
3093
    my $item   = Koha::Items->find($itemno);
Lines 3069-3090 sub GetRenewCount { Link Here
3069
    $sth->execute( $bornum, $itemno );
3106
    $sth->execute( $bornum, $itemno );
3070
    my $data = $sth->fetchrow_hashref;
3107
    my $data = $sth->fetchrow_hashref;
3071
    $renewcount = $data->{'renewals'} if $data->{'renewals'};
3108
    $renewcount = $data->{'renewals'} if $data->{'renewals'};
3109
    $unseencount = $data->{'unseen_renewals'} if $data->{'unseen_renewals'};
3072
    # $item and $borrower should be calculated
3110
    # $item and $borrower should be calculated
3073
    my $branchcode = _GetCircControlBranch($item->unblessed, $patron->unblessed);
3111
    my $branchcode = _GetCircControlBranch($item->unblessed, $patron->unblessed);
3074
3112
3075
    my $rule = Koha::CirculationRules->get_effective_rule(
3113
    my $rules = Koha::CirculationRules->get_effective_rules(
3076
        {
3114
        {
3077
            categorycode => $patron->categorycode,
3115
            categorycode => $patron->categorycode,
3078
            itemtype     => $item->effective_itemtype,
3116
            itemtype     => $item->effective_itemtype,
3079
            branchcode   => $branchcode,
3117
            branchcode   => $branchcode,
3080
            rule_name    => 'renewalsallowed',
3118
            rules        => [ 'renewalsallowed', 'unseen_renewals_allowed' ]
3081
        }
3119
        }
3082
    );
3120
    );
3083
3121
    $renewsallowed = $rules ? $rules->{renewalsallowed} : 0;
3084
    $renewsallowed = $rule ? $rule->rule_value : 0;
3122
    $unseenallowed = $rules->{unseen_renewals_allowed} ?
3123
        $rules->{unseen_renewals_allowed} :
3124
        0;
3085
    $renewsleft    = $renewsallowed - $renewcount;
3125
    $renewsleft    = $renewsallowed - $renewcount;
3126
    $unseenleft    = $unseenallowed - $unseencount;
3086
    if($renewsleft < 0){ $renewsleft = 0; }
3127
    if($renewsleft < 0){ $renewsleft = 0; }
3087
    return ( $renewcount, $renewsallowed, $renewsleft );
3128
    if($unseenleft < 0){ $unseenleft = 0; }
3129
    return (
3130
        $renewcount,
3131
        $renewsallowed,
3132
        $renewsleft,
3133
        $unseencount,
3134
        $unseenallowed,
3135
        $unseenleft
3136
    );
3088
}
3137
}
3089
3138
3090
=head2 GetSoonestRenewDate
3139
=head2 GetSoonestRenewDate
(-)a/C4/ILSDI/Services.pm (-1 / +1 lines)
Lines 644-650 sub RenewLoan { Link Here
644
644
645
    # Add renewal if possible
645
    # Add renewal if possible
646
    my @renewal = CanBookBeRenewed( $borrowernumber, $itemnumber );
646
    my @renewal = CanBookBeRenewed( $borrowernumber, $itemnumber );
647
    if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber ); }
647
    if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber, undef, undef, undef, 0 ); }
648
648
649
    my $issue = $item->checkout;
649
    my $issue = $item->checkout;
650
    return unless $issue; # FIXME should be handled
650
    return unless $issue; # FIXME should be handled
(-)a/C4/SIP/ILS/Transaction/Renew.pm (+1 lines)
Lines 51-56 sub do_renew_for { Link Here
51
    } else {
51
    } else {
52
        $renewerror=~s/on_reserve/Item unavailable due to outstanding holds/;
52
        $renewerror=~s/on_reserve/Item unavailable due to outstanding holds/;
53
        $renewerror=~s/too_many/Item has reached maximum renewals/;
53
        $renewerror=~s/too_many/Item has reached maximum renewals/;
54
        $renewerror=~s/too_unseen/Item has reached maximum consecutive renewals without being seen/;
54
        $renewerror=~s/item_denied_renewal/Item renewal is not allowed/;
55
        $renewerror=~s/item_denied_renewal/Item renewal is not allowed/;
55
        $self->screen_msg($renewerror);
56
        $self->screen_msg($renewerror);
56
        $self->renewal_ok(0);
57
        $self->renewal_ok(0);
(-)a/Koha/CirculationRules.pm (+3 lines)
Lines 145-150 our $RULE_KINDS = { Link Here
145
    renewalsallowed => {
145
    renewalsallowed => {
146
        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
146
        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
147
    },
147
    },
148
    unseen_renewals_allowed => {
149
        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
150
    },
148
    rentaldiscount => {
151
    rentaldiscount => {
149
        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
152
        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
150
    },
153
    },
(-)a/Koha/REST/V1/Checkouts.pm (-1 / +3 lines)
Lines 151-156 sub renew { Link Here
151
    my $c = shift->openapi->valid_input or return;
151
    my $c = shift->openapi->valid_input or return;
152
152
153
    my $checkout_id = $c->validation->param('checkout_id');
153
    my $checkout_id = $c->validation->param('checkout_id');
154
    my $seen = $c->validation->param('seen') || 1;
154
    my $checkout = Koha::Checkouts->find( $checkout_id );
155
    my $checkout = Koha::Checkouts->find( $checkout_id );
155
156
156
    unless ($checkout) {
157
    unless ($checkout) {
Lines 173-179 sub renew { Link Here
173
        );
174
        );
174
    }
175
    }
175
176
176
    AddRenewal($borrowernumber, $itemnumber, $checkout->branchcode);
177
    AddRenewal($borrowernumber, $itemnumber, $checkout->branchcode, undef, undef, $seen);
177
    $checkout = Koha::Checkouts->find($checkout_id);
178
    $checkout = Koha::Checkouts->find($checkout_id);
178
179
179
    $c->res->headers->location( $c->req->url->to_string );
180
    $c->res->headers->location( $c->req->url->to_string );
Lines 222-227 sub allows_renewal { Link Here
222
            allows_renewal => $renewable,
223
            allows_renewal => $renewable,
223
            max_renewals => $rule->rule_value,
224
            max_renewals => $rule->rule_value,
224
            current_renewals => $checkout->renewals,
225
            current_renewals => $checkout->renewals,
226
            unseen_renewals => $checkout->unseen_renewals,
225
            error => $error
227
            error => $error
226
        }
228
        }
227
    );
229
    );
(-)a/api/v1/swagger/definitions/checkout.json (+4 lines)
Lines 35-40 Link Here
35
      "type": ["integer", "null"],
35
      "type": ["integer", "null"],
36
      "description": "Number of renewals"
36
      "description": "Number of renewals"
37
    },
37
    },
38
    "unseen_renewals": {
39
      "type": ["integer", "null"],
40
      "description": "Number of consecutive unseen renewals"
41
    },
38
    "auto_renew": {
42
    "auto_renew": {
39
      "type": "boolean",
43
      "type": "boolean",
40
      "description": "Auto renewal"
44
      "description": "Auto renewal"
(-)a/api/v1/swagger/parameters.json (+3 lines)
Lines 32-37 Link Here
32
  "checkout_id_pp": {
32
  "checkout_id_pp": {
33
    "$ref": "parameters/checkout.json#/checkout_id_pp"
33
    "$ref": "parameters/checkout.json#/checkout_id_pp"
34
  },
34
  },
35
  "seen_pp": {
36
    "$ref": "parameters/checkout.json#/seen_pp"
37
  },
35
  "match": {
38
  "match": {
36
    "name": "_match",
39
    "name": "_match",
37
    "in": "query",
40
    "in": "query",
(-)a/api/v1/swagger/parameters/checkout.json (+7 lines)
Lines 5-9 Link Here
5
    "description": "Internal checkout identifier",
5
    "description": "Internal checkout identifier",
6
    "required": true,
6
    "required": true,
7
    "type": "integer"
7
    "type": "integer"
8
  },
9
  "seen_pp": {
10
    "name": "seen",
11
    "in": "query",
12
    "description": "Item was seen flag",
13
    "required": false,
14
    "type": "integer"
8
  }
15
  }
9
}
16
}
(-)a/api/v1/swagger/paths/checkouts.json (-3 / +4 lines)
Lines 81-89 Link Here
81
      "x-mojo-to": "Checkouts#renew",
81
      "x-mojo-to": "Checkouts#renew",
82
      "operationId": "renewCheckout",
82
      "operationId": "renewCheckout",
83
      "tags": ["patrons", "checkouts"],
83
      "tags": ["patrons", "checkouts"],
84
      "parameters": [{
84
      "parameters": [
85
        "$ref": "../parameters.json#/checkout_id_pp"
85
        { "$ref": "../parameters.json#/checkout_id_pp" },
86
      }],
86
        { "$ref": "../parameters.json#/seen_pp" }
87
      ],
87
      "produces": ["application/json"],
88
      "produces": ["application/json"],
88
      "responses": {
89
      "responses": {
89
        "201": {
90
        "201": {
(-)a/circ/renew.pl (-1 / +9 lines)
Lines 44-49 my ( $template, $librarian, $cookie, $flags ) = get_template_and_user( Link Here
44
my $schema = Koha::Database->new()->schema();
44
my $schema = Koha::Database->new()->schema();
45
45
46
my $barcode        = $cgi->param('barcode');
46
my $barcode        = $cgi->param('barcode');
47
my $unseen         = $cgi->param('unseen') || 0;
47
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespae
48
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespae
48
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
49
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
49
my $override_limit = $cgi->param('override_limit');
50
my $override_limit = $cgi->param('override_limit');
Lines 99-105 if ($barcode) { Link Here
99
                    if ( $cgi->param('renewonholdduedate') ) {
100
                    if ( $cgi->param('renewonholdduedate') ) {
100
                        $date_due = dt_from_string( scalar $cgi->param('renewonholdduedate'));
101
                        $date_due = dt_from_string( scalar $cgi->param('renewonholdduedate'));
101
                    }
102
                    }
102
                    $date_due = AddRenewal( undef, $item->itemnumber(), $branchcode, $date_due );
103
                    $date_due = AddRenewal(
104
                        undef,
105
                        $item->itemnumber(),
106
                        $branchcode,
107
                        $date_due,
108
                        undef,
109
                        !$unseen
110
                    );
103
                    $template->param( date_due => $date_due );
111
                    $template->param( date_due => $date_due );
104
                }
112
                }
105
            }
113
            }
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+12 lines)
Lines 1004-1009 div { Link Here
1004
        width: auto;
1004
        width: auto;
1005
    }
1005
    }
1006
1006
1007
    .renew_formfield {
1008
        margin-bottom: 1em;
1009
    }
1010
1007
    .circmessage {
1011
    .circmessage {
1008
        margin-bottom: .3em;
1012
        margin-bottom: .3em;
1009
        padding: 0 .4em .4em;
1013
        padding: 0 .4em .4em;
Lines 2404-2409 li { Link Here
2404
    position: relative;
2408
    position: relative;
2405
}
2409
}
2406
2410
2411
#renew_as_unseen_label {
2412
    margin-left: 1em;
2413
}
2414
2415
#renew_as_unseen_checkbox {
2416
    margin-right: 1em;
2417
}
2418
2407
#clearscreen {
2419
#clearscreen {
2408
    position: absolute;
2420
    position: absolute;
2409
    right: 0;
2421
    right: 0;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc (+4 lines)
Lines 48-53 Link Here
48
                        [% END %]
48
                        [% END %]
49
                    [% END %]
49
                    [% END %]
50
                    [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
50
                    [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
51
                        [% IF Koha.Preference( 'UnseenRenewals' ) %]
52
                            <label id="renew_as_unseen_label" for="override_limit">Renew as &quot;unseen&quot; if appropriate:</label>
53
                            <input type="checkbox" name="renew_as_unseen" id="renew_as_unseen_checkbox" value="1" />
54
                        [% END %]
51
                        <button class="btn btn-default" id="RenewCheckinChecked"><i class="fa fa-check"></i> Renew or check in selected items</button>
55
                        <button class="btn btn-default" id="RenewCheckinChecked"><i class="fa fa-check"></i> Renew or check in selected items</button>
52
                        <button class="btn btn-default" id="RenewAll"><i class="fa fa-book"></i> Renew all</button>
56
                        <button class="btn btn-default" id="RenewAll"><i class="fa fa-book"></i> Renew all</button>
53
                    [% END %]
57
                    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc (+3 lines)
Lines 11-16 Link Here
11
    var RETURN_CLAIMED_NOTES = _("Notes about return claim");
11
    var RETURN_CLAIMED_NOTES = _("Notes about return claim");
12
    var NOT_CHECKED_OUT = _("not checked out");
12
    var NOT_CHECKED_OUT = _("not checked out");
13
    var TOO_MANY_RENEWALS = _("too many renewals");
13
    var TOO_MANY_RENEWALS = _("too many renewals");
14
    var TOO_MANY_UNSEEN = _("too many consecutive renewals without being seen by the library");
14
    var ON_RESERVE = _("on hold");
15
    var ON_RESERVE = _("on hold");
15
    var REASON_UNKNOWN = _("reason unknown");
16
    var REASON_UNKNOWN = _("reason unknown");
16
    var TODAYS_CHECKOUTS = _("Today's checkouts");
17
    var TODAYS_CHECKOUTS = _("Today's checkouts");
Lines 19-24 Link Here
19
    var ON_HOLD = _("On hold");
20
    var ON_HOLD = _("On hold");
20
    var PLACE_HOLD = _("Place hold");
21
    var PLACE_HOLD = _("Place hold");
21
    var NOT_RENEWABLE = _("Not renewable");
22
    var NOT_RENEWABLE = _("Not renewable");
23
    var NOT_RENEWABLE_UNSEEN = _("Must be renewed at the library");
22
    var NOT_RENEWABLE_TOO_SOON = _("No renewal before %s");
24
    var NOT_RENEWABLE_TOO_SOON = _("No renewal before %s");
23
    var NOT_RENEWABLE_AUTO_TOO_SOON = _("Scheduled for automatic renewal");
25
    var NOT_RENEWABLE_AUTO_TOO_SOON = _("Scheduled for automatic renewal");
24
    var NOT_RENEWABLE_AUTO_TOO_LATE = _("Can no longer be auto-renewed - number of checkout days exceeded");
26
    var NOT_RENEWABLE_AUTO_TOO_LATE = _("Can no longer be auto-renewed - number of checkout days exceeded");
Lines 27-32 Link Here
27
    var NOT_RENEWABLE_AUTO_RENEW = _("Scheduled for automatic renewal");
29
    var NOT_RENEWABLE_AUTO_RENEW = _("Scheduled for automatic renewal");
28
    var NOT_RENEWABLE_DENIED = _("Renewal denied by syspref");
30
    var NOT_RENEWABLE_DENIED = _("Renewal denied by syspref");
29
    var RENEWALS_REMAINING = _("%s of %s renewals remaining");
31
    var RENEWALS_REMAINING = _("%s of %s renewals remaining");
32
    var UNSEEN_REMAINING = _("%s of %s unseen renewals remaining");
30
    var HOLD_IS_SUSPENDED = _("Hold is <strong>suspended</strong>");
33
    var HOLD_IS_SUSPENDED = _("Hold is <strong>suspended</strong>");
31
    var UNTIL = _("until %s");
34
    var UNTIL = _("until %s");
32
    var NEXT_AVAILABLE_ITYPE = _("Next available %s item");
35
    var NEXT_AVAILABLE_ITYPE = _("Next available %s item");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+1 lines)
Lines 1030-1035 Link Here
1030
        var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1030
        var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1031
        var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
1031
        var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
1032
        var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
1032
        var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
1033
        var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]";
1033
        var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
1034
        var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
1034
        var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
1035
        var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
1035
        var interface = "[% interface | html %]";
1036
        var interface = "[% interface | html %]";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-4 / +25 lines)
Lines 52-57 Link Here
52
                                    </form>
52
                                    </form>
53
                                [% END %]
53
                                [% END %]
54
54
55
                            [% ELSIF error == "too_unseen" %]
56
57
                                <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been renewed the maximum number of consecutive times without being seen by the library )</p>
58
59
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
60
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
61
                                        <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
62
                                        <input type="hidden" name="override_limit" value="1" />
63
                                        <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
64
                                    </form>
65
                                [% END %]
66
55
                            [% ELSIF error == "too_soon" %]
67
                            [% ELSIF error == "too_soon" %]
56
68
57
                                <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
69
                                <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
Lines 168-177 Link Here
168
                    <fieldset>
180
                    <fieldset>
169
                        <legend>Renew</legend>
181
                        <legend>Renew</legend>
170
182
171
                        <label for="barcode">Enter item barcode: </label>
183
                        [% IF Koha.Preference('UnseenRenewals') %]
172
184
                            <div class="renew_formfield">
173
                        <input name="barcode" id="barcode" size="14" class="focus" type="text" />
185
                                <label for="barcode">Enter item barcode: </label>
174
186
                                <input name="barcode" id="barcode" size="14" class="focus" type="text" />
187
                            </div>
188
                            <div class="renew_formfield">
189
                                <label for="unseen">Record renewal as unseen if appropriate: </label>
190
                                <input value="1" name="unseen" id="unseen" type="checkbox" />
191
                            </div>
192
                        [% ELSE %]
193
                            <label for="barcode">Enter item barcode: </label>
194
                            <input name="barcode" id="barcode" size="14" class="focus" type="text" />
195
                        [% END %]
175
                        <input type="submit" class="submit" value="Submit" />
196
                        <input type="submit" class="submit" value="Submit" />
176
                    </fieldset>
197
                    </fieldset>
177
198
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+1 lines)
Lines 859-864 Link Here
859
        var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
859
        var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
860
        var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
860
        var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
861
        var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
861
        var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
862
        var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]";
862
        var interface = "[% interface | html %]";
863
        var interface = "[% interface | html %]";
863
        var theme = "[% theme | html %]";
864
        var theme = "[% theme | html %]";
864
        var borrowernumber = "[% patron.borrowernumber | html %]";
865
        var borrowernumber = "[% patron.borrowernumber | html %]";
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-4 / +22 lines)
Lines 143-151 $(document).ready(function() { Link Here
143
                itemnumber:      itemnumber,
143
                itemnumber:      itemnumber,
144
                borrowernumber:  borrowernumber,
144
                borrowernumber:  borrowernumber,
145
                branchcode:      branchcode,
145
                branchcode:      branchcode,
146
                override_limit:  override_limit,
146
                override_limit:  override_limit
147
            };
147
            };
148
148
149
            if (UnseenRenewals) {
150
                var ren = $("#renew_as_unseen_checkbox");
151
                var renew_unseen = ren.length > 0 && ren.is(':checked') ? 1 : 0;
152
                params.seen = renew_unseen === 1 ? 0 : 1;
153
            }
154
149
            // Determine which due date we need to use
155
            // Determine which due date we need to use
150
            var dueDate = isOnReserve ?
156
            var dueDate = isOnReserve ?
151
                $("#newonholdduedate input").val() :
157
                $("#newonholdduedate input").val() :
Lines 168-173 $(document).ready(function() { Link Here
168
                        content += NOT_CHECKED_OUT;
174
                        content += NOT_CHECKED_OUT;
169
                    } else if ( data.error == "too_many" ) {
175
                    } else if ( data.error == "too_many" ) {
170
                        content += TOO_MANY_RENEWALS;
176
                        content += TOO_MANY_RENEWALS;
177
                    } else if ( data.error == "too_unseen" ) {
178
                        content += TOO_MANY_UNSEEN;
171
                    } else if ( data.error == "on_reserve" ) {
179
                    } else if ( data.error == "on_reserve" ) {
172
                        content += ON_RESERVE;
180
                        content += ON_RESERVE;
173
                    } else if ( data.error == "restriction" ) {
181
                    } else if ( data.error == "restriction" ) {
Lines 432-437 $(document).ready(function() { Link Here
432
440
433
                            span_style = "display: none";
441
                            span_style = "display: none";
434
                            span_class = "renewals-allowed";
442
                            span_class = "renewals-allowed";
443
                        } else if ( oObj.can_renew_error == "too_unseen" ) {
444
                            msg += "<span class='renewals-disabled'>"
445
                                    + NOT_RENEWABLE_UNSEEN
446
                                    + "</span>";
447
448
                            span_style = "display: none";
449
                            span_class = "renewals-allowed";
435
                        } else if ( oObj.can_renew_error == "restriction" ) {
450
                        } else if ( oObj.can_renew_error == "restriction" ) {
436
                            msg += "<span class='renewals-disabled'>"
451
                            msg += "<span class='renewals-disabled'>"
437
                                    + NOT_RENEWABLE_RESTRICTION
452
                                    + NOT_RENEWABLE_RESTRICTION
Lines 526-534 $(document).ready(function() { Link Here
526
                        }
541
                        }
527
                        content += msg;
542
                        content += msg;
528
                        if ( can_renew || can_force_renew ) {
543
                        if ( can_renew || can_force_renew ) {
529
                            content += "<span class='renewals'>("
544
                            content += "<span class='renewals'>(";
530
                                    + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
545
                            content += RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed );
531
                                    + ")</span>";
546
                            if (UnseenRenewals && oObj.unseen_allowed) {
547
                                content += " / " + UNSEEN_REMAINING.format( oObj.unseen_remaining, oObj.unseen_allowed );
548
                            }
549
                            content += ")</span>";
532
                        }
550
                        }
533
551
534
                        content += "</span>";
552
                        content += "</span>";
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-6 / +40 lines)
Lines 81-86 Link Here
81
                                            <li>Your account has expired. Please contact the library for more information.</li>
81
                                            <li>Your account has expired. Please contact the library for more information.</li>
82
                                        [% ELSIF error == 'too_many' %]
82
                                        [% ELSIF error == 'too_many' %]
83
                                            <li>You have renewed this item the maximum number of times allowed.</li>
83
                                            <li>You have renewed this item the maximum number of times allowed.</li>
84
                                        [% ELSIF error == 'too_unseen' %]
85
                                            <li>You have renewed this item the maximum number of consecutive times without it being seen by the library.</li>
84
                                        [% ELSIF error == 'too_soon' %]
86
                                        [% ELSIF error == 'too_soon' %]
85
                                            <li>It is too soon after the checkout date for this item to be renewed.</li>
87
                                            <li>It is too soon after the checkout date for this item to be renewed.</li>
86
                                        [% ELSIF error == 'on_reserve' %]
88
                                        [% ELSIF error == 'on_reserve' %]
Lines 309-335 Link Here
309
                                                        [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
311
                                                        [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
310
                                                            <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
312
                                                            <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
311
                                                        [% END %]
313
                                                        [% END %]
312
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
314
                                                        <span class="renewals">(
315
                                                            [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
316
                                                            [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
317
                                                                / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
318
                                                            [% END %]
319
                                                        )</span>
313
                                                    [% ELSIF ( ISSUE.on_reserve ) %]
320
                                                    [% ELSIF ( ISSUE.on_reserve ) %]
314
                                                        Not renewable <span class="renewals">(on hold)</span>
321
                                                        Not renewable <span class="renewals">(on hold)</span>
315
                                                    [% ELSIF ( ISSUE.too_many ) %]
322
                                                    [% ELSIF ( ISSUE.too_many ) %]
316
                                                        Not renewable
323
                                                        Not renewable
324
                                                    [% ELSIF ( ISSUE.too_unseen ) %]
325
                                                        Item must be seen by the library
317
                                                    [% ELSIF ( ISSUE.norenew_overdue ) %]
326
                                                    [% ELSIF ( ISSUE.norenew_overdue ) %]
318
                                                        Not allowed <span class="renewals">(overdue)</span>
327
                                                        Not allowed <span class="renewals">(overdue)</span>
319
                                                    [% ELSIF ( ISSUE.auto_too_late ) %]
328
                                                    [% ELSIF ( ISSUE.auto_too_late ) %]
320
                                                        No longer renewable
329
                                                        No longer renewable
321
                                                    [% ELSIF ISSUE.auto_too_much_oweing %]
330
                                                    [% ELSIF ISSUE.auto_too_much_oweing %]
322
                                                        Automatic renewal failed, you have unpaid fines.
331
                                                        Automatic renewal failed, you have unpaid fines.
323
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
332
                                                        <span class="renewals">(
333
                                                            [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
334
                                                            [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
335
                                                                / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
336
                                                            [% END %]
337
                                                        )</span>
324
                                                    [% ELSIF ISSUE.auto_account_expired %]
338
                                                    [% ELSIF ISSUE.auto_account_expired %]
325
                                                        Automatic renewal failed, your account is expired.
339
                                                        Automatic renewal failed, your account is expired.
326
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
340
                                                        <span class="renewals">(
341
                                                            [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
342
                                                            [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
343
                                                                / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
344
                                                            [% END %]
345
                                                        )</span>
327
                                                    [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
346
                                                    [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
328
                                                        Automatic renewal
347
                                                        Automatic renewal
329
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
348
                                                        <span class="renewals">(
349
                                                            [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
350
                                                            [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
351
                                                                / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
352
                                                            [% END %]
353
                                                        )</span>
330
                                                    [% ELSIF ( ISSUE.too_soon ) %]
354
                                                    [% ELSIF ( ISSUE.too_soon ) %]
331
                                                        No renewal before [% ISSUE.soonestrenewdate | html %]
355
                                                        No renewal before [% ISSUE.soonestrenewdate | html %]
332
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
356
                                                        <span class="renewals">(
357
                                                            [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
358
                                                            [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
359
                                                                / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
360
                                                            [% END %]
361
                                                        )</span>
333
                                                    [% ELSIF ( ISSUE.item_denied_renewal ) %]
362
                                                    [% ELSIF ( ISSUE.item_denied_renewal ) %]
334
                                                        Renewal not allowed
363
                                                        Renewal not allowed
335
                                                    [% END %]
364
                                                    [% END %]
Lines 582-588 Link Here
582
                                                            [% IF ( canrenew ) %]
611
                                                            [% IF ( canrenew ) %]
583
                                                                <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber | uri %]&amp;bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
612
                                                                <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber | uri %]&amp;bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
584
                                                            [% END %]
613
                                                            [% END %]
585
                                                                <span class="renewals">([% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining)</span>
614
                                                                <span class="renewals">(
615
                                                                    [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining
616
                                                                    [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
617
                                                                        / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library
618
                                                                    [% END %]
619
                                                                )</span>
586
                                                        [% ELSIF ( OVERDUE.norenew_overdue ) %]
620
                                                        [% ELSIF ( OVERDUE.norenew_overdue ) %]
587
                                                            Not allowed<span class="renewals">(overdue)</span>
621
                                                            Not allowed<span class="renewals">(overdue)</span>
588
                                                        [% ELSIF ( OVERDUE.onreserve ) %]
622
                                                        [% ELSIF ( OVERDUE.onreserve ) %]
(-)a/misc/cronjobs/automatic_renewals.pl (-1 / +1 lines)
Lines 78-84 while ( my $auto_renew = $auto_renews->next ) { Link Here
78
    # CanBookBeRenewed returns 'auto_renew' when the renewal should be done by this script
78
    # CanBookBeRenewed returns 'auto_renew' when the renewal should be done by this script
79
    my ( $ok, $error ) = CanBookBeRenewed( $auto_renew->borrowernumber, $auto_renew->itemnumber );
79
    my ( $ok, $error ) = CanBookBeRenewed( $auto_renew->borrowernumber, $auto_renew->itemnumber );
80
    if ( $error eq 'auto_renew' ) {
80
    if ( $error eq 'auto_renew' ) {
81
        my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode );
81
        my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode, undef, undef, 0 );
82
        $auto_renew->auto_renew_error(undef)->store;
82
        $auto_renew->auto_renew_error(undef)->store;
83
        push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew;
83
        push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew;
84
    } elsif ( $error eq 'too_many'
84
    } elsif ( $error eq 'too_many'
(-)a/offline_circ/download.pl (+1 lines)
Lines 68-73 my $issues_query = q{SELECT Link Here
68
    issues.date_due AS date_due,
68
    issues.date_due AS date_due,
69
    issues.issuedate AS issuedate,
69
    issues.issuedate AS issuedate,
70
    issues.renewals AS renewals,
70
    issues.renewals AS renewals,
71
    issues.unseen_renewals AS unseen_renewals,
71
    borrowers.cardnumber AS cardnumber,
72
    borrowers.cardnumber AS cardnumber,
72
    CONCAT(borrowers.surname, ', ', borrowers.firstname) AS borrower_name
73
    CONCAT(borrowers.surname, ', ', borrowers.firstname) AS borrower_name
73
    FROM issues
74
    FROM issues
(-)a/opac/opac-renew.pl (-1 / +1 lines)
Lines 82-88 else { Link Here
82
            else {
82
            else {
83
                $branchcode = 'OPACRenew';
83
                $branchcode = 'OPACRenew';
84
            }
84
            }
85
            AddRenewal( $borrowernumber, $itemnumber, $branchcode, undef, undef );
85
            AddRenewal( $borrowernumber, $itemnumber, $branchcode, undef, undef, 0 );
86
            push( @renewed, $itemnumber );
86
            push( @renewed, $itemnumber );
87
        }
87
        }
88
        else {
88
        else {
(-)a/opac/opac-user.pl (-1 / +9 lines)
Lines 209-215 if ( $pending_checkouts->count ) { # Useless test Link Here
209
209
210
        # check if item is renewable
210
        # check if item is renewable
211
        my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
211
        my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
212
        ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
212
        (
213
            $issue->{'renewcount'},
214
            $issue->{'renewsallowed'},
215
            $issue->{'renewsleft'},
216
            $issue->{'unseencount'},
217
            $issue->{'unseenallowed'},
218
            $issue->{'unseenleft'}
219
        ) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
213
        ( $issue->{'renewalfee'}, $issue->{'renewalitemtype'} ) = GetIssuingCharges( $issue->{'itemnumber'}, $borrowernumber );
220
        ( $issue->{'renewalfee'}, $issue->{'renewalitemtype'} ) = GetIssuingCharges( $issue->{'itemnumber'}, $borrowernumber );
214
        $issue->{itemtype_object} = Koha::ItemTypes->find( Koha::Items->find( $issue->{itemnumber} )->effective_itemtype );
221
        $issue->{itemtype_object} = Koha::ItemTypes->find( Koha::Items->find( $issue->{itemnumber} )->effective_itemtype );
215
        if($status && C4::Context->preference("OpacRenewalAllowed")){
222
        if($status && C4::Context->preference("OpacRenewalAllowed")){
Lines 220-225 if ( $pending_checkouts->count ) { # Useless test Link Here
220
227
221
        if ($renewerror) {
228
        if ($renewerror) {
222
            $issue->{'too_many'}       = 1 if $renewerror eq 'too_many';
229
            $issue->{'too_many'}       = 1 if $renewerror eq 'too_many';
230
            $issue->{'too_unseen'}     = 1 if $renewerror eq 'too_unseen';
223
            $issue->{'on_reserve'}     = 1 if $renewerror eq 'on_reserve';
231
            $issue->{'on_reserve'}     = 1 if $renewerror eq 'on_reserve';
224
            $issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue';
232
            $issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue';
225
            $issue->{'auto_renew'}     = 1 if $renewerror eq 'auto_renew';
233
            $issue->{'auto_renew'}     = 1 if $renewerror eq 'auto_renew';
(-)a/svc/checkouts (-1 / +11 lines)
Lines 158-164 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
158
      )
158
      )
159
      : undef;
159
      : undef;
160
160
161
    my ( $renewals_count, $renewals_allowed, $renewals_remaining ) =
161
    my (
162
        $renewals_count,
163
        $renewals_allowed,
164
        $renewals_remaining,
165
        $unseen_count,
166
        $unseen_allowed,
167
        $unseen_remaining
168
    ) =
162
      GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} );
169
      GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} );
163
170
164
    my $type_for_stat = Koha::ItemTypes->find( $item_level_itypes ? $c->{itype} : $c->{itemtype} );
171
    my $type_for_stat = Koha::ItemTypes->find( $item_level_itypes ? $c->{itype} : $c->{itemtype} );
Lines 225-230 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
225
        renewals_count      => $renewals_count,
232
        renewals_count      => $renewals_count,
226
        renewals_allowed    => $renewals_allowed,
233
        renewals_allowed    => $renewals_allowed,
227
        renewals_remaining  => $renewals_remaining,
234
        renewals_remaining  => $renewals_remaining,
235
        unseen_count        => $unseen_count,
236
        unseen_allowed      => $unseen_allowed,
237
        unseen_remaining    => $unseen_remaining,
228
238
229
        return_claim_id         => $c->{return_claim_id},
239
        return_claim_id         => $c->{return_claim_id},
230
        return_claim_notes      => $c->{return_claim_notes},
240
        return_claim_notes      => $c->{return_claim_notes},
(-)a/svc/renew (-2 / +2 lines)
Lines 46-51 my $borrowernumber = $input->param('borrowernumber'); Link Here
46
my $override_limit = $input->param('override_limit');
46
my $override_limit = $input->param('override_limit');
47
my $branchcode     = $input->param('branchcode')
47
my $branchcode     = $input->param('branchcode')
48
  || C4::Context->userenv->{'branch'};
48
  || C4::Context->userenv->{'branch'};
49
my $seen           = $input->param('seen');
49
my $date_due;
50
my $date_due;
50
if ( $input->param('date_due') ) {
51
if ( $input->param('date_due') ) {
51
    $date_due = dt_from_string( scalar $input->param('date_due') );
52
    $date_due = dt_from_string( scalar $input->param('date_due') );
Lines 66-72 if ( $data->{error} && $data->{error} eq 'on_reserve' && C4::Context->preference Link Here
66
}
67
}
67
68
68
if ( $data->{renew_okay} ) {
69
if ( $data->{renew_okay} ) {
69
    $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due );
70
    $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due, undef, $seen );
70
    $data->{date_due} = output_pref( { dt => $date_due, as_due_date => 1 } );
71
    $data->{date_due} = output_pref( { dt => $date_due, as_due_date => 1 } );
71
}
72
}
72
73
73
- 

Return to bug 24083