Lines 248-271
if ($borrower) {
Link Here
|
248 |
# warn "issuer's branchcode: " . $issuer->{branchcode}; |
248 |
# warn "issuer's branchcode: " . $issuer->{branchcode}; |
249 |
# warn "user's branchcode: " . $borrower->{branchcode}; |
249 |
# warn "user's branchcode: " . $borrower->{branchcode}; |
250 |
my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || ''); |
250 |
my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || ''); |
251 |
my @issues; |
251 |
my $pending_checkouts = $patron->pending_checkouts; |
252 |
my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} ); |
252 |
my @checkouts; |
253 |
foreach my $it (@$issueslist) { |
253 |
while ( my $c = $pending_checkouts->next ) { |
|
|
254 |
my $checkout = $c->unblessed_all_relateds; |
254 |
my ($can_be_renewed, $renew_error) = CanBookBeRenewed( |
255 |
my ($can_be_renewed, $renew_error) = CanBookBeRenewed( |
255 |
$borrower->{borrowernumber}, |
256 |
$borrower->{borrowernumber}, |
256 |
$it->{itemnumber}, |
257 |
$checkout->{itemnumber}, |
257 |
); |
258 |
); |
258 |
$it->{can_be_renewed} = $can_be_renewed; |
259 |
$checkout->{can_be_renewed} = $can_be_renewed; # In the future this will be $checkout->can_be_renewed |
259 |
$it->{renew_error} = $renew_error; |
260 |
$checkout->{renew_error} = $renew_error; |
260 |
$it->{date_due} = $it->{date_due_sql}; |
261 |
$checkout->{overdue} = $c->is_overdue; |
261 |
push @issues, $it; |
262 |
push @checkouts, $checkout; |
262 |
} |
263 |
} |
263 |
|
264 |
|
264 |
$template->param( |
265 |
$template->param( |
265 |
validuser => 1, |
266 |
validuser => 1, |
266 |
borrowername => $borrowername, |
267 |
borrowername => $borrowername, |
267 |
issues_count => scalar(@issues), |
268 |
issues_count => scalar(@checkouts), |
268 |
ISSUES => \@issues, |
269 |
ISSUES => \@checkouts, |
269 |
patronid => $patronid, |
270 |
patronid => $patronid, |
270 |
patronlogin => $patronlogin, |
271 |
patronlogin => $patronlogin, |
271 |
patronpw => $patronpw, |
272 |
patronpw => $patronpw, |
272 |
- |
|
|