Lines 27-33
use JSON qw(to_json);
Link Here
|
27 |
|
27 |
|
28 |
use C4::Auth qw(check_cookie_auth); |
28 |
use C4::Auth qw(check_cookie_auth); |
29 |
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue ); |
29 |
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue ); |
30 |
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount); |
30 |
use C4::Circulation |
|
|
31 |
qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate); |
31 |
use C4::Context; |
32 |
use C4::Context; |
32 |
|
33 |
|
33 |
use Koha::DateUtils; |
34 |
use Koha::DateUtils; |
Lines 116-121
while ( my $c = $sth->fetchrow_hashref() ) {
Link Here
|
116 |
|
117 |
|
117 |
my ( $can_renew, $can_renew_error ) = |
118 |
my ( $can_renew, $can_renew_error ) = |
118 |
CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); |
119 |
CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); |
|
|
120 |
my $can_renew_date = |
121 |
$can_renew_error eq 'too_soon' |
122 |
? output_pref( |
123 |
{ |
124 |
dt => GetSoonestRenewDate( $c->{borrowernumber}, $c->{itemnumber} ), |
125 |
as_due_date => 1 |
126 |
} |
127 |
) |
128 |
: undef; |
119 |
|
129 |
|
120 |
my ( $renewals_count, $renewals_allowed, $renewals_remaining ) = |
130 |
my ( $renewals_count, $renewals_allowed, $renewals_remaining ) = |
121 |
GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} ); |
131 |
GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} ); |
Lines 134-139
while ( my $c = $sth->fetchrow_hashref() ) {
Link Here
|
134 |
price => $c->{replacementprice} || q{}, |
144 |
price => $c->{replacementprice} || q{}, |
135 |
can_renew => $can_renew, |
145 |
can_renew => $can_renew, |
136 |
can_renew_error => $can_renew_error, |
146 |
can_renew_error => $can_renew_error, |
|
|
147 |
can_renew_date => $can_renew_date, |
137 |
itemnumber => $c->{itemnumber}, |
148 |
itemnumber => $c->{itemnumber}, |
138 |
borrowernumber => $c->{borrowernumber}, |
149 |
borrowernumber => $c->{borrowernumber}, |
139 |
biblionumber => $c->{biblionumber}, |
150 |
biblionumber => $c->{biblionumber}, |
140 |
- |
|
|