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